Change VCPKG_BUILD_SHARED_LIBS to VCPKG_LIBRARY_LINKAGE with values

dynamic or static
This commit is contained in:
Alexander Karatarakis 2016-10-07 16:34:31 -07:00
parent 1a95b4a0ec
commit 50fb104f6a
10 changed files with 12 additions and 12 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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")

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -1,3 +1,3 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_BUILD_SHARED_LIBS OFF)
set(VCPKG_LIBRARY_LINKAGE static)

View File

@ -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)