mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-23 23:49:06 +08:00
Change VCPKG_BUILD_SHARED_LIBS to VCPKG_LIBRARY_LINKAGE with values
dynamic or static
This commit is contained in:
parent
1a95b4a0ec
commit
50fb104f6a
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user