[exiv2] Fix static builds. [gts] Add early detection for CRT linkage.

This commit is contained in:
Robert Schumacher 2018-02-23 22:32:02 -08:00
parent fee4acc543
commit 51f6cf724c
3 changed files with 21 additions and 21 deletions

View File

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

View File

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

View File

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