From 8e77d829f017652e15faee0a55b610a0159edd55 Mon Sep 17 00:00:00 2001 From: Shinya Onogi Date: Mon, 20 Mar 2017 02:37:58 +0900 Subject: [PATCH] Added: Selection of library linkage type Selection of library linkage type is added --- ports/gdcm2/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 851da6172f8..32f2f6f3aa8 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -10,6 +10,11 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/gdcm-include-dir.patch" ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(GDCM_BUILD_SHARED_LIBS ON) +else() + set(GDCM_BUILD_SHARED_LIBS OFF) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} # PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -17,7 +22,7 @@ vcpkg_configure_cmake( -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF -DGDCM_BUILD_SHARED_LIBS=ON -DGDCM_USE_SYSTEM_EXPAT=ON - -DGDCM_USE_SYSTEM_ZLIB=ON + -DGDCM_USE_SYSTEM_ZLIB=${GDCM_BUILD_SHARED_LIBS} ${ADDITIONAL_OPTIONS} )