2021-05-27 04:40:48 +08:00
|
|
|
# rebuild: 1
|
2021-07-15 03:45:18 +08:00
|
|
|
cmake_minimum_required(VERSION 3.20)
|
2016-09-22 18:08:27 +08:00
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
set(SCRIPTS "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location to stored scripts")
|
|
|
|
include("${SCRIPTS}/cmake/z_vcpkg_function_arguments.cmake")
|
|
|
|
|
|
|
|
function(debug_message)
|
|
|
|
if(PORT_DEBUG)
|
|
|
|
z_vcpkg_function_arguments(ARGS)
|
|
|
|
list(JOIN ARGS " " ARG_STRING)
|
|
|
|
message(STATUS "[DEBUG] " "${ARG_STRING}")
|
2016-10-01 09:21:38 +08:00
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
endfunction()
|
2021-03-01 05:17:19 +08:00
|
|
|
function(z_vcpkg_deprecation_message)
|
|
|
|
z_vcpkg_function_arguments(ARGS)
|
|
|
|
list(JOIN ARGS " " ARG_STRING)
|
|
|
|
message(DEPRECATION "${ARG_STRING}")
|
|
|
|
endfunction()
|
2016-10-01 09:21:38 +08:00
|
|
|
|
2020-10-29 05:18:07 +08:00
|
|
|
option(_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES "Controls whether use of a backcompat only support feature fails the build.")
|
|
|
|
if (_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES)
|
2021-02-19 06:27:41 +08:00
|
|
|
set(Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "FATAL_ERROR")
|
2020-10-29 05:18:07 +08:00
|
|
|
else()
|
2021-02-19 06:27:41 +08:00
|
|
|
set(Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "WARNING")
|
2020-10-29 05:18:07 +08:00
|
|
|
endif()
|
|
|
|
|
2021-03-01 05:17:19 +08:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${SCRIPTS}/cmake")
|
2021-02-19 06:27:41 +08:00
|
|
|
include("${SCRIPTS}/cmake/vcpkg_minimum_required.cmake")
|
2021-07-15 03:45:18 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2021-05-05)
|
2019-09-13 14:52:52 +08:00
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_CMAKE_PATH "${BUILDTREES_DIR}" BUILDTREES_DIR)
|
|
|
|
file(TO_CMAKE_PATH "${PACKAGES_DIR}" PACKAGES_DIR)
|
2020-07-18 23:48:01 +08:00
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
set(CURRENT_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET}" CACHE PATH "Location to install final packages")
|
2016-09-19 11:50:08 +08:00
|
|
|
|
|
|
|
if(PORT)
|
2021-02-19 06:27:41 +08:00
|
|
|
set(CURRENT_BUILDTREES_DIR "${BUILDTREES_DIR}/${PORT}")
|
|
|
|
set(CURRENT_PACKAGES_DIR "${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET}")
|
2016-09-19 11:50:08 +08:00
|
|
|
endif()
|
|
|
|
|
2016-10-01 09:21:38 +08:00
|
|
|
if(CMD MATCHES "^BUILD$")
|
2021-02-19 06:27:41 +08:00
|
|
|
set(CMAKE_TRIPLET_FILE "${TARGET_TRIPLET_FILE}")
|
|
|
|
if(NOT EXISTS "${CMAKE_TRIPLET_FILE}")
|
2016-10-01 09:21:38 +08:00
|
|
|
message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}")
|
|
|
|
endif()
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2018-06-27 12:48:29 +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()
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR)
|
|
|
|
if(NOT EXISTS "${CURRENT_PORT_DIR}")
|
2016-09-19 11:50:08 +08:00
|
|
|
message(FATAL_ERROR "Cannot find port: ${PORT}\n Directory does not exist: ${CURRENT_PORT_DIR}")
|
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
if(NOT EXISTS "${CURRENT_PORT_DIR}/portfile.cmake")
|
2016-09-19 11:50:08 +08:00
|
|
|
message(FATAL_ERROR "Port is missing portfile: ${CURRENT_PORT_DIR}/portfile.cmake")
|
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
if(NOT EXISTS "${CURRENT_PORT_DIR}/CONTROL" AND NOT EXISTS "${CURRENT_PORT_DIR}/vcpkg.json")
|
[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(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)
|
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}")
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}")
|
|
|
|
message(FATAL_ERROR "Unable to remove directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.")
|
2018-06-27 12:48:29 +08:00
|
|
|
endif()
|
2016-09-19 11:50:08 +08:00
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}" "${CURRENT_PACKAGES_DIR}")
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
include("${CMAKE_TRIPLET_FILE}")
|
2019-08-20 23:47:26 +08:00
|
|
|
|
2020-02-04 06:22:52 +08:00
|
|
|
if (DEFINED VCPKG_PORT_CONFIGS)
|
2021-02-19 06:27:41 +08:00
|
|
|
foreach(VCPKG_PORT_CONFIG IN LISTS VCPKG_PORT_CONFIGS)
|
|
|
|
include("${VCPKG_PORT_CONFIG}")
|
2019-08-20 23:47:26 +08:00
|
|
|
endforeach()
|
|
|
|
endif()
|
2019-07-19 23:08:08 +08:00
|
|
|
|
2021-03-11 07:33:16 +08:00
|
|
|
set(HOST_TRIPLET "${_HOST_TRIPLET}")
|
|
|
|
set(CURRENT_HOST_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}/${HOST_TRIPLET}" CACHE PATH "Location to install final packages for the host")
|
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
set(TRIPLET_SYSTEM_ARCH "${VCPKG_TARGET_ARCHITECTURE}")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_common_definitions.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/execute_process.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_acquire_msys.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_add_to_path.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_apply_patches.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_cmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_make.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_msbuild.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_ninja.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_nmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_build_qmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_buildpath_length_warning.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_check_features.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_check_linkage.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_clean_executables_in_bin.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_clean_msbuild.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_configure_cmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_configure_gn.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_configure_make.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_configure_meson.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_configure_qmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_copy_pdbs.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_copy_tool_dependencies.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_copy_tools.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_download_distfile.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_execute_build_process.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_execute_required_process.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_execute_required_process_repeat.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_extract_source_archive.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_extract_source_archive_ex.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_fail_port_install.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_find_acquire_program.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_fixup_cmake_targets.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_fixup_pkgconfig.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_from_bitbucket.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_from_git.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_from_github.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_from_gitlab.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_from_sourceforge.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_get_program_files_platform_bitness.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_get_windows_sdk.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_cmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_gn.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_make.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_meson.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_msbuild.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_nmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_install_qmake.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_internal_get_cmake_vars.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_replace_string.cmake")
|
|
|
|
include("${SCRIPTS}/cmake/vcpkg_test_cmake.cmake")
|
2021-02-10 07:53:36 +08:00
|
|
|
|
2021-03-01 05:17:19 +08:00
|
|
|
include("${SCRIPTS}/cmake/z_vcpkg_apply_patches.cmake")
|
2021-07-15 03:45:18 +08:00
|
|
|
include("${SCRIPTS}/cmake/z_vcpkg_forward_output_variable.cmake")
|
2021-02-10 07:53:36 +08:00
|
|
|
include("${SCRIPTS}/cmake/z_vcpkg_prettify_command_line.cmake")
|
|
|
|
|
2021-02-19 06:27:41 +08:00
|
|
|
include("${CURRENT_PORT_DIR}/portfile.cmake")
|
2020-06-23 05:14:36 +08:00
|
|
|
if(DEFINED PORT)
|
2021-02-19 06:27:41 +08:00
|
|
|
include("${SCRIPTS}/build_info.cmake")
|
2020-06-23 05:14:36 +08:00
|
|
|
endif()
|
2016-10-01 09:21:38 +08:00
|
|
|
elseif(CMD MATCHES "^CREATE$")
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}" NATIVE_VCPKG_ROOT_DIR)
|
|
|
|
file(TO_NATIVE_PATH "${DOWNLOADS}" NATIVE_DOWNLOADS)
|
2020-12-16 02:26:00 +08:00
|
|
|
if(NOT DEFINED PORT_PATH)
|
|
|
|
set(PORT_PATH "${VCPKG_ROOT_DIR}/ports/${PORT}")
|
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_NATIVE_PATH "${PORT_PATH}" NATIVE_PORT_PATH)
|
[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(PORTFILE_PATH "${PORT_PATH}/portfile.cmake")
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_NATIVE_PATH "${PORTFILE_PATH}" NATIVE_PORTFILE_PATH)
|
[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(MANIFEST_PATH "${PORT_PATH}/vcpkg.json")
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_NATIVE_PATH "${MANIFEST_PATH}" NATIVE_MANIFEST_PATH)
|
[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(EXISTS "${PORTFILE_PATH}")
|
|
|
|
message(FATAL_ERROR "Portfile already exists: '${NATIVE_PORTFILE_PATH}'")
|
2016-10-01 09:21:38 +08:00
|
|
|
endif()
|
|
|
|
if(NOT FILENAME)
|
|
|
|
get_filename_component(FILENAME "${URL}" NAME)
|
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
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}")
|
2021-02-19 06:27:41 +08:00
|
|
|
file(TO_NATIVE_PATH "${DOWNLOAD_PATH}" NATIVE_DOWNLOAD_PATH)
|
[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(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}")
|
2016-10-01 09:21:38 +08:00
|
|
|
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)
|
2017-11-04 05:52:02 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2021-02-19 06:27:41 +08:00
|
|
|
URLS "${URL}"
|
|
|
|
FILENAME "${FILENAME}"
|
2017-11-04 05:52:02 +08:00
|
|
|
)
|
[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)
|
2016-10-01 09:21:38 +08:00
|
|
|
endif()
|
2021-02-19 06:27:41 +08:00
|
|
|
file(SHA512 "${DOWNLOAD_PATH}" SHA512)
|
2016-10-01 09:21:38 +08:00
|
|
|
|
2021-02-19 06:27:41 +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)
|
2016-10-01 09:21:38 +08:00
|
|
|
|
[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}")
|
2016-10-01 09:21:38 +08:00
|
|
|
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()
|