vcpkg/scripts/ports.cmake

178 lines
6.7 KiB
CMake
Raw Normal View History

2016-09-19 11:50:08 +08:00
cmake_minimum_required(VERSION 3.5)
macro(debug_message)
if(DEFINED PORT_DEBUG AND PORT_DEBUG)
message(STATUS "[DEBUG] ${ARGN}")
endif()
endmacro()
option(_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES "Controls whether use of a backcompat only support feature fails the build.")
if (_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES)
set(_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "FATAL_ERROR")
else()
set(_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "WARNING")
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(vcpkg_minimum_required)
vcpkg_minimum_required(VERSION 2021-01-13)
file(TO_CMAKE_PATH ${BUILDTREES_DIR} BUILDTREES_DIR)
file(TO_CMAKE_PATH ${PACKAGES_DIR} PACKAGES_DIR)
set(CURRENT_INSTALLED_DIR ${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET} CACHE PATH "Location to install final packages")
set(SCRIPTS ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Location to stored scripts")
2016-09-19 11:50:08 +08:00
if(PORT)
set(CURRENT_BUILDTREES_DIR ${BUILDTREES_DIR}/${PORT})
set(CURRENT_PACKAGES_DIR ${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET})
endif()
if(CMD MATCHES "^BUILD$")
set(CMAKE_TRIPLET_FILE ${TARGET_TRIPLET_FILE})
if(NOT EXISTS ${CMAKE_TRIPLET_FILE})
message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}")
endif()
2016-09-19 11:50:08 +08:00
if(NOT DEFINED CURRENT_PORT_DIR)
2016-09-19 11:50:08 +08:00
message(FATAL_ERROR "CURRENT_PORT_DIR was not defined")
endif()
set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR)
if(NOT EXISTS ${CURRENT_PORT_DIR})
message(FATAL_ERROR "Cannot find port: ${PORT}\n Directory does not exist: ${CURRENT_PORT_DIR}")
endif()
if(NOT EXISTS ${CURRENT_PORT_DIR}/portfile.cmake)
message(FATAL_ERROR "Port is missing portfile: ${CURRENT_PORT_DIR}/portfile.cmake")
endif()
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
if(NOT EXISTS ${CURRENT_PORT_DIR}/CONTROL AND NOT EXISTS ${CURRENT_PORT_DIR}/vcpkg.json)
message(FATAL_ERROR "Port is missing control or manifest file: ${CURRENT_PORT_DIR}/{CONTROL,vcpkg.json}")
endif()
2016-09-19 11:50:08 +08:00
unset(PACKAGES_DIR)
unset(BUILDTREES_DIR)
if(EXISTS ${CURRENT_PACKAGES_DIR})
file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*")
if(FILES_IN_CURRENT_PACKAGES_DIR)
file(REMOVE_RECURSE ${FILES_IN_CURRENT_PACKAGES_DIR})
file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*")
if(FILES_IN_CURRENT_PACKAGES_DIR)
message(FATAL_ERROR "Unable to empty directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.")
endif()
endif()
2016-09-19 11:50:08 +08:00
endif()
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR})
include(${CMAKE_TRIPLET_FILE})
[vcpkg] Add Supports: field. Use contents of triplets instead of names for dependency resolution. (#8601) * remove unfinished "supports" tag * extract "supports" from control files But do nothing with the value * Start `Supports` documentation * Use Supports in a bunch of control files I only tried matching the already existing logic in the portfile.cmake. * Cmake var provider (#8) * Cmake var provider (#9) * fix windows build (#10) * Add missing files to build * Fix test (#11) * adding hooks for cmake variables in expressions * Adding hooks for 'supports' in CI test * Fix test (#12) * Add overrides to evaluation environment * use "supported" tag in CI testing * cleanup comment * Fix issues with PR * [var_provider] Get library linkage variables from triplet * Fix compilation errors in tests * Add unimplemented functions * Fix unit tests part 1 * Fix issue when buildtrees dir does not exist * Change binary output hash * Fix handling of * feature * Add core feature when using * * Do not add Default-Features when installing 'core' * [vcpkg] WIP. 6 failing tests. * [vcpkg] WIP. 1 failing tests. * [vcpkg] WIP. 0 failing tests. * [vcpkg] Removed 'remove_graph'. 0 failing tests. * [vcpkg] Removed 'install_graph'. 0 failing tests. * [vcpkg] Remove AnyAction; replace with ActionPlan * [vcpkg] Minor cleanup. * [vcpkg][z3][qt5-connectivity][qt5-purchasing] Improve error messages while parsing. Fix a few trivial port issues. * [vcpkg] Work around ICE with MSVC v140 * [vcpkg] Add purge on fail to decompress for CI * [vcpkg] Fix parsing of nested parentheses in qualifiers * [vcpkg] Fix Linux builds (explicit qualification in declaration) * [vcpkg] Fix Build-Depends implying default features. Fix qualified dependencies regression. * [mmx] Add to skip list and full rebuild -- mmx causes problems by installing 'sched.h' * [libpqxx][mqtt-cpp] Prevent installing include/CMakeLists.txt * [cppitertools] Fix installed include namespace (should be include/cppitertools) * [libsoundio] Move headers into soundio/ subdirectory as per original cmake * [ci.baseline] Temporarily skip charls due to conflict with dcmtk * [vcpkg] Add restricted include files post build check -- bump global abi version * [libsoundio] Hotfix stray line in portfile * [vcpkg] Fix regression: CMake information was not being displayed for build-and-install actions * [jsonnet] Fix installation of internal headers; use system nlohmann-json * [grpc][upb] Teach grpc to use packaged upb. Add find_package(upb). Remove inappropriate upb features. * [zfp] Move problematic 'include/bitstream.h' to 'include/zfp/bitstream.h' * [x265] Bump control version to trigger rebuild after zfp conflict * [akali] Disable parallel configure * [dirent][dlfcn-win32][getopt-win32][pthreads] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [ci.baseline] Update baseline for improved upb support * [tgui] Disable parallel configure * [libiconv] Enable VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [aws-sdk-cpp] Disable parallel configure * [vcpkg] Implement policy VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [aws-sdk-cpp] Fix amount of escaping semicolons -- Note: I do not know the root cause requiring this change * [libodb-sqlite] Fix configuring into source directory * [gettext] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [libodb] DISABLE_PARALLEL_CONFIGURE * [vcpkg] Add 'config.h' and 'local.h' to restricted header list * [mcpp] Remove unused and problematic include 'config.h' from installed files * [teemo] Move installed headers into subdirectory to prevent conflicts with x265 * [ci.baseline] Update current OSX. Skip libmesh on all platforms due to heavy conflicts. * [vcpkg] Add 'slice.h' as a restricted header * [osg] Improve accuracy of dependencies (disable some, add some to Depends) * [vcpkg] Skip invoking a subprocess for 0 specs in load_tag_vars * [ci.baseline] Skip mongo-c-driver on osx due to flakiness * [teemo] Fix incorrect include file read * [osg] Fix dependency typo: glut -> freeglut * [vcpkg] Recover some lost performance with the addition of vcpkg_get_tags. A huge performance cost was loading the triplet files over and over; instead, we splice the sources into a macro and load it once, then just call that macro for each port. Remove use of hashing because we aren't cross-process-safe anyway (global static will do instead). * [vcpkg] Change Supports atom 'windows' to include UWP. Improve Supports field documentation. * [vcpkg] Add docs for VCPKG_ENV_PASSTHROUGH and VCPKG_DEP_INFO_OVERRIDE_VARS * Fix typo Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-02-04 06:22:52 +08:00
if (DEFINED VCPKG_PORT_CONFIGS)
foreach(VCPKG_PORT_CONFIG ${VCPKG_PORT_CONFIGS})
include(${VCPKG_PORT_CONFIG})
endforeach()
endif()
set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE})
include(${SCRIPTS}/cmake/vcpkg_common_definitions.cmake)
include(execute_process)
include(vcpkg_acquire_msys)
include(vcpkg_add_to_path)
include(vcpkg_apply_patches)
include(vcpkg_build_cmake)
include(vcpkg_build_gn)
include(vcpkg_build_make)
include(vcpkg_build_msbuild)
include(vcpkg_build_ninja)
include(vcpkg_build_nmake)
include(vcpkg_build_qmake)
include(vcpkg_buildpath_length_warning)
include(vcpkg_check_features)
include(vcpkg_check_linkage)
include(vcpkg_clean_executables_in_bin)
include(vcpkg_clean_msbuild)
include(vcpkg_configure_cmake)
include(vcpkg_configure_gn)
include(vcpkg_configure_make)
include(vcpkg_configure_meson)
include(vcpkg_configure_qmake)
include(vcpkg_copy_pdbs)
include(vcpkg_copy_tool_dependencies)
include(vcpkg_copy_tools)
include(vcpkg_download_distfile)
include(vcpkg_execute_build_process)
include(vcpkg_execute_required_process)
include(vcpkg_execute_required_process_repeat)
include(vcpkg_extract_source_archive)
include(vcpkg_extract_source_archive_ex)
include(vcpkg_fail_port_install)
include(vcpkg_find_acquire_program)
include(vcpkg_fixup_cmake_targets)
include(vcpkg_fixup_pkgconfig)
include(vcpkg_from_bitbucket)
include(vcpkg_from_git)
include(vcpkg_from_github)
include(vcpkg_from_gitlab)
include(vcpkg_from_sourceforge)
include(vcpkg_get_program_files_platform_bitness)
include(vcpkg_get_windows_sdk)
include(vcpkg_install_cmake)
include(vcpkg_install_gn)
include(vcpkg_install_make)
include(vcpkg_install_meson)
include(vcpkg_install_msbuild)
include(vcpkg_install_nmake)
include(vcpkg_install_qmake)
[vcpkg/scripts] Add a way to get cmake compiler settings/flags (#12936) * add function get_cmake_vars * fine tuning. * apply to make based ports. * add log suffix on not windows platforms * fix c&p error * add previous LINK env * setup env on windows and extract cpp flags correctly. * Apply suggestions from code review * commit changes from fontconfig PR * Apply suggestions from code review Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * cleanup docs * add conversion from somelib.lib to -lsomelib * add missing ar-lib wrapper * small but important regex correction * add latest changes from update_fontconfig PR * Apply suggestions from code review first set which don't need special attention Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> * Apply suggestions from code review one more simple change Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> * [x264] set env AS * fix bugs due to refactor * use subpath everywhere * apply changes from CR * remove unnecessary lines 41 & 44 * remove flag transformation * reintroduce the flag / to - transformation for MSVC * Apply suggestions from code review Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> * rename the function * rename function/variables * transform flags list * Apply suggestions from code review * fix vcpkg_build_make due to the variable name change * fix another case of function renaming regressions * only rename config.log if it exists * actually add the script after vcpkg_common_functions was deleted. * remove setting of ldflags if path contains spaces Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-11-11 01:52:02 +08:00
include(vcpkg_internal_get_cmake_vars)
include(vcpkg_prettify_command)
include(vcpkg_replace_string)
include(vcpkg_test_cmake)
2016-09-19 11:50:08 +08:00
include(${CURRENT_PORT_DIR}/portfile.cmake)
if(DEFINED PORT)
include(${SCRIPTS}/build_info.cmake)
endif()
elseif(CMD MATCHES "^CREATE$")
file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR)
file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS)
if(NOT DEFINED PORT_PATH)
set(PORT_PATH "${VCPKG_ROOT_DIR}/ports/${PORT}")
endif()
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
file(TO_NATIVE_PATH ${PORT_PATH} NATIVE_PORT_PATH)
set(PORTFILE_PATH "${PORT_PATH}/portfile.cmake")
file(TO_NATIVE_PATH ${PORTFILE_PATH} NATIVE_PORTFILE_PATH)
set(MANIFEST_PATH "${PORT_PATH}/vcpkg.json")
file(TO_NATIVE_PATH ${MANIFEST_PATH} NATIVE_MANIFEST_PATH)
if(EXISTS "${PORTFILE_PATH}")
message(FATAL_ERROR "Portfile already exists: '${NATIVE_PORTFILE_PATH}'")
endif()
if(NOT FILENAME)
get_filename_component(FILENAME "${URL}" NAME)
endif()
string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME ${FILENAME})
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
set(DOWNLOAD_PATH "${DOWNLOADS}/${FILENAME}")
file(TO_NATIVE_PATH ${DOWNLOAD_PATH} NATIVE_DOWNLOAD_PATH)
if(EXISTS "${DOWNLOAD_PATH}")
message(STATUS "Using pre-downloaded: ${NATIVE_DOWNLOAD_PATH}")
message(STATUS "If this is not desired, delete the file and ${NATIVE_PORT_PATH}")
else()
include(vcpkg_download_distfile)
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
set(_VCPKG_INTERNAL_NO_HASH_CHECK ON)
vcpkg_download_distfile(ARCHIVE
URLS ${URL}
FILENAME ${FILENAME}
)
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
set(_VCPKG_INTERNAL_NO_HASH_CHECK OFF)
endif()
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
file(SHA512 ${DOWNLOAD_PATH} SHA512)
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
file(MAKE_DIRECTORY ${PORT_PATH})
configure_file(${SCRIPTS}/templates/portfile.in.cmake ${PORTFILE_PATH} @ONLY)
configure_file(${SCRIPTS}/templates/vcpkg.json.in ${MANIFEST_PATH} @ONLY)
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
message(STATUS "Generated portfile: ${NATIVE_PORTFILE_PATH}")
message(STATUS "Generated manifest: ${NATIVE_MANIFEST_PATH}")
message(STATUS "To launch an editor for these new files, run")
2017-05-08 17:16:49 +08:00
message(STATUS " .\\vcpkg edit ${PORT}")
2016-09-19 11:50:08 +08:00
endif()