aboutsummaryrefslogtreecommitdiff
path: root/ports/corrade
diff options
context:
space:
mode:
Diffstat (limited to 'ports/corrade')
-rw-r--r--ports/corrade/portfile.cmake16
-rw-r--r--ports/corrade/vcpkg.json2
2 files changed, 8 insertions, 10 deletions
diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake
index 06615bf11..187374a6d 100644
--- a/ports/corrade/portfile.cmake
+++ b/ports/corrade/portfile.cmake
@@ -10,28 +10,27 @@ vcpkg_from_github(
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
# Handle features
-set(_COMPONENT_FLAGS "")
+set(_COMPONENTS "")
foreach(_feature IN LISTS ALL_FEATURES)
# Uppercase the feature name and replace "-" with "_"
string(TOUPPER "${_feature}" _FEATURE)
string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
- # Turn "-DWITH_*=" ON or OFF depending on whether the feature
- # is in the list.
- if(_feature IN_LIST FEATURES)
- list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON")
- else()
- list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF")
+ # Final feature is empty, ignore it
+ if(_feature)
+ list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE})
endif()
endforeach()
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS})
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS
+ ${FEATURE_OPTIONS}
-DUTILITY_USE_ANSI_COLORS=ON
-DBUILD_STATIC=${BUILD_STATIC}
- ${_COMPONENT_FLAGS}
)
vcpkg_install_cmake()
@@ -68,5 +67,4 @@ file(INSTALL ${SOURCE_PATH}/COPYING
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright)
-
vcpkg_copy_pdbs()
diff --git a/ports/corrade/vcpkg.json b/ports/corrade/vcpkg.json
index 3f738261d..83940abbc 100644
--- a/ports/corrade/vcpkg.json
+++ b/ports/corrade/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "corrade",
"version-string": "2020.06",
- "port-version": 1,
+ "port-version": 2,
"description": "C++11/C++14 multiplatform utility library.",
"homepage": "https://magnum.graphics/corrade/",
"default-features": [