diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 45e8d07d24..3b67685608 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" ) -if(VCPKG_BUILD_SHARED_LIBS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(PNG_STATIC_LIBS OFF) set(PNG_SHARED_LIBS ON) else() @@ -36,7 +36,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(VCPKG_BUILD_SHARED_LIBS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) vcpkg_copy_pdbs() else() file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index f87c87a351..ef42536dc5 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(VCPKG_BUILD_SHARED_LIBS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib) vcpkg_copy_pdbs() else() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index ec04a0d2f9..954c75b82f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -28,8 +28,8 @@ function(vcpkg_configure_cmake) if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}) endif() - if(DEFINED VCPKG_BUILD_SHARED_LIBS) - list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS}) + if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) endif() message(STATUS "Configuring ${TARGET_TRIPLET}-rel") diff --git a/triplets/arm-uwp.cmake b/triplets/arm-uwp.cmake index 57af878813..678643eb14 100644 --- a/triplets/arm-uwp.cmake +++ b/triplets/arm-uwp.cmake @@ -1,6 +1,6 @@ set(VCPKG_TARGET_ARCHITECTURE arm) set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_BUILD_SHARED_LIBS ON) +set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) diff --git a/triplets/x64-uwp.cmake b/triplets/x64-uwp.cmake index 1b5dd34df7..ca6455fc80 100644 --- a/triplets/x64-uwp.cmake +++ b/triplets/x64-uwp.cmake @@ -1,6 +1,6 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_BUILD_SHARED_LIBS ON) +set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) diff --git a/triplets/x64-windows-static.cmake b/triplets/x64-windows-static.cmake index 79e1a8d11a..75f9b95325 100644 --- a/triplets/x64-windows-static.cmake +++ b/triplets/x64-windows-static.cmake @@ -1,3 +1,3 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE static) -set(VCPKG_BUILD_SHARED_LIBS OFF) +set(VCPKG_LIBRARY_LINKAGE static) diff --git a/triplets/x64-windows.cmake b/triplets/x64-windows.cmake index 1f8d2c9574..d0be7297f0 100644 --- a/triplets/x64-windows.cmake +++ b/triplets/x64-windows.cmake @@ -1,4 +1,4 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_BUILD_SHARED_LIBS ON) +set(VCPKG_LIBRARY_LINKAGE dynamic) diff --git a/triplets/x86-uwp.cmake b/triplets/x86-uwp.cmake index 5a2927a4df..7e2d4d2c0f 100644 --- a/triplets/x86-uwp.cmake +++ b/triplets/x86-uwp.cmake @@ -1,6 +1,6 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_BUILD_SHARED_LIBS ON) +set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) diff --git a/triplets/x86-windows-static.cmake b/triplets/x86-windows-static.cmake index 6697dea455..c855f0caa0 100644 --- a/triplets/x86-windows-static.cmake +++ b/triplets/x86-windows-static.cmake @@ -1,3 +1,3 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE static) -set(VCPKG_BUILD_SHARED_LIBS OFF) \ No newline at end of file +set(VCPKG_LIBRARY_LINKAGE static) \ No newline at end of file diff --git a/triplets/x86-windows.cmake b/triplets/x86-windows.cmake index 08a232739d..40ccbe152d 100644 --- a/triplets/x86-windows.cmake +++ b/triplets/x86-windows.cmake @@ -1,3 +1,3 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_BUILD_SHARED_LIBS ON) +set(VCPKG_LIBRARY_LINKAGE dynamic)