[magnum-extras] Fix build without features

This commit is contained in:
Robert Schumacher 2018-02-24 02:27:48 -08:00
parent ca7f50e598
commit 9bf1809e28
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
Source: magnum-extras
Version: 2018.02-1
Version: 2018.02-2
Build-Depends: magnum
Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/
Default-Features:

View File

@ -41,26 +41,30 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/MagnumExtras)
# Messages to the user
if("ui" IN_LIST FEATURES)
message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box")
endif()
# Debug includes and share are the same as release
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share)
# Clean up empty directories
if(NOT FEATURES)
if("${FEATURES}" STREQUAL "")
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/bin
${CURRENT_PACKAGES_DIR}/lib
${CURRENT_PACKAGES_DIR}/debug)
${CURRENT_PACKAGES_DIR}/debug
)
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()