2016-09-28 16:21:47 -07:00
|
|
|
# Common Ambient Variables:
|
2017-03-13 03:39:46 +03:00
|
|
|
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
|
|
|
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
2017-06-15 08:30:22 +09:00
|
|
|
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
2017-03-13 03:39:46 +03:00
|
|
|
# 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)
|
2016-09-28 16:21:47 -07:00
|
|
|
#
|
|
|
|
|
2016-09-18 20:50:08 -07:00
|
|
|
include(vcpkg_common_functions)
|
2019-02-15 14:32:07 -08:00
|
|
|
|
2016-09-18 20:50:08 -07:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2016-09-25 14:46:43 +02:00
|
|
|
URLS "@URL@"
|
2016-09-18 20:50:08 -07:00
|
|
|
FILENAME "@FILENAME@"
|
2016-09-22 21:30:58 +02:00
|
|
|
SHA512 @SHA512@
|
2016-09-18 20:50:08 -07:00
|
|
|
)
|
2019-02-15 14:32:07 -08:00
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
# (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag).
|
|
|
|
# REF 1.0.0
|
|
|
|
# (Optional) Read the docs for how to generate patches at:
|
|
|
|
# https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md
|
|
|
|
# PATCHES
|
|
|
|
# 001_port_fixes.patch
|
|
|
|
# 002_more_port_fixes.patch
|
|
|
|
)
|
2016-09-18 20:50:08 -07:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-10-05 16:59:59 -07:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-02-03 17:16:13 +01:00
|
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
2016-09-18 20:50:08 -07:00
|
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
# Handle copyright
|
2017-07-27 20:21:15 -07:00
|
|
|
# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright)
|
2018-08-31 09:07:14 +09:00
|
|
|
|
|
|
|
# Post-build test for cmake libraries
|
|
|
|
# vcpkg_test_cmake(PACKAGE_NAME @PORT@)
|