vcpkg/scripts/templates/portfile.in.cmake

78 lines
3.2 KiB
CMake
Raw Normal View History

# 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}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
2019-10-07 20:07:26 -07:00
# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET}
# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads
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)
2019-10-07 20:07:26 -07:00
# VCPKG_TOOLCHAIN = ON OFF
# TRIPLET_SYSTEM_ARCH = arm x86 x64
# BUILD_ARCH = "Win32" "x64" "ARM"
# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH}
# DEBUG_CONFIG = "Debug Static" "Debug Dll"
# RELEASE_CONFIG = "Release Static"" "Release DLL"
# VCPKG_TARGET_IS_WINDOWS
# VCPKG_TARGET_IS_UWP
# VCPKG_TARGET_IS_LINUX
# VCPKG_TARGET_IS_OSX
# VCPKG_TARGET_IS_FREEBSD
# VCPKG_TARGET_IS_ANDROID
# VCPKG_TARGET_IS_MINGW
2019-10-07 20:07:26 -07:00
# VCPKG_TARGET_EXECUTABLE_SUFFIX
# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX
# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX
#
# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md
# # Specifies if the port install should fail immediately given a condition
# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows")
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@"
SHA512 @SHA512@
2016-09-18 20:50:08 -07: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
# # Check if one or more features are a part of a package installation.
# # See /docs/maintainers/vcpkg_check_features.md for more details
# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used
# tbb WITH_TBB
# INVERTED_FEATURES
# tbb ROCKSDB_IGNORE_PACKAGE_TBB
# )
2016-09-18 20:50:08 -07:00
vcpkg_configure_cmake(
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()
# # Moves all .cmake files from /debug/share/@PORT@/ to /share/@PORT@/
# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details
# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/@PORT@)
# # Handle copyright
# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright)