aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/jsoncpp/portfile.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/ports/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake
index 68dfcc42a..f4b89adca 100644
--- a/ports/jsoncpp/portfile.cmake
+++ b/ports/jsoncpp/portfile.cmake
@@ -7,11 +7,19 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(JSONCPP_STATIC OFF)
+ set(JSONCPP_DYNAMIC ON)
+else()
+ set(JSONCPP_STATIC ON)
+ set(JSONCPP_DYNAMIC OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
- -DBUILD_STATIC_LIBS:BOOL=OFF
- -DBUILD_SHARED_LIBS:BOOL=ON
+ -DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC}
+ -DBUILD_SHARED_LIBS:BOOL=${JSONCPP_DYNAMIC}
)
vcpkg_install_cmake()