Skip to content

Commit

Permalink
[magnum-extras] Fix build without features
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Feb 24, 2018
1 parent ca7f50e commit 9bf1809
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ports/magnum-extras/CONTROL
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
10 changes: 7 additions & 3 deletions ports/magnum-extras/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9bf1809

Please sign in to comment.