mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 07:38:59 +08:00
[magnum][magnum-plugins] Fixed plugins location, static plugins build
Static libray linkage should work now, including plugins.
This commit is contained in:
parent
7b9275f1b3
commit
bffa100a43
@ -1,4 +1,4 @@
|
||||
Source: magnum-plugins
|
||||
Version: jun2017-3
|
||||
Version: jun2017-4
|
||||
Build-Depends: stb, magnum
|
||||
Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
|
||||
|
@ -15,8 +15,10 @@ vcpkg_apply_patches(
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(BUILD_STATIC 1)
|
||||
set(BUILD_PLUGINS_STATIC 1)
|
||||
else()
|
||||
set(BUILD_STATIC 0)
|
||||
set(BUILD_PLUGINS_STATIC 0)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -36,6 +38,9 @@ vcpkg_configure_cmake(
|
||||
-DWITH_ANYIMAGECONVERTER=ON
|
||||
-DWITH_ANYSCENEIMPORTER=ON
|
||||
-DBUILD_STATIC=${BUILD_STATIC}
|
||||
-DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC}
|
||||
-DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d
|
||||
-DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -46,6 +51,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
# move plugin libs to conventional place
|
||||
file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*)
|
||||
file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum)
|
||||
file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*)
|
||||
file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum)
|
||||
else()
|
||||
# remove headers and libs for plugins
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
# hint vcpkg
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: magnum
|
||||
Version: jun2017-4
|
||||
Version: jun2017-5
|
||||
Build-Depends: corrade, sdl2, openal-soft
|
||||
Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
|
||||
|
@ -16,8 +16,10 @@ vcpkg_apply_patches(
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(BUILD_STATIC 1)
|
||||
set(BUILD_PLUGINS_STATIC 1)
|
||||
else()
|
||||
set(BUILD_STATIC 0)
|
||||
set(BUILD_PLUGINS_STATIC 0)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -38,6 +40,7 @@ vcpkg_configure_cmake(
|
||||
-DWITH_FONTCONVERTER=ON
|
||||
-DWITH_TGAIMAGECONVERTER=ON
|
||||
-DBUILD_STATIC=${BUILD_STATIC}
|
||||
-DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC}
|
||||
-DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d
|
||||
-DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum
|
||||
--trace
|
||||
@ -64,6 +67,18 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
# move plugin libs to conventional place
|
||||
file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*)
|
||||
file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum)
|
||||
file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*)
|
||||
file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum)
|
||||
else()
|
||||
# remove headers and libs for plugins
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
|
Loading…
Reference in New Issue
Block a user