aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-16 13:13:08 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-16 13:13:08 -0800
commit4953992865d70341fe31dfbcc2a8a3453aedbb42 (patch)
tree022aca8761094c772f26da468dabc4296c502db8
parenta451768429d560cf42a98cc4d03feccf4329ea96 (diff)
downloadvcpkg-4953992865d70341fe31dfbcc2a8a3453aedbb42.tar.gz
vcpkg-4953992865d70341fe31dfbcc2a8a3453aedbb42.zip
[jsoncpp] Enable static linking
-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()