Skip to content

Commit

Permalink
Change VCPKG_BUILD_SHARED_LIBS to VCPKG_LIBRARY_LINKAGE with values
Browse files Browse the repository at this point in the history
dynamic or static
  • Loading branch information
alexkaratarakis committed Oct 7, 2016
1 parent 1a95b4a commit 50fb104
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ports/libpng/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ports/zlib/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions scripts/cmake/vcpkg_configure_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion triplets/arm-uwp.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion triplets/x64-uwp.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion triplets/x64-windows-static.cmake
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion triplets/x64-windows.cmake
Original file line number Diff line number Diff line change
@@ -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)

2 changes: 1 addition & 1 deletion triplets/x86-uwp.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion triplets/x86-windows-static.cmake
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion triplets/x86-windows.cmake
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 50fb104

Please sign in to comment.