aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-02-23 22:32:02 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-02-23 22:32:02 -0800
commit51f6cf724c7534397bf13cf58fb9842ffde9c7ca (patch)
tree09692cd5205dbe13db6f75ba4263f9e7ea0a7ad8
parentfee4acc543e3801eed474495061875d0484e0bd3 (diff)
downloadvcpkg-51f6cf724c7534397bf13cf58fb9842ffde9c7ca.tar.gz
vcpkg-51f6cf724c7534397bf13cf58fb9842ffde9c7ca.zip
[exiv2] Fix static builds. [gts] Add early detection for CRT linkage.
-rw-r--r--ports/exiv2/CONTROL4
-rw-r--r--ports/exiv2/portfile.cmake5
-rw-r--r--ports/gts/portfile.cmake33
3 files changed, 21 insertions, 21 deletions
diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL
index 15d24a868..eb5e4c39a 100644
--- a/ports/exiv2/CONTROL
+++ b/ports/exiv2/CONTROL
@@ -1,4 +1,4 @@
Source: exiv2
-Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99
-Build-Depends:zlib, expat
+Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-1
+Build-Depends: zlib, expat
Description: Image metadata library and tools http://www.exiv2.org
diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake
index fb44d3e94..93d16690c 100644
--- a/ports/exiv2/portfile.cmake
+++ b/ports/exiv2/portfile.cmake
@@ -10,6 +10,7 @@ vcpkg_from_github(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
)
vcpkg_install_cmake()
@@ -26,6 +27,10 @@ file(REMOVE ${DEBUG_EXE})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
# Handle copyright
file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright)
diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake
index d55f5dc66..14a5e2bfa 100644
--- a/ports/gts/portfile.cmake
+++ b/ports/gts/portfile.cmake
@@ -1,29 +1,24 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ message("gts does not support building statically -- building dynamically instead")
+ set(VCPKG_LIBRARY_LINKAGE "dynamic")
+endif()
+
+if(VCPKG_CRT_LINKAGE STREQUAL "static")
+ message("gts can only be built dynamically, and therefore cannot static link the CRT")
+endif()
include(vcpkg_common_functions)
-vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
- REPO "finetjul/gts"
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO finetjul/gts
REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b
- HEAD_REF master
SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9
+ HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA # Disable this option if project cannot be built with Ninja
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ PREFER_NINJA
)
vcpkg_install_cmake()
@@ -33,4 +28,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gts RENAME copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()