mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 02:53:48 +08:00
30 lines
1.0 KiB
CMake
30 lines
1.0 KiB
CMake
# Common Ambient Variables:
|
|
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
|
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
|
# PORT is the current port name (zlib, etc)
|
|
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
|
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
|
#
|
|
|
|
include(vcpkg_common_functions)
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/@ROOT_NAME@)
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "@URL@"
|
|
FILENAME "@FILENAME@"
|
|
SHA512 @SHA512@
|
|
)
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
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
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Handle copyright
|
|
#file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@)
|
|
#file(RENAME ${CURRENT_PACKAGES_DIR}/share/@PORT@/LICENSE ${CURRENT_PACKAGES_DIR}/share/@PORT@/copyright) |