mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 03:34:26 +08:00
c69f2b9098
* [vcpkg tool] Add vcpkg_install_copyright * Make sure FILE_LIST is provided * relative to ${SOURCE_PATH} * Add documentation * Add to table of contents * Relative paths was a bad idea. * Tell users to use the correct way Co-authored-by: Billy O'Neal <bion@microsoft.com> * Fix docs * Add parameter COMMENT * Rename to vcpkg_concat_copyright * Fix escape * Revert "Fix escape" This reverts commit 53f1636705396fe5e606bf67ef72e39edc35140f. * Revert "Rename to vcpkg_concat_copyright" This reverts commit 6ce9152a618b37e5a914248f6ca6c8b7b54ef3e3. * Fix escape * Add support for single copyright file * Update docs * Make comment less confusing * [ci skip] Billy CR * [ci skip] Format * Remove explicit checks for STREQUAL "" * Add error msg if file doesn't exist Co-authored-by: Billy O'Neal <bion@microsoft.com>
86 lines
3.4 KiB
CMake
86 lines
3.4 KiB
CMake
# 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}
|
|
# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET}
|
|
# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads
|
|
# 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)
|
|
# 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
|
|
# 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
|
|
|
|
# Also consider vcpkg_from_* functions if you can; the generated code here is for any web accessable
|
|
# source archive.
|
|
# vcpkg_from_github
|
|
# vcpkg_from_gitlab
|
|
# vcpkg_from_bitbucket
|
|
# vcpkg_from_sourceforge
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "@URL@"
|
|
FILENAME "@FILENAME@"
|
|
SHA512 @SHA512@
|
|
)
|
|
|
|
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
|
|
)
|
|
|
|
# # 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
|
|
# )
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
# # Moves all .cmake files from /debug/share/@PORT@/ to /share/@PORT@/
|
|
# # See /docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md for more details
|
|
# When you uncomment "vcpkg_cmake_config_fixup()", you need to add the following to "dependencies" vcpkg.json:
|
|
#{
|
|
# "name": "vcpkg-cmake-config",
|
|
# "host": true
|
|
#}
|
|
# vcpkg_cmake_config_fixup(CONFIG_PATH cmake TARGET_PATH share/@PORT@)
|
|
|
|
# Uncomment the line below if necessary to install the license file for the port
|
|
# as a file named `copyright` to the directory `${CURRENT_PACKAGES_DIR}/share/${PORT}`
|
|
# vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|