diff --git a/docs/examples/manifest-mode-cmake.md b/docs/examples/manifest-mode-cmake.md index 7087da020b5608..2a780f7de43745 100644 --- a/docs/examples/manifest-mode-cmake.md +++ b/docs/examples/manifest-mode-cmake.md @@ -1,6 +1,6 @@ # Manifest Mode: CMake Example -We would like to add vcpkg manifest support to an existing cmake project! +We would like to add [vcpkg manifest support](../users/manifests.md) to an existing cmake project! Let's create a simple project that prints the fibonacci sequence up to a certain number, using some common dependencies. diff --git a/docs/examples/modify-baseline-to-pin-old-boost.md b/docs/examples/modify-baseline-to-pin-old-boost.md new file mode 100644 index 00000000000000..b8354c051fc775 --- /dev/null +++ b/docs/examples/modify-baseline-to-pin-old-boost.md @@ -0,0 +1,190 @@ +# Pin old Boost versions +This document will teach you how to set versions of meta-packages like `boost` or `qt5`. + +**What is a meta-package?** +In vcpkg we call meta-packages to ports that by themselves don't install anything but that instead forward installation to another port or ports. The reasons for these meta-packages to exist are plenty: to install different versions of a library depending on platform (like the old OpenSSL port did), to allow for multiple versions to exist in the vcpkg registry at the same time (OpenCV), or to conveniently install/uninstall a catalog of related packages (Boost and Qt). + +In the case of Boost, it is unlikely that a user requires all of the 140+ Boost libraries in their project. For the sake of convenience, vcpkg splits Boost into multiple sub-packages broken down to individual libraries. By doing so, users can limit the subset of Boost libraries that they depend on. + +If a user wants to install all of the Boost libraries available in vcpkg, they can do so by installing the `boost` meta-package. + +Due to the nature of meta-packages, some unexpected issues arise when trying to use them with versioning. If a user writes the following manifest file: + +`vcpkg.json` +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "787fe1418ea968913cc6daf11855ffd8b0b5e9d4", + "dependencies": [ "boost-tuple" ], + "overrides": [ + { "name": "boost", "version": "1.72.0" } + ] +} +``` + +The resulting installation plan is: +``` +The following packages will be built and installed: + boost-assert[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-assert\3393715b4ebe30fe1c3b68acf7f84363e611f156 + boost-compatibility[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-compatibility\cda5675366367789659c59aca65fc57d03c51deb + boost-config[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-config\ca82ca1b9c1739c91f3cf42c68cee56c896ae6bd + boost-container-hash[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-container-hash\bf472c23d29c3d80b562c43471eb92cea998f372 + boost-core[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-core\20a19f6ece37686a02eed33e1f58add8b7a2582a + boost-detail[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-detail\96744251f025f9b3c856a275dfc338031876777b + boost-integer[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-integer\de70ce0d1500df1eda3496c4f98f42f5db256b4a + boost-io[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-io\7bf3407372f8fc2a99321d24a0e952d44fe25bf3 + boost-preprocessor[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-preprocessor\8d78b8ba2e9f54cb00137115ddd2ffec1c63c149 + boost-static-assert[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-static-assert\2a41c4703c7122de25b1c60510c43edc9371f63d + boost-throw-exception[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-throw-exception\b13bdf32a20786a0165cc20205ef63765cac0627 + boost-tuple[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-tuple\22e3d000a178a88992c430d8ae8a0244c7dea674 + boost-type-traits[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-type-traits\8829793f6c6c913257314caa317599f8d253a5ca + boost-uninstall[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-uninstall\08933bad27b6d41caef0940c31e2069ecb6a079c + boost-utility[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-utility\47572946bf6a63c731b9c4142eecb8bef3d3b270 + boost-vcpkg-helpers[core]:x64-windows -> 7#2 -- D:\vcpkg\buildtrees\versioning\versions\boost-vcpkg-helpers\2a21e5ab45d1ce41c185faf85dff0670ea6def1d +``` + +It is reasonable to expect that overriding `boost` to version 1.72.0 results in all Boost packages being pinned to version 1.72.0. **However, vcpkg does not treat the `boost` meta-package any differently that any other port.** In other words, vcpkg has no notion that `boost` is related to all the other `boost-*` libraries, other than it depends on all of them. For this reason, all the other boost packages are installed at version 1.75.0, which is the baseline version. + +Below, we describe two methods to pin down Boost versions effectively. + +## Method 1: Pin specific packages +Use `"overrides"` to force specific versions in a package-by-package basis. + +`vcpkg.json` +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "787fe1418ea968913cc6daf11855ffd8b0b5e9d4", + "dependencies": [ "boost-tuple" ], + "overrides": [ + { "name": "boost-core", "version": "1.72" }, + { "name": "boost-integer", "version": "1.72" }, + { "name": "boost-io", "version": "1.72" }, + { "name": "boost-tuple", "version": "1.72" } + ] +} +``` + +This method allows you to quickly set the specific versions you want, but you will need to write an override for each package. Boost libraries are also heavily interdependent, which means that you may end up writing a lot of override lines. + +The second method makes it easy to pin the entire Boost collection and end up with a very simple manifest file. + +## Method 2: Modify baseline +An easy way to set the version for the entirety of boost is to use the `"builtin-baseline"` property. + +As of right now, it is only possible to go back to Boost version `1.75.0` using a baseline. Since that was the contemporary Boost version when the versioning feature was merged. **But, it is possible to modify the baseline to whatever you like and use that instead.** + +### Step 1: Create a new branch +As described in the versioning documentation. The value that goes in `"builtin-baseline"` is a Git commit in the vcpkg repository's history. Then it stands to reason, that if you want to customize the baseline you should be able to create a new commit with said custom baseline. + +Let's start by creating a new branch to hold our modified baseline. +In the directory containing your clone of the vcpkg Git repository run: + +``` +git checkout -b custom-boost-baseline +``` + +This will create a new branch named `custom-boost-baseline` and check it out immediately. + +### Step 2: Modify the baseline +The next step is to modify the baseline file, open the file in your editor of choice and modify the entries for the Boost libraries. + +Change the `"baseline"` version to your desired version. +_NOTE: Remember to also set the port versions to 0 (or your desired version)._ + +`${vcpkg-root}/versions/baseline.json` +```diff +... + "boost": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, + "boost-accumulators": { +- "baseline": "1.75.0", +- "port-version": 1 ++ "baseline": "1.72.0", ++ "port-version": 0 + }, + "boost-algorithm": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, + "boost-align": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, +... + "boost-uninstall: { + "baseline": "1.75.0", + "port-version": 0 + }, +... +``` + +Some `boost-` packages are helpers used by vcpkg and are not part of Boost. For example, `"boost-uninstall"` is a vcpkg helper to conveniently uninstall all Boost libraries, but it didn't exist for Boost version `1.72.0`, in this case it is fine to leave it at `1.75.0` to avoid baseline errors (since all versions in `baseline.json` must have existed). + +### Step 3: Commit your changes +After saving your modified file, run these commands to commit your changes: + +``` +git add versions/baseline.json +git commit -m "Baseline Boost 1.72.0" +``` + +You can set the commit message to whatever you want, just make it useful for you. + +### Step 4: Get your baseline commit SHA +Once all your changes are ready, you can get the commit SHA by running: +``` +git rev-parse HEAD +``` + +The output of that command will be the commit SHA you need to put as the `"builtin-baseline"` in your project's manifest file. Copy the 40-hex digits and save them to use later in your manifest file. + +### Step 5: (Optional) Go back to the main repository branch +Once your changes have been commited locally, you can refer to the commit SHA regardless of the repository branch you're working on. So, let's go back to the main vcpkg repository branch. + +``` +git checkout master +``` + +### Step 6: Create your manifest file with your custom baseline + +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "9b5cf7c3d9376ddf43429671282972ec4f99aa85", + "dependencies": [ "boost-tuple" ] +} +``` + +In this example, commit SHA `9b5cf7c3d9376ddf43429671282972ec4f99aa85` is the commit ID with the modified baseline. Even when a different branch (`master` in this case) is checked out, Git is able to find the commit as long as the branch with the modified baseline exists (the `custom-boost-baseline` branch we created in step 1). + +We run `vcpkg --feature-flags="manifests,versions" install` in the directory containing our manifest file and the output looks like this: + +``` +The following packages will be built and installed: + boost-assert[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-assert\6754398591f48435b28014ca0d60e5375a4c04d1 + boost-compatibility[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-compatibility\9893ff3c554575bc712df4108a949e07b269f401 + boost-config[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-config\de2784767046b06ec31eb718f10df512e51f2aad + boost-container-hash[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-container-hash\cc19fb0154bbef188f309f49b2664ec7623b96b6 + boost-core[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-core\0eb5e20df9e267e9eca325be946f52ceb8a60229 + boost-detail[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-detail\759d7c6a3f9dbaed0b0c69fa0bb764f7606bb02d + boost-integer[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-integer\173956c61a26e83b0f8b58b0baf60f06aeee637c + boost-preprocessor[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-preprocessor\86eb3938b7875f124feb845331dbe84cbab5d1c6 + boost-static-assert[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-static-assert\e82d8f7f3ee07e927dc374f5a08ed6d6f4ef81f4 + boost-throw-exception[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-throw-exception\64df295f7df41de4fcb219834889b126b5020def + boost-tuple[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-tuple\b3e1b01ffce6e367e4fed0a5538a8546abacb6b2 + boost-type-traits[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-type-traits\5e44ec657660eccf4d3b2710b092dd238e1e7a2d + boost-uninstall[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-uninstall\08933bad27b6d41caef0940c31e2069ecb6a079c + boost-utility[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-utility\7d721b2458d5d595ac341eb54883274f38a4b8c2 + boost-vcpkg-helpers[core]:x64-windows -> 7#2 -- D:\vcpkg\buildtrees\versioning\versions\boost-vcpkg-helpers\2a21e5ab45d1ce41c185faf85dff0670ea6def1d +``` + +Notice how simple our manifest file has become, instead of having a multitude of `"overrides"` you can pin down all Boost packages just by setting the `"builtin-baseline"` to be your modified baseline commit SHA. diff --git a/docs/users/versioning.getting-started.md b/docs/examples/versioning.getting-started.md similarity index 79% rename from docs/users/versioning.getting-started.md rename to docs/examples/versioning.getting-started.md index 6be419adfdd7c7..c83eddb5914b35 100644 --- a/docs/users/versioning.getting-started.md +++ b/docs/examples/versioning.getting-started.md @@ -1,22 +1,43 @@ # Getting started with versioning +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/examples/versioning.getting-started.md).** + Vcpkg lets you take control of which version of packages to install in your projects using manifests. ## Enabling versions -To start using the versioning feature, first you need to enable the `versions` feature flag in any of the following manners: +To start using [versioning](../users/versioning.md), first you need to enable the `versions` feature flag in any of the following manners: -* Setting the `VCPKG_FEATURE_FLAGS` environment variable. +* Setting the `VCPKG_FEATURE_FLAGS` environment variable ```PowerShell # Example for PowerShell $env:VCPKG_FEATURE_FLAGS="versions" -./vcpkg install +``` +```bash +# Example for bash +export VCPKG_FEATURE_FLAGS=versions +``` +```cmd +REM Example for cmd +SET VCPKG_FEATURE_FLAGS=versions ``` -* Passing the feature flags in the vcpkg command line. -```PowerShell -./vcpkg --feature-flags="versions" install +* Passing the feature flags in the vcpkg command line +```bash +./vcpkg install --feature-flags=versions +``` + +* Setting `VCPKG_FEATURE_FLAGS` before your `project()` CMake directive +```cmake +set(VCPKG_FEATURE_FLAGS versions) +project(myapp) +``` +* Setting `VcpkgAdditionalInstallOptions` (Project Properties -> Vcpkg -> Additional Options) in your MSBuild project +```xml + + --feature-flags=versions + ``` ## Using versions with manifests @@ -28,7 +49,7 @@ Let's start with creating a simple CMake project that depends on `fmt` and `zlib Create a folder with the following files: **vcpkg.json** -``` +```json { "name": "versions-test", "version": "1.0.0", @@ -61,7 +82,7 @@ int main() ```CMake cmake_minimum_required(VERSION 3.18) -project(versions-test CXX) +project(versionstest CXX) add_executable(main main.cpp) @@ -109,42 +130,40 @@ fmt[core]:x86-windows -> 7.1.3 -- D:\vcpkg\buildtrees\versioning\versions\fmt\dd zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4 ``` -Instead of using the portfiles in `ports/`; vcpkg is checking out the files for each version in `buildtrees/versioning/versions/`. The files in `ports/` are still used when running vcpkg in classic mode or when the `versions` feature flag is disabled. +Instead of using the portfiles in `ports/`, vcpkg is checking out the files for each version in `buildtrees/versioning/versions/`. The files in `ports/` are still used when running vcpkg in classic mode or when the `versions` feature flag is disabled. -_NOTE: Output from the vcpkg while configuring CMake is only available when using CMake version `3.18` or newer. If you're using an older CMake you can check the `vcpkg-manifest-install.log` file in your build directory instead._ +_NOTE: Output from vcpkg while configuring CMake is only available when using CMake version `3.18` or newer. If you're using an older CMake you can check the `vcpkg-manifest-install.log` file in your build directory instead._ Read our [manifests announcement blog post](https://devblogs.microsoft.com/cppblog/vcpkg-accelerate-your-team-development-environment-with-binary-caching-and-manifests/#using-manifests-with-msbuild-projects) to learn how to use manifests with MSBuild. ### Manifest changes If you have used manifests before you will notice that there are some new JSON properties. Let's review these changes: -* **`version`** -``` +#### **`version`** +```json { "name": "versions-test", - "version": "1.0.0", - ... + "version": "1.0.0" } ``` This is your project's version declaration. Previously, you could only declare versions for your projects using the `version-string` property. Now that versioning has come around, vcpkg is aware of some new versioning schemes. -Version scheme | Description --- | -- -`version` | Dot-separated numerics: `1.0.0`. +Version scheme | Description +---------------- | --------------- +`version` | Dot-separated numerics: `1.0.0.5`. `version-semver` | Compliant [semantic versions](https://semver.org): `1.2.0` and `1.2.0-rc`. -`version-date` | Dates in `YYYY-MM-DD` format: `2021-01-01` +`version-date` | Dates in `YYYY-MM-DD` format: `2021-01-01` `version-string` | Arbitrary strings: `vista`, `candy`. -* **`version>=`** -``` -"dependencies": [ - { - "name": "fmt", - "version>=": "7.1.3" - }, - "zlib" -], +#### **`version>=`** +```json +{ + "dependencies": [ + { "name": "fmt", "version>=": "7.1.3" }, + "zlib" + ] +} ``` This property is used to express minimum version constraints, it is allowed only as part of the `"dependencies"` declarations. In our example we set an explicit constraint on version `7.1.3` of `fmt`. @@ -155,7 +174,7 @@ Vcpkg uses a minimum version approach, in our example, even if `fmt` version `8. If you want to upgrade your dependencies, you can bump the minimum version constraint or use a newer baseline. -* **`builtin-baseline`** +#### **`builtin-baseline`** ``` "builtin-baseline": "b60f003ccf5fe8613d029f49f835c8929a66eb61" @@ -163,7 +182,7 @@ If you want to upgrade your dependencies, you can bump the minimum version const This field declares the versioning baseline for all ports. Setting a baseline is required to enable versioning, otherwise you will get the current versions on the ports directory. You can run 'git rev-parse HEAD' to get the current commit of vcpkg and set it as the builtin-baseline. But what is a baseline? What does it do? Why is the value a SHA? -From the [versioning documentation](versioning.md): +From the [versioning documentation](../users/versioning.md): > The baseline references a commit within the vcpkg repository that establishes a minimum version on every dependency in the graph. If @@ -197,7 +216,7 @@ Baselines are also a convenient mechanism to upgrade multiple versions at a time But what if you want to pin a version older than the baseline? -* **`overrides`** +#### **`overrides`** Since baselines establish a version floor for all packages and explicit constraints get upgraded when they are lower than the baseline, we need another mechanism to downgrade versions past the baseline. @@ -264,11 +283,11 @@ If you want to have flexible port customization along with versioning features, ## Further reading -If you're interested in delving deeper into the details of how versioning works we recommended that you read the [original versioning specification](../specifications/versioning.md) and the [implementation details](versioning.implementation-details.md). +If you're interested in delving deeper into the details of how versioning works we recommended that you read the [original versioning specification](../specifications/versioning.md) and the [implementation details](../users/versioning.implementation-details.md). See also: -* [Versioning docs](versioning.md) +* [Versioning docs](../users/versioning.md) * [Original specification](../specifications/versioning.md) -* [Versioning reference](versioning.reference.md) -* [Versioning implementation details](versioning.implementation-details.md) +* [Versioning reference](../users/versioning.reference.md) +* [Versioning implementation details](../users/versioning.implementation-details.md) diff --git a/docs/index.md b/docs/index.md index 7d0601c139a3c0..00a17a5b4444c9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,8 @@ ### Quick Start -Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement are vital to its success! +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/index.md).** + +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement is vital to its success! ### Examples @@ -8,19 +10,23 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too - [Packaging Zipfiles Example: zlib](examples/packaging-zipfiles.md) - [Packaging GitHub Repositories Example: libogg](examples/packaging-github-repos.md) - [Patching Example: Patching libpng to work for x86-uwp](examples/patching.md) +- [Getting Started with Versioning](examples/versioning.getting-started.md) ### User Help - [Integration with build systems](users/integration.md) - [Triplet files](users/triplets.md) - [Configuration and Environment](users/config-environment.md) +- [Manifests](users/manifests.md) +- [Binary Caching](users/binarycaching.md) +- [Versioning](users/versioning.md) - [Usage with Android](users/android.md) -- [Using a manifest file to declare your dependencies](users/manifests.md) +- [Host Dependencies](users/host-dependencies.md) -### Maintainer help +### Maintainer Help -- [Control files](maintainers/control-files.md) - in general, one should use manifest files instead -- [Manifest files](maintainers/manifest-files.md) +- [Manifest files - vcpkg.json](maintainers/manifest-files.md) +- [Control files](maintainers/control-files.md) - [Portfile functions](maintainers/portfile-functions.md) - [Maintainer Guidelines](maintainers/maintainer-guide.md) @@ -31,6 +37,11 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too - [Layout of the vcpkg source tree](tool-maintainers/layout.md) - [Maintainer Guidelines](maintainers/maintainer-guide.md) +### Community Resources (not directly affiliated with vcpkg) + +- [vcpkg.info](https://vcpkg.info/) - Package index + search +- [vcpkgx](https://vcpkgx.com/) - Package index + search + ### Specifications - [Export](specifications/export-command.md) diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index ab5f0eea34ee60..4951a8888ba3a9 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -1,7 +1,7 @@ # CONTROL files -CONTROL files are retained for backwards compatibility with earlier versions of vcpkg; -all new features are added only to vcpkg.json, and we recommend using vcpkg.json for any newly authored port. +**CONTROL files are retained for backwards compatibility with earlier versions of vcpkg; +all new features are added only to [vcpkg.json](manifests.md), and we recommend using vcpkg.json for any newly authored port.** The `CONTROL` file contains metadata about the port. The syntax is based on [the Debian `control` format][debian] although we only support the subset of fields documented here. diff --git a/docs/maintainers/execute_process.md b/docs/maintainers/execute_process.md index 21bca7f3ae24e6..688ec84646c72e 100644 --- a/docs/maintainers/execute_process.md +++ b/docs/maintainers/execute_process.md @@ -1,9 +1,11 @@ # execute_process +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/execute_process.md). + Intercepts all calls to execute_process() inside portfiles and fails when Download Mode is enabled. In order to execute a process in Download Mode call `vcpkg_execute_in_download_mode()` instead. ## Source -[scripts/cmake/execute_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/execute_process.cmake) +[scripts/cmake/execute\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/execute_process.cmake) diff --git a/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md b/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md index dbac8458757e3d..63218102f7c56f 100644 --- a/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md +++ b/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md @@ -1,5 +1,7 @@ # vcpkg_internal_get_cmake_vars +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** Runs a cmake configure with a dummy project to extract certain cmake variables @@ -26,4 +28,4 @@ If possible avoid usage in portfiles. * [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) ## Source -[scripts/cmake/vcpkg_internal_get_cmake_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake) +[scripts/cmake/vcpkg\_internal\_get\_cmake\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_apply_patches.md b/docs/maintainers/internal/z_vcpkg_apply_patches.md new file mode 100644 index 00000000000000..64351ed526666e --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_apply_patches.md @@ -0,0 +1,32 @@ +# z_vcpkg_apply_patches + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** + +Apply a set of patches to a source tree. + +```cmake +z_vcpkg_apply_patches( + SOURCE_PATH + [QUIET] + PATCHES ... +) +``` + +The `` should be set to `${SOURCE_PATH}` by convention, +and is the path to apply the patches in. + +`z_vcpkg_apply_patches` will take the list of ``es, +which are by default relative to the port directory, +and apply them in order using `git apply`. +Generally, these ``es take the form of `some.patch` +to select patches in the port directory. +One may also download patches and use `${VCPKG_DOWNLOADS}/path/to/some.patch`. + +If `QUIET` is not passed, it is a fatal error for a patch to fail to apply; +otherwise, if `QUIET` is passed, no message is printed. +This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. + +## Source +[scripts/cmake/z\_vcpkg\_apply\_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_apply_patches.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_function_arguments.md b/docs/maintainers/internal/z_vcpkg_function_arguments.md index e60407f205b435..ac6fb1b6096d68 100644 --- a/docs/maintainers/internal/z_vcpkg_function_arguments.md +++ b/docs/maintainers/internal/z_vcpkg_function_arguments.md @@ -1,5 +1,7 @@ # z_vcpkg_function_arguments +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** Get a list of the arguments which were passed in. Unlike `ARGV`, which is simply the arguments joined with `;`, @@ -24,4 +26,4 @@ endfunction() ``` ## Source -[scripts/cmake/z_vcpkg_function_arguments.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_function_arguments.cmake) +[scripts/cmake/z\_vcpkg\_function\_arguments.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_function_arguments.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_prettify_command_line.md b/docs/maintainers/internal/z_vcpkg_prettify_command_line.md index 1b763663030d3f..f17114bce8b493 100644 --- a/docs/maintainers/internal/z_vcpkg_prettify_command_line.md +++ b/docs/maintainers/internal/z_vcpkg_prettify_command_line.md @@ -1,5 +1,7 @@ # z_vcpkg_prettify_command_line +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** Turn a command line into a formatted string. @@ -16,4 +18,4 @@ This command is for internal use, when printing out to a message. * `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` ## Source -[scripts/cmake/z_vcpkg_prettify_command_line.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_prettify_command_line.cmake) +[scripts/cmake/z\_vcpkg\_prettify\_command\_line.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_prettify_command_line.cmake) diff --git a/docs/maintainers/maintainer-guide.md b/docs/maintainers/maintainer-guide.md index 9a65d1790aa891..592023a4b360d4 100644 --- a/docs/maintainers/maintainer-guide.md +++ b/docs/maintainers/maintainer-guide.md @@ -229,7 +229,7 @@ If you're updating multiple ports at the same time, instead you can run: vcpkg x-add-version --all ``` -To update the files for all modified ports at once. +To update the files for all modified ports at once. _NOTE: These commands require you to have committed your changes to the ports before running them. The reason is that the Git SHA of the port directory is required in these version files. But don't worry, the `x-add-version` command will warn you if you have local changes that haven't been committed._ diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index c92abc2c67895e..fbad18c8ef634d 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -1,10 +1,10 @@ - + # Portfile helper functions - [execute\_process](execute_process.md) - [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) - [vcpkg\_add\_to\_path](vcpkg_add_to_path.md) -- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) +- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) (deprecated) - [vcpkg\_build\_cmake](vcpkg_build_cmake.md) - [vcpkg\_build\_gn](vcpkg_build_gn.md) - [vcpkg\_build\_make](vcpkg_build_make.md) @@ -58,5 +58,18 @@ ## Internal Functions - [vcpkg\_internal\_get\_cmake\_vars](internal/vcpkg_internal_get_cmake_vars.md) +- [z\_vcpkg\_apply\_patches](internal/z_vcpkg_apply_patches.md) - [z\_vcpkg\_function\_arguments](internal/z_vcpkg_function_arguments.md) - [z\_vcpkg\_prettify\_command\_line](internal/z_vcpkg_prettify_command_line.md) + +## Scripts from Ports + +### [vcpkg-cmake](ports/vcpkg-cmake.md) + +- [vcpkg\_cmake\_build](ports/vcpkg-cmake/vcpkg_cmake_build.md) +- [vcpkg\_cmake\_configure](ports/vcpkg-cmake/vcpkg_cmake_configure.md) +- [vcpkg\_cmake\_install](ports/vcpkg-cmake/vcpkg_cmake_install.md) + +### [vcpkg-cmake-config](ports/vcpkg-cmake-config.md) + +- [vcpkg\_cmake\_config\_fixup](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md) diff --git a/docs/maintainers/ports/vcpkg-cmake-config.md b/docs/maintainers/ports/vcpkg-cmake-config.md new file mode 100644 index 00000000000000..18e7bb9ac87083 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake-config.md @@ -0,0 +1,10 @@ +# vcpkg-cmake-config + +`vcpkg-cmake-config` provides `vcpkg_cmake_config_fixup()`, +a function which both: + +- Fixes common mistakes in port build systems, like using absolute paths +- Merges the debug and release config files. + +This function should almost always be used when a port has `*config.cmake` files, +even when the buildsystem of the project is not CMake. diff --git a/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md new file mode 100644 index 00000000000000..33509d1174ef8a --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md @@ -0,0 +1,51 @@ +# vcpkg_cmake_config_fixup + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md). + +Merge release and debug CMake targets and configs to support multiconfig generators. + +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +```cmake +vcpkg_cmake_config_fixup( + [PACKAGE_NAME ] + [CONFIG_PATH ] + [DO_NOT_DELETE_CONFIG_PATH_PARENT] + [NO_PREFIX_CORRECTION] +) +``` + +For many ports, `vcpkg_cmake_config_fixup()` on its own should work, +as `PACKAGE_NAME` defaults to `${PORT}` and `CONFIG_PATH` defaults to `share/${PACKAGE_NAME}`. +For ports where the package name passed to `find_package` is distinct from the port name, +`PACKAGE_NAME` should be changed to be that name instead. +For ports where the directory of the `*config.cmake` files cannot be set, +use the `CONFIG_PATH` to change the directory where the files come from. + +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing the `DO_NOT_DELETE_PARENT_CONFIG_PATH` option disable such behavior, +as it is convenient for ports that install +more than one CMake package configuration file. + +The `NO_PREFIX_CORRECTION` option disables the correction of `_IMPORT_PREFIX` +done by vcpkg due to moving the config files. +Currently the correction does not take into account how the files are moved, +and applies a rather simply correction which in some cases will yield the wrong results. + +## How it Works + +1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. +2. Removes `/debug//*config.cmake`. +3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. +6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. + +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) + +## Source +[ports/vcpkg-cmake-config/vcpkg\_cmake\_config\_fixup.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake.md b/docs/maintainers/ports/vcpkg-cmake.md new file mode 100644 index 00000000000000..b84c58869c8e27 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake.md @@ -0,0 +1,7 @@ +# vcpkg-cmake + +This port contains cmake functions for dealing with a CMake buildsystem. + +In the common case, `vcpkg_cmake_configure()` (with appropriate arguments) +followed by `vcpkg_cmake_install()` will be enough to build and install a port. +`vcpkg_cmake_build()` is provided for more complex cases. diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md new file mode 100644 index 00000000000000..51a96372f812cd --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md @@ -0,0 +1,36 @@ +# vcpkg_cmake_build + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md). + +Build a cmake project. + +```cmake +vcpkg_cmake_build( + [TARGET ] + [LOGFILE_BASE ] + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_build` builds an already-configured cmake project. +You can use the alias [`vcpkg_cmake_install()`] function +if your CMake build system supports the `install` TARGET, +and this is something we recommend doing whenever possible. +Otherwise, you can use `TARGET` to set the target to build. +This function defaults to not passing a target to cmake. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `build`, and thus the logfiles end up being something like +`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`, +this is set to `install`, so you'll get log names like `install-x86-windows-dbg.log`. + +For build systems that are buggy when run in parallel, +using `DISABLE_PARALLEL` will run the build with only one job. + +Finally, `ADD_BIN_TO_PATH` adds the appropriate (either release or debug) +`bin/` directories to the path during the build, +such that executables run during the build will be able to access those DLLs. + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_build.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_build.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md new file mode 100644 index 00000000000000..3fcdf0e1abae5b --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md @@ -0,0 +1,76 @@ +# vcpkg_cmake_configure + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md). + +Configure a CMake buildsystem. + +```cmake +vcpkg_cmake_configure( + SOURCE_PATH + [LOGFILE_BASE ] + [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] + [WINDOWS_USE_MSBUILD] + [GENERATOR ] + [OPTIONS + ...] + [OPTIONS_RELEASE + ...] + [OPTIONS_DEBUG + ...] +) +``` + +`vcpkg_cmake_configure` configures a CMake build system for use with +`vcpkg_cmake_buildsystem_build` and `vcpkg_cmake_buildsystem_install`. +`source-path` is where the source is located; by convention, +this is usually `${SOURCE_PATH}`, which is set by one of the `vcpkg_from_*` functions. +This function configures the build system for both Debug and Release builds by default, +assuming that `VCPKG_BUILD_TYPE` is not set; if it is, then it will only configure for +that build type. + +Use the `OPTIONS` argument to set the configure settings for both release and debug, +and use `OPTIONS_RELEASE` and `OPTIONS_DEBUG` to set the configure settings for +release only and debug only repsectively. + +By default, when possible, `vcpkg_cmake_configure` uses [ninja-build] +as its build system. If the `WINDOWS_USE_MSBUILD` argument is passed, then +`vcpkg_cmake_configure` will use a Visual Studio generator on Windows; +on every other platform, `vcpkg_cmake_configure` just uses Ninja. + +[ninja-build]: https://ninja-build.org/ + +Additionally, one may pass the specific generator a port should use with `GENERATOR`. +This is useful if some project-specific buildsystem +has been wrapped in a CMake build system that doesn't perform an actual build. +If used for this purpose, it should be set to `"NMake Makefiles"`. +`vcpkg_cmake_buildsystem_build` and `install` do not support this being set to anything +except for NMake. + +For libraries which cannot be configured in parallel, +pass the `DISABLE_PARALLEL_CONFIGURE` flag. This is needed, for example, +if the library's build system writes back into the source directory during configure. +This also disables the `CMAKE_DISABLE_SOURCE_CHANGES` option. + +By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` +which set the default character set to utf-8 for MSVC. +If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `config`, and thus the logfiles end up being something like +`config-x86-windows-dbg.log`. You can set it to anything you like; +if you set it to `config-the-first`, +you'll get something like `config-the-first-x86-windows.dbg.log`. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md new file mode 100644 index 00000000000000..29ac265aa6eef1 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md @@ -0,0 +1,25 @@ +# vcpkg_cmake_install + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md). + +Build and install a cmake project. + +```cmake +vcpkg_cmake_install( + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_install` transparently forwards to [`vcpkg_cmake_build()`], +with additional parameters to set the `TARGET` to `install`, +and to set the `LOGFILE_ROOT` to `install` as well. + +[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_install.cmake) diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md index d4969323e52e23..fbd43b8e32aa48 100644 --- a/docs/maintainers/vcpkg_acquire_msys.md +++ b/docs/maintainers/vcpkg_acquire_msys.md @@ -1,5 +1,7 @@ # vcpkg_acquire_msys +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_acquire_msys.md). + Download and prepare an MSYS2 instance. ## Usage @@ -55,4 +57,4 @@ vcpkg_execute_required_process( * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) ## Source -[scripts/cmake/vcpkg_acquire_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake) +[scripts/cmake/vcpkg\_acquire\_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake) diff --git a/docs/maintainers/vcpkg_add_to_path.md b/docs/maintainers/vcpkg_add_to_path.md index 2437576387f550..76fb251b934e5a 100644 --- a/docs/maintainers/vcpkg_add_to_path.md +++ b/docs/maintainers/vcpkg_add_to_path.md @@ -1,5 +1,7 @@ # vcpkg_add_to_path +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_add_to_path.md). + Add a directory or directories to the PATH environment variable ```cmake @@ -22,4 +24,4 @@ If no paths are passed, then nothing will be done. * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) ## Source -[scripts/cmake/vcpkg_add_to_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) +[scripts/cmake/vcpkg\_add\_to\_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) diff --git a/docs/maintainers/vcpkg_apply_patches.md b/docs/maintainers/vcpkg_apply_patches.md index cfcf6ff15f6d34..76197ecca9c666 100644 --- a/docs/maintainers/vcpkg_apply_patches.md +++ b/docs/maintainers/vcpkg_apply_patches.md @@ -1,8 +1,11 @@ # vcpkg_apply_patches -Apply a set of patches to a source tree. This function is deprecated in favor of the `PATCHES` argument to `vcpkg_from_github()` et al. +**This function has been deprecated in favor of the `PATCHES` argument to `vcpkg_from_github()` et al.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_apply_patches.md). + +Apply a set of patches to a source tree. -## Usage ```cmake vcpkg_apply_patches( SOURCE_PATH <${SOURCE_PATH}> @@ -11,24 +14,5 @@ vcpkg_apply_patches( ) ``` -## Parameters -### SOURCE_PATH -The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. - -### PATCHES -A list of patches that are applied to the source tree. - -Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. - -### QUIET -Disables the warning message upon failure. - -This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. - -## Examples - -* [libbson](https://github.com/Microsoft/vcpkg/blob/master/ports/libbson/portfile.cmake) -* [gdal](https://github.com/Microsoft/vcpkg/blob/master/ports/gdal/portfile.cmake) - ## Source -[scripts/cmake/vcpkg_apply_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_apply_patches.cmake) +[scripts/cmake/vcpkg\_apply\_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_apply_patches.cmake) diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md index f75d050c32c823..eb7cb6e50b7796 100644 --- a/docs/maintainers/vcpkg_build_cmake.md +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -1,5 +1,9 @@ # vcpkg_build_cmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_cmake.md). + +**This function has been deprecated in favor of `vcpkg_cmake_build` from the vcpkg-cmake port.** + Build a cmake project. ## Usage: @@ -31,4 +35,4 @@ You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) functi * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake) +[scripts/cmake/vcpkg\_build\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake) diff --git a/docs/maintainers/vcpkg_build_gn.md b/docs/maintainers/vcpkg_build_gn.md index 0f5f2e8b06c487..b664b9c54c0128 100644 --- a/docs/maintainers/vcpkg_build_gn.md +++ b/docs/maintainers/vcpkg_build_gn.md @@ -1,5 +1,7 @@ # vcpkg_build_gn +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_gn.md). + Build a GN project ## Usage: @@ -14,4 +16,4 @@ vcpkg_build_gn( Only build the specified targets. ## Source -[scripts/cmake/vcpkg_build_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_gn.cmake) +[scripts/cmake/vcpkg\_build\_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_gn.cmake) diff --git a/docs/maintainers/vcpkg_build_make.md b/docs/maintainers/vcpkg_build_make.md index 6da602f3e72175..e3877ce22f0464 100644 --- a/docs/maintainers/vcpkg_build_make.md +++ b/docs/maintainers/vcpkg_build_make.md @@ -1,5 +1,7 @@ # vcpkg_build_make +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_make.md). + Build a linux makefile project. ## Usage: @@ -49,4 +51,4 @@ You can use the alias [`vcpkg_install_make()`](vcpkg_install_make.md) function i * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_make.cmake) +[scripts/cmake/vcpkg\_build\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_make.cmake) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index e011bfbc8ec70e..4e86fd3b66e005 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_build_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_msbuild.md). + Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. ## Usage @@ -61,4 +63,4 @@ Additional options passed to msbuild for Debug builds. These are in addition to * [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) +[scripts/cmake/vcpkg\_build\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_build_ninja.md b/docs/maintainers/vcpkg_build_ninja.md index 758249966d7607..de099a16d3e998 100644 --- a/docs/maintainers/vcpkg_build_ninja.md +++ b/docs/maintainers/vcpkg_build_ninja.md @@ -1,5 +1,7 @@ # vcpkg_build_ninja +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_ninja.md). + Build a ninja project ## Usage: @@ -14,4 +16,4 @@ vcpkg_build_ninja( Only build the specified targets. ## Source -[scripts/cmake/vcpkg_build_ninja.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_ninja.cmake) +[scripts/cmake/vcpkg\_build\_ninja.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_ninja.cmake) diff --git a/docs/maintainers/vcpkg_build_nmake.md b/docs/maintainers/vcpkg_build_nmake.md index 55257b50dd8c96..c61680fca2d6e9 100644 --- a/docs/maintainers/vcpkg_build_nmake.md +++ b/docs/maintainers/vcpkg_build_nmake.md @@ -1,5 +1,7 @@ # vcpkg_build_nmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_nmake.md). + Build a msvc makefile project. ## Usage: @@ -73,4 +75,4 @@ You can use the alias [`vcpkg_install_nmake()`](vcpkg_install_nmake.md) function * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_nmake.cmake) +[scripts/cmake/vcpkg\_build\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_nmake.cmake) diff --git a/docs/maintainers/vcpkg_build_qmake.md b/docs/maintainers/vcpkg_build_qmake.md index c899155bdf8416..e452388546d523 100644 --- a/docs/maintainers/vcpkg_build_qmake.md +++ b/docs/maintainers/vcpkg_build_qmake.md @@ -1,5 +1,7 @@ # vcpkg_build_qmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_qmake.md). + Build a qmake-based project, previously configured using vcpkg_configure_qmake. ```cmake @@ -7,4 +9,4 @@ vcpkg_build_qmake() ``` ## Source -[scripts/cmake/vcpkg_build_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_qmake.cmake) +[scripts/cmake/vcpkg\_build\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_qmake.cmake) diff --git a/docs/maintainers/vcpkg_buildpath_length_warning.md b/docs/maintainers/vcpkg_buildpath_length_warning.md index fdc7adedae2629..c67dc64656f933 100644 --- a/docs/maintainers/vcpkg_buildpath_length_warning.md +++ b/docs/maintainers/vcpkg_buildpath_length_warning.md @@ -1,5 +1,7 @@ # vcpkg_buildpath_length_warning +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_buildpath_length_warning.md). + Warns the user if their vcpkg installation path might be too long for the package they're installing. ```cmake @@ -11,4 +13,4 @@ path to `buildtrees` is bigger than `N`. Note that this is simply a warning, and isn't relied on for correctness. ## Source -[scripts/cmake/vcpkg_buildpath_length_warning.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_buildpath_length_warning.cmake) +[scripts/cmake/vcpkg\_buildpath\_length\_warning.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_buildpath_length_warning.cmake) diff --git a/docs/maintainers/vcpkg_check_features.md b/docs/maintainers/vcpkg_check_features.md index beb599664b1205..a8b90a3cd90ce9 100644 --- a/docs/maintainers/vcpkg_check_features.md +++ b/docs/maintainers/vcpkg_check_features.md @@ -1,53 +1,45 @@ # vcpkg_check_features + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_check_features.md). Check if one or more features are a part of a package installation. -## Usage ```cmake vcpkg_check_features( - OUT_FEATURE_OPTIONS - [FEATURES - - [ ] - ...] - [INVERTED_FEATURES - - [ ] - ...] + OUT_FEATURE_OPTIONS + [PREFIX ] + [FEATURES + [ ]... + ] + [INVERTED_FEATURES + [ ]... + ] ) ``` -`vcpkg_check_features()` accepts these parameters: - -* `OUT_FEATURE_OPTIONS`: - An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS` - and then set it to contain a list of option definitions (`-D=ON|OFF`). - - This should be set to `FEATURE_OPTIONS` by convention. - -* `FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: - - * `-D=ON`, if a feature is specified for installation, - * `-D=OFF`, otherwise. - -* `INVERTED_FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: - - * `-D=OFF`, if a feature is specified for installation, - * `-D=ON`, otherwise. +The `` should be set to `FEATURE_OPTIONS` by convention. -## Notes +`vcpkg_check_features()` will: -The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used. +- for each `` passed in `FEATURES`: + - if the feature is set, add `-D=ON` to ``, + and set `_` to ON. + - if the feature is not set, add `-D=OFF` to ``, + and set `_` to OFF. +- for each `` passed in `INVERTED_FEATURES`: + - if the feature is set, add `-D=OFF` to ``, + and set `_` to OFF. + - if the feature is not set, add `-D=ON` to ``, + and set `_` to ON. -At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call. +If `` is not passed, then the feature vars set are simply ``, +not `_`. -Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication. -If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists, -two conflicting definitions are added to `OUT_FEATURE_OPTIONS`. +If `INVERTED_FEATURES` is not passed, then the `FEATURES` keyword is optional. +This behavior is deprecated. +If the same `` is passed multiple times, +then `vcpkg_check_features` will cause a fatal error, +since that is a bug. ## Examples @@ -58,18 +50,18 @@ $ ./vcpkg install mimalloc[asm,secure] # ports/mimalloc/portfile.cmake vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - # Keyword FEATURES is optional if INVERTED_FEATURES are not used - asm MI_SEE_ASM - override MI_OVERRIDE - secure MI_SECURE + FEATURES + asm MI_SEE_ASM + override MI_OVERRIDE + secure MI_SECURE ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DMI_SEE_ASM=ON;-DMI_OVERRIDE=OFF;-DMI_SECURE=ON" + ${FEATURE_OPTIONS} ) ``` @@ -79,18 +71,18 @@ vcpkg_configure_cmake( $ ./vcpkg install cpprestsdk[websockets] # ports/cpprestsdk/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required - brotli CPPREST_EXCLUDE_BROTLI - websockets CPPREST_EXCLUDE_WEBSOCKETS +vcpkg_check_features( + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + websockets CPPREST_EXCLUDE_WEBSOCKETS ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON;-DCPPREST_EXCLUDE_WEBSOCKETS=OFF" + ${FEATURE_OPTIONS} ) ``` @@ -100,18 +92,19 @@ vcpkg_configure_cmake( $ ./vcpkg install pcl[cuda] # ports/pcl/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - cuda WITH_CUDA - cuda BUILD_CUDA - cuda BUILD_GPU +vcpkg_check_features( + FEATURES + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_CUDA=ON;-DBUILD_CUDA=ON;-DBUILD_GPU=ON" + ${FEATURE_OPTIONS} ) ``` @@ -121,19 +114,19 @@ vcpkg_configure_cmake( $ ./vcpkg install rocksdb[tbb] # ports/rocksdb/portfile.cmake -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_check_features( + FEATURES + tbb WITH_TBB + INVERTED_FEATURES + tbb ROCKSDB_IGNORE_PACKAGE_TBB ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_TBB=ON;-DROCKSDB_IGNORE_PACKAGE_TBB=OFF" + ${FEATURE_OPTIONS} ) ``` @@ -144,4 +137,4 @@ vcpkg_configure_cmake( * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) ## Source -[scripts/cmake/vcpkg_check_features.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_features.cmake) +[scripts/cmake/vcpkg\_check\_features.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_features.cmake) diff --git a/docs/maintainers/vcpkg_check_linkage.md b/docs/maintainers/vcpkg_check_linkage.md index 9c0c823adb1a81..8b73520e0a7c16 100644 --- a/docs/maintainers/vcpkg_check_linkage.md +++ b/docs/maintainers/vcpkg_check_linkage.md @@ -1,5 +1,7 @@ # vcpkg_check_linkage +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_check_linkage.md). + Asserts the available library and CRT linkage options for the port. ## Usage @@ -33,4 +35,4 @@ This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, * [abseil](https://github.com/Microsoft/vcpkg/blob/master/ports/abseil/portfile.cmake) ## Source -[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) +[scripts/cmake/vcpkg\_check\_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) diff --git a/docs/maintainers/vcpkg_clean_executables_in_bin.md b/docs/maintainers/vcpkg_clean_executables_in_bin.md index 26f948cbc16895..b6df723adec912 100644 --- a/docs/maintainers/vcpkg_clean_executables_in_bin.md +++ b/docs/maintainers/vcpkg_clean_executables_in_bin.md @@ -1,5 +1,7 @@ # vcpkg_clean_executables_in_bin +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_clean_executables_in_bin.md). + Remove specified executables found in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. If, after all specified executables have been removed, and the `bin` and `debug/bin` directories are empty, then also delete `bin` and `debug/bin` directories. ## Usage @@ -20,4 +22,4 @@ Generally, there is no need to call this function manually. Instead, pass an ext * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) ## Source -[scripts/cmake/vcpkg_clean_executables_in_bin.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_executables_in_bin.cmake) +[scripts/cmake/vcpkg\_clean\_executables\_in\_bin.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_executables_in_bin.cmake) diff --git a/docs/maintainers/vcpkg_clean_msbuild.md b/docs/maintainers/vcpkg_clean_msbuild.md index 1837bccbb7d88b..00e5358682bcd1 100644 --- a/docs/maintainers/vcpkg_clean_msbuild.md +++ b/docs/maintainers/vcpkg_clean_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_clean_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_clean_msbuild.md). + Clean intermediate files generated by `vcpkg_install_msbuild()`. ## Usage @@ -12,4 +14,4 @@ vcpkg_clean_msbuild() * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) ## Source -[scripts/cmake/vcpkg_clean_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_msbuild.cmake) +[scripts/cmake/vcpkg\_clean\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_common_definitions.md b/docs/maintainers/vcpkg_common_definitions.md index b93ef4cbdbe769..a97723c1b0627d 100644 --- a/docs/maintainers/vcpkg_common_definitions.md +++ b/docs/maintainers/vcpkg_common_definitions.md @@ -1,8 +1,9 @@ # vcpkg_common_definitions -File contains helpful variabls for portfiles which are commonly needed or used. +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_common_definitions.md). + +This file defines the following variabls which are commonly needed or used in portfiles: -## The following variables are available: ```cmake VCPKG_TARGET_IS_ with being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD, OPENBSD. only defined if VCPKG_HOST_IS_ with being one of the following: WINDOWS, LINUX, OSX, FREEBSD, OPENBSD. only defined if @@ -18,6 +19,10 @@ VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg +TARGET_TRIPLET the name of the current triplet to build for +CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet +HOST_TRIPLET the name of the triplet corresponding to the host +CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet ``` CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target @@ -25,4 +30,4 @@ Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also define portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports. ## Source -[scripts/cmake/vcpkg_common_definitions.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_common_definitions.cmake) +[scripts/cmake/vcpkg\_common\_definitions.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_common_definitions.cmake) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index bd1a3156591c52..fd434cf220bc81 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -1,5 +1,9 @@ # vcpkg_configure_cmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_cmake.md). + +**This function has been deprecated in favor of `vcpkg_cmake_configure` from the vcpkg-cmake port.** + Configure CMake for Debug and Release builds of a project. ## Usage @@ -65,4 +69,4 @@ This command supplies many common arguments to CMake. To see the full list, exam * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_configure_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake) +[scripts/cmake/vcpkg\_configure\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake) diff --git a/docs/maintainers/vcpkg_configure_gn.md b/docs/maintainers/vcpkg_configure_gn.md index 47742be5821d6b..c196f7330114ff 100644 --- a/docs/maintainers/vcpkg_configure_gn.md +++ b/docs/maintainers/vcpkg_configure_gn.md @@ -1,5 +1,7 @@ # vcpkg_configure_gn +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_gn.md). + Generate Ninja (GN) targets ## Usage: @@ -27,4 +29,4 @@ Options to be passed to the debug target. Options to be passed to the release target. ## Source -[scripts/cmake/vcpkg_configure_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_gn.cmake) +[scripts/cmake/vcpkg\_configure\_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_gn.cmake) diff --git a/docs/maintainers/vcpkg_configure_make.md b/docs/maintainers/vcpkg_configure_make.md index fe18edd8b8f193..ebf80521af7718 100644 --- a/docs/maintainers/vcpkg_configure_make.md +++ b/docs/maintainers/vcpkg_configure_make.md @@ -1,5 +1,7 @@ # vcpkg_configure_make +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_make.md). + Configure configure for Debug and Release builds of a project. ## Usage @@ -88,4 +90,4 @@ This command supplies many common arguments to configure. To see the full list, * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) ## Source -[scripts/cmake/vcpkg_configure_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) +[scripts/cmake/vcpkg\_configure\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) diff --git a/docs/maintainers/vcpkg_configure_meson.md b/docs/maintainers/vcpkg_configure_meson.md index 803ad0b170cde9..a0bfc8a99df1bf 100644 --- a/docs/maintainers/vcpkg_configure_meson.md +++ b/docs/maintainers/vcpkg_configure_meson.md @@ -1,5 +1,7 @@ # vcpkg_configure_meson +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_meson.md). + Configure Meson for Debug and Release builds of a project. ## Usage @@ -35,4 +37,4 @@ This command supplies many common arguments to Meson. To see the full list, exam * [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) ## Source -[scripts/cmake/vcpkg_configure_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_meson.cmake) +[scripts/cmake/vcpkg\_configure\_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_meson.cmake) diff --git a/docs/maintainers/vcpkg_configure_qmake.md b/docs/maintainers/vcpkg_configure_qmake.md index e55600c4e6a35e..53526e10321468 100644 --- a/docs/maintainers/vcpkg_configure_qmake.md +++ b/docs/maintainers/vcpkg_configure_qmake.md @@ -1,5 +1,7 @@ # vcpkg_configure_qmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_qmake.md). + Configure a qmake-based project. ```cmake @@ -18,4 +20,4 @@ The path to the *.pro qmake project file. The options passed to qmake. ## Source -[scripts/cmake/vcpkg_configure_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_qmake.cmake) +[scripts/cmake/vcpkg\_configure\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_qmake.cmake) diff --git a/docs/maintainers/vcpkg_copy_pdbs.md b/docs/maintainers/vcpkg_copy_pdbs.md index 37592febcfc2a0..9c379d225959d1 100644 --- a/docs/maintainers/vcpkg_copy_pdbs.md +++ b/docs/maintainers/vcpkg_copy_pdbs.md @@ -1,20 +1,24 @@ # vcpkg_copy_pdbs +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_pdbs.md). + Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. -## Usage ```cmake -vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) +vcpkg_copy_pdbs( + [BUILD_PATHS ...]) ``` -## Notes -This command should always be called by portfiles after they have finished rearranging the binary output. +The ``s are patterns which will be passed to `file(GLOB_RECURSE)`, +for locating DLLs. It defaults to using: -## Parameters -### BUILD_PATHS -Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. +- `${CURRENT_PACKAGES_DIR}/bin/*.dll` +- `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll` -Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. +since that is generally where DLLs are located. + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output. ## Examples @@ -22,4 +26,4 @@ Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/deb * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) ## Source -[scripts/cmake/vcpkg_copy_pdbs.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_pdbs.cmake) +[scripts/cmake/vcpkg\_copy\_pdbs.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_pdbs.cmake) diff --git a/docs/maintainers/vcpkg_copy_tool_dependencies.md b/docs/maintainers/vcpkg_copy_tool_dependencies.md index 68b1fa09db25da..d34fa5d602c040 100644 --- a/docs/maintainers/vcpkg_copy_tool_dependencies.md +++ b/docs/maintainers/vcpkg_copy_tool_dependencies.md @@ -1,5 +1,7 @@ # vcpkg_copy_tool_dependencies +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_tool_dependencies.md). + Copy all DLL dependencies of built tools into the tool folder. ## Usage @@ -18,4 +20,4 @@ This command should always be called by portfiles after they have finished rearr * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) ## Source -[scripts/cmake/vcpkg_copy_tool_dependencies.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tool_dependencies.cmake) +[scripts/cmake/vcpkg\_copy\_tool\_dependencies.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tool_dependencies.cmake) diff --git a/docs/maintainers/vcpkg_copy_tools.md b/docs/maintainers/vcpkg_copy_tools.md index 5a3f886022f381..34a4bb84a63c25 100644 --- a/docs/maintainers/vcpkg_copy_tools.md +++ b/docs/maintainers/vcpkg_copy_tools.md @@ -1,5 +1,7 @@ # vcpkg_copy_tools +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_tools.md). + Copy tools and all their DLL dependencies into the `tools` folder. ## Usage @@ -27,4 +29,4 @@ Auto clean executables in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_ * [uriparser](https://github.com/microsoft/vcpkg/blob/master/ports/uriparser/portfile.cmake) ## Source -[scripts/cmake/vcpkg_copy_tools.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tools.cmake) +[scripts/cmake/vcpkg\_copy\_tools.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tools.cmake) diff --git a/docs/maintainers/vcpkg_download_distfile.md b/docs/maintainers/vcpkg_download_distfile.md index 0ff151739fd739..9b1bda73738566 100644 --- a/docs/maintainers/vcpkg_download_distfile.md +++ b/docs/maintainers/vcpkg_download_distfile.md @@ -1,5 +1,7 @@ # vcpkg_download_distfile +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_download_distfile.md). + Download and cache a file needed for this port. This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. @@ -51,4 +53,4 @@ The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downlo * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) ## Source -[scripts/cmake/vcpkg_download_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake) +[scripts/cmake/vcpkg\_download\_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake) diff --git a/docs/maintainers/vcpkg_execute_build_process.md b/docs/maintainers/vcpkg_execute_build_process.md index 1c81dd1b5613d9..4d41d0f3b01382 100644 --- a/docs/maintainers/vcpkg_execute_build_process.md +++ b/docs/maintainers/vcpkg_execute_build_process.md @@ -1,5 +1,7 @@ # vcpkg_execute_build_process +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_build_process.md). + Execute a required build process ## Usage @@ -33,4 +35,4 @@ conflict when building multiple at once. * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) ## Source -[scripts/cmake/vcpkg_execute_build_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_build_process.cmake) +[scripts/cmake/vcpkg\_execute\_build\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_build_process.cmake) diff --git a/docs/maintainers/vcpkg_execute_in_download_mode.md b/docs/maintainers/vcpkg_execute_in_download_mode.md index 50ea3786a23bce..c4931714cca6a2 100644 --- a/docs/maintainers/vcpkg_execute_in_download_mode.md +++ b/docs/maintainers/vcpkg_execute_in_download_mode.md @@ -1,5 +1,7 @@ # vcpkg_execute_in_download_mode +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_in_download_mode.md). + Execute a process even in download mode. ## Usage @@ -31,4 +33,4 @@ See [`execute_process()`] for a detailed description of the parameters. [`execute_process()`]: https://cmake.org/cmake/help/latest/command/execute_process.html ## Source -[scripts/cmake/vcpkg_execute_in_download_mode.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_in_download_mode.cmake) +[scripts/cmake/vcpkg\_execute\_in\_download\_mode.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_in_download_mode.cmake) diff --git a/docs/maintainers/vcpkg_execute_required_process.md b/docs/maintainers/vcpkg_execute_required_process.md index 21b1029eb89555..b00c97260f2ad3 100644 --- a/docs/maintainers/vcpkg_execute_required_process.md +++ b/docs/maintainers/vcpkg_execute_required_process.md @@ -1,5 +1,7 @@ # vcpkg_execute_required_process +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_required_process.md). + Execute a process with logging and fail the build if the command fails. ## Usage @@ -46,4 +48,4 @@ This should be a unique name for different triplets so that the logs don't confl * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) ## Source -[scripts/cmake/vcpkg_execute_required_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process.cmake) +[scripts/cmake/vcpkg\_execute\_required\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process.cmake) diff --git a/docs/maintainers/vcpkg_execute_required_process_repeat.md b/docs/maintainers/vcpkg_execute_required_process_repeat.md index 290ac7fce865a8..e6c9d0def13090 100644 --- a/docs/maintainers/vcpkg_execute_required_process_repeat.md +++ b/docs/maintainers/vcpkg_execute_required_process_repeat.md @@ -1,5 +1,7 @@ # vcpkg_execute_required_process_repeat +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_required_process_repeat.md). + Execute a process until the command succeeds, or until the COUNT is reached. ## Usage @@ -13,4 +15,4 @@ vcpkg_execute_required_process_repeat( ``` ## Source -[scripts/cmake/vcpkg_execute_required_process_repeat.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process_repeat.cmake) +[scripts/cmake/vcpkg\_execute\_required\_process\_repeat.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process_repeat.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive.md b/docs/maintainers/vcpkg_extract_source_archive.md index da98a2813eee9a..5e17d2d8d01c17 100644 --- a/docs/maintainers/vcpkg_extract_source_archive.md +++ b/docs/maintainers/vcpkg_extract_source_archive.md @@ -1,5 +1,7 @@ # vcpkg_extract_source_archive +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_extract_source_archive.md). + Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). ## Usage @@ -29,4 +31,4 @@ This command will also create a tracking file named .extracted in the * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) ## Source -[scripts/cmake/vcpkg_extract_source_archive.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive.cmake) +[scripts/cmake/vcpkg\_extract\_source\_archive.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive_ex.md b/docs/maintainers/vcpkg_extract_source_archive_ex.md index 55902b70d05c53..0692846f7627b4 100644 --- a/docs/maintainers/vcpkg_extract_source_archive_ex.md +++ b/docs/maintainers/vcpkg_extract_source_archive_ex.md @@ -1,5 +1,7 @@ # vcpkg_extract_source_archive_ex +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_extract_source_archive_ex.md). + Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). ## Usage @@ -53,4 +55,4 @@ Specifies that the default removal of the top level folder should not occur. * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) ## Source -[scripts/cmake/vcpkg_extract_source_archive_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) +[scripts/cmake/vcpkg\_extract\_source\_archive\_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) diff --git a/docs/maintainers/vcpkg_fail_port_install.md b/docs/maintainers/vcpkg_fail_port_install.md index 53b81bd1a433b9..f729b19a356891 100644 --- a/docs/maintainers/vcpkg_fail_port_install.md +++ b/docs/maintainers/vcpkg_fail_port_install.md @@ -1,5 +1,7 @@ # vcpkg_fail_port_install +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fail_port_install.md). + Checks common requirements and fails the current portfile with a (default) error message ## Usage @@ -38,4 +40,4 @@ Library linkage for which the build should fail early. * [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake) ## Source -[scripts/cmake/vcpkg_fail_port_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fail_port_install.cmake) +[scripts/cmake/vcpkg\_fail\_port\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fail_port_install.cmake) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 2bdbb7c513deac..fe23d4e5dbb79d 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -1,5 +1,7 @@ # vcpkg_find_acquire_program +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_find_acquire_program.md). + Download or find a well-known tool. ## Usage @@ -46,4 +48,4 @@ Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_ac * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) ## Source -[scripts/cmake/vcpkg_find_acquire_program.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake) +[scripts/cmake/vcpkg\_find\_acquire\_program.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake) diff --git a/docs/maintainers/vcpkg_find_fortran.md b/docs/maintainers/vcpkg_find_fortran.md index ffc1b6893cd710..ccd37ec86262f4 100644 --- a/docs/maintainers/vcpkg_find_fortran.md +++ b/docs/maintainers/vcpkg_find_fortran.md @@ -1,5 +1,7 @@ # vcpkg_find_fortran +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_find_fortran.md). + Checks if a Fortran compiler can be found. Windows(x86/x64) Only: If not it will switch/enable MinGW gfortran and return required cmake args for building. @@ -10,4 +12,4 @@ vcpkg_find_fortran() ``` ## Source -[scripts/cmake/vcpkg_find_fortran.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_fortran.cmake) +[scripts/cmake/vcpkg\_find\_fortran.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_fortran.cmake) diff --git a/docs/maintainers/vcpkg_fixup_cmake_targets.md b/docs/maintainers/vcpkg_fixup_cmake_targets.md index 01e4fd3e1ee819..dbb6fb4325bf5f 100644 --- a/docs/maintainers/vcpkg_fixup_cmake_targets.md +++ b/docs/maintainers/vcpkg_fixup_cmake_targets.md @@ -1,5 +1,9 @@ # vcpkg_fixup_cmake_targets +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fixup_cmake_targets.md). + +**This function has been deprecated in favor of `vcpkg_cmake_config_fixup` from the vcpkg-cmake-config port.** + Merge release and debug CMake targets and configs to support multiconfig generators. Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. @@ -22,7 +26,7 @@ This needs to be specified if the port name differs from the `find_package()` na Defaults to `share/${PORT}`. -### DO_NOT_DELETE_PARENT_CONFIG_PATH +### DO_NOT_DELETE_PARENT_CONFIG_PATH By default the parent directory of CONFIG_PATH is removed if it is named "cmake". Passing this option disable such behavior, as it is convenient for ports that install more than one CMake package configuration file. @@ -49,4 +53,4 @@ Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targe * [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) ## Source -[scripts/cmake/vcpkg_fixup_cmake_targets.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) +[scripts/cmake/vcpkg\_fixup\_cmake\_targets.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) diff --git a/docs/maintainers/vcpkg_fixup_pkgconfig.md b/docs/maintainers/vcpkg_fixup_pkgconfig.md index 23cee61429fb84..4b4b1ce0179ca8 100644 --- a/docs/maintainers/vcpkg_fixup_pkgconfig.md +++ b/docs/maintainers/vcpkg_fixup_pkgconfig.md @@ -1,5 +1,7 @@ # vcpkg_fixup_pkgconfig +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fixup_pkgconfig.md). + Fix common paths in *.pc files and make everything relativ to $(prefix) ## Usage @@ -40,4 +42,4 @@ Still work in progress. If there are more cases which can be handled here feel f * [brotli](https://github.com/Microsoft/vcpkg/blob/master/ports/brotli/portfile.cmake) ## Source -[scripts/cmake/vcpkg_fixup_pkgconfig.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_pkgconfig.cmake) +[scripts/cmake/vcpkg\_fixup\_pkgconfig.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_pkgconfig.cmake) diff --git a/docs/maintainers/vcpkg_from_bitbucket.md b/docs/maintainers/vcpkg_from_bitbucket.md index ad41a14311a97c..dd32fde023df0e 100644 --- a/docs/maintainers/vcpkg_from_bitbucket.md +++ b/docs/maintainers/vcpkg_from_bitbucket.md @@ -1,5 +1,7 @@ # vcpkg_from_bitbucket +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_bitbucket.md). + Download and extract a project from Bitbucket. Enables support for installing HEAD `vcpkg.exe install --head `. @@ -56,4 +58,4 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake) +[scripts/cmake/vcpkg\_from\_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake) diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md index ac8ad68407a856..ce6daa5e7c240b 100644 --- a/docs/maintainers/vcpkg_from_git.md +++ b/docs/maintainers/vcpkg_from_git.md @@ -1,5 +1,7 @@ # vcpkg_from_git +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_git.md). + Download and extract a project from git ## Usage: @@ -44,4 +46,4 @@ This parameter is used for automatic REF updates for certain ports in the centra * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake) +[scripts/cmake/vcpkg\_from\_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake) diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md index db557c1c886949..c11b2ed16f0428 100644 --- a/docs/maintainers/vcpkg_from_github.md +++ b/docs/maintainers/vcpkg_from_github.md @@ -1,5 +1,7 @@ # vcpkg_from_github +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_github.md). + Download and extract a project from GitHub. Enables support for `install --head`. ## Usage: @@ -71,4 +73,4 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_github.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake) +[scripts/cmake/vcpkg\_from\_github.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake) diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md index e2160b27b5dd97..082261effe0060 100644 --- a/docs/maintainers/vcpkg_from_gitlab.md +++ b/docs/maintainers/vcpkg_from_gitlab.md @@ -1,5 +1,7 @@ # vcpkg_from_gitlab +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_gitlab.md). + Download and extract a project from Gitlab instances. Enables support for `install --head`. ## Usage: @@ -66,4 +68,4 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) ## Source -[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) +[scripts/cmake/vcpkg\_from\_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) diff --git a/docs/maintainers/vcpkg_from_sourceforge.md b/docs/maintainers/vcpkg_from_sourceforge.md index 2bf7f25a6e7fe8..7ce256b2ef3f99 100644 --- a/docs/maintainers/vcpkg_from_sourceforge.md +++ b/docs/maintainers/vcpkg_from_sourceforge.md @@ -1,5 +1,7 @@ # vcpkg_from_sourceforge +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_sourceforge.md). + Download and extract a project from sourceforge. ## Usage: @@ -65,4 +67,4 @@ Specifies that the default removal of the top level folder should not occur. * [tinyfiledialogs](https://github.com/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_sourceforge.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_sourceforge.cmake) +[scripts/cmake/vcpkg\_from\_sourceforge.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_sourceforge.cmake) diff --git a/docs/maintainers/vcpkg_get_program_files_platform_bitness.md b/docs/maintainers/vcpkg_get_program_files_platform_bitness.md index d4d5480d07913f..ed74869b805ef5 100644 --- a/docs/maintainers/vcpkg_get_program_files_platform_bitness.md +++ b/docs/maintainers/vcpkg_get_program_files_platform_bitness.md @@ -1,5 +1,7 @@ # vcpkg_get_program_files_platform_bitness +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_get_program_files_platform_bitness.md). + Get the Program Files directory of the current platform's bitness: either `$ENV{ProgramW6432}` on 64-bit windows, or `$ENV{PROGRAMFILES}` on 32-bit windows. @@ -10,4 +12,4 @@ vcpkg_get_program_files_platform_bitness() ``` ## Source -[scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake) +[scripts/cmake/vcpkg\_get\_program\_files\_platform\_bitness.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake) diff --git a/docs/maintainers/vcpkg_get_windows_sdk.md b/docs/maintainers/vcpkg_get_windows_sdk.md index 30cac43de6495a..d3a3ee81757087 100644 --- a/docs/maintainers/vcpkg_get_windows_sdk.md +++ b/docs/maintainers/vcpkg_get_windows_sdk.md @@ -1,5 +1,7 @@ # vcpkg_get_windows_sdk +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_get_windows_sdk.md). + Get the Windows SDK number. ## Usage: @@ -8,4 +10,4 @@ vcpkg_get_windows_sdk() ``` ## Source -[scripts/cmake/vcpkg_get_windows_sdk.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_windows_sdk.cmake) +[scripts/cmake/vcpkg\_get\_windows\_sdk.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_windows_sdk.cmake) diff --git a/docs/maintainers/vcpkg_install_cmake.md b/docs/maintainers/vcpkg_install_cmake.md index 058a2ef61f3cb8..10c9d0b325c738 100644 --- a/docs/maintainers/vcpkg_install_cmake.md +++ b/docs/maintainers/vcpkg_install_cmake.md @@ -1,5 +1,9 @@ # vcpkg_install_cmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_cmake.md). + +**This function has been deprecated in favor of `vcpkg_cmake_install` from the vcpkg-cmake port.** + Build and install a cmake project. ## Usage: @@ -22,4 +26,4 @@ parameter. * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_cmake.cmake) +[scripts/cmake/vcpkg\_install\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_cmake.cmake) diff --git a/docs/maintainers/vcpkg_install_gn.md b/docs/maintainers/vcpkg_install_gn.md index 48bd81a02d4fe9..46018ffef35404 100644 --- a/docs/maintainers/vcpkg_install_gn.md +++ b/docs/maintainers/vcpkg_install_gn.md @@ -1,5 +1,7 @@ # vcpkg_install_gn +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_gn.md). + Installs a GN project ## Usage: @@ -20,4 +22,4 @@ Only install the specified targets. Note: includes must be handled separately ## Source -[scripts/cmake/vcpkg_install_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_gn.cmake) +[scripts/cmake/vcpkg\_install\_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_gn.cmake) diff --git a/docs/maintainers/vcpkg_install_make.md b/docs/maintainers/vcpkg_install_make.md index c1baa36395025c..19f4b5ca8f1e3b 100644 --- a/docs/maintainers/vcpkg_install_make.md +++ b/docs/maintainers/vcpkg_install_make.md @@ -1,5 +1,7 @@ # vcpkg_install_make +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_make.md). + Build and install a make project. ## Usage: @@ -21,4 +23,4 @@ This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.m * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_make.cmake) +[scripts/cmake/vcpkg\_install\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_make.cmake) diff --git a/docs/maintainers/vcpkg_install_meson.md b/docs/maintainers/vcpkg_install_meson.md index 8d8cc5bb01b501..6d52dd11b9af57 100644 --- a/docs/maintainers/vcpkg_install_meson.md +++ b/docs/maintainers/vcpkg_install_meson.md @@ -1,5 +1,7 @@ # vcpkg_install_meson +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_meson.md). + Builds a meson project previously configured with `vcpkg_configure_meson()`. ## Usage @@ -13,4 +15,4 @@ vcpkg_install_meson() * [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_meson.cmake) +[scripts/cmake/vcpkg\_install\_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_meson.cmake) diff --git a/docs/maintainers/vcpkg_install_msbuild.md b/docs/maintainers/vcpkg_install_msbuild.md index 65da246678a59e..151a42410f5b07 100644 --- a/docs/maintainers/vcpkg_install_msbuild.md +++ b/docs/maintainers/vcpkg_install_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_install_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_msbuild.md). + Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. ## Usage @@ -90,4 +92,4 @@ Additional options passed to msbuild for Debug builds. These are in addition to * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) +[scripts/cmake/vcpkg\_install\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_install_nmake.md b/docs/maintainers/vcpkg_install_nmake.md index f4f490b2ba61df..9ac942ef2c3357 100644 --- a/docs/maintainers/vcpkg_install_nmake.md +++ b/docs/maintainers/vcpkg_install_nmake.md @@ -1,5 +1,7 @@ # vcpkg_install_nmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_nmake.md). + Build and install a msvc makefile project. ## Usage: @@ -63,4 +65,4 @@ This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake) +[scripts/cmake/vcpkg\_install\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake) diff --git a/docs/maintainers/vcpkg_install_qmake.md b/docs/maintainers/vcpkg_install_qmake.md index 51421247b26d16..4efc1579485aac 100644 --- a/docs/maintainers/vcpkg_install_qmake.md +++ b/docs/maintainers/vcpkg_install_qmake.md @@ -1,5 +1,7 @@ # vcpkg_install_qmake +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_qmake.md). + Build and install a qmake project. ## Usage: @@ -21,4 +23,4 @@ staging directories. * [libqglviewer](https://github.com/Microsoft/vcpkg/blob/master/ports/libqglviewer/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_qmake.cmake) +[scripts/cmake/vcpkg\_install\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_qmake.cmake) diff --git a/docs/maintainers/vcpkg_minimum_required.md b/docs/maintainers/vcpkg_minimum_required.md index 419338956286c2..caf975f61e254a 100644 --- a/docs/maintainers/vcpkg_minimum_required.md +++ b/docs/maintainers/vcpkg_minimum_required.md @@ -1,5 +1,7 @@ # vcpkg_minimum_required +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_minimum_required.md). + Asserts that the version of the vcpkg program being used to build a port is later than the supplied date, inclusive. ## Usage @@ -12,4 +14,4 @@ vcpkg_minimum_required(VERSION 2021-01-13) The date-version to check against. ## Source -[scripts/cmake/vcpkg_minimum_required.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_minimum_required.cmake) +[scripts/cmake/vcpkg\_minimum\_required.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_minimum_required.cmake) diff --git a/docs/maintainers/vcpkg_replace_string.md b/docs/maintainers/vcpkg_replace_string.md index 9269609859c81b..179b8a08d7ab31 100644 --- a/docs/maintainers/vcpkg_replace_string.md +++ b/docs/maintainers/vcpkg_replace_string.md @@ -1,5 +1,7 @@ # vcpkg_replace_string +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_replace_string.md). + Replace a string in a file. ```cmake @@ -8,4 +10,4 @@ vcpkg_replace_string(filename match_string replace_string) ## Source -[scripts/cmake/vcpkg_replace_string.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_replace_string.cmake) +[scripts/cmake/vcpkg\_replace\_string.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_replace_string.cmake) diff --git a/docs/regenerate.ps1 b/docs/regenerate.ps1 index fa80bd62ab5a90..93e78a3c915d53 100755 --- a/docs/regenerate.ps1 +++ b/docs/regenerate.ps1 @@ -15,9 +15,73 @@ if (-not (Test-Path "$VcpkgRoot/.vcpkg-root")) { throw "Invalid vcpkg instance, did you forget -VcpkgRoot?" } -$tableOfContents = @() -$internalTableOfContents = @() +class CMakeDocumentation { + [String]$Filename + [String[]]$ActualDocumentation + [Bool]$IsDeprecated + [String]$DeprecationMessage + [Bool]$HasError +} + +[String[]]$cmakeScriptsPorts = @( + 'vcpkg-cmake' + 'vcpkg-cmake-config' +) + +[CMakeDocumentation[]]$tableOfContents = @() +[CMakeDocumentation[]]$internalTableOfContents = @() +$portTableOfContents = [ordered]@{} + +function RelativeUnixPathTo +{ + Param( + [Parameter(Mandatory)] + [String]$Path, + [Parameter(Mandatory)] + [String]$Base + ) + + $Path = Resolve-Path -LiteralPath $Path + $Base = Resolve-Path -LiteralPath $Base + + if ($IsWindows) + { + if ((Split-Path -Qualifier $Path) -ne (Split-Path -Qualifier $Base)) + { + throw "It is not possible to get the relative unix path from $Base to $Path" + } + } + + $Path = $Path -replace '\\','/' + $Base = $Base -replace '\\','/' + + [String[]]$PathArray = $Path -split '/' + [String[]]$BaseArray = $Base -split '/' + + [String[]]$Result = @() + + $Idx = 0 + + while ($Idx -lt $PathArray.Length -and $Idx -lt $BaseArray.Length) + { + if ($PathArray[$Idx] -ne $BaseArray[$Idx]) + { + break + } + ++$Idx + } + + for ($BaseIdx = $Idx; $BaseIdx -lt $BaseArray.Length; ++$BaseIdx) + { + $Result += '..' + } + for ($PathIdx = $Idx; $PathIdx -lt $PathArray.Length; ++$PathIdx) + { + $Result += $PathArray[$PathIdx] + } + $Result -join '/' +} function WriteFile { Param( @@ -33,41 +97,81 @@ function WriteFile function FinalDocFile { Param( - [String[]]$Value, - [String]$Name + [CMakeDocumentation]$Docs, + [String]$PathToFile # something like docs/maintainers/blah.md ) - $Value + @( + [String[]]$documentation = @() + + if ($Docs.ActualDocumentation.Length -eq 0) + { + throw "Invalid documentation: empty docs" + } + + $documentation += $Docs.ActualDocumentation[0] # name line + if ($Docs.IsDeprecated) + { + if ($null -eq $Docs.DeprecationMessage) + { + $documentation += @("", "**This function has been deprecated**") + } + else + { + $documentation += @("", "**This function has been deprecated $($Docs.DeprecationMessage)**") + } + } + $documentation += @("", "The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/$PathToFile).") + + $documentation += $Docs.ActualDocumentation[1..$Docs.ActualDocumentation.Length] + + $relativePath = RelativeUnixPathTo $Docs.Filename $VcpkgRoot + $documentation += @( "", "## Source", - "[scripts/cmake/$Name](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/$Name)", + "[$($relativePath -replace '_','\_')](https://github.com/Microsoft/vcpkg/blob/master/$relativePath)", "" ) + + $documentation } -Get-ChildItem "$VcpkgRoot/scripts/cmake" -Filter '*.cmake' | ForEach-Object { - $filename = $_ - [String[]]$contents = Get-Content $filename +function ParseCmakeDocComment +{ + Param( + [Parameter(Mandatory)] + [System.IO.FileSystemInfo]$Filename + ) - if ($contents[0] -eq '# DEPRECATED') { - return + $Docs = New-Object 'CMakeDocumentation' + $Docs.HasError = $False + $Docs.IsDeprecated = $False + $Docs.Filename = $Filename.FullName + + [String[]]$contents = Get-Content $Filename + + if ($contents[0] -eq '# DEPRECATED') + { + $Docs.IsDeprecated = $True + } + elseif($contents[0] -match '^# DEPRECATED: (.*)$') + { + $Docs.IsDeprecated = $True + $Docs.DeprecationMessage = $matches[1] } [String]$startCommentRegex = '#\[(=*)\[' [String]$endCommentRegex = '' [Bool]$inComment = $False - [Bool]$failThisFile = $False - [Bool]$isInternalFunction = $filename.Name.StartsWith("vcpkg_internal") -or $filename.Name.StartsWith("z_vcpkg") $contents = $contents | ForEach-Object { if (-not $inComment) { if ($_ -match "^\s*${startCommentRegex}(\.[a-z]*)?:?\s*$") { if (-not [String]::IsNullOrEmpty($matches[2]) -and $matches[2] -ne '.md') { - Write-Warning "The documentation in ${filename} doesn't seem to be markdown (extension: $($matches[2])). Only markdown is supported; please rewrite the documentation in markdown." + Write-Warning "The documentation in $($Filename.FullName) doesn't seem to be markdown (extension: $($matches[2])). Only markdown is supported; please rewrite the documentation in markdown." } $inComment = $True $endCommentRegex = "\]$($matches[1])\]" } elseif ($_ -match $startCommentRegex) { - $failThisFile = $True + $Docs.HasError = $True Write-Warning "Invalid start of comment -- the comment start must be at the beginning of the line. (on line: `"$_`")" } else { @@ -78,7 +182,7 @@ Get-ChildItem "$VcpkgRoot/scripts/cmake" -Filter '*.cmake' | ForEach-Object { $inComment = $False $endCommentRegex = '' } elseif ($_ -match $endCommentRegex) { - $failThisFile = $True + $Docs.HasError = $True Write-Warning "Invalid end of comment -- the comment end must be on it's own on a line. (on line: `"$_`")" } else { @@ -89,47 +193,147 @@ Get-ChildItem "$VcpkgRoot/scripts/cmake" -Filter '*.cmake' | ForEach-Object { } if ($inComment) { - Write-Warning "File ${filename} has an unclosed comment." - return + Write-Warning "File $($Filename.FullName) has an unclosed comment." + $Docs.HasError = $True } - if ($failThisFile) { - return + if ($contents.Length -ne 0) + { + $Docs.ActualDocumentation = $contents } + $Docs +} + +Get-ChildItem "$VcpkgRoot/scripts/cmake" -Filter '*.cmake' | ForEach-Object { + $docs = ParseCmakeDocComment $_ + [Bool]$isInternalFunction = $_.Name.StartsWith("vcpkg_internal") -or $_.Name.StartsWith("z_vcpkg") + + if ($docs.IsDeprecated -and $null -eq $docs.ActualDocumentation) + { + return + } + if ($docs.HasError) + { + return + } - if ($contents) { - if ($isInternalFunction) { + if ($null -ne $docs.ActualDocumentation) + { + if ($isInternalFunction) + { + $pathToFile = "maintainers/internal/$($_.BaseName).md" WriteFile ` - -Path "$PSScriptRoot/maintainers/internal/$($filename.BaseName).md" ` - -Value (FinalDocFile $contents $filename.Name) + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs) - $internalTableOfContents += $filename.BaseName - } else { + $internalTableOfContents += $docs + } + else + { + $pathToFile = "maintainers/$($_.BaseName).md" WriteFile ` - -Path "$PSScriptRoot/maintainers/$($filename.BaseName).md" ` - -Value (FinalDocFile $contents $filename.Name) + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs $pathToFile) - $tableOfContents += $filename.BaseName + $tableOfContents += $docs } - } elseif (-not $isInternalFunction) { + } + elseif (-not $isInternalFunction) + { # don't worry about undocumented internal functions - Write-Warning "The cmake function in file $filename doesn't seem to have any documentation. Make sure the documentation comments are correctly written." + Write-Warning "The cmake function in file $($_.FullName) doesn't seem to have any documentation. Make sure the documentation comments are correctly written." + } +} + +$cmakeScriptsPorts | ForEach-Object { + $portName = $_ + + Copy-Item "$VcpkgRoot/ports/$portName/README.md" "$PSScriptRoot/maintainers/ports/$portName.md" + New-Item -Path "$PSScriptRoot/maintainers/ports/$portName" -Force -ItemType 'Directory' | Out-Null + + $portTableOfContents[$portName] = @() + + Get-ChildItem "$VcpkgRoot/ports/$portName" -Filter '*.cmake' | ForEach-Object { + if ($_.Name -eq 'vcpkg-port-config.cmake' -or $_.Name -eq 'portfile.cmake') + { + return + } + + $docs = ParseCmakeDocComment $_ + + if ($docs.IsDeprecated -and $null -eq $docs.ActualDocumentation) + { + return + } + if ($docs.HasError) + { + return + } + + if ($null -ne $docs.ActualDocumentation) + { + $pathToFile = "maintainers/ports/$portName/$($_.BaseName).md" + WriteFile ` + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs $pathToFile) + $portTableOfContents[$portName] += $docs + } + else + { + Write-Warning "The cmake function in file $($_.FullName) doesn't seem to have any documentation. Make sure the documentation comments are correctly written." + } } } $portfileFunctionsContent = @( - '', + '', '', '# Portfile helper functions') -$tableOfContents | Sort-Object -Culture '' | ForEach-Object { - $portfileFunctionsContent += "- [$($_ -replace '_','\_')]($_.md)" +$DocsName = @{ expression = { Split-Path -LeafBase $_.Filename } } +$tableOfContents | Sort-Object -Property $DocsName -Culture '' | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + if ($_.IsDeprecated) + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')]($name.md) (deprecated)" + } + else + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')]($name.md)" + } } $portfileFunctionsContent += @("", "## Internal Functions", "") -$internalTableOfContents | Sort-Object -Culture '' | ForEach-Object { - $portfileFunctionsContent += "- [$($_ -replace '_','\_')](internal/$_.md)" +$internalTableOfContents | Sort-Object -Property $DocsName -Culture '' | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + if ($_.IsDeprecated) + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')](internal/$name.md) (deprecated)" + } + else + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')](internal/$name.md)" + } } + +$portfileFunctionsContent += @("", "## Scripts from Ports") +$portTableOfContents.GetEnumerator() | ForEach-Object { + $portName = $_.Name + $cmakeDocs = $_.Value + $portfileFunctionsContent += @("", "### [$portName](ports/$portName.md)", "") + $cmakeDocs | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + if ($_.IsDeprecated) + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')](ports/$portName/$name.md) (deprecated)" + } + else + { + $portfileFunctionsContent += "- [$($name -replace '_','\_')](ports/$portName/$name.md)" + } + } +} + $portfileFunctionsContent += "" # final newline WriteFile ` diff --git a/docs/specifications/binarycaching.md b/docs/specifications/binarycaching.md index 3bbd766e1adb03..d9c55d5d140ffb 100644 --- a/docs/specifications/binarycaching.md +++ b/docs/specifications/binarycaching.md @@ -2,6 +2,8 @@ **Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** +**Up-to-date documentation is available at [Binarycaching](../users/binarycaching.md).** + ## Motivation The primary motivation of binary caching is to accelerate two broad scenarios in an easily accessible way diff --git a/docs/specifications/export-command.md b/docs/specifications/export-command.md index 4111bfed44b531..5464e9408d5783 100644 --- a/docs/specifications/export-command.md +++ b/docs/specifications/export-command.md @@ -1,5 +1,7 @@ # Binary Export (Apr 28, 2017) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + ## 1. Motivation ### A. Build once and share diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md index 81afba0807c04a..5737c650a64dd7 100644 --- a/docs/specifications/feature-packages.md +++ b/docs/specifications/feature-packages.md @@ -1,6 +1,8 @@ # Proposal: Features / Feature packages (Feb 23 2017) -**Note: this is the proposal as it was initially accepted and does not necessarily reflect the current behavior.** +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Selecting Library Features](../users/selecting-library-features.md).** ## 1. Motivation diff --git a/docs/specifications/manifests.md b/docs/specifications/manifests.md index bc4e1d7cca4ad3..f095e77f25cc8c 100644 --- a/docs/specifications/manifests.md +++ b/docs/specifications/manifests.md @@ -1,5 +1,9 @@ # Manifests -- `vcpkg.json` +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Manifests](../users/manifests.md).** + For many other language package managers, there exists a way of writing one's dependencies in a declarative manifest format; we want something similar for vcpkg. What follows is the specification of that feature; this should mean that vcpkg becomes far more user and enterprise-friendly, and is additionally an important diff --git a/docs/specifications/ports-overlay.md b/docs/specifications/ports-overlay.md index d486cfe193bff1..632954fc34375d 100644 --- a/docs/specifications/ports-overlay.md +++ b/docs/specifications/ports-overlay.md @@ -1,5 +1,6 @@ # Ports Overlay (Jun 19, 2019) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** ## 1. Motivation diff --git a/docs/specifications/prefab.md b/docs/specifications/prefab.md index 4574e01ee8779a..f94758b490f8a0 100644 --- a/docs/specifications/prefab.md +++ b/docs/specifications/prefab.md @@ -1,5 +1,7 @@ # Vcpkg: export Android prefab Archives (AAR files) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + Vcpkg can export android archives ([AAR files](https://developer.android.com/studio/projects/android-library)). Once an archive is created, it can imported in Android Studio as a native dependent. The archive is automatically consumed using [android studio's prefab tool](https://github.com/google/prefab). For more information on Prefab, refer to: diff --git a/docs/specifications/registries-2.md b/docs/specifications/registries-2.md index 41a32886b9c62e..46429db705e3b8 100644 --- a/docs/specifications/registries-2.md +++ b/docs/specifications/registries-2.md @@ -1,5 +1,7 @@ # Registries: Take 2 (including Git Registries) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + Originally, the design of registries was decided upon and written up in the [Registries RFC](registries.md). However, as we've gotten further into the design process of git registries and versioning, and discussed the interaction of versioning with registries, diff --git a/docs/specifications/registries.md b/docs/specifications/registries.md index 48b392a5c1d684..426593829cf005 100644 --- a/docs/specifications/registries.md +++ b/docs/specifications/registries.md @@ -1,5 +1,7 @@ # Package Federation: Custom Registries +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + As it is now, vcpkg has over 1400 ports in the default registry (the `/ports` directory). For the majority of users, this repository of packages is enough. However, many enterprises need to more closely control their dependencies for one reason or another, and this document diff --git a/docs/specifications/scripts-extraction.md b/docs/specifications/scripts-extraction.md index a617a77413f735..396e2d4e0273aa 100644 --- a/docs/specifications/scripts-extraction.md +++ b/docs/specifications/scripts-extraction.md @@ -1,5 +1,7 @@ # Scripts Tree Extraction +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + ## Background We extracted vcpkg-tool as part of a future wherein Registries are the primary mechanism for interacting with the ports tree, which would allow the vcpkg tool and associated artifacts to be deployed and figure the rest out on their own. Unfortunately, we have concurrently edited things in the so called "scripts" tree which lives in support of ports but really probably belongs in the vcpkg-tool repo. diff --git a/docs/specifications/versioning.md b/docs/specifications/versioning.md index 960e87f1892019..e8122c3595a517 100644 --- a/docs/specifications/versioning.md +++ b/docs/specifications/versioning.md @@ -1,5 +1,9 @@ # Versioning Specification +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Versioning](../users/versioning.md).** + ## Glossary Some of the terms used in this document have similar meaning when discussed by the community, and because of that, they can cause confusion and ambiguity. To solve this issue, we will assign specific meaning to these terms and try to keep a consistent usage through the document. diff --git a/docs/users/android.md b/docs/users/android.md index 6ff1d05d15bef7..b56030f55d7014 100644 --- a/docs/users/android.md +++ b/docs/users/android.md @@ -1,5 +1,7 @@ # Vcpkg and Android +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/android.md).** + Android is not officialy supported, and there are no official android triplets at the moment. However, some packages can compile to Android, and the situation is improving: see the list of [PR related to Android](https://github.com/Microsoft/vcpkg/pulls?q=+android+). diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md index 07e238f925635f..b7783698454fb4 100644 --- a/docs/users/binarycaching.md +++ b/docs/users/binarycaching.md @@ -1,5 +1,7 @@ # Binary Caching +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/binarycaching.md).** + Binary caching is vcpkg's method for reusing package builds between projects and between machines. Think of it as a "package restore accelerator" that gives you the same results as though you built from source. Each build is packaged independently, so changing one library only requires rebuilding consuming libraries. If your CI provider offers a native "caching" function, we recommend using both methods for the most performant results. @@ -112,6 +114,38 @@ Vcpkg will attempt to avoid revealing the SAS during normal operations, however: 1. It will be printed in full if `--debug` is passed 2. It will be passed as a command line parameter to subprocesses, such as `curl.exe` +### Google Cloud Storage (experimental) + +> Note: This is an experimental feature and may change or be removed at any time + +Vcpkg supports interfacing with Google Cloud Storage (GCS) via the `x-gcs` source type. + +``` +x-gcs,[,] +``` + +First, you need to create an Google Cloud Platform Account as well as a storage bucket ([GCS Quick Start](https://cloud.google.com/storage/docs/quickstart-gsutil)]. + +As part of this quickstart you would have configured the `gsutil` command-line tool to authenticate with Google Cloud. +Vcpkg will use this command-line tool, make sure it is in your search path for executables. + +Example 1 (using a bucket without a common prefix for the objects): + +``` +x-gcs,gs:///,readwrite +``` + +Example 2 (using a bucket and a prefix for the objects): + +``` +x-gcs,gs:///my-vcpkg-cache/maybe/with/many/slashes/,readwrite +x-gcs,gs:///my-vcpkg-cache/maybe/with`,commas/too!/,readwrite +``` + +Commas (`,`) are valid as part of a object prefix in GCS, just remember to escape them in the vcpkg configuration, as +shown in the previous example. Note that GCS does not have folders (some of the GCS tools simulate folders), it is not +necessary to create or otherwise manipulate the prefix used by your vcpkg cache. + ## Configuration Binary caching is configured via a combination of defaults, the environment variable `VCPKG_BINARY_SOURCES` (set to `;;...`), and the command line option `--binarysource=`. Source options are evaluated in order of defaults, then environment, then command line. Binary caching can be completely disabled by passing `--binarysource=clear` as the last command line option. diff --git a/docs/users/config-environment.md b/docs/users/config-environment.md index 309a7865426bc6..169b2aff73299f 100644 --- a/docs/users/config-environment.md +++ b/docs/users/config-environment.md @@ -1,5 +1,7 @@ ## Environment and Configuration +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/config-environment.md).** + ### Environment Variables #### VCPKG_DOWNLOADS @@ -38,11 +40,15 @@ Example: `D:\2017` This environment variable can be set to a triplet name which will be used for unqualified triplet references in command lines. +#### VCPKG_DEFAULT_HOST_TRIPLET + +This environment variable can be set to a triplet name which will be used for unqualified host port references in command lines and all host port references in dependency lists. See [the Tools documentation](tools.md) for more information. + #### VCPKG_OVERLAY_PORTS This environment variable allows users to override ports with alternate versions according to the -[ports overlay](../specifications/ports-overlay.md) specification. List paths to overlays using -the platform dependent PATH seperator (Windows `;` | others `:`) +[ports overlay](../specifications/ports-overlay.md) specification. List paths to overlays using +the platform dependent PATH seperator (Windows `;` | others `:`) Example (Windows): `C:\custom-ports\boost;C:\custom-ports\sqlite3` @@ -50,7 +56,7 @@ Example (Windows): `C:\custom-ports\boost;C:\custom-ports\sqlite3` This environment variable allows users to add directories to search for triplets. [Example: overlay triplets](../examples/overlay-triplets-linux-dynamic.md). -List paths to overlays using the platform dependent PATH seperator (Windows `;`, others `:`) +List paths to overlays using the platform dependent PATH seperator (Windows `;`, others `:`) #### VCPKG_FORCE_SYSTEM_BINARIES diff --git a/docs/users/host-dependencies.md b/docs/users/host-dependencies.md new file mode 100644 index 00000000000000..061e21804518be --- /dev/null +++ b/docs/users/host-dependencies.md @@ -0,0 +1,59 @@ +# Host Dependencies + +Tools used at build time by other ports to generate code or implement a custom build system can be packaged inside vcpkg. + +## Consuming + +When consuming a port as a tool, you must set the dependency's `"host"` field to true. For example: +```json +{ + "name": "contoso-http-library", + "version-string": "1.0.0", + "description": "Contoso's http runtime library", + "dependencies": [ + "contoso-core-library", + { + "name": "contoso-code-generator", + "host": true + }, + { + "name": "contoso-build-system", + "host": true + } + ] +} +``` +In this case, the `contoso-code-generator` and `contoso-build-system` (including any transitive dependencies) will be built and installed for the host triplet before `contoso-http-library` is built. + +>Note: Consumers must use `vcpkg.json` instead of `CONTROL` as their metadata format. You can easily convert an existing `CONTROL` file using `vcpkg format-manifest /path/to/CONTROL`. + +Then, within the portfile of the consumer (`contoso-http-library` in the example), the CMake variable `CURRENT_HOST_INSTALLED_DIR` will be defined to `installed/` and should be used to locate any required assets. In the example, `contoso-code-generator` might have installed `tools/contoso-code-generator/ccg.exe` which the consumer would add to its local path via +```cmake +# ports/contoso-http-library/portfile.cmake +vcpkg_add_to_path(${CURRENT_HOST_INSTALLED_DIR}/tools/contoso-code-generator) +``` + +## Specifying the Host Triplet + +The default host triplets are chosen based on the host architecture and operating system, for example `x64-windows`, `x64-linux`, or `x64-osx`. They can be overridden via: + +1. In CMake-based manifest mode, calling `set(VCPKG_HOST_TRIPLET "" CACHE STRING "")` before the first `project()` directive +2. In MSBuild-based manifest mode, setting the `VcpkgHostTriplet` property +3. On the command line, via the flag `--host-triplet=...` +4. The `VCPKG_DEFAULT_HOST_TRIPLET` environment variable + +## Producing + +Producing a tool has no special requirements; tools should be authored as a standard port, following all the normal policies and practices. Notably, they should build against `TARGET_TRIPLET`, not `HOST_TRIPLET` within the context of their portfile. + +Sometimes, it can be useful to determine whether the current context is a cross-compiling one or not. This should be done by comparing the strings `TARGET_TRIPLET` and `HOST_TRIPLET`. For example: + +```cmake +string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" I_AM_NOT_CROSSCOMPILING) + +if(TARGET_TRIPLET STREQUAL HOST_TRIPLET) + # This is a native build +else() + # This is a cross build +endif() +``` diff --git a/docs/users/integration.md b/docs/users/integration.md index e9d8940aa500c3..ba8ea4d8bcbce3 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -1,5 +1,7 @@ ## Buildsystem Integration +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/integration.md).** + Vcpkg offers many ways to integrate into your build so you can do what's right for your project. There are two main categories of integration: - [`integrate` command](#integrate) @@ -30,6 +32,7 @@ Here are some examples, though this is not an exhaustive list: To get a full list for all your installed packages, run `vcpkg owns manual-link`. + #### CMake toolchain file (Recommended for Open Source CMake projects) ```no-highlight cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake diff --git a/docs/users/manifests.md b/docs/users/manifests.md index c5addbba73a394..9cec98cfaa91a1 100644 --- a/docs/users/manifests.md +++ b/docs/users/manifests.md @@ -1,36 +1,37 @@ # Manifest Mode -vcpkg has two modes of operation - classic mode and manifest mode. - -In classic mode, vcpkg produces an "installed" tree, -whose contents are changed by explicit calls to `vcpkg install` or `vcpkg remove`. -The installed tree is intended for consumption by any number of projects: -for example, installing a bunch of libraries and then using those libraries from Visual Studio, -without additional configuration. -Because the installed tree is not associated with an individual project, -it's similar to tools like `brew` or `apt`, -except that the installed tree is vcpkg-installation-local, -rather than global to a system or user. - -In manifest mode, an installed tree is associated with a particular project rather than the vcpkg installation. -The set of installed ports is controlled by editing the project's "manifest file", -and the installed tree is placed in the project directory or build directory. -This mode acts more similarly to language package managers like Cargo, or npm. -We recommend using this manifest mode whenever possible, -because it allows one to encode a project's dependencies explicitly in a project file, -rather than in the documentation, making your project much easier to consume. - -Manifest mode is in beta, but one can use it from the CMake integration, -which will be stable when used via things like `find_package`. -This is the recommended way to use manifest mode. - -In this document, we have basic information on [Writing a Manifest](#writing-a-manifest), -the [vcpkg Command Line Interface](#command-line-interface), -and a little more information on [CMake](#cmake-integration) integration. +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/manifests.md).** + +vcpkg has two modes of consuming dependencies - classic mode and manifest mode. + +In classic mode, vcpkg produces an "installed" tree, whose contents are changed by explicit calls to `vcpkg install` or +`vcpkg remove`. The installed tree is intended for consumption by any number of projects: for example, installing a +bunch of libraries and then using those libraries from Visual Studio, without additional configuration. Because the +installed tree is not associated with an individual project, it's similar to tools like `brew` or `apt`, except that the +installed tree is vcpkg-installation-local, rather than global to a system or user. + +In manifest mode, an installed tree is associated with a particular project rather than the vcpkg installation. The set +of installed ports is controlled by editing the project's "manifest file", and the installed tree is placed in the +project directory or build directory. This mode acts more similarly to language package managers like Cargo, or npm. We +recommend using this manifest mode whenever possible, because it allows one to encode a project's dependencies +explicitly in a project file, rather than in the documentation, making your project much easier to consume. + +Manifest mode is in beta, but it can be used from the CMake or MSBuild integration, which will be stable when used via +things like `find_package`. This is the recommended way to use manifest mode. Check out the [manifest cmake example](../examples/manifest-mode-cmake.md) for an example project using CMake and manifest mode. +## Table of Contents + +- [Simple Example Manifest](#simple-example-manifest) +- [Manifest Syntax Reference](#manifest-syntax-reference) +- [Command Line Interface](#command-line-interface) +- [CMake Integration](#cmake-integration) +- [MSBuild Integration](#msbuild-integration) + +See also [the original specification](../specifications/manifests.md) for more low-level details. + ## Simple Example Manifest ```json @@ -50,7 +51,7 @@ manifest mode. } ``` -## Writing a Manifest +## Manifest Syntax Reference A manifest is a JSON-formatted file named `vcpkg.json` which lies at the root of your project. It contains all the information a person needs to know to get dependencies for your project, @@ -274,52 +275,177 @@ and that's the `"default-features"` field, which is an array of feature names. ## Command Line Interface -The command line interface around the new manifest mode is pretty simple. -There's only one command that one really needs to worry about, `vcpkg install`, -although `vcpkg search` is still useful. -Since manifest mode is still in beta, you'll need to pass a feature flag: `manifests`. -There are a few ways to pass this feature flag: +**Experimental behind the `manifests` feature flag** + +When invoked from any subdirectory of the directory containing `vcpkg.json`, `vcpkg install` with no package arguments +will install all manifest dependencies into `/vcpkg_installed/`. Most of `vcpkg +install`'s classic mode parameters function the same in manifest mode. + +### `--x-install-root=` + +**Experimental and may change or be removed at any time** + +Specifies an alternate install location than `/vcpkg_installed/`. + +### `--triplet=` + +Specify the triplet to be used for installation. + +Defaults to the same default triplet as in classic mode. + +### `--x-feature=` + +**Experimental and may change or be removed at any time** + +Specify an additional feature from the `vcpkg.json` to install dependencies from. + +### `--x-no-default-features` -* `--feature-flags` option: On any vcpkg command, you can pass `--feature-flags=manifests` -* `VCPKG_FEATURE_FLAGS` environment variable: one can set the environment variable `VCPKG_FEATURE_FLAGS` to - `manifests`. +**Experimental and may change or be removed at any time** -### `vcpkg install` +Disables automatic activation of all default features listed in the `vcpkg.json`. -Once one has written a manifest file, -they can run `vcpkg install` in any subdirectory of the directory containing `vcpkg.json`. -It will install all of the dependencies for the default triplet into -`/vcpkg_installed`. -If you want to switch the triplet (for example, this is very common on windows, where the default triplet is x86-windows, not x64-windows), -you can pass it with the `--triplet` option: `vcpkg install --triplet x64-windows` (or whatever). -Then, vcpkg will install all the dependencies, and you're ready to go! +### `--x-manifest-root=` + +**Experimental and may change or be removed at any time** + +Specifies the directory containing `vcpkg.json`. + +Defaults to searching upwards from the current working directory. ## CMake Integration -The CMake integration acts exactly like the existing CMake integration. -One passes the toolchain file, located at `[vcpkg root]/scripts/buildsystems/vcpkg.cmake`, -to the CMake invocation via the `CMAKE_TOOLCHAIN_FILE` variable. -Then, CMake will install all dependencies into the build directory, and you're good! -It ends up that you only have to run CMake, and vcpkg is called only as part of the build process. -Unlike bare vcpkg, the feature flag is not required, -since the CMake integration won't break as long as you depending on the exact naming of vcpkg's installed directory. +Our [CMake Integration](integration.md#cmake) will automatically detect a `vcpkg.json` manifest file in the same +directory as the top-level `CMakeLists.txt` (`${CMAKE_SOURCE_DIR}/vcpkg.json`) and activate manifest mode. Vcpkg will be +automatically bootstrapped if missing and invoked to install your dependencies into your local build directory +(`${CMAKE_BINARY_DIR}/vcpkg_installed`). + +### Configuration + +All vcpkg-affecting variables must be defined before the first `project()` directive, such as via the command line or +`set()` statements. + +#### `VCPKG_TARGET_TRIPLET` + +This variable controls which triplet dependencies will be installed for. + +If unset, vcpkg will automatically detect an appropriate default triplet given the current compiler settings. + +#### `VCPKG_HOST_TRIPLET` + +This variable controls which triplet host dependencies will be installed for. + +If unset, vcpkg will automatically detect an appropriate native triplet (x64-windows, x64-osx, x64-linux). + +See also [Host Dependencies](host-dependencies.md). + +#### `VCPKG_MANIFEST_MODE` + +This variable controls whether vcpkg operates in manifest mode or in classic mode. To disable manifest mode even with a +`vcpkg.json`, set this to `OFF`. + +Defaults to `ON` when `VCPKG_MANIFEST_DIR` is non-empty or `${CMAKE_SOURCE_DIR}/vcpkg.json` exists. + +#### `VCPKG_MANIFEST_DIR` + +This variable can be defined to specify an alternate folder containing your `vcpkg.json` manifest. -### Example: +Defaults to `${CMAKE_SOURCE_DIR}` if `${CMAKE_SOURCE_DIR}/vcpkg.json` exists. +#### `VCPKG_MANIFEST_INSTALL` + +This variable controls whether vcpkg will be automatically run to install your dependencies during your configure step. + +Defaults to `ON` if `VCPKG_MANIFEST_MODE` is `ON`. + +#### `VCPKG_BOOTSTRAP_OPTIONS` + +This variable can be set to additional command parameters to pass to `./bootstrap-vcpkg` (run in automatic restore mode +if the vcpkg tool does not exist). + +#### `VCPKG_OVERLAY_TRIPLETS` + +This variable can be set to a list of paths to be passed on the command line as `--overlay-triplets=...` + +#### `VCPKG_OVERLAY_PORTS` + +This variable can be set to a list of paths to be passed on the command line as `--overlay-ports=...` + +#### `VCPKG_MANIFEST_FEATURES` + +This variable can be set to a list of features to treat as active when installing from your manifest. + +For example, Features can be used by projects to control building with additional dependencies to enable tests or +samples: + +```json +{ + "name": "mylibrary", + "version": "1.0", + "dependencies": [ "curl" ], + "features": { + "samples": { + "description": "Build Samples", + "dependencies": [ "fltk" ] + }, + "tests": { + "description": "Build Tests", + "dependencies": [ "gtest" ] + } + } +} ``` -> cmake -B builddir -S . -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -> cmake --build builddir +```cmake +# CMakeLists.txt + +option(BUILD_TESTING "Build tests" OFF) +if(BUILD_TESTING) + list(APPEND VCPKG_MANIFEST_FEATURES "tests") +endif() + +option(BUILD_SAMPLES "Build samples" OFF) +if(BUILD_SAMPLES) + list(APPEND VCPKG_MANIFEST_FEATURES "samples") +endif() + +project(myapp) + +# ... ``` -with a `vcpkg.json` in the same directory as `CMakeLists.txt` should Just Work! +#### `VCPKG_MANIFEST_NO_DEFAULT_FEATURES` + +This variable controls whether to automatically activate all default features in addition to those listed in +`VCPKG_MANIFEST_FEATURES`. If set to `ON`, default features will not be automatically activated. + +Defaults to `OFF`. + +#### `VCPKG_INSTALL_OPTIONS` + +This variable can be set to a list of additional command line parameters to pass to the vcpkg tool during automatic +installation. + +#### `VCPKG_FEATURE_FLAGS` + +This variable can be set to a list of feature flags to pass to the vcpkg tool during automatic installation to opt-in to +experimental behavior. + +See the `--feature-flags=` command line option for more information. ## MSBuild Integration -To use manifests with MSBuild, first you need to use an [existing integration method](integration.md#with-msbuild). Then, simply add a vcpkg.json above your project file (such as in the root of your source repository) and set the property `VcpkgEnableManifest` to `true`. You can set this property via the IDE in `Project Properties -> Vcpkg -> Use Vcpkg Manifest`. +To use manifests with MSBuild, first you need to use an [existing integration method](integration.md#with-msbuild). +Then, simply add a vcpkg.json above your project file (such as in the root of your source repository) and set the +property `VcpkgEnableManifest` to `true`. You can set this property via the IDE in `Project Properties -> Vcpkg -> Use +Vcpkg Manifest`. -As part of your project's build, vcpkg automatically be run and install any listed dependencies to `vcpkg_installed/` adjacent to the `vcpkg.json` file; these files will then automatically be included in and linked to your MSBuild projects. +As part of your project's build, vcpkg automatically be run and install any listed dependencies to `vcpkg_installed/` +adjacent to the `vcpkg.json` file; these files will then automatically be included in and linked to your MSBuild +projects. -Note: It is critical that all project files in a single build consuming the same `vcpkg.json` use the same triplet; if you need to use different triplets for different projects in your solution, they must consume from different `vcpkg.json` files. +Note: It is critical that all project files in a single build consuming the same `vcpkg.json` use the same triplet; if +you need to use different triplets for different projects in your solution, they must consume from different +`vcpkg.json` files. ### MSBuild Properties @@ -333,25 +459,37 @@ This can be set to "false" to explicitly disable vcpkg integration for the proje This can be set to a custom triplet to use for integration (such as x64-windows-static) +#### `VcpkgHostTriplet` (Host Triplet) + +This can be set to a custom triplet to use for resolving host dependencies. + +If unset, this will default to the "native" triplet (x64-windows, x64-osx, x64-linux). + +See also [Host Dependencies](host-dependencies.md). + #### `VcpkgAdditionalInstallOptions` (Additional Options) -When using a manifest, this option specifies additional command line flags to pass to the underlying vcpkg tool invocation. This can be used to access features that have not yet been exposed through another option. +When using a manifest, this option specifies additional command line flags to pass to the underlying vcpkg tool +invocation. This can be used to access features that have not yet been exposed through another option. #### `VcpkgConfiguration` (Vcpkg Configuration) -If your configuration names are too complex for vcpkg to guess correctly, you can assign this property to `Release` or `Debug` to explicitly tell vcpkg what variant of libraries you want to consume. +If your configuration names are too complex for vcpkg to guess correctly, you can assign this property to `Release` or +`Debug` to explicitly tell vcpkg what variant of libraries you want to consume. #### `VcpkgEnableManifest` (Use Vcpkg Manifest) -This property must be set to true in order to consume from a local vcpkg.json file. If set to false, any local vcpkg.json files will be ignored. This will default to true in the future. +This property must be set to true in order to consume from a local vcpkg.json file. If set to false, any local +vcpkg.json files will be ignored. This will default to true in the future. #### `VcpkgManifestInstall` (Install Vcpkg Dependencies) *(Requires `Use Vcpkg Manifest` set to `true`)* -This property can be set to "false" to disable automatic dependency restoration on project build. Dependencies can be manually restored via the vcpkg command line. +This property can be set to "false" to disable automatic dependency restoration on project build. Dependencies can be +manually restored via the vcpkg command line. #### `VcpkgInstalledDirectory` (Installed Directory) -This property defines the location where headers and binaries are consumed from. In manifest mode, this directory is created and populated based on your manifest. - +This property defines the location where headers and binaries are consumed from. In manifest mode, this directory is +created and populated based on your manifest. diff --git a/docs/users/selecting-library-features.md b/docs/users/selecting-library-features.md index 03c1863b34de81..51d828280af940 100644 --- a/docs/users/selecting-library-features.md +++ b/docs/users/selecting-library-features.md @@ -1,30 +1,25 @@ # Selecting library features +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/selecting-library-features.md).** + ## Installing a library -We will look at [llvm](https://llvm.org/) as an example. -LLVM is a compiler infrasture. It supports optimizing llvm-ir and generating machine code. -You could install it using: +We will look at [llvm](https://llvm.org/) as an example. You could install it using: ```powershell -> .\vcpkg install llvm +> vcpkg install llvm ``` - -On Windows, this will install the 32-bit x86 LLVM, since that's the default triplet on Windows. -If you are building for 64-bit Windows instead, you can use the following command to change the default triplet: - -```powershell -> .\vcpkg install --triplet x64-windows llvm +or via a manifest with +```json +{ + "dependencies": ["llvm"] +} ``` -We have more documentation on triplets [here](triplets.md). -Currently we can't choose build type `debug` or `release` using command line switches. - With llvm now installed, we can execute: ```powershell -> # llc takes llvm IR and generates machine code -> .\installed\x86-windows\bin\llc.exe --version # or x86-windows, or replace with the actual triplet +> installed\x86-windows\bin\llc.exe --version ``` we see: @@ -45,7 +40,7 @@ The llvm port allows this via the "target-*" features. If we do: ```powershell -.\vcpkg search llvm +> vcpkg search llvm ``` We can see: @@ -64,17 +59,33 @@ llvm[target-arm] Build with ARM backend. We can install any of these targets by using the install-feature syntax: ```powershell -> .\vcpkg install llvm[target-arm] # Installs LLVM with the ARM target +> vcpkg install llvm[target-arm] # Installs LLVM with the ARM target +``` +```json +{ + "dependencies": [{ "name": "llvm", "features": ["target-arm"] }] +} ``` -## Opting out of default feature +## Opting out of default features + The llvm port includes a few default features that you as a user may not want: for example, the `clang` feature is default, which means that `vcpkg install llvm` will also build and install clang. If you are writing a compiler that uses LLVM as a backend, you're likely not interested in installing clang as well, and we can do that by disabling default features with the special `core` "feature": ```powershell -> .\vcpkg install llvm[core,default-targets] # removing the default-feature with "core" also removes all of the default targets you get +> vcpkg install llvm[core,target-arm] # removing the default-feature with "core" also removes all of the default targets you get +``` +or in manifest files: +```json +{ + "dependencies": [{ + "name": "llvm", + "default-features": false, + "features": ["target-arm"] + }] +} ``` # Further reading diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 37efd590d09838..61192575a64b8b 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -1,5 +1,7 @@ # Triplet files +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/triplets.md).** + Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name. In Vcpkg, we use triplets to describe an imaginary "target configuration set" for every library. Within a triplet, libraries are generally built with the same configuration, but it is not a requirement. For example, you could have one triplet that builds `openssl` statically and `zlib` dynamically, one that builds them both statically, and one that builds them both dynamically (all for the same target OS and architecture). A single build will consume files from a single triplet. diff --git a/docs/users/versioning.implementation-details.md b/docs/users/versioning.implementation-details.md index f363fb438d99a1..fc5981e24f20ab 100644 --- a/docs/users/versioning.implementation-details.md +++ b/docs/users/versioning.implementation-details.md @@ -1,5 +1,7 @@ # Versioning: Implementation details +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/versioning.implementation-details.md).** + ## Contents * [Minimum versioning](#minimum-versioning) diff --git a/docs/users/versioning.md b/docs/users/versioning.md index 5db7f42c21e0e2..6fdc678e520c41 100644 --- a/docs/users/versioning.md +++ b/docs/users/versioning.md @@ -1,11 +1,13 @@ # Versioning +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/versioning.md).** + **This feature is experimental and requires `--feature-flags=versions`** Versioning allows you to deterministically control the precise revisions of dependencies used by your project from within your manifest file. -See our guide to [getting started with versioning](versioning.getting-started.md). +See our guide to [getting started with versioning](../examples/versioning.getting-started.md). ## Version schemes diff --git a/docs/users/versioning.reference.md b/docs/users/versioning.reference.md index eb49b44e2d152b..976b8461228d04 100644 --- a/docs/users/versioning.reference.md +++ b/docs/users/versioning.reference.md @@ -1,5 +1,7 @@ # Versioning reference +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/versioning.reference.md).** + ## Contents * [Version schemes](#version-schemes) @@ -114,7 +116,7 @@ Each port in vcpkg has a corresponding versions file, the location of a port's v ``` ${VCPKG_ROOT}/versions/${first-letter-of-portname}-/${portname}.json -```` +``` For example, for `zlib` the corresponding versions file is: diff --git a/ports/amqpcpp/CONTROL b/ports/amqpcpp/CONTROL deleted file mode 100644 index 910b53e1523513..00000000000000 --- a/ports/amqpcpp/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: amqpcpp -Version: 4.1.7 -Homepage: https://github.com/CopernicaMarketingSoftware/AMQP-CPP -Description: AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker -Build-Depends: openssl (linux) -Supports: !uwp \ No newline at end of file diff --git a/ports/amqpcpp/portfile.cmake b/ports/amqpcpp/portfile.cmake index 3b160e697c6870..95317afa3c657b 100644 --- a/ports/amqpcpp/portfile.cmake +++ b/ports/amqpcpp/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CopernicaMarketingSoftware/AMQP-CPP - REF e7f76bc75d7855012450763a638092925d52f417 #v4.1.7 - SHA512 ce105622d09014b51876911e95c4523b786d670bbd0bafa47874c6d52dca63f610dbb52561107bd1941c1fda79a4e200331779a79f9394c1ea437e0e1a4695bf + REF 9fa05100f43686f617722aaba7a500cd54b9804a #v4.3.11 + SHA512 f4d311d3f430579deb0ff9d820d9c6160dce775622afe28731ed4e6abd6b827bf20afb5bdf52d246d0fb5afc469005cc34469f57063e197375b6be8ed93afe8b HEAD_REF master PATCHES find-openssl.patch diff --git a/ports/amqpcpp/vcpkg.json b/ports/amqpcpp/vcpkg.json new file mode 100644 index 00000000000000..18cca30fd5dab8 --- /dev/null +++ b/ports/amqpcpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "amqpcpp", + "version-string": "4.3.11", + "description": "AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker", + "homepage": "https://github.com/CopernicaMarketingSoftware/AMQP-CPP", + "supports": "!uwp", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/azure-kinect-sensor-sdk/CONTROL b/ports/azure-kinect-sensor-sdk/CONTROL index f6bf9ae0cad430..710ceb4606a2f0 100644 --- a/ports/azure-kinect-sensor-sdk/CONTROL +++ b/ports/azure-kinect-sensor-sdk/CONTROL @@ -1,6 +1,5 @@ Source: azure-kinect-sensor-sdk -Version: 1.4.0-alpha.0 -Port-Version: 6 +Version: 1.4.1 Homepage: https://github.com/microsoft/Azure-Kinect-Sensor-SDK Description: Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device. Build-Depends: azure-c-shared-utility, glfw3, gtest, imgui, libusb, spdlog, cjson, ebml, libjpeg-turbo, matroska, libsoundio, libyuv diff --git a/ports/azure-kinect-sensor-sdk/fix-builds.patch b/ports/azure-kinect-sensor-sdk/fix-builds.patch index 52240c68afc678..5426cca27d7697 100644 --- a/ports/azure-kinect-sensor-sdk/fix-builds.patch +++ b/ports/azure-kinect-sensor-sdk/fix-builds.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4967b94..e36009e 100644 +index 4f002b5..cef79d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,6 @@ option(K4A_BUILD_DOCS "Build K4A doxygen documentation" OFF) @@ -39,7 +39,7 @@ index 4967b94..e36009e 100644 # Find all dependencies add_subdirectory(extern) -@@ -160,10 +179,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") +@@ -161,10 +180,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") endif() endif() @@ -60,38 +60,6 @@ index 4967b94..e36009e 100644 if (K4A_BUILD_DOCS) find_package(Doxygen 1.8.14 EXACT) -diff --git a/examples/green_screen/CMakeLists.txt b/examples/green_screen/CMakeLists.txt -index 423ca68..0c7cc0a 100644 ---- a/examples/green_screen/CMakeLists.txt -+++ b/examples/green_screen/CMakeLists.txt -@@ -7,9 +7,9 @@ target_include_directories( green_screen PRIVATE ${OpenCV_INCLUDE_DIRS} ) - # OpenCV_LIBS, by default, is picking up the debug version of opencv on Windows even in release mode, which was causing a dependency on non-redistributable Visual Studio dlls. - if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") -- target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320d.lib) -+ target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) - else() -- target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320.lib) -+ target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) - endif() - else() - target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) -diff --git a/examples/opencv_compatibility/CMakeLists.txt b/examples/opencv_compatibility/CMakeLists.txt -index ef72e99..f1faeb7 100644 ---- a/examples/opencv_compatibility/CMakeLists.txt -+++ b/examples/opencv_compatibility/CMakeLists.txt -@@ -7,9 +7,9 @@ target_include_directories( opencv_example PRIVATE ${OpenCV_INCLUDE_DIRS} ) - # OpenCV_LIBS, by default, is picking up the debug version of opencv on Windows even in release mode, which was causing a dependency on non-redistributable Visual Studio dlls. - if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") -- target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320d.lib) -+ target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) - else() -- target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320.lib) -+ target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) - endif() - else() - target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) diff --git a/examples/transformation/CMakeLists.txt b/examples/transformation/CMakeLists.txt index e5b41e6..8f7f7f3 100644 --- a/examples/transformation/CMakeLists.txt @@ -117,7 +85,7 @@ index 166fe2a..a3db07f 100644 ${OPENGL_LIBRARIES}) \ No newline at end of file diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt -index cb4f7b4..c102766 100644 +index cb4f7b4..c3eab98 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -1,7 +1,6 @@ @@ -129,7 +97,7 @@ index cb4f7b4..c102766 100644 find_package(Git REQUIRED QUIET) if (Git_FOUND) get_git_dir(${K4A_SOURCE_DIR} GIT_DIR) -@@ -57,18 +56,4 @@ endif() +@@ -57,18 +56,5 @@ endif() # lower than CMake 3.3 set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) @@ -148,6 +116,7 @@ index cb4f7b4..c102766 100644 -if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") - add_subdirectory(libusb) -endif() ++ diff --git a/src/allocator/CMakeLists.txt b/src/allocator/CMakeLists.txt index 7140274..3bb6747 100644 --- a/src/allocator/CMakeLists.txt @@ -175,7 +144,7 @@ index e96b7d0..ed69f41 100644 # Define alias for other targets to link against diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c -index f046ef2..3d23ada 100644 +index bf5f34a..d37c4e6 100644 --- a/src/calibration/calibration.c +++ b/src/calibration/calibration.c @@ -6,7 +6,7 @@ @@ -184,9 +153,9 @@ index f046ef2..3d23ada 100644 #include -#include +#include + #include //cJSON.h need this set correctly. // System dependencies - #include diff --git a/src/capturesync/CMakeLists.txt b/src/capturesync/CMakeLists.txt index a434593..bcb19ba 100644 --- a/src/capturesync/CMakeLists.txt @@ -295,12 +264,12 @@ index 97c6cf3..e9f5b1a 100644 # Define alias for other targets to link against diff --git a/src/record/sdk/CMakeLists.txt b/src/record/sdk/CMakeLists.txt -index 571a297..4be0697 100644 +index 2e23295..d150e70 100644 --- a/src/record/sdk/CMakeLists.txt +++ b/src/record/sdk/CMakeLists.txt -@@ -41,8 +41,8 @@ target_link_libraries(k4arecord PRIVATE +@@ -40,8 +40,8 @@ target_link_libraries(k4arecord PRIVATE + k4ainternal::record k4ainternal::playback - k4a::k4a k4ainternal::logging - ebml::ebml - matroska::matroska @@ -308,7 +277,7 @@ index 571a297..4be0697 100644 + Matroska::matroska ) - # Define alias for k4arecord + target_link_libraries(k4arecord PUBLIC diff --git a/src/tewrapper/CMakeLists.txt b/src/tewrapper/CMakeLists.txt index e4a696e..6ee6696 100644 --- a/src/tewrapper/CMakeLists.txt diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake index 5c6a189eeaec9e..0ced2d2689642c 100644 --- a/ports/azure-kinect-sensor-sdk/portfile.cmake +++ b/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -1,9 +1,9 @@ -set(VERSION 1.4.0-alpha.0) +set(VERSION 1.4.1) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/Azure-Kinect-Sensor-SDK REF v${VERSION} - SHA512 bf09ff92dc1b8621a941d838aef9c804bb5635f7984b7f86f01a38441d44935db764b69483d598e1f2c0aafb5c7ec196ef9c722967d92e6d075cb67ce781fea9 + SHA512 ef94c072caae43b0a105b192013e09082d267d4064e6676fac981b52e7576a663f59fcb53f0afe66b425ef2cea0cb3aa224ff7be6485c0b5543ff9cdabd82d4d HEAD_REF master PATCHES fix-builds.patch @@ -65,7 +65,7 @@ endif() vcpkg_download_distfile(ARCHIVE URLS "https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.Sensor/${VERSION}" FILENAME "azure-kinect-sensor-sdk.zip" - SHA512 6c15975e7c834672de723b0c474fa4cd58f41c5bee6511dcbdbc22f1a58daa906c4f01a7e941af0e7d09f763ff886015c1f6b1e29b6bdfb333f10857edfec2ca + SHA512 17630a00f4e9ff3ef68945b62021f6d0390030b43c120c207afe934075a7a87c5848be1f46f4c35c7ecd5698012452ffcbb67f739e9048857410ec7077e5e8c6 ) vcpkg_extract_source_archive_ex( diff --git a/ports/boost-context/b2-options.cmake.in b/ports/boost-context/b2-options.cmake.in new file mode 100644 index 00000000000000..30933f499b2edb --- /dev/null +++ b/ports/boost-context/b2-options.cmake.in @@ -0,0 +1,14 @@ + +if(@VCPKG_TARGET_IS_WINDOWS@) + list(APPEND B2_OPTIONS + abi=ms + binary-format=pe + ) +endif() + +if(@VCPKG_TARGET_IS_OSX@) + list(APPEND B2_OPTIONS + abi=sysv + binary-format=mach-o + ) +endif() diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake index dd4c347babd811..3558398694e6f7 100644 --- a/ports/boost-context/portfile.cmake +++ b/ports/boost-context/portfile.cmake @@ -15,7 +15,15 @@ file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +configure_file( + "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in" + "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" + @ONLY +) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-context/vcpkg.json b/ports/boost-context/vcpkg.json index 95ee33e38f8e43..2829cc688a0854 100644 --- a/ports/boost-context/vcpkg.json +++ b/ports/boost-context/vcpkg.json @@ -1,6 +1,7 @@ { "name": "boost-context", "version-string": "1.75.0", + "port-version": 2, "description": "Boost context module", "homepage": "https://github.com/boostorg/context", "supports": "!uwp & !emscripten", diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 09daaeea3c4b66..cd97df9e9b06c7 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -307,6 +307,11 @@ function(boost_modular_build) list(APPEND B2_OPTIONS address-model=64 architecture=power) else() list(APPEND B2_OPTIONS address-model=32 architecture=x86) + + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND B2_OPTIONS "asmflags=/safeseh") + endif() + endif() file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) diff --git a/ports/boost-modular-build-helper/vcpkg.json b/ports/boost-modular-build-helper/vcpkg.json index 93a19943cc53c6..6d31eb2ab1f5de 100644 --- a/ports/boost-modular-build-helper/vcpkg.json +++ b/ports/boost-modular-build-helper/vcpkg.json @@ -1,7 +1,7 @@ { "name": "boost-modular-build-helper", "version-string": "1.75.0", - "port-version": 5, + "port-version": 6, "dependencies": [ "boost-uninstall" ] diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL deleted file mode 100644 index 909dc4c1ab1b8e..00000000000000 --- a/ports/box2d/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: box2d -Version: 2.4.0 -Description: An open source C++ engine for simulating rigid bodies in 2D. -Homepage: https://box2d.org -Supports: !uwp diff --git a/ports/box2d/export-targets.patch b/ports/box2d/export-targets.patch deleted file mode 100644 index 636f1086b01761..00000000000000 --- a/ports/box2d/export-targets.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 6ef515f..6975f91 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -95,8 +95,8 @@ set(BOX2D_HEADER_FILES - ../include/box2d/b2_world_callbacks.h - ../include/box2d/box2d.h) - --add_library(box2d STATIC ${BOX2D_SOURCE_FILES} ${BOX2D_HEADER_FILES}) --target_include_directories(box2d PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include) -+add_library(box2d STATIC ${BOX2D_SOURCE_FILES}) -+target_include_directories(box2d PUBLIC $ $) - target_include_directories(box2d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - set_target_properties(box2d PROPERTIES - CXX_STANDARD 11 -@@ -104,5 +104,18 @@ set_target_properties(box2d PROPERTIES - CXX_EXTENSIONS NO - ) - --source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES ${BOX2D_SOURCE_FILES}) --source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" PREFIX "include" FILES ${BOX2D_HEADER_FILES}) -+install(FILES ${BOX2D_HEADER_FILES} DESTINATION include/box2d) -+ -+install(TARGETS box2d -+ EXPORT unofficial-box2d-targets -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib -+) -+ -+install( -+ EXPORT unofficial-box2d-targets -+ FILE unofficial-box2d-config.cmake -+ NAMESPACE unofficial::box2d:: -+ DESTINATION share/unofficial-box2d -+) diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 3b931cb3fa179f..1e414e72a574bb 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -5,11 +5,9 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO erincatto/Box2D - REF 4d7757feedc9dd36f64393ae08acfd3b9600ac17 #v2.4.0 - SHA512 197f701016c91fda944328e7d867f0a5baa152cce53fa35826986923456af593595bad884008944e041d9ac2e1d769a54eaad4142e19b42a3bb2a2010d814cc9 + REF 9ebbbcd960ad424e03e5de6e66a40764c16f51bc #v2.4.1 + SHA512 d9fa387ce893ed1fb73f80006491202f2624ef6d0fb37daf92fbd1a7f9071c84da45e4b418b333566435bbbdfd3d5f68a42dfca02416e9a3a2b4db039f1c6151 HEAD_REF master - PATCHES - export-targets.patch ) vcpkg_configure_cmake( @@ -23,7 +21,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/box2d) vcpkg_copy_pdbs() diff --git a/ports/box2d/vcpkg.json b/ports/box2d/vcpkg.json new file mode 100644 index 00000000000000..eff301909c4be5 --- /dev/null +++ b/ports/box2d/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "box2d", + "version-semver": "2.4.1", + "description": "An open source C++ engine for simulating rigid bodies in 2D", + "homepage": "https://box2d.org", + "supports": "!uwp" +} diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index ce085e32f7e987..93d89044460740 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,4 +1,5 @@ Source: brotli Version: 1.0.9 +Port-Version: 1 Homepage: https://github.com/google/brotli Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/fix-ios.patch b/ports/brotli/fix-ios.patch new file mode 100644 index 00000000000000..b3dee6aa03836d --- /dev/null +++ b/ports/brotli/fix-ios.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcd9024..a717b87 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,7 @@ if(NOT BROTLI_BUNDLED_MODE) + install( + TARGETS brotli + RUNTIME DESTINATION tools/brotli ++ BUNDLE DESTINATION tools/brotli + CONFIGURATIONS Release + ) + diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 6d28f2650f1cb7..9c1e3037dc5184 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( install.patch fix-arm-uwp.patch pkgconfig.patch + fix-ios.patch ) vcpkg_configure_cmake( diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL index f6538bcf16bd8a..26469fc1914521 100644 --- a/ports/brynet/CONTROL +++ b/ports/brynet/CONTROL @@ -1,4 +1,4 @@ Source: brynet -Version: 1.0.7 +Version: 1.10.0 Homepage: https://github.com/IronsDu/brynet Description: A C++ header only cross platform high performance tcp network library, and support SSL/HTTP/Websocket. diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake index f5d89c56a1243a..db89d6a99bfd2d 100644 --- a/ports/brynet/portfile.cmake +++ b/ports/brynet/portfile.cmake @@ -3,8 +3,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IronsDu/brynet - REF 4879414c1ecd5c3159f9b16c7d113057fdbeb666 # v1.0.7 - SHA512 a7ac13e00f292f2aca98d9b252905eb6479ebc156588749129b0d05ba1116e721cc842ac49c192f9b3bc1931136dd7682f10027e9e3ebc1df1de6bca1799d02b + REF 1b4a9623b5d6502bd912dd8b106fb3462d7f6ab4 # v1.10.0 + SHA512 a36fabddfc7e60423363f219247777beeeddcd858502b7fd32fe1f86abd33294d91802cf6ae61c53e34f6e6a9a4e6182e0ab2a1a2b62850354995798be2bfc49 HEAD_REF master ) diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL index 8da4c6611e48ff..2e3327dbdf9881 100644 --- a/ports/celero/CONTROL +++ b/ports/celero/CONTROL @@ -1,4 +1,4 @@ Source: celero -Version: 2.6.0-1 +Version: 2.7.2 Homepage: https://github.com/DigitalInBlue/Celero Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/fix-win32-define.patch b/ports/celero/fix-win32-define.patch deleted file mode 100644 index 0a90dbed9f76a0..00000000000000 --- a/ports/celero/fix-win32-define.patch +++ /dev/null @@ -1,490 +0,0 @@ -diff --git a/README.md b/README.md -index 5b83f2d..151f5d1 100644 ---- a/README.md -+++ b/README.md -@@ -166,7 +166,7 @@ Here is an example of a simple Celero Benchmark. (Note: This is a complete, runn - - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/experiments/DemoSimple/DemoSimple.cpp b/experiments/DemoSimple/DemoSimple.cpp -index 2a0a0c3..f0c300f 100644 ---- a/experiments/DemoSimple/DemoSimple.cpp -+++ b/experiments/DemoSimple/DemoSimple.cpp -@@ -2,7 +2,7 @@ - - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp b/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp -index 86c47c1..0be4ac2 100644 ---- a/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp -+++ b/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp -@@ -1,6 +1,6 @@ - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/experiments/DemoTransform/DemoTransform.cpp b/experiments/DemoTransform/DemoTransform.cpp -index 25b37a2..55e7e60 100644 ---- a/experiments/DemoTransform/DemoTransform.cpp -+++ b/experiments/DemoTransform/DemoTransform.cpp -@@ -4,7 +4,7 @@ - #include - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp b/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp -index 0f3b8ed..e8f85c5 100644 ---- a/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp -+++ b/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp -@@ -1,7 +1,7 @@ - #include - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp b/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp -index e724fa2..8df7296 100644 ---- a/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp -+++ b/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp -@@ -3,7 +3,7 @@ - #include - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #include - #endif -diff --git a/include/celero/Celero.h b/include/celero/Celero.h -index aaf38ef..a7c91d4 100644 ---- a/include/celero/Celero.h -+++ b/include/celero/Celero.h -@@ -31,7 +31,7 @@ - /// It is highly encouraged to only run this code compiled in a "Release" mode to use all available optimizations. - /// - --#ifdef WIN32 -+#ifdef _WIN32 - #include - #endif - -diff --git a/include/celero/CommandLine.h b/include/celero/CommandLine.h -index 230417a..82204f9 100644 ---- a/include/celero/CommandLine.h -+++ b/include/celero/CommandLine.h -@@ -38,7 +38,7 @@ - #include - #include - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #endif - -@@ -115,7 +115,7 @@ namespace cmdline - return lexical_cast_t::value>::cast(arg); - } - --#ifdef WIN32 -+#ifdef _WIN32 - static inline std::string demangle(const std::string &) - { - return std::string(); -diff --git a/include/celero/Export.h b/include/celero/Export.h -index b672b15..a074e37 100644 ---- a/include/celero/Export.h -+++ b/include/celero/Export.h -@@ -23,7 +23,7 @@ - #define CELERO_EXPORT - #define CELERO_EXPORT_C - #else --#ifdef WIN32 -+#ifdef _WIN32 - #if defined CELERO_EXPORTS - #define CELERO_EXPORT _declspec(dllexport) - #define CELERO_EXPORT_C extern "C" _declspec(dllexport) -diff --git a/include/celero/Utilities.h b/include/celero/Utilities.h -index 4f409e5..93e3c53 100644 ---- a/include/celero/Utilities.h -+++ b/include/celero/Utilities.h -@@ -19,7 +19,7 @@ - /// limitations under the License. - /// - --#ifndef WIN32 -+#ifndef _WIN32 - #include - #endif - -diff --git a/src/Console.cpp b/src/Console.cpp -index 91e2059..b4c62ec 100644 ---- a/src/Console.cpp -+++ b/src/Console.cpp -@@ -20,14 +20,14 @@ - - using namespace celero; - --#ifdef WIN32 -+#ifdef _WIN32 - #include - #include - #else - #include - #endif - --#ifdef WIN32 -+#ifdef _WIN32 - auto WinColor() -> decltype(GetStdHandle(STD_OUTPUT_HANDLE)) - { - auto h = GetStdHandle(STD_OUTPUT_HANDLE); -@@ -39,7 +39,7 @@ auto WinColor() -> decltype(GetStdHandle(STD_OUTPUT_HANDLE)) - - void Red() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED); - #else -@@ -49,7 +49,7 @@ void Red() - - void RedBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_INTENSITY); - #else -@@ -59,7 +59,7 @@ void RedBold() - - void Green() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_GREEN); - #else -@@ -69,7 +69,7 @@ void Green() - - void GreenBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY); - #else -@@ -79,7 +79,7 @@ void GreenBold() - - void Blue() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_BLUE); - #else -@@ -89,7 +89,7 @@ void Blue() - - void BlueBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_INTENSITY); - #else -@@ -99,7 +99,7 @@ void BlueBold() - - void Cyan() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN); - #else -@@ -109,7 +109,7 @@ void Cyan() - - void CyanBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY); - #else -@@ -119,7 +119,7 @@ void CyanBold() - - void Yellow() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN); - #else -@@ -129,7 +129,7 @@ void Yellow() - - void YellowBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY); - #else -@@ -139,7 +139,7 @@ void YellowBold() - - void White() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); - #else -@@ -149,7 +149,7 @@ void White() - - void WhiteBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); - #else -@@ -159,7 +159,7 @@ void WhiteBold() - - void WhiteOnRed() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, BACKGROUND_RED | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); - #else -@@ -169,7 +169,7 @@ void WhiteOnRed() - - void WhiteOnRedBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, BACKGROUND_RED | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); - #else -@@ -179,7 +179,7 @@ void WhiteOnRedBold() - - void PurpleBold() - { --#ifdef WIN32 -+#ifdef _WIN32 - auto h = WinColor(); - SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY); - #else -@@ -189,7 +189,7 @@ void PurpleBold() - - void Default() - { --#ifdef WIN32 -+#ifdef _WIN32 - White(); - #else - std::cout << "\033[0m"; -diff --git a/src/Exceptions.cpp b/src/Exceptions.cpp -index 9cb1918..7780774 100644 ---- a/src/Exceptions.cpp -+++ b/src/Exceptions.cpp -@@ -21,7 +21,7 @@ - #include - #include - --#ifdef WIN32 -+#ifdef _WIN32 - #include - #endif // WIN32 - -diff --git a/src/Memory.cpp b/src/Memory.cpp -index f1662d4..fde7f19 100644 ---- a/src/Memory.cpp -+++ b/src/Memory.cpp -@@ -19,7 +19,7 @@ - #include - #include - --#ifdef WIN32 -+#ifdef _WIN32 - #include - - #include -@@ -53,7 +53,7 @@ - - using namespace celero; - --#ifdef WIN32 -+#ifdef _WIN32 - #else - constexpr int64_t Kilobytes2Bytes{1024}; - -@@ -120,7 +120,7 @@ celero::RAMReport celero::RAMReport::operator-(const RAMReport& x) - - int64_t celero::GetRAMSystemTotal() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -155,7 +155,7 @@ int64_t celero::GetRAMSystemTotal() - - int64_t celero::GetRAMSystemAvailable() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -167,7 +167,7 @@ int64_t celero::GetRAMSystemAvailable() - - int64_t celero::GetRAMSystemUsed() - { --#ifdef WIN32 -+#ifdef _WIN32 - return celero::GetRAMSystemTotal() - celero::GetRAMSystemAvailable(); - #elif defined(__APPLE__) - int mib[2]; -@@ -198,7 +198,7 @@ int64_t celero::GetRAMSystemUsed() - - int64_t celero::GetRAMSystemUsedByCurrentProcess() - { --#ifdef WIN32 -+#ifdef _WIN32 - PROCESS_MEMORY_COUNTERS_EX pmc; - GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); - return static_cast(pmc.WorkingSetSize); -@@ -209,7 +209,7 @@ int64_t celero::GetRAMSystemUsedByCurrentProcess() - - int64_t celero::GetRAMPhysicalTotal() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -225,7 +225,7 @@ int64_t celero::GetRAMPhysicalTotal() - - int64_t celero::GetRAMPhysicalAvailable() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -237,7 +237,7 @@ int64_t celero::GetRAMPhysicalAvailable() - - int64_t celero::GetRAMPhysicalUsed() - { --#ifdef WIN32 -+#ifdef _WIN32 - return celero::GetRAMPhysicalTotal() - celero::GetRAMPhysicalAvailable(); - #elif defined(__APPLE__) - struct rusage rusage; -@@ -252,7 +252,7 @@ int64_t celero::GetRAMPhysicalUsed() - - int64_t celero::GetRAMPhysicalUsedByCurrentProcess() - { --#ifdef WIN32 -+#ifdef _WIN32 - PROCESS_MEMORY_COUNTERS_EX pmc; - GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); - return static_cast(pmc.WorkingSetSize); -@@ -306,7 +306,7 @@ int64_t celero::GetRAMPhysicalUsedByCurrentProcessPeak() - - int64_t celero::GetRAMVirtualTotal() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -322,7 +322,7 @@ int64_t celero::GetRAMVirtualTotal() - - int64_t celero::GetRAMVirtualAvailable() - { --#ifdef WIN32 -+#ifdef _WIN32 - MEMORYSTATUSEX memInfo; - memInfo.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&memInfo); -@@ -334,7 +334,7 @@ int64_t celero::GetRAMVirtualAvailable() - - int64_t celero::GetRAMVirtualUsed() - { --#ifdef WIN32 -+#ifdef _WIN32 - return celero::GetRAMVirtualTotal() - celero::GetRAMVirtualAvailable(); - #elif defined(__APPLE__) - return -1; -@@ -348,7 +348,7 @@ int64_t celero::GetRAMVirtualUsed() - - int64_t celero::GetRAMVirtualUsedByCurrentProcess() - { --#ifdef WIN32 -+#ifdef _WIN32 - PROCESS_MEMORY_COUNTERS_EX pmc; - GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); - return pmc.PrivateUsage; -diff --git a/src/Timer.cpp b/src/Timer.cpp -index 7792722..fa24e74 100644 ---- a/src/Timer.cpp -+++ b/src/Timer.cpp -@@ -20,7 +20,7 @@ - #include - #include - --#ifdef WIN32 -+#ifdef _WIN32 - #include - LARGE_INTEGER QPCFrequency; - #else -@@ -29,7 +29,7 @@ LARGE_INTEGER QPCFrequency; - - uint64_t celero::timer::GetSystemTime() - { --#ifdef WIN32 -+#ifdef _WIN32 - LARGE_INTEGER timeStorage; - QueryPerformanceCounter(&timeStorage); - if(QPCFrequency.QuadPart != 0) -@@ -46,7 +46,7 @@ uint64_t celero::timer::GetSystemTime() - - double celero::timer::CachePerformanceFrequency(bool quiet) - { --#ifdef WIN32 -+#ifdef _WIN32 - QueryPerformanceFrequency(&QPCFrequency); - if(QPCFrequency.QuadPart == 0) - { -diff --git a/src/Utilities.cpp b/src/Utilities.cpp -index 6d9a266..0e4f1c4 100644 ---- a/src/Utilities.cpp -+++ b/src/Utilities.cpp -@@ -19,7 +19,7 @@ - #include - #include - --#ifdef WIN32 -+#ifdef _WIN32 - #include - - #include diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index 364ec44b8da879..c2eb0b04025556 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -1,10 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DigitalInBlue/Celero - REF 83b592b134cb41e2e5611714bce0bf61413eb12b #2.6.0 - SHA512 3315b56467c17330f603c6710996c1a76f67068960b1356ca92db1ab23fca9f27a2dda9be521a19b88efc2e961095ee5523924b135d380681a4328c09d963e8c + REF b9bbe63ebc464f799676cd4c696b376296178d63 #2.7.2 + SHA512 00a93c433b99a2c918741350c3fbfad67e4fe239948497de33fea2f13c8666e4fe37caf9f0e92d3c04dcb8b5c5e12501b199de3e69bbcf4f321c57a7c086e228 HEAD_REF master - PATCHES fix-win32-define.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES) diff --git a/ports/concurrentqueue/CONTROL b/ports/concurrentqueue/CONTROL deleted file mode 100644 index c39dd436608dae..00000000000000 --- a/ports/concurrentqueue/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: concurrentqueue -Version: 1.0.2 -Homepage: https://github.com/cameron314/concurrentqueue -Description: A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 diff --git a/ports/concurrentqueue/portfile.cmake b/ports/concurrentqueue/portfile.cmake index d2d104d33165bc..ed5c189f9c00c8 100644 --- a/ports/concurrentqueue/portfile.cmake +++ b/ports/concurrentqueue/portfile.cmake @@ -2,8 +2,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cameron314/concurrentqueue - REF v1.0.2 - SHA512 9f5e42c0956d142741be3772cbf49a22179e78571df0e5c680a48ff46b9228981c7d5ca56ee77ae6e1bf2396c4a81f12cb72cfdd689219a6346fa29f6f9ea866 + REF 3747268264d0fa113e981658a99ceeae4dad05b7# v1.0.3 + SHA512 798d61e8e5b87cd1870df20410db18e2fcbc5e4e1d849308663cc0403a0d50d29b72428fc0a39231ae8bcb460c946559bde0f2d22584c335fe849cbcbe607ec2 HEAD_REF master ) diff --git a/ports/concurrentqueue/vcpkg.json b/ports/concurrentqueue/vcpkg.json new file mode 100644 index 00000000000000..f091937d608593 --- /dev/null +++ b/ports/concurrentqueue/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "concurrentqueue", + "version": "1.0.3", + "description": "A fast multi-producer, multi-consumer lock-free concurrent queue for C++11", + "homepage": "https://github.com/cameron314/concurrentqueue" +} diff --git a/ports/cpp-httplib/CONTROL b/ports/cpp-httplib/CONTROL index a080407158c14e..73d17dfcd4aace 100644 --- a/ports/cpp-httplib/CONTROL +++ b/ports/cpp-httplib/CONTROL @@ -1,4 +1,4 @@ Source: cpp-httplib -Version: 0.7.18 +Version: 0.8.4 Homepage: https://github.com/yhirose/cpp-httplib Description: A single file C++11 header-only HTTP/HTTPS server and client library diff --git a/ports/cpp-httplib/portfile.cmake b/ports/cpp-httplib/portfile.cmake index 0aff5485e21d22..cf3347adbcb08f 100644 --- a/ports/cpp-httplib/portfile.cmake +++ b/ports/cpp-httplib/portfile.cmake @@ -2,8 +2,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yhirose/cpp-httplib - REF 40db42108f4303057a0494710ab06c796bb60448 # v0.7.18 - SHA512 54f5d7b4f8b9824977ceed4681db5af4421c26d6f07d6085428e4fa17007c2c1cde4c32615bc4100ce8fd9fb449ab420e94f057be4db7140479578654d1e6941 + REF cf475bcb505678046d53f0e0575a9efaa5b227f9 # v0.8.4 + SHA512 fbfb2294aaf50dc2eb053b89a4640ac2928268f936666a4c84724f5dc021fbfc30b3b451e213f4697f3d46bf87c078ccb01e8c2326153e3241bbd81fcf74427d HEAD_REF master ) diff --git a/ports/crow/CONTROL b/ports/crow/CONTROL deleted file mode 100644 index 96efb27bf16fea..00000000000000 --- a/ports/crow/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: crow -Version: 0.1-1 -Homepage: https://github.com/ipkn/crow -Description: Very fast and easy to use C++ micro web framework diff --git a/ports/crow/portfile.cmake b/ports/crow/portfile.cmake index 7c3f48ded84015..880ead8ee351f9 100644 --- a/ports/crow/portfile.cmake +++ b/ports/crow/portfile.cmake @@ -1,10 +1,10 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO ipkn/crow - REF v0.1 - SHA512 5a97c5b8cda3ffe79001aa382d4391eddde30027401bbb1d9c85c70ea715f556d3659f5eac0b9d9192c19d13718f19ad6bdf49d67bef03b21e75300d60e7d02a + REPO CrowCpp/crow + REF 696fbb104369ee948b00274a5e7e677c405f460e #0.2 + SHA512 9d925c229e6380555293909b941465b5419e6311e56d64da28e46bb4cdf9bdffd4adbbb37314a88f7abf4d2337e5baf26a5b107fedee4895e057eba1648c8b9c HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crow RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/crow/vcpkg.json b/ports/crow/vcpkg.json new file mode 100644 index 00000000000000..5d575d7173a372 --- /dev/null +++ b/ports/crow/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "crow", + "version": "0.2", + "description": "Very fast and easy to use C++ micro web framework", + "homepage": "https://github.com/CrowCpp/crow" +} diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL index 71ff8bfdd4031b..e961b7ace78dc5 100644 --- a/ports/exprtk/CONTROL +++ b/ports/exprtk/CONTROL @@ -1,4 +1,4 @@ Source: exprtk -Version: 2020-09-14 +Version: 2021-01-01 Homepage: http://www.partow.net/programming/exprtk/index.html Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/copyright b/ports/exprtk/copyright index 56598bb5128dcf..f360b8332b9f60 100644 --- a/ports/exprtk/copyright +++ b/ports/exprtk/copyright @@ -1,4 +1,4 @@ -Copyright 1999-2020 Arash Partow +Copyright 1999-2021 Arash Partow http://www.partow.net/programming/exprtk/index.html Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index eb3d16a7d7dfd3..8ebab1b62db09a 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -1,9 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF d312ba91419c9cb12c8279fd3a19096d39dfcb5e # accessed on 2020-09-14 - SHA512 c8145e2fdd6ecbed2a1a82d0e7e5e1e5545f42d2bb02700fb52f31012e959d4e070e0e04e5e13d1879d62f7a9c61c692462ce3cca44144670f97db84f572be09 + REF ca5c577917646ddba3f71ce6d5dd7d01f351ee80 + SHA512 bb4e36cec74c5e583c417000e4b20dc878572f0eeceffdae021dcdc0cc3e4186be150ca446722ce6a497c9cd4f8bbe51098894207ce711b33139fffb5dd2f6a4 ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/exprtk) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index dc32fe3a4fba7d..fff2ce9f58ca06 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,6 +1,6 @@ Source: ffmpeg Version: 4.3.1 -Port-Version: 11 +Port-Version: 12 Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. diff --git a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake index 8e2dd44d008eb1..170bf63336c3d8 100644 --- a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake +++ b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake @@ -1,6 +1,8 @@ set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +cmake_policy(SET CMP0012 NEW) + _find_package(${ARGS}) set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH}) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL deleted file mode 100644 index 23ea3ec680af39..00000000000000 --- a/ports/fmt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: fmt -Version: 7.1.3 -Port-Version: 0 -Homepage: https://github.com/fmtlib/fmt -Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 692314ff246b20..c91f568a29d526 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -6,16 +6,15 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-warning4189.patch ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DFMT_CMAKE_DIR=share/fmt -DFMT_TEST=OFF -DFMT_DOC=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if(VCPKG_TARGET_IS_WINDOWS) @@ -40,7 +39,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() vcpkg_fixup_pkgconfig() if(VCPKG_TARGET_IS_WINDOWS) diff --git a/ports/fmt/vcpkg.json b/ports/fmt/vcpkg.json new file mode 100644 index 00000000000000..debc7b8e3ea0e4 --- /dev/null +++ b/ports/fmt/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "fmt", + "version": "7.1.3", + "port-version": 1, + "description": "Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.", + "homepage": "https://github.com/fmtlib/fmt", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/fplus/CONTROL b/ports/fplus/CONTROL deleted file mode 100644 index 10c95ac63931e4..00000000000000 --- a/ports/fplus/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fplus -Version: 0.2.3-p0 -Description: Functional Programming Library for C++. Write concise and readable C++ code. -Homepage: https://github.com/Dobiasd/FunctionalPlus \ No newline at end of file diff --git a/ports/fplus/portfile.cmake b/ports/fplus/portfile.cmake index 4dfc776a480c98..486c7bb46a07d4 100644 --- a/ports/fplus/portfile.cmake +++ b/ports/fplus/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Dobiasd/FunctionalPlus - REF v0.2.3-p0 - SHA512 99fe07e68cd5630b9b243670778772f396cabb89845fb3ae5105884fab1cdbb7fae4080f57d0aea4d9282f84036572c0dd1e4b9602997dec4171a90b98416759 + REF 916abce0787da6c6c373d06c453a2cd684594dc2 #v0.2.13-p0 + SHA512 40aa090fc96794e1255416fba84b4afae6b52fe66dc9b810d863da78f387238054e743ba775921b1387b10b00ce6d1500df97806018181f26fcbc925758ef0f6 HEAD_REF master ) diff --git a/ports/fplus/vcpkg.json b/ports/fplus/vcpkg.json new file mode 100644 index 00000000000000..6f40283c09e252 --- /dev/null +++ b/ports/fplus/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fplus", + "version-semver": "0.2.13-p0", + "description": "Functional Programming Library for C++. Write concise and readable C++ code", + "homepage": "https://github.com/Dobiasd/FunctionalPlus" +} diff --git a/ports/functions-framework-cpp/0001-fix-msvc-build.patch b/ports/functions-framework-cpp/0001-fix-msvc-build.patch deleted file mode 100644 index 3bd928303d0e05..00000000000000 --- a/ports/functions-framework-cpp/0001-fix-msvc-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/google/cloud/functions/internal/base64_decode.cc b/google/cloud/functions/internal/base64_decode.cc -index 038cb47..38c9a72 100644 ---- a/google/cloud/functions/internal/base64_decode.cc -+++ b/google/cloud/functions/internal/base64_decode.cc -@@ -15,6 +15,7 @@ - #include "google/cloud/functions/internal/base64_decode.h" - #include - #include -+#include - - namespace google::cloud::functions_internal { - inline namespace FUNCTIONS_FRAMEWORK_CPP_NS { diff --git a/ports/functions-framework-cpp/portfile.cmake b/ports/functions-framework-cpp/portfile.cmake index 1330828b7c0dcc..e0f938f23e008a 100644 --- a/ports/functions-framework-cpp/portfile.cmake +++ b/ports/functions-framework-cpp/portfile.cmake @@ -4,11 +4,9 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GoogleCloudPlatform/functions-framework-cpp - REF v0.4.0 - SHA512 89f1322cdefcafcff84a3afa95529068481dfb4f3ae363cd81e8b5a54f1d9158c402e2fa3f441428e6ab41e6c91d1280ebff8c3b6e239e4c064cedad34a15d6d + REF v0.5.0 + SHA512 cc7ba39a86a035625e09e653f1c60ee5125a449a2822c26b3e30d6ed3d84bfce93a8e627069b1c50e0dddcaf0277d82681627d653d42a3e967d191b2d979e2e8 HEAD_REF main - PATCHES - 0001-fix-msvc-build.patch ) vcpkg_configure_cmake( diff --git a/ports/functions-framework-cpp/vcpkg.json b/ports/functions-framework-cpp/vcpkg.json index 220c60d7555b08..cb9077fe2e5905 100644 --- a/ports/functions-framework-cpp/vcpkg.json +++ b/ports/functions-framework-cpp/vcpkg.json @@ -1,6 +1,6 @@ { "name": "functions-framework-cpp", - "version": "0.4.0", + "version": "0.5.0", "description": "Functions Framework for C++.", "homepage": "https://github.com/GoogleCloudPlatform/functions-framework-cpp/", "license": "Apache-2.0", diff --git a/ports/fxdiv/portfile.cmake b/ports/fxdiv/portfile.cmake new file mode 100644 index 00000000000000..a62cefcd8e261d --- /dev/null +++ b/ports/fxdiv/portfile.cmake @@ -0,0 +1,18 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/fxdiv + REF 63058eff77e11aa15bf531df5dd34395ec3017c8 + SHA512 da33eab4d006645f383a1f24fc3e747db3aeb0613219297ec0ae69aa2617f07ba050ebd6a64a8cbde6d25481f176d0ec3b9753a95d1fbcead2136595f3e50e97 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFXDIV_BUILD_TESTS=OFF + -DFXDIV_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/fxdiv/vcpkg.json b/ports/fxdiv/vcpkg.json new file mode 100644 index 00000000000000..e120815ee41831 --- /dev/null +++ b/ports/fxdiv/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fxdiv", + "version-string": "2021-02-21", + "description": "C99/C++ header-only library for division via fixed-point multiplication by inverse", + "homepage": "https://github.com/Maratyszcza/FXdiv" +} diff --git a/ports/g3log/CONTROL b/ports/g3log/CONTROL deleted file mode 100644 index aeeee688cb4783..00000000000000 --- a/ports/g3log/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: g3log -Version: 2019-07-29 -Description: Asynchronous logger with Dynamic Sinks -Homepage: https://github.com/KjellKod/g3log diff --git a/ports/g3log/portfile.cmake b/ports/g3log/portfile.cmake index 2d529f0142b4e8..6cd6d0837dd056 100644 --- a/ports/g3log/portfile.cmake +++ b/ports/g3log/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KjellKod/g3log - REF f1491791785101d4ae948f8ecee7e9cc3e6b0be8 - SHA512 852ed7c9eb2345f02414be7fb7dfbd4be340dcbf8abc4e6ba6327d181cf10e33969279166151b4eeab78b290d3fecbf4a5094696c412f7b2ab815df415652bd8 + REF 2fca06ff6da5c67465b591f4d45e8fd14d531142 #v1.3.4 + SHA512 8dba89e5a08e44d585478470725e25e37486685d8fe4d3cb5e97c81013389c95d96bdde658244e425008169bc8a9fc2d34a065b83b110c62e73d3ccab9b2b9e1 HEAD_REF master ) @@ -10,7 +10,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" G3_SHARED_LIB) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" G3_SHARED_RUNTIME) # https://github.com/KjellKod/g3log#prerequisites -set(VERSION "1.3.2-80") +set(VERSION "1.3.4") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -28,7 +28,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3logger TARGET_PATH share/g3logger) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3log) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/g3log/vcpkg.json b/ports/g3log/vcpkg.json new file mode 100644 index 00000000000000..c17e98d8b10697 --- /dev/null +++ b/ports/g3log/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "g3log", + "version": "1.3.4", + "description": "Asynchronous logger with Dynamic Sinks", + "homepage": "https://github.com/KjellKod/g3log" +} diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index e756882df8bb8e..c3ed21e0f5d4e8 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,4 +1,4 @@ Source: geos -Version: 3.9.0 +Version: 3.9.1 Homepage: https://www.osgeo.org/projects/geos/ Description: Geometry Engine Open Source diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index beecfd42988642..f5b9c21ac2f6af 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -1,9 +1,9 @@ -set(GEOS_VERSION 3.9.0) +set(GEOS_VERSION 3.9.1) vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2" FILENAME "geos-${GEOS_VERSION}.tar.bz2" - SHA512 1081f2aa20e671450953f7bb53b17c703804a1c9f4987c9da0987ff24339af5811b2c8b79c8e438d04ca38e4d06164dc5a4206f266f7efc19af3f9d9ea8f71f8 + SHA512 7ea131685cd110ec5e0cb7c214b52b75397371e75f011e1410b6770b6a48ca492a02337d86a7be35c852ef94604fe9d6f49634c79d4946df611aaa4f5cbaee28 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/glm/CMakeLists.txt b/ports/glm/CMakeLists.txt index 678604b8670f79..c8a92c151de436 100644 --- a/ports/glm/CMakeLists.txt +++ b/ports/glm/CMakeLists.txt @@ -15,7 +15,9 @@ install( ) install( - EXPORT glm-config DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm + EXPORT glm-config + NAMESPACE glm:: + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm ) install( diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL deleted file mode 100644 index 3ba2f552d7b2dc..00000000000000 --- a/ports/glm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glm -Version: 0.9.9.8 -Description: OpenGL Mathematics (GLM) -Homepage: https://glm.g-truc.net diff --git a/ports/glm/vcpkg.json b/ports/glm/vcpkg.json new file mode 100644 index 00000000000000..45a3b3c71a262d --- /dev/null +++ b/ports/glm/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "glm", + "version-string": "0.9.9.8", + "port-version": 1, + "description": "OpenGL Mathematics (GLM)", + "homepage": "https://glm.g-truc.net" +} diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL deleted file mode 100644 index 64664a9a190df2..00000000000000 --- a/ports/globjects/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: globjects -Version: 1.1.0-3 -Build-Depends: glbinding, glm -Description: C++ library strictly wrapping OpenGL objects. -Homepage: https://github.com/cginternals/globjects diff --git a/ports/globjects/fix-dependency-glm.patch b/ports/globjects/fix-dependency-glm.patch new file mode 100644 index 00000000000000..e867da1b10fa17 --- /dev/null +++ b/ports/globjects/fix-dependency-glm.patch @@ -0,0 +1,13 @@ +diff --git a/source/globjects/CMakeLists.txt b/source/globjects/CMakeLists.txt +index 71e92d8..b8b4408 100644 +--- a/source/globjects/CMakeLists.txt ++++ b/source/globjects/CMakeLists.txt +@@ -359,7 +359,7 @@ target_link_libraries(${target} + + PUBLIC + ${DEFAULT_LIBRARIES} +- glm ++ glm::glm + glbinding::glbinding + glbinding::glbinding-aux + diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index 12ef300593595c..4103fd3ab44e5e 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -4,7 +4,9 @@ vcpkg_from_github( REF dc68b09a53ec20683d3b3a12ed8d9cb12602bb9a SHA512 5145df795a73a8d74e983e143fd57441865f3082860efb89a3aa8c4d64c2eb6f0256a8049ccd5479dd77e53ef6638d9c903b29a8ef2b41a076003d9595912500 HEAD_REF master - PATCHES system-install.patch + PATCHES + system-install.patch + fix-dependency-glm.patch ) vcpkg_configure_cmake( diff --git a/ports/globjects/vcpkg.json b/ports/globjects/vcpkg.json new file mode 100644 index 00000000000000..8878d28659a741 --- /dev/null +++ b/ports/globjects/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "globjects", + "version-string": "1.1.0", + "port-version": 4, + "description": "C++ library strictly wrapping OpenGL objects", + "homepage": "https://github.com/cginternals/globjects", + "dependencies": [ + "glbinding", + "glm" + ] +} diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 783ac0141e82f1..0da849f0dcaae3 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO googleapis/google-cloud-cpp - REF v1.24.0 - SHA512 06d53c1599ad60d5ec201f4fc9526f1bae6aee3c776423b9072c07030c840fb808c4e983b83ca58b7899f56e648b4a73846c8ecad0238e513979964f2d28d072 + REF v1.25.0 + SHA512 db1803b9de38028a171d3b295b85da5dd36f150c78f2ec523f24eb67998c27d06584aa26e572cab8508841cb469c980304501b87f4157a8020f85bc733f968b5 HEAD_REF master ) diff --git a/ports/google-cloud-cpp/vcpkg.json b/ports/google-cloud-cpp/vcpkg.json index 33f4f70f3845d7..4c9f4791cd77dd 100644 --- a/ports/google-cloud-cpp/vcpkg.json +++ b/ports/google-cloud-cpp/vcpkg.json @@ -1,6 +1,6 @@ { "name": "google-cloud-cpp", - "version": "1.24.0", + "version": "1.25.0", "port-version": 2, "description": "C++ Client Libraries for Google Cloud Platform APIs.", "homepage": "https://github.com/googleapis/google-cloud-cpp", diff --git a/ports/harfbuzz/0001-circumvent-samefile-error.patch b/ports/harfbuzz/0001-circumvent-samefile-error.patch new file mode 100755 index 00000000000000..3db21590a64d6c --- /dev/null +++ b/ports/harfbuzz/0001-circumvent-samefile-error.patch @@ -0,0 +1,43 @@ +diff --git a/src/gen-harfbuzzcc.py b/src/gen-harfbuzzcc.py +index b25bcc7..97bf2ab 100644 +--- a/src/gen-harfbuzzcc.py ++++ b/src/gen-harfbuzzcc.py +@@ -15,4 +15,8 @@ with open (OUTPUT, "wb") as f: + f.write ("".join ('#include "{}"\n'.format (os.path.basename (x)) for x in sources if x.endswith (".cc")).encode ()) + + # copy it also to src/ +-shutil.copyfile (OUTPUT, os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT))) ++src = OUTPUT ++dst = os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT)) ++# Avoid SameFileError ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) +diff --git a/src/gen-hb-version.py b/src/gen-hb-version.py +index 5ec2024..59d4754 100644 +--- a/src/gen-hb-version.py ++++ b/src/gen-hb-version.py +@@ -33,4 +33,8 @@ with open (INPUT, "r", encoding='utf-8') as template: + .encode ()) + + # copy it also to src/ +-shutil.copyfile (OUTPUT, os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT))) ++src = OUTPUT ++dst = os.path.join(CURRENT_SOURCE_DIR, os.path.basename (OUTPUT)) ++# Avoid SameFileError if src and dst is the same ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) +diff --git a/src/gen-ragel-artifacts.py b/src/gen-ragel-artifacts.py +index b60ec3b..288e224 100644 +--- a/src/gen-ragel-artifacts.py ++++ b/src/gen-ragel-artifacts.py +@@ -22,4 +22,8 @@ hh = rl.replace ('.rl', '.hh') + subprocess.Popen ([ragel, '-e', '-F1', '-o', hh, rl], cwd=outdir).wait () + + # copy it also to src/ +-shutil.copyfile (os.path.join (outdir, hh), os.path.join (CURRENT_SOURCE_DIR, hh)) ++src = os.path.join (outdir, hh) ++dst = os.path.join (CURRENT_SOURCE_DIR, hh) ++# Avoid SameFileError ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) + diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 5752550b60c29a..54cc71fbab1f44 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -5,6 +5,11 @@ vcpkg_from_github( SHA512 d231a788ea4e52231d4c363c1eca76424cb82ed0952b5c24d0b082e88b3dddbda967e7fffe67fffdcb22c7ebfbf0ec923365eb4532be772f2e61fa7d29b51998 HEAD_REF master PATCHES + # This patch is a workaround that is needed until the following issues are resolved upstream: + # - https://github.com/mesonbuild/meson/issues/8375 + # - https://github.com/harfbuzz/harfbuzz/issues/2870 + # Details: https://github.com/microsoft/vcpkg/issues/16262 + 0001-circumvent-samefile-error.patch 0002-fix-uwp-build.patch ) diff --git a/ports/harfbuzz/vcpkg.json b/ports/harfbuzz/vcpkg.json index bdb4c342069c5f..c2e9ab742139a5 100644 --- a/ports/harfbuzz/vcpkg.json +++ b/ports/harfbuzz/vcpkg.json @@ -1,6 +1,7 @@ { "name": "harfbuzz", "version-string": "2.7.4", + "port-version": 1, "description": "HarfBuzz OpenType text shaping engine", "homepage": "https://github.com/harfbuzz/harfbuzz", "dependencies": [ diff --git a/ports/hazelcast-cpp-client/portfile.cmake b/ports/hazelcast-cpp-client/portfile.cmake new file mode 100644 index 00000000000000..787af98a5d55fe --- /dev/null +++ b/ports/hazelcast-cpp-client/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hazelcast/hazelcast-cpp-client + REF v4.0.1 + SHA512 9d6e2fe890d5dc08b2ccc2e74c736c7ce014a03f5f020ccfc21f5accbfe39285898283e01e491cab1259badf983094b97b618230cb999480372aaf018d874457 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openssl WITH_OPENSSL + example BUILD_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/hazelcast-cpp-client) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/hazelcast-cpp-client/vcpkg.json b/ports/hazelcast-cpp-client/vcpkg.json new file mode 100644 index 00000000000000..d3270c849490bf --- /dev/null +++ b/ports/hazelcast-cpp-client/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "hazelcast-cpp-client", + "version-semver": "4.0.1", + "description": "C++ client library for Hazelcast in-memory database.", + "homepage": "https://github.com/hazelcast/hazelcast-cpp-client", + "documentation": "http://hazelcast.github.io/hazelcast-cpp-client/index.html", + "supports": "!uwp", + "dependencies": [ + "boost-any", + "boost-asio", + "boost-chrono", + "boost-format", + "boost-optional", + "boost-property-tree", + "boost-system", + "boost-thread", + "boost-uuid" + ], + "features": { + "example": { + "description": "Build examples for Hazelcast C++ client" + }, + "openssl": { + "description": "Build hazelcast C++ client with SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/hiredis/CONTROL b/ports/hiredis/CONTROL deleted file mode 100644 index a331b173517e7e..00000000000000 --- a/ports/hiredis/CONTROL +++ /dev/null @@ -1,13 +0,0 @@ -Source: hiredis -Version: 1.0.0 -Port-Version: 0 -Homepage: https://github.com/redis/hiredis -Description: Hiredis is a minimalistic C client library for the Redis database. - -Feature: ssl -Description: Build hiredis_ssl for SSL support -Build-Depends: openssl - -Feature: example -Description: Build example -Build-Depends: libevent, pthread, libuv \ No newline at end of file diff --git a/ports/hiredis/fix-include-path.patch b/ports/hiredis/fix-include-path.patch new file mode 100644 index 00000000000000..8bfeae09d7eb9a --- /dev/null +++ b/ports/hiredis/fix-include-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7eafeb8..623c586 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ IF(WIN32 OR MINGW) + TARGET_LINK_LIBRARIES(hiredis PRIVATE ws2_32) + ENDIF() + +-TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $ $) ++TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $ $) + + CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY) + diff --git a/ports/hiredis/portfile.cmake b/ports/hiredis/portfile.cmake index 0c72c83305c558..d0b273c77197c4 100644 --- a/ports/hiredis/portfile.cmake +++ b/ports/hiredis/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( fix-feature-example.patch support-static-in-win.patch fix-timeval.patch + fix-include-path.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/hiredis/vcpkg.json b/ports/hiredis/vcpkg.json new file mode 100644 index 00000000000000..862214eb8b0944 --- /dev/null +++ b/ports/hiredis/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "hiredis", + "version": "1.0.0", + "port-version": 1, + "description": "Hiredis is a minimalistic C client library for the Redis database.", + "homepage": "https://github.com/redis/hiredis", + "features": { + "example": { + "description": "Build example", + "dependencies": [ + "libevent", + "libuv", + "pthread" + ] + }, + "ssl": { + "description": "Build hiredis_ssl for SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index f6f85b29eccc34..7cb41284226a85 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -23,13 +23,6 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp ) - -if(IMGUI_USE_WCHAR32) - FILE(READ ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h IMCONFIG) - STRING(REGEX REPLACE "//#define IMGUI_USE_WCHAR32" "#define IMGUI_USE_WCHAR32" IMCONFIG "${IMCONFIG}") - FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h "${IMCONFIG}") -endif() - if(IMGUI_BUILD_ALLEGRO5_BINDING) find_path(ALLEGRO5_INCLUDE_DIRS allegro5/allegro.h) target_include_directories(${PROJECT_NAME} PRIVATE ${ALLEGRO5_INCLUDE_DIRS}) @@ -120,6 +113,11 @@ if(IMGUI_FREETYPE) find_package(freetype CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PUBLIC freetype) target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE) +endif() + +if(IMGUI_USE_WCHAR32) + target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_USE_WCHAR32) endif() list(REMOVE_DUPLICATES BINDINGS_SOURCES) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL deleted file mode 100644 index 4544e796294b65..00000000000000 --- a/ports/imgui/CONTROL +++ /dev/null @@ -1,81 +0,0 @@ -Source: imgui -Version: 1.81 -Port-Version: 1 -Homepage: https://github.com/ocornut/imgui -Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. - -Feature: allegro5-binding -Description: Make available Allegro5 binding -Build-Depends: allegro5 - -Feature: dx9-binding -Description: Make available DirectX9 binding - -Feature: dx10-binding -Description: Make available DirectX10 binding - -Feature: dx11-binding -Description: Make available DirectX11 binding - -Feature: dx12-binding -Description: Make available DirectX12 binding - -Feature: glfw-binding -Description: Make available GLFW binding -Build-Depends: glfw3 - -Feature: glut-binding -Description: Make available Glut binding -Build-Depends: freeglut - -Feature: marmalade-binding -Description: Make available Marmalade binding - -Feature: metal-binding -Description: Make available Metal binding - -Feature: opengl2-binding -Description: Make available OpenGL (legacy) binding - -Feature: opengl3-glew-binding -Description: Make available OpenGL3/ES/ES2 (modern) binding with GLEW -Build-Depends: glew - -Feature: opengl3-glad-binding -Description: Make available OpenGL3/ES/ES2 (modern) binding with glad -Build-Depends: glad - -Feature: opengl3-gl3w-binding -Description: Make available OpenGL3/ES/ES2 (modern) binding with gl3w -Build-Depends: gl3w - -Feature: opengl3-glbinding-binding -Description: Make available OpenGL3/ES/ES2 (modern) binding glbinding -Build-Depends: glbinding - -Feature: osx-binding -Description: Make available OSX binding - -Feature: sdl2-binding -Description: Make available SDL2 binding -Build-Depends: sdl2 - -Feature: vulkan-binding -Description: Make available Vulkan binding -Build-Depends: vulkan - -Feature: win32-binding -Description: Make available Win32 binding - -Feature: freetype -Description: Build font atlases using FreeType instead of stb_truetype -Build-Depends: freetype - -Feature: libigl-imgui -Description: Install the libigl-imgui headers - -Feature: wchar32 -Description: Use WCHAR32 instead of WCHAR16 - -Feature: docking-experimental -Description: Build with docking support diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index eccb30ba912136..5e550339fda286 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -4,8 +4,8 @@ if ("docking-experimental" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF 682249396f02b8c21e5ff333ab4a1969c89387ad - SHA512 95f17c14e0a8f10dfc51fd1b30894f9905433fac8f9a93b6c545a542df5eb20be68f40996080a85cba934107ce19fff91a1df1edad1a1b5a0030e8f626e1985d + REF 239d09804d17997e147f4bcfb451ead04c1d67ff + SHA512 7e93dd8c1a465b8405d32f08aa2be0c1a2bea7762384ba6a16848e10b10f5684f8969b672cec6e994a90fc6a6189519730dd7d15b82ae39b5221278eae23ba61 HEAD_REF docking ) else() @@ -72,6 +72,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +if ("freetype" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_ENABLE_FREETYPE" "#define IMGUI_ENABLE_FREETYPE") +endif() +if ("wchar32" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_USE_WCHAR32" "#define IMGUI_USE_WCHAR32") +endif() + vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() diff --git a/ports/imgui/vcpkg.json b/ports/imgui/vcpkg.json new file mode 100644 index 00000000000000..1b7ee7851b4f93 --- /dev/null +++ b/ports/imgui/vcpkg.json @@ -0,0 +1,105 @@ +{ + "name": "imgui", + "version": "1.81", + "port-version": 2, + "description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.", + "homepage": "https://github.com/ocornut/imgui", + "features": { + "allegro5-binding": { + "description": "Make available Allegro5 binding", + "dependencies": [ + "allegro5" + ] + }, + "docking-experimental": { + "description": "Build with docking support" + }, + "dx10-binding": { + "description": "Make available DirectX10 binding" + }, + "dx11-binding": { + "description": "Make available DirectX11 binding" + }, + "dx12-binding": { + "description": "Make available DirectX12 binding" + }, + "dx9-binding": { + "description": "Make available DirectX9 binding" + }, + "freetype": { + "description": "Build font atlases using FreeType instead of stb_truetype", + "dependencies": [ + "freetype" + ] + }, + "glfw-binding": { + "description": "Make available GLFW binding", + "dependencies": [ + "glfw3" + ] + }, + "glut-binding": { + "description": "Make available Glut binding", + "dependencies": [ + "freeglut" + ] + }, + "libigl-imgui": { + "description": "Install the libigl-imgui headers" + }, + "marmalade-binding": { + "description": "Make available Marmalade binding" + }, + "metal-binding": { + "description": "Make available Metal binding" + }, + "opengl2-binding": { + "description": "Make available OpenGL (legacy) binding" + }, + "opengl3-gl3w-binding": { + "description": "Make available OpenGL3/ES/ES2 (modern) binding with gl3w", + "dependencies": [ + "gl3w" + ] + }, + "opengl3-glad-binding": { + "description": "Make available OpenGL3/ES/ES2 (modern) binding with glad", + "dependencies": [ + "glad" + ] + }, + "opengl3-glbinding-binding": { + "description": "Make available OpenGL3/ES/ES2 (modern) binding glbinding", + "dependencies": [ + "glbinding" + ] + }, + "opengl3-glew-binding": { + "description": "Make available OpenGL3/ES/ES2 (modern) binding with GLEW", + "dependencies": [ + "glew" + ] + }, + "osx-binding": { + "description": "Make available OSX binding" + }, + "sdl2-binding": { + "description": "Make available SDL2 binding", + "dependencies": [ + "sdl2" + ] + }, + "vulkan-binding": { + "description": "Make available Vulkan binding", + "dependencies": [ + "vulkan" + ] + }, + "wchar32": { + "description": "Use WCHAR32 instead of WCHAR16" + }, + "win32-binding": { + "description": "Make available Win32 binding" + } + } +} diff --git a/ports/itpp/CONTROL b/ports/itpp/CONTROL deleted file mode 100644 index 2d4fa89005dec7..00000000000000 --- a/ports/itpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: itpp -Version: 4.3.1-5 -Homepage: http://itpp.sourceforge.net -Description: IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications. \ No newline at end of file diff --git a/ports/itpp/portfile.cmake b/ports/itpp/portfile.cmake index 730607b373397f..52e8b05f5bed00 100644 --- a/ports/itpp/portfile.cmake +++ b/ports/itpp/portfile.cmake @@ -15,6 +15,10 @@ vcpkg_from_sourceforge( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_LAPACK=ON + -DCMAKE_DISABLE_FIND_PACKAGE_FFT=ON + -DCMAKE_DISABLE_FIND_PACKAGE_BLAS=ON ) vcpkg_install_cmake() diff --git a/ports/itpp/vcpkg.json b/ports/itpp/vcpkg.json new file mode 100644 index 00000000000000..130cda581cc962 --- /dev/null +++ b/ports/itpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "itpp", + "version-semver": "4.3.1", + "port-version": 6, + "description": "IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications.", + "homepage": "http://itpp.sourceforge.net" +} diff --git a/ports/krabsetw/portfile.cmake b/ports/krabsetw/portfile.cmake index 2a5a07d5efc0b7..7dcb2c7fb7c63c 100644 --- a/ports/krabsetw/portfile.cmake +++ b/ports/krabsetw/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_fail_port_install(ON_TARGET "UWP" "LINUX" "OSX" "FREEBSD" "ANDROID" "MINGW vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/krabsetw - REF 74a35d706a25b983ed0f1a830309cf7413f8c2cf - SHA512 98c830238d8bbe130db64afe8b7f74deb7f311f89b780943d8c9db472a64d6e5f798fa77265995660cea1a5db8fb88984ecc9351c10716b2e3a25b5d0665482d + REF 31679cf84bc85360158672699f2f68a821e8a6d0 + SHA512 4fcc4ee1c41c6d40770a5b57111e6fd29eedf1f4a29038ab1dfb8bffb3ad0464c4ec06b90b65fabadcd419564d55172d4d9fdc3750c1898545f7c6e00fbe99c8 HEAD_REF master ) diff --git a/ports/krabsetw/vcpkg.json b/ports/krabsetw/vcpkg.json index 54ef0df5382ad9..93749378612ebf 100644 --- a/ports/krabsetw/vcpkg.json +++ b/ports/krabsetw/vcpkg.json @@ -1,6 +1,6 @@ { "name": "krabsetw", - "version-string": "4.1.14", + "version-string": "4.1.18", "description": "krabsetw is a header-only C++ library that simplifies interacting with ETW.", "homepage": "https://github.com/microsoft/krabsetw", "supports": "windows & !uwp" diff --git a/ports/libgnutls/portfile.cmake b/ports/libgnutls/portfile.cmake new file mode 100644 index 00000000000000..5b027cca66f372 --- /dev/null +++ b/ports/libgnutls/portfile.cmake @@ -0,0 +1,35 @@ +set(GNUTLS_BRANCH 3.6) +set(GNUTLS_VERSION ${GNUTLS_BRANCH}.15) +set(GNUTLS_HASH f757d1532198f44bcad7b73856ce6a05bab43f6fb77fcc81c59607f146202f73023d0796d3e1e7471709cf792c8ee7d436e19407e0601bc0bda2f21512b3b01c) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${GNUTLS_VERSION}.tar.xz" + FILENAME "gnutls-${GNUTLS_VERSION}.tar.xz" + SHA512 ${GNUTLS_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GNUTLS_VERSION} +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-doc + --disable-silent-rules + --disable-tests + --disable-maintainer-mode + --disable-rpath + --with-included-unistring + --without-p11-kit +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libgnutls/vcpkg.json b/ports/libgnutls/vcpkg.json new file mode 100644 index 00000000000000..08cc0beb9116db --- /dev/null +++ b/ports/libgnutls/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libgnutls", + "version": "3.6.15", + "description": "A secure communications library implementing the SSL, TLS and DTLS protocols", + "homepage": "https://www.gnutls.org/", + "supports": "!windows", + "dependencies": [ + "gmp", + "libidn2", + "libtasn1", + "nettle" + ] +} diff --git a/ports/libhv/portfile.cmake b/ports/libhv/portfile.cmake new file mode 100644 index 00000000000000..8f25101c00f1ad --- /dev/null +++ b/ports/libhv/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ithewei/libhv + REF v1.0.0 + SHA512 49d9e93444667ff143048abc05f88aab23ec5c543c58d0494bac9c29ac8216760220f19828bde6b84a5864bc8c5ec280ee4a72cc5ba888a4f02734240243cb07 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_UNITTEST=OFF + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_SHARED=${BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libhv/vcpkg.json b/ports/libhv/vcpkg.json new file mode 100644 index 00000000000000..adfef8d2095950 --- /dev/null +++ b/ports/libhv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libhv", + "version": "1.0.0", + "description": "Libhv is a C/C++ network library similar to libevent/libuv.", + "homepage": "https://github.com/ithewei/libhv", + "supports": "!(arm | uwp)" +} diff --git a/ports/liblsl/CONTROL b/ports/liblsl/CONTROL index e374a5888f72a3..708ea67e1334d0 100644 --- a/ports/liblsl/CONTROL +++ b/ports/liblsl/CONTROL @@ -1,3 +1,6 @@ Source: liblsl -Version: 1.13.1 +Version: 1.14.0 +Homepage: https://github.com/sccn/liblsl Description: C++ lsl library for multi-modal time-synched data transmission over the local network +Supports: !(static & staticcrt) +Build-Depends: pugixml diff --git a/ports/liblsl/portfile.cmake b/ports/liblsl/portfile.cmake index 38a74bf239bb2d..a8d56b0bdb664f 100644 --- a/ports/liblsl/portfile.cmake +++ b/ports/liblsl/portfile.cmake @@ -1,35 +1,32 @@ -set(VCPKG_LIBRARY_LINKAGE dynamic) +# static builds are currently not supported since liblsl always also builds shared binaries +# which need to be deleted for vcpkg but then the CMake target can no longer be imported because it still references them +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sccn/liblsl - REF 1.13.1 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake - SHA512 95cfd69cff86eb7de62624775f3037dd71a5240a6ad82c12d9340bfaf2c38c25ac9e884b01635bf71e27fcd9ce385602d8fa347c61b6ce10cf2bb7f0ad761282 + REF v1.14.0 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake + SHA512 b4ec379339d174c457c8c1ec69f9e51ea78a738e72ecc96b9193f07b5273acb296b5b1f90c9dfe16591ecab0eef9aae9add640c1936d3769cae0bd96617205ec HEAD_REF master ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DLSL_BUILD_STATIC=OFF - -DLSL_UNIXFOLDERS=ON - -DLSL_NO_FANCY_LIBNAME=ON - -Dlslgitrevision="1.13.1" - -Dlslgitbranch="master" + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLSL_BUILD_STATIC=OFF + -DLSL_BUNDLED_PUGIXML=OFF # we use the pugixml vcpkg package instead + -Dlslgitrevision=v1.14.0 + -Dlslgitbranch=master ) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_copy_tools(TOOL_NAMES lslver AUTO_CLEAN) -if(VCPKG_TARGET_IS_WINDOWS) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/lslver.exe) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/lslver/) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/lslver.exe ${CURRENT_PACKAGES_DIR}/tools/lslver/lslver.exe) -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl) +file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL deleted file mode 100644 index 4a9f2d2ba23930..00000000000000 --- a/ports/libmysql/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: libmysql -Version: 8.0.20 -Port-Version: 1 -Homepage: https://github.com/mysql/mysql-server -Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, lz4, zlib -Description: A MySQL client library for C development. -Supports: !(windows&x86)&!uwp \ No newline at end of file diff --git a/ports/libmysql/system-libs.patch b/ports/libmysql/system-libs.patch index 2715823ea83deb..547573fc58e7ad 100644 --- a/ports/libmysql/system-libs.patch +++ b/ports/libmysql/system-libs.patch @@ -56,6 +56,24 @@ index fde3a75..9f694b9 100644 ENDMACRO() MACRO (MYSQL_USE_BUNDLED_ICU) +diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake +index 3fa58da..88b53e7 100644 +--- a/cmake/libutils.cmake ++++ b/cmake/libutils.cmake +@@ -350,12 +350,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES) + # On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib + # must be merged into mysqlclient.lib + IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient") +- SET(LINKER_EXTRA_FLAGS "") +- FOREACH(LIB ${SSL_LIBRARIES}) +- STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}") +- ENDFOREACH() +- SET_TARGET_PROPERTIES(${TARGET} +- PROPERTIES STATIC_LIBRARY_FLAGS "${LINKER_EXTRA_FLAGS}") ++ TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${SSL_LIBRARIES}) + ENDIF() + + IF(OSLIBS) diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake index 9aad130..68cbaba 100644 --- a/cmake/lz4.cmake @@ -70,7 +88,7 @@ index 9aad130..68cbaba 100644 SET(SYSTEM_LZ4_FOUND 1) INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4}) diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake -index 52feade..4a0237a 100644 +index 52feade..1e71bd7 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -93,7 +93,20 @@ ENDMACRO() @@ -78,12 +96,12 @@ index 52feade..4a0237a 100644 # WITH_SSL=[yes|system|] MACRO (MYSQL_CHECK_SSL) + find_package(OpenSSL REQUIRED) -+ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "") -+ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "") ++ set(OPENSSL_LIBRARY OpenSSL::SSL CACHE STRING "") ++ set(CRYPTO_LIBRARY OpenSSL::Crypto CACHE STRING "") + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl + DOC "path to the openssl executable") + SET(SSL_DEFINES "-DHAVE_OPENSSL") -+ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) ++ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) + if(NOT WIN32) + find_package(Threads REQUIRED) + list(APPEND SSL_LIBRARIES Threads::Threads) diff --git a/ports/libmysql/vcpkg.json b/ports/libmysql/vcpkg.json new file mode 100644 index 00000000000000..225ec74956eca1 --- /dev/null +++ b/ports/libmysql/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libmysql", + "version": "8.0.20", + "port-version": 2, + "description": "A MySQL client library for C development", + "homepage": "https://github.com/mysql/mysql-server", + "supports": "!(windows & x86) & !uwp", + "dependencies": [ + "boost-algorithm", + "boost-functional", + "boost-geometry", + "boost-graph", + "boost-optional", + "icu", + "libevent", + "lz4", + "openssl", + "zlib" + ] +} diff --git a/ports/libnop/portfile.cmake b/ports/libnop/portfile.cmake new file mode 100644 index 00000000000000..5c10f5e60ffdce --- /dev/null +++ b/ports/libnop/portfile.cmake @@ -0,0 +1,8 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/libnop + REF 910b55815be16109f04f4180e9adee14fb4ce281 + SHA512 74c5324eaa1b6b2ac8dfef94c835b5c5b044625f8e5efe3522470b1ecc4798ff43d344a013cee2f6901e83267c6167072947b754e63f1552ae7044cffe234c36 +) +file(INSTALL ${SOURCE_PATH}/include/nop DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libnop/vcpkg.json b/ports/libnop/vcpkg.json new file mode 100644 index 00000000000000..be09bef23df997 --- /dev/null +++ b/ports/libnop/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libnop", + "version-date": "2021-03-01", + "description": "libnop is a header-only library for serializing and deserializing C++ data types without external code generators or runtime support libraries", + "homepage": "https://github.com/google/libnop" +} diff --git a/ports/libpmemobj-cpp/CONTROL b/ports/libpmemobj-cpp/CONTROL index c3dd8c750e558a..4846f52682c6a0 100644 --- a/ports/libpmemobj-cpp/CONTROL +++ b/ports/libpmemobj-cpp/CONTROL @@ -1,5 +1,5 @@ Source: libpmemobj-cpp -Version: 1.11 +Version: 1.12 Homepage: https://github.com/pmem/libpmemobj-cpp Description: C++ bindings for libpmemobj (https://github.com/pmem/pmdk). diff --git a/ports/libpmemobj-cpp/portfile.cmake b/ports/libpmemobj-cpp/portfile.cmake index a11c76095af6df..8a60244b0f1a5b 100644 --- a/ports/libpmemobj-cpp/portfile.cmake +++ b/ports/libpmemobj-cpp/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pmem/libpmemobj-cpp - REF 02c30bf553c36c683a4f826dac78f0dc5e8e7a2c #v1.11 - SHA512 981e642c1cf3075454130c068fc6a7b0db35cde18581968b6ee17765db0e255e5d057feb68217b0b4a9b58e56c4578aa82b97cfa22112115382139bad5d8bce4 + REF b570268bec37735df1d4591605c0c7b2077c7bed #v1.12 + SHA512 0914c35c708b5fec81ac2632cfbae52412c2ff2255940b54e72acc03875fdebf03f83194a6f91f1ac1d9c3531c7d1537fa0b9bc1a9da53acc50339a3b7df7b62 HEAD_REF master PATCHES fixlibpmemobj-cpp.patch diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index 5d535ff7238fd7..d684fa2392a843 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,6 +1,6 @@ Source: libpq Version: 12.2 -Port-Version: 11 +Port-Version: 12 Build-Depends: libpq[core,bonjour] (osx) Supports: !uwp Homepage: https://www.postgresql.org/ diff --git a/ports/libpq/patches/windows/Solution_Debug.patch b/ports/libpq/patches/windows/Solution_DEBUG.patch similarity index 100% rename from ports/libpq/patches/windows/Solution_Debug.patch rename to ports/libpq/patches/windows/Solution_DEBUG.patch diff --git a/ports/libpq/patches/windows/Solution_Release.patch b/ports/libpq/patches/windows/Solution_RELEASE.patch similarity index 100% rename from ports/libpq/patches/windows/Solution_Release.patch rename to ports/libpq/patches/windows/Solution_RELEASE.patch diff --git a/ports/libpq/patches/windows/python3_build_Debug.patch b/ports/libpq/patches/windows/python3_build_DEBUG.patch similarity index 100% rename from ports/libpq/patches/windows/python3_build_Debug.patch rename to ports/libpq/patches/windows/python3_build_DEBUG.patch diff --git a/ports/libpq/patches/windows/python3_build_Release.patch b/ports/libpq/patches/windows/python3_build_RELEASE.patch similarity index 100% rename from ports/libpq/patches/windows/python3_build_Release.patch rename to ports/libpq/patches/windows/python3_build_RELEASE.patch diff --git a/ports/libsvm/CONTROL b/ports/libsvm/CONTROL deleted file mode 100644 index 4a9af6018f4673..00000000000000 --- a/ports/libsvm/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: libsvm -Version: 323-1 -Description: A library for Support Vector Machines -Homepage: https://www.csie.ntu.edu.tw/~cjlin/libsvm/ - -Feature: tools -Description: Build libsvm tools diff --git a/ports/libsvm/portfile.cmake b/ports/libsvm/portfile.cmake index fe15e57bf3c399..a89b838e1ed021 100644 --- a/ports/libsvm/portfile.cmake +++ b/ports/libsvm/portfile.cmake @@ -29,7 +29,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) if ("tools" IN_LIST FEATURES) - vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN) + if (WIN32) + vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN) + else () + vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-train AUTO_CLEAN) + endif () endif () file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libsvm/vcpkg.json b/ports/libsvm/vcpkg.json new file mode 100644 index 00000000000000..fe2003e4d0d371 --- /dev/null +++ b/ports/libsvm/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libsvm", + "version-string": "323", + "port-version": 2, + "description": "A library for Support Vector Machines.", + "homepage": "https://www.csie.ntu.edu.tw/~cjlin/libsvm/", + "features": { + "tools": { + "description": "build libsvm CLI tools." + } + } +} diff --git a/ports/libtasn1/portfile.cmake b/ports/libtasn1/portfile.cmake new file mode 100644 index 00000000000000..7b2cd0ef4c8e5d --- /dev/null +++ b/ports/libtasn1/portfile.cmake @@ -0,0 +1,31 @@ +set(VERSION 4.16.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/libtasn1/libtasn1-${VERSION}.tar.gz" + FILENAME "libtasn1-${VERSION}.tar.gz" + SHA512 b356249535d5d592f9b59de39d21e26dd0f3f00ea47c9cef292cdd878042ea41ecbb7c8d2f02ac5839f5210092fe92a25acd343260ddf644887b031b167c2e71 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +# restore the default ac_cv_prog_cc_g flags, otherwise it fails to compile +set(VCPKG_C_FLAGS "-g -O2") +set(VCPKG_CXX_FLAGS "-g -O2") + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-doc +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libtasn1/vcpkg.json b/ports/libtasn1/vcpkg.json new file mode 100644 index 00000000000000..fbe18fbcf973b0 --- /dev/null +++ b/ports/libtasn1/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libtasn1", + "version": "4.16.0", + "description": "A secure communications library implementing the SSL, TLS and DTLS protocols", + "homepage": "https://www.gnutls.org/", + "supports": "!windows" +} diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index 566948d4b41c28..5dd5dcf0a8d431 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,5 +1,5 @@ Source: libtorrent -Version: 1.2.11 +Version: 1.2.12 Homepage: https://github.com/arvidn/libtorrent Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision, boost-pool, boost-variant diff --git a/ports/libtorrent/fix-AppleClang-test.patch b/ports/libtorrent/fix-AppleClang-test.patch new file mode 100644 index 00000000000000..048e8d409f289a --- /dev/null +++ b/ports/libtorrent/fix-AppleClang-test.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92592ec..8bfcd60 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -644,7 +644,9 @@ if (NOT Windows) + } + ]=]) + string(REPLACE "std::atomic" "std::atomic" ATOMICS64_TEST_SOURCE "${ATOMICS_TEST_SOURCE}") +- ++ if(APPLE) ++ set(CMAKE_REQUIRED_FLAGS "-std=c++11") ++ endif() + check_cxx_source_compiles("${ATOMICS_TEST_SOURCE}" HAVE_CXX_ATOMICS_WITHOUT_LIB) + check_cxx_source_compiles("${ATOMICS64_TEST_SOURCE}" HAVE_CXX_ATOMICS64_WITHOUT_LIB) + if((NOT HAVE_CXX_ATOMICS_WITHOUT_LIB) OR (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)) +@@ -659,6 +661,9 @@ if (NOT Windows) + target_link_libraries(torrent-rasterbar PUBLIC atomic) + endif() + endif() ++ if(APPLE) ++ unset(CMAKE_REQUIRED_FLAGS) ++ endif() + endif() + + feature_option(build_tests "build tests" OFF) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index ec1d7d07561333..346a426cf337cb 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -37,11 +37,12 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arvidn/libtorrent - REF v1.2.11 - SHA512 d502286f67bf462f14169daafe12b94ca723598530c85360c3a4b3c73535202b63632036248fdecc942cb559e66e6a5cb5afa830dc78bbff72a6c9a330710b62 + REF e3f2b016dcd37a9a6e8a94006c7befcf2cb7bfac #v1.2.12 + SHA512 5d58ce1d942d2bbcc423a307e70cfb714b102e029c50c7e214e6b46b7a1311564c7b094d895d99f400ecdb0272b66c94c2f21fa414d4565582784f1dc5c7ec97 HEAD_REF RC_1_2 PATCHES ${ICONV_PATCH} + fix-AppleClang-test.patch ) vcpkg_configure_cmake( diff --git a/ports/libwebm/0003-fix-android-ndk-r22.patch b/ports/libwebm/0003-fix-android-ndk-r22.patch new file mode 100644 index 00000000000000..b08168ade00bc8 --- /dev/null +++ b/ports/libwebm/0003-fix-android-ndk-r22.patch @@ -0,0 +1,25 @@ +diff --git a/mkvmuxerutil.cpp b/mkvmuxerutil.cpp +index 27ab15d..8949c85 100644 +--- a/mkvmuxerutil.cpp ++++ b/mkvmuxerutil.cpp +@@ -10,6 +10,7 @@ + + #ifdef __ANDROID__ + #include ++#include + #endif + + #include +diff --git a/mkvparser.cpp b/mkvparser.cpp +index 4f20148..9cc6971 100644 +--- a/mkvparser.cpp ++++ b/mkvparser.cpp +@@ -4034,7 +4034,7 @@ long SegmentInfo::Parse() { + } + + const double rollover_check = m_duration * m_timecodeScale; +- if (rollover_check > LLONG_MAX) ++ if (rollover_check > static_cast(LLONG_MAX)) + return E_FILE_FORMAT_INVALID; + + if (pos != stop) diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL index c2d9d878f75b34..243a220c5eb9c1 100644 --- a/ports/libwebm/CONTROL +++ b/ports/libwebm/CONTROL @@ -1,4 +1,5 @@ Source: libwebm -Version: 1.0.0.27-5 +Version: 1.0.0.27 +Port-Version: 6 Homepage: https://github.com/webmproject/libwebm Description: WebM File Parser diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake index 9e8d4c9073b9ee..a461ae0cbea4c9 100644 --- a/ports/libwebm/portfile.cmake +++ b/ports/libwebm/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES 0001-fix-cmake.patch no-samples.patch + 0003-fix-android-ndk-r22.patch ) if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -28,5 +29,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/libwebm/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 933f234d60bf10..5782832bc84b8e 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,5 +1,6 @@ Source: llvm Version: 11.0.0 +Port-Version: 1 Homepage: https://llvm.org/ Description: The LLVM Compiler Infrastructure Supports: !uwp diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index ddb7db92c80f50..8d7d7b9feaa631 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -119,6 +119,10 @@ if("polly" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "polly") endif() +if("tools" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=../../lib/clang/11.0.0) +endif() + set(known_llvm_targets AArch64 AMDGPU diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index ba00f30be20b3e..29350d265895a3 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,5 +1,5 @@ Source: lua -Version: 5.4.1 +Version: 5.4.2 Homepage: https://www.lua.org Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index 0d343cc6f38e6d..3130bebe115bce 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_download_distfile(ARCHIVE - URLS "https://www.lua.org/ftp/lua-5.4.1.tar.gz" - FILENAME "lua-5.4.1.tar.gz" - SHA512 49ffbe814ec41e515fc8502b6958151c6c56aa171412f0b211ad9de934be2c958c3709d49435885ddea0fa6765ed511dafb3537558950ff3b4261338214f1571 + URLS "https://www.lua.org/ftp/lua-5.4.2.tar.gz" + FILENAME "lua-5.4.2.tar.gz" + SHA512 9454a6ffd973598f2f4a2399834c31c4d5090bd12e716776e3189aa57760319d114ee64a8338bbc2ef5e08150bf0adc2ad94a1b2677f38538a43359969d4d920 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/mongoose/CONTROL b/ports/mongoose/CONTROL deleted file mode 100644 index a6c7f8663ae925..00000000000000 --- a/ports/mongoose/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: mongoose -Version: 6.15-2 -Description: Embedded web server / embedded networking library -Homepage: https://cesanta.com/ -Supports: !uwp - -Feature: ssl -Build-Depends: openssl -Description: Build with openssl diff --git a/ports/mongoose/portfile.cmake b/ports/mongoose/portfile.cmake index d8dbbaddcd3453..972a36a0fecdba 100644 --- a/ports/mongoose/portfile.cmake +++ b/ports/mongoose/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cesanta/mongoose - REF 6.15 - SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde + REF 8e520756366ca5739f13dc6ad65fcf269dbbc994 #v7.1 + SHA512 a966a8b4e47e36da0f630c3cf343c85a1c1138508a82e506b21e4b8bd72573d0e0145318f97b32a67f423e033b348de76a00b780430e4e69d1a98bd7494a3e0a HEAD_REF master ) diff --git a/ports/mongoose/vcpkg.json b/ports/mongoose/vcpkg.json new file mode 100644 index 00000000000000..9313383b64ab11 --- /dev/null +++ b/ports/mongoose/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "mongoose", + "version": "7.1", + "description": "Embedded web server / embedded networking library", + "homepage": "https://cesanta.com/", + "supports": "!uwp", + "features": { + "ssl": { + "description": "Build with openssl", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/msix/CONTROL b/ports/msix/CONTROL deleted file mode 100644 index ec246a87784bda..00000000000000 --- a/ports/msix/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: msix -Version: 1.7-2 -Build-Depends: xerces-c, zlib, openssl (!uwp&!windows), catch2 -Homepage: https://github.com/microsoft/msix-packaging -Description: The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks. - The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details. diff --git a/ports/msix/portfile.cmake b/ports/msix/portfile.cmake index 249d6fd8fb82ed..2dbd06fe82f5eb 100644 --- a/ports/msix/portfile.cmake +++ b/ports/msix/portfile.cmake @@ -32,6 +32,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA NO_CHARSET_FLAG + DISABLE_PARALLEL_CONFIGURE OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DINSTALL_LIBMSIX=ON diff --git a/ports/msix/vcpkg.json b/ports/msix/vcpkg.json new file mode 100644 index 00000000000000..b3e01e092b865d --- /dev/null +++ b/ports/msix/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "msix", + "version": "1.7", + "port-version": 3, + "description": "The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks.The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details.", + "homepage": "https://github.com/microsoft/msix-packaging", + "dependencies": [ + "catch2", + { + "name": "openssl", + "platform": "!uwp & !windows" + }, + "xerces-c", + "zlib" + ] +} diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 2538dd836e0f0c..df1c9ced410529 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,4 +1,4 @@ Source: openssl -Version: 1.1.1i +Version: 1.1.1j Homepage: https://www.openssl.org Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index d5b888ab03fd3c..cd7884f17092a5 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -2,11 +2,11 @@ if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") endif() -set(OPENSSL_VERSION 1.1.1i) +set(OPENSSL_VERSION 1.1.1j) vcpkg_download_distfile(ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 fe12e0ab9e1688f24dd862ac633d0ab703b499c0f34b53c3560aa0d3879d81d647aa0678ed517dda5efb2711f669fcb1a1e0e24f6eac2efc2cf4eae6b62014d8 + SHA512 51e44995663b5258b0018bdc1e2b0e7e8e0cce111138ca1f80514456af920fce4e409a411ce117c0f3eb9190ac3e47c53a43f39b06acd35b7494e2bec4a607d5 ) vcpkg_find_acquire_program(PERL) diff --git a/ports/openssl/uwp/EnableUWPSupport.patch b/ports/openssl/uwp/EnableUWPSupport.patch index 4313220f118b26..fe7837445985cf 100644 --- a/ports/openssl/uwp/EnableUWPSupport.patch +++ b/ports/openssl/uwp/EnableUWPSupport.patch @@ -135,12 +135,6 @@ diff --git a/Configure b/Configure index 5a699836f3..de45f1e299 100755 --- a/Configure +++ b/Configure -@@ -1,4 +1,5 @@ - #! /usr/bin/env perl -+#! /usr/bin/env perl - # -*- mode: perl; -*- - # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. - # @@ -407,6 +408,7 @@ my @disablables = ( "ubsan", "ui-console", diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index b27c40d4d9998f..7d29b2e2dcee3d 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,7 +1,7 @@ Source: pangolin Version: 0.5 -Port-Version: 11 -Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg +Port-Version: 12 +Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg[avformat] Homepage: https://github.com/stevenlovegrove/Pangolin Description: Lightweight GUI Library Supports: !uwp & !osx diff --git a/ports/pangolin/add-definition.patch b/ports/pangolin/add-definition.patch new file mode 100644 index 00000000000000..02790216ebd1bd --- /dev/null +++ b/ports/pangolin/add-definition.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9e0baac..bb3ef76 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -287,6 +287,8 @@ if(BUILD_PANGOLIN_VIDEO AND _LINUX_) + message(STATUS "V4L Found and Enabled") + endif() + ++add_definitions(-DHAVE_FFMPEG_AVPIXELFORMAT) ++ + find_package(FFMPEG QUIET) + if(BUILD_PANGOLIN_VIDEO AND FFMPEG_FOUND) + set(HAVE_FFMPEG 1) diff --git a/ports/pangolin/fix-dependeny-ffmpeg.patch b/ports/pangolin/fix-dependeny-ffmpeg.patch deleted file mode 100644 index bb1581e4fd9c48..00000000000000 --- a/ports/pangolin/fix-dependeny-ffmpeg.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/CMakeModules/FindFFMPEG.cmake b/CMakeModules/FindFFMPEG.cmake -index 4f77e5a..151762f 100644 ---- a/CMakeModules/FindFFMPEG.cmake -+++ b/CMakeModules/FindFFMPEG.cmake -@@ -21,6 +21,14 @@ FIND_PATH( - SWSCALE_INCLUDE_DIR libswscale/swscale.h - /usr/include /usr/local/include /opt/local/include - ) -+FIND_PATH( -+ AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h -+ /usr/include /usr/local/include /opt/local/include -+) -+FIND_PATH( -+ SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h -+ /usr/include /usr/local/include /opt/local/include -+) - - # Find Library files - FIND_LIBRARY( -@@ -43,15 +51,28 @@ FIND_LIBRARY( - NAMES swscale - PATH /usr/lib /usr/local/lib /opt/local/lib - ) -+FIND_LIBRARY( -+ AVDEVICE_LIBRARY -+ NAMES avdevice -+ PATH /usr/lib /usr/local/lib /opt/local/lib -+) -+FIND_LIBRARY( -+ SWRESAMPLE_LIBRARY -+ NAMES swresample -+ PATH /usr/lib /usr/local/lib /opt/local/lib -+) - - IF( EXISTS "${AVUTIL_INCLUDE_DIR}/libavutil/pixdesc.h" ) - SET( AVUTIL_HAVE_PIXDESC TRUE) - endif() - - IF(AVCODEC_INCLUDE_DIR AND AVFORMAT_INCLUDE_DIR AND AVUTIL_INCLUDE_DIR AND SWSCALE_INCLUDE_DIR AND AVCODEC_LIBRARY AND AVFORMAT_LIBRARY AND AVUTIL_LIBRARY AND SWSCALE_LIBRARY AND AVUTIL_HAVE_PIXDESC) -+ IF (WIN32) -+ SET(AVFORMAT_LIBRARY ${AVFORMAT_LIBRARY} Ws2_32 Secur32 Bcrypt strmiids mfplat mfuuid) -+ ENDIF() - SET(FFMPEG_FOUND TRUE) -- SET(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVFORMAT_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY}) -- SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR}) -+ SET(FFMPEG_LIBRARIES ${AVFORMAT_LIBRARY} ${AVDEVICE_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY} ${SWRESAMPLE_LIBRARY}) -+ SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWRESAMPLE_INCLUDE_DIR}) - - include(CheckCXXSourceCompiles) - diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index 79080b126980a5..303e697b482b63 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -11,11 +11,12 @@ vcpkg_from_github( PATCHES deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library fix-includepath-error.patch # include path has one more ../ - fix-dependeny-ffmpeg.patch fix-dependency-python.patch + add-definition.patch ) file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index 77ebf431ca12da..566a309592c4da 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_add_to_path(${GPERF_PATH}) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS curl ENABLE_CURL zlib ENABLE_ZLIB + splash ENABLE_SPLASH ) vcpkg_configure_cmake( diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index b9af520839f992..a000e3dcc753e1 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -1,7 +1,7 @@ { "name": "poppler", "version-string": "20.12.1", - "port-version": 3, + "port-version": 4, "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ @@ -19,6 +19,7 @@ "openjpeg" ], "default-features": [ + "splash", "zlib" ], "features": { @@ -28,6 +29,13 @@ "curl" ] }, + "splash": { + "description": "Build the Splash graphics backend", + "dependencies": [ + "boost-container", + "boost-move" + ] + }, "zlib": { "description": "zlib for poppler", "dependencies": [ diff --git a/ports/popsift/CONTROL b/ports/popsift/CONTROL new file mode 100644 index 00000000000000..038e8fb7edf0d3 --- /dev/null +++ b/ports/popsift/CONTROL @@ -0,0 +1,11 @@ +Source: popsift +Version: 0.9 +Port-Version: 0 +Description: PopSift is an implementation of the SIFT algorithm in CUDA. +Build-Depends: cuda +Homepage: https://github.com/alicevision/popsift +Supports: !(uwp|arm|arm64|android|x86) + +Feature: apps +Description: Application programs for popsift (detection and matching) +Build-Depends: boost-algorithm, boost-program-options, boost-filesystem, boost-system \ No newline at end of file diff --git a/ports/popsift/portfile.cmake b/ports/popsift/portfile.cmake new file mode 100644 index 00000000000000..f611efa0f1780c --- /dev/null +++ b/ports/popsift/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alicevision/popsift + REF v0.9 + SHA512 56789520872203eea86e07e8210e00c0b67d85486af16df9d620b1aff10f8d9ef5d910cf1dda6c68af7ca2ed11658ab5414ac79117b543f91a7d8d6a96a17ce0 + HEAD_REF develop +) + +include(${CURRENT_INSTALLED_DIR}/share/vcpkg_find_cuda/vcpkg_find_cuda.cmake) +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) + +message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + apps PopSift_BUILD_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} -DCUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/PopSift) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + + # move the bin direcory to tools + if ("apps" IN_LIST FEATURES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin" ${CURRENT_PACKAGES_DIR}/tools/popsift) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") +# file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin" ${CURRENT_PACKAGES_DIR}/tools/popsift/debug) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/popsift) + endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/popsift RENAME copyright) \ No newline at end of file diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 89bcc3b4ab50aa..e603d4af53acaf 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -80,3 +80,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/proj4/vcpkg.json b/ports/proj4/vcpkg.json index d36b0ad22773ff..629feec029495d 100644 --- a/ports/proj4/vcpkg.json +++ b/ports/proj4/vcpkg.json @@ -1,6 +1,7 @@ { "name": "proj4", "version-string": "7.2.1", + "port-version": 1, "description": "PROJ.4 library for cartographic projections", "homepage": "https://github.com/OSGeo/PROJ", "dependencies": [ diff --git a/ports/protopuf/portfile.cmake b/ports/protopuf/portfile.cmake index 45e9c17635a8a8..0d72bd302afbcd 100644 --- a/ports/protopuf/portfile.cmake +++ b/ports/protopuf/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PragmaTwice/protopuf - REF v1.0.0 - SHA512 45644fd586da80a7bb9e434152f2b28b99d45f5679b9fcc173ff3f1abf42d8deb971641351cf67dc3408a86da25ed03154fe612f56983282da32dc3e29333f6c + REF v1.0.1 + SHA512 d58bff752fde243ea20c4bcb34c197d6495004b6a77a95332aff3d4a647adf5e1a6fb3cde862aa7e876b02ad0caa4893f2337323dca510686c7a95c1598d2249 HEAD_REF master ) diff --git a/ports/protopuf/vcpkg.json b/ports/protopuf/vcpkg.json index ab15ca9497279a..2107fb9e41d117 100644 --- a/ports/protopuf/vcpkg.json +++ b/ports/protopuf/vcpkg.json @@ -1,6 +1,6 @@ { "name": "protopuf", - "version-string": "1.0.0", + "version-string": "1.0.1", "description": "A little, highly templated, and protobuf-compatible serialization/deserialization library written in C++20", "homepage": "https://github.com/PragmaTwice/protopuf" } diff --git a/ports/psimd/portfile.cmake b/ports/psimd/portfile.cmake new file mode 100644 index 00000000000000..f68dacb838f692 --- /dev/null +++ b/ports/psimd/portfile.cmake @@ -0,0 +1,15 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/psimd + REF 072586a71b55b7f8c584153d223e95687148a900 + SHA512 a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/psimd/vcpkg.json b/ports/psimd/vcpkg.json new file mode 100644 index 00000000000000..49fc6e93d97a65 --- /dev/null +++ b/ports/psimd/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "psimd", + "version-string": "2021-02-21", + "description": "Portable 128-bit SIMD intrinsics", + "homepage": "https://github.com/Maratyszcza/psimd" +} diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 72b4ee3bd8e6c1..ee19476cf24522 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -5,7 +5,7 @@ endif() set(PYTHON_VERSION_MAJOR 3) set(PYTHON_VERSION_MINOR 9) -set(PYTHON_VERSION_PATCH 0) +set(PYTHON_VERSION_PATCH 2) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) set(PATCHES @@ -23,7 +23,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 39d304cae181674c4872c63768c0e5aeace2c92eb6d5ea550428d65c8571bc60922b3a3d484b51c46b466aadb7e27500559cafec13a489b48613bbb3fe6a5a5d + SHA512 f13c7e50d2c7c00e67b801b0bbb6ab6a8b6bd16c706b3bdd9d2186de3830f0043d0b95d7993d65a169adc9097738906c07727f0df49cd2fb2916bdf0456896b6 HEAD_REF master PATCHES ${PATCHES} ) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index d89136da3bdb68..0a0b7778f16b39 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,6 @@ { "name": "python3", - "version-string": "3.9.0", - "port-version": 3, + "version-string": "3.9.2", "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "supports": "!(arm | uwp)", diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 6f730f9931c6bc..2a4990eb069a2d 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,5 +1,5 @@ Source: qscintilla -Version: 2.11.4-2 +Version: 2.12.0 Homepage: https://www.riverbankcomputing.com/software/qscintilla Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5-base[core], qt5-macextras (osx), qt5-winextras (windows) \ No newline at end of file diff --git a/ports/qscintilla/fix-static.patch b/ports/qscintilla/fix-static.patch index f3a4a616d7899e..1c0569d47d4309 100644 --- a/ports/qscintilla/fix-static.patch +++ b/ports/qscintilla/fix-static.patch @@ -1,29 +1,29 @@ -diff --git a/Qt4Qt5/qscintilla.pro b/Qt4Qt5/qscintilla.pro -index 075079c32..8ff8678b6 100644 ---- a/Qt4Qt5/qscintilla.pro -+++ b/Qt4Qt5/qscintilla.pro -@@ -37,13 +37,13 @@ CONFIG(debug, debug|release) { - TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} - } - --macx:!CONFIG(staticlib) { -+macx:!CONFIG(static) { - QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) - } - - INCLUDEPATH += . ../include ../lexlib ../src - --!CONFIG(staticlib) { -+!CONFIG(static) { - DEFINES += QSCINTILLA_MAKE_DLL - } - DEFINES += SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES -@@ -90,7 +90,7 @@ greaterThan(QT_MAJOR_VERSION, 4) { - } else { - features.path = $$[QT_INSTALL_DATA]/mkspecs/features - } --CONFIG(staticlib) { -+CONFIG(static) { - features.files = $$PWD/features_staticlib/qscintilla2.prf - } else { - features.files = $$PWD/features/qscintilla2.prf +diff --git a/src/qscintilla.pro b/src/qscintilla.pro +index 8d0acd2..2246442 100644 +--- a/src/qscintilla.pro ++++ b/src/qscintilla.pro +@@ -37,13 +37,13 @@ CONFIG(debug, debug|release) { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} + } + +-macx:!CONFIG(staticlib) { ++macx:!CONFIG(static) { + QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) + } + + INCLUDEPATH += . ../scintilla/include ../scintilla/lexlib ../scintilla/src + +-!CONFIG(staticlib) { ++!CONFIG(static) { + DEFINES += QSCINTILLA_MAKE_DLL + } + DEFINES += SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES +@@ -82,7 +82,7 @@ qsci.files = ../qsci + INSTALLS += qsci + + features.path = $$[QT_HOST_DATA]/mkspecs/features +-CONFIG(staticlib) { ++CONFIG(static) { + features.files = $$PWD/features_staticlib/qscintilla2.prf + } else { + features.files = $$PWD/features/qscintilla2.prf diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index 8ef89729015b30..11fd204de8e43f 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_download_distfile(ARCHIVE - URLS "https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.11.4/QScintilla-2.11.4.tar.gz" - FILENAME "QScintilla-2.11.4.tar.gz" - SHA512 90fc2427121ca9ae55e34cf636460099bbdadd844318d9ef05f86790a36e25fb64528264bb7bb99e46b7add96378eff0cc69bb692940c6a1bddfadf86a9abdbd + URLS "https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.12.0/QScintilla_src-2.12.0.tar.gz" + FILENAME "QScintilla-2.12.0.tar.gz" + SHA512 9bdaba5c33c1b11ccad83eb1fda72142758afc50c955a62d5a8ff102b41d4b67d897bf96ce0540e16bc5a7fae2ce1acbf06931d5f0ae6768759c9ff072c03daa ) vcpkg_extract_source_archive_ex( @@ -18,7 +18,7 @@ get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) vcpkg_add_to_path(${PYTHON3_PATH}) vcpkg_configure_qmake( - SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 + SOURCE_PATH ${SOURCE_PATH}/src OPTIONS CONFIG+=build_all CONFIG-=hide_symbols @@ -34,7 +34,7 @@ else() vcpkg_install_qmake() endif() -file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/Qsci/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) vcpkg_copy_pdbs() diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 84af14d20d79e8..07aae35d7998d0 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,6 +1,5 @@ Source: realsense2 -Version: 2.40.0 -Port-Version: 1 +Version: 2.42.0 Homepage: https://github.com/IntelRealSense/librealsense Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). Build-Depends: libusb(linux) diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index d7208ec1bb514f..73aea5bf09d19d 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF aae6f315ce80ff80df5bc9439b4ee852187533c1 #v2.40.0 - SHA512 6d8d0837bd2d502a84e4a8193a9bf5f2cb27c1ca97fceffc9d5bc81c6ed5a2d2b5c79e2fc3446f34425d3db0693de02c561b9ba276e59598b33d928f0799fba4 + REF bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d #v2.42.0 + SHA512 b2a2d24df4bdf4853df626942b1931bbe011a4e3faaa4e3c4bcb3f76506ae8edb955a458219fdc300018e640e2ffe4cd34f459786b909cf9aab71a767d691178 HEAD_REF master PATCHES fix_openni2.patch diff --git a/ports/rsasynccpp/portfile.cmake b/ports/rsasynccpp/portfile.cmake new file mode 100644 index 00000000000000..438f2cd8c49406 --- /dev/null +++ b/ports/rsasynccpp/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "ANDROID" "FREEBSD" "OPENBSD") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO renestein/Rstein.AsyncCpp + REF 0.0.7 + SHA512 b4cc1c68b6fc7bb8b418457ba18b834769abec07e44305955214f8918cc57f85c4258a0521ea55388fab3ec9724488e506d2b114c765b804991c38bf33133c55 + HEAD_REF master +) + +if("lib-cl-win-legacy-await" IN_LIST FEATURES) + if (VCPKG_CRT_LINKAGE MATCHES "static") + set(RELEASE_CONFIGURATION "ReleaseMT_VSAWAIT") + set(DEBUG_CONFIGURATION "DebugMT_VSAWAIT") + else() + set(RELEASE_CONFIGURATION "Release_VSAWAIT") + set(DEBUG_CONFIGURATION "Debug_VSAWAIT") + endif() +else() + if (VCPKG_CRT_LINKAGE MATCHES "static") + set(RELEASE_CONFIGURATION "ReleaseMT") + set(DEBUG_CONFIGURATION "DebugMT") + else() + set(RELEASE_CONFIGURATION "Release") + set(DEBUG_CONFIGURATION "Debug") + endif() +endif() + +if (TRIPLET_SYSTEM_ARCH MATCHES "x86") + set(MSBUILD_PLATFORM "x86") +else () + set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH RStein.AsyncCppLib.sln + LICENSE_SUBPATH LICENSE + PLATFORM ${MSBUILD_PLATFORM} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} +) + +file(COPY "${SOURCE_PATH}/RStein.AsyncCpp/" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/asynccpp" + FILES_MATCHING PATTERN "*.h") \ No newline at end of file diff --git a/ports/rsasynccpp/vcpkg.json b/ports/rsasynccpp/vcpkg.json new file mode 100644 index 00000000000000..f29d9388b49782 --- /dev/null +++ b/ports/rsasynccpp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "rsasynccpp", + "version": "0.0.7", + "maintainers": "Rene Stein ", + "description": "Task Parallel Library (TPL)/dataflow/actors/async primitives for C++ based on C++ 20 coroutines.", + "homepage": "https://github.com/renestein/Rstein.AsyncCpp", + "supports": "windows & !arm", + "features": { + "lib-cl-win-legacy-await": { + "description": "Legacy coroutines (/await switch, std::experimental namespace)." + } + } +} diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL deleted file mode 100644 index 290fb456a1cf1f..00000000000000 --- a/ports/scintilla/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: scintilla -Version: 4.4.5 -Homepage: https://www.scintilla.org/ -Description: A free source code editing component for Win32, GTK+, and OS X -Supports: !(uwp|linux|osx) diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index 8823621accfa61..d1e1f1b77631c3 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,9 +1,9 @@ vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") vcpkg_download_distfile(ARCHIVE - URLS "https://www.scintilla.org/scintilla445.zip" - FILENAME "scintilla445.zip" - SHA512 bac25ee6e9b1ab3602a6fbf2f28f046f6da5c45dfd6e882df250760a254517ee9b05d95b816234b5145553f0a8da92016d7839a50624543c52fde7539ea08259 + URLS "https://www.scintilla.org/scintilla446.zip" + FILENAME "scintilla446.zip" + SHA512 db6fa38283401497d8331f97dc5b57ea11d998988001f06b95892de769de5829b9f567635f3c1f2d9cfbc4384024d11666d28224ce90c5813ceef865b0dec255 ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -17,14 +17,14 @@ endif() vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - REF 4.4.5 + REF 4.4.6 PATCHES ${PATCHES} ) vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH Win32/SciLexer.vcxproj - INCLUDES_SUBPATH include LICENSE_SUBPATH License.txt - ALLOW_ROOT_INCLUDES ) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT} FILES_MATCHING PATTERN "*.*") diff --git a/ports/scintilla/vcpkg.json b/ports/scintilla/vcpkg.json new file mode 100644 index 00000000000000..c223db6a0bc996 --- /dev/null +++ b/ports/scintilla/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "scintilla", + "version": "4.4.6", + "description": "A free source code editing component for Win32, GTK+, and OS X", + "homepage": "https://www.scintilla.org/", + "supports": "!(uwp | linux | osx)" +} diff --git a/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch b/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch index 5dd4ad83cb4353..bef8315562150d 100644 --- a/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch +++ b/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch @@ -1,6 +1,8 @@ ---- CMakeLists.orig.txt 2020-10-28 09:08:51.925900284 +0100 -+++ CMakeLists.txt 2020-10-28 09:09:10.034165780 +0100 -@@ -1240,12 +1240,6 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06aa026..81d7645 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1240,12 +1240,6 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS) set(HAVE_FCITX TRUE) endif() diff --git a/ports/sdl2/vcpkg.json b/ports/sdl2/vcpkg.json index 0babf17fb5ad7d..6918756702e230 100644 --- a/ports/sdl2/vcpkg.json +++ b/ports/sdl2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sdl2", "version-string": "2.0.14", - "port-version": 2, + "port-version": 3, "description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.", "homepage": "https://www.libsdl.org/download-2.0.php", "features": { diff --git a/ports/seal/CONTROL b/ports/seal/CONTROL index 060d457b6e9791..3bfe24c1008c8f 100644 --- a/ports/seal/CONTROL +++ b/ports/seal/CONTROL @@ -1,5 +1,5 @@ Source: seal -Version: 3.6.1 +Version: 3.6.2 Homepage: https://github.com/microsoft/SEAL Description: Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library. Supports: !windows | (windows & static) diff --git a/ports/seal/portfile.cmake b/ports/seal/portfile.cmake index d3bae38565e96a..f477b0bc713beb 100644 --- a/ports/seal/portfile.cmake +++ b/ports/seal/portfile.cmake @@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/SEAL - REF d6040632780981f3ab61969025d333d394eb2aeb - SHA512 f93c636eb9f3dd4c3b626b126aeed669da506e1e17eba172f6d3193ff2561b4cb4fc19a30b46792afa04848f1f4d73e276cdc915b41ec64bc9ea6d02550af110 + REF 5c586e2480dc0a43fb76a23a3dcc3daecb3764e8 + SHA512 2a0720d654946bcdb2313353c41ecd420a812dd678b04538e999881790c1c3636605204f0271a2faa1965a1445bd2d8973ffe8fdabf128afb51adb6523e90358 HEAD_REF master ) diff --git a/ports/sentry-native/CONTROL b/ports/sentry-native/CONTROL deleted file mode 100644 index 6c7c246821bb1e..00000000000000 --- a/ports/sentry-native/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: sentry-native -Version: 0.4.7 -Homepage: https://sentry.io/ -Description: Sentry SDK for C, C++ and native applications. -Build-Depends: curl (!windows) -Supports: !(arm|arm64|uwp) diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake index 42f297743e5f67..d587985417f40f 100644 --- a/ports/sentry-native/portfile.cmake +++ b/ports/sentry-native/portfile.cmake @@ -1,9 +1,9 @@ vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.7/sentry-native.zip" - FILENAME "sentry-native-0.4.7.zip" - SHA512 ad007bdee5fd6ff5afa1a2ee6a44de0cd1f7c05ab51a037b0a974ba99770d7a5eac6bd62da39ad11645dbc64a016925bb96be7a1ac4c1fcb473046a10393a508 + URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.8/sentry-native.zip" + FILENAME "sentry-native-0.4.8.zip" + SHA512 87956967ad53d0714934f53ed8c547ec60abeeeffbf337523f461c2e2888b8d00a16683f6e375a87096fea74e096df6afb149ef9ad7228f857ef1c4b30b5fc05 ) vcpkg_extract_source_archive_ex( diff --git a/ports/sentry-native/vcpkg.json b/ports/sentry-native/vcpkg.json new file mode 100644 index 00000000000000..b1344980c702d7 --- /dev/null +++ b/ports/sentry-native/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sentry-native", + "version-semver": "0.4.8", + "description": "Sentry SDK for C, C++ and native applications.", + "homepage": "https://sentry.io/", + "supports": "!(arm | arm64 | uwp)", + "dependencies": [ + { + "name": "curl", + "platform": "!windows" + } + ] +} diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index 3bfe1b9637f4db..d9298f5737b32d 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO stiffstream/sobjectizer - REF 73b0d1bf5b4bdf543c24bc4969d2c408e0cea812 # v.5.7.2.2 - SHA512 f911900f67832be877ac1d906deb4fb03925601d91c7d9bb0dd1c789d71a5bddb8ec5e0fe361ad7cfa8787a70d09aee26b17e8dba55c0b5dc4fba2b31651442b + REF 20379c163b7e361dd72e2dfa5356ff59fe886cb1 # v.5.7.2.3 + SHA512 74f5fc91a8e64b7ce3c5ba5c97ce1f495624799bb63a01453262f17d9128ad00e8d93cdf537a67dbab6d08525796263c83c187506bed1c3eabcfa2baf49f43a9 ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOBJECTIZER_BUILD_STATIC ) diff --git a/ports/sobjectizer/vcpkg.json b/ports/sobjectizer/vcpkg.json index fb728af777c0ec..4bd98f5451377b 100644 --- a/ports/sobjectizer/vcpkg.json +++ b/ports/sobjectizer/vcpkg.json @@ -1,6 +1,6 @@ { "name": "sobjectizer", - "version-string": "5.7.2.2", + "version": "5.7.2.3", "description": "SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels.", "homepage": "https://github.com/Stiffstream/sobjectizer", "license": "BSD-3-Clause" diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL deleted file mode 100644 index e90a64f1d17f80..00000000000000 --- a/ports/sqlite3/CONTROL +++ /dev/null @@ -1,13 +0,0 @@ -Source: sqlite3 -Version: 3.33.0 -Homepage: https://sqlite.org/ -Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. - -Feature: tool -Description: sqlite3 executable - -Feature: geopoly -Description: enable geopoly functionality for sqlite3 - -Feature: json1 -Description: enable JSON functionality for sqlite3 diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index ac61e2290e39c9..0ab830dc783c27 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,8 +1,8 @@ -set(SQLITE_VERSION 3330000) -set(SQLITE_HASH a9cb038c82dcafe1b5aa410f60bff21066b3e3456161bc91829a1a3b3b6591e0595209f45d4a6b10b0ad08e88df3f1b2062d4b075205e32d34780da7dea3e07b) +set(SQLITE_VERSION 3340100) +set(SQLITE_HASH 8a936f1c34fc9036cadf5bd53f9ee594135c2efdef1d2c82bd4fdf3e0218afde710fc4c436cfc992687d008e6086a697da0487352ed88809d677e05d824940dd) vcpkg_download_distfile(ARCHIVE - URLS "https://sqlite.org/2020/sqlite-amalgamation-${SQLITE_VERSION}.zip" + URLS "https://sqlite.org/2021/sqlite-amalgamation-${SQLITE_VERSION}.zip" FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip" SHA512 ${SQLITE_HASH} ) diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json new file mode 100644 index 00000000000000..eafa71352b2c7b --- /dev/null +++ b/ports/sqlite3/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "sqlite3", + "version": "3.34.1", + "description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.", + "homepage": "https://sqlite.org/", + "features": { + "geopoly": { + "description": "enable geopoly functionality for sqlite3" + }, + "json1": { + "description": "enable JSON functionality for sqlite3" + }, + "tool": { + "description": "sqlite3 executable" + } + } +} diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL deleted file mode 100644 index 9756e8e8c9dcf3..00000000000000 --- a/ports/taglib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: taglib -Version: 1.11.1-20190531 -Description: TagLib Audio Meta-Data Library -Homepage: https://github.com/taglib/taglib -Build-Depends: zlib diff --git a/ports/taglib/msvc-disable-deprecated-warnings.patch b/ports/taglib/msvc-disable-deprecated-warnings.patch new file mode 100644 index 00000000000000..4d99bb8bc730aa --- /dev/null +++ b/ports/taglib/msvc-disable-deprecated-warnings.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5fc91cc6..6f57e4ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,17 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif() + +-if(MSVC AND ENABLE_STATIC_RUNTIME) +- foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endforeach(flag_var) ++if(MSVC) ++ if(ENABLE_STATIC_RUNTIME) ++ foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) ++ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ++ endforeach(flag_var) ++ endif() ++ # Disable warnings for internal invocations of API functions ++ # that have been marked with TAGLIB_DEPRECATED ++ # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996 ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") + endif() + + # Read version information from file taglib/toolkit/taglib.h into variables diff --git a/ports/taglib/portfile.cmake b/ports/taglib/portfile.cmake index c6e57352646270..bce8b1f869eb57 100644 --- a/ports/taglib/portfile.cmake +++ b/ports/taglib/portfile.cmake @@ -1,13 +1,20 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taglib/taglib - REF ba7adc2bc261ed634c2a964185bcffb9365ad2f4 - SHA512 faf516f40f12031a37414ce9246ec409e64e570faebe2d604afdefbb7d665e0a0c9c68bec0e6dcb1c5ceb8fa8e1c3477f5ac75029f17beedd679fa3ea735ce6d + REF v1.12 + SHA512 63c96297d65486450908bda7cc1583ec338fa5a56a7c088fc37d6e125e1ee76e6d20343556a8f3d36f5b7e5187c58a5d15be964c996e3586ea1438910152b1a6 HEAD_REF master + PATCHES msvc-disable-deprecated-warnings.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_SHARED_LIBS OFF) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) + set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) endif() vcpkg_configure_cmake( @@ -18,6 +25,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + # remove the debug/include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -31,4 +40,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/taglib/vcpkg.json b/ports/taglib/vcpkg.json new file mode 100644 index 00000000000000..f3f7239ced4d9b --- /dev/null +++ b/ports/taglib/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "taglib", + "version-semver": "1.12.0", + "description": "TagLib Audio Meta-Data Library", + "homepage": "https://taglib.org/", + "license": "LGPL-2.1 OR MPL-1.1", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/trantor/CONTROL b/ports/trantor/CONTROL index 5349726cc36939..7b7921fc274b2a 100644 --- a/ports/trantor/CONTROL +++ b/ports/trantor/CONTROL @@ -1,5 +1,5 @@ Source: trantor -Version: 1.2.0 +Version: 1.3.0 Homepage: https://github.com/an-tao/trantor Description: A non-blocking I/O cross-platform TCP network library, using C++14. Build-Depends: openssl, c-ares diff --git a/ports/trantor/portfile.cmake b/ports/trantor/portfile.cmake index eb835a13eaa3fb..ba9485945b60cd 100644 --- a/ports/trantor/portfile.cmake +++ b/ports/trantor/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO an-tao/trantor - REF v1.2.0 - SHA512 2d94ef174642c81e1db62621ae8bc98a5b439f90437af4fa0ab67d09646bb04847b07a8be305331807dad4ef9244b06636ef471ce9da15ce23fc8bed4ff1d9e2 + REF v1.3.0 + SHA512 2fda0d5e157db5e384d60517969e3542de2002d779e5a31f44d2ed74cc5b09af26e230fbe73a67d45988615ca9b6ae2ed008a690dd20bc806436db53de8e7a55 HEAD_REF master PATCHES vcpkg.patch diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL deleted file mode 100644 index 26d3e5a664d5e8..00000000000000 --- a/ports/uwebsockets/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: uwebsockets -Version: 18.13.0 -Build-Depends: zlib, usockets -Homepage: https://github.com/uWebSockets/uWebSockets -Description: Simple, secure & standards compliant web I/O for the most demanding of applications diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 55ef05c89b37e7..a5238fb3760a21 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uNetworking/uWebSockets - REF 03fca626a95130ab80f86adada54b29d27242759 # v18.13.0 - SHA512 0005b55ed1a86b5c4473f22512f96425da714a8ef3985e02e2d2c26a812cd49bf70b28b0ca68f66103537fc25482e14875034ce73883b7c47ff8bb6c30ec7693 + REF 6f1c0d802221b5eaae49acef8c2cfa48433583fb # v19.0.0 + SHA512 ed648c7e1a422531a8e3fdcbc7c659fbe96e7c7e430b1924471ef13b49a12f7306fdf32df839f7572a2b8ca0e3a443fe1fa01bc368e2fc4d6f928b3803fe5d4c HEAD_REF master ) diff --git a/ports/uwebsockets/vcpkg.json b/ports/uwebsockets/vcpkg.json new file mode 100644 index 00000000000000..fb4c90951b3af7 --- /dev/null +++ b/ports/uwebsockets/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "uwebsockets", + "version": "19.0.0", + "description": "Simple, secure & standards compliant web I/O for the most demanding of applications", + "homepage": "https://github.com/uWebSockets/uWebSockets", + "dependencies": [ + "usockets", + "zlib" + ] +} diff --git a/ports/vcpkg-cmake-config/README.md b/ports/vcpkg-cmake-config/README.md new file mode 100644 index 00000000000000..18e7bb9ac87083 --- /dev/null +++ b/ports/vcpkg-cmake-config/README.md @@ -0,0 +1,10 @@ +# vcpkg-cmake-config + +`vcpkg-cmake-config` provides `vcpkg_cmake_config_fixup()`, +a function which both: + +- Fixes common mistakes in port build systems, like using absolute paths +- Merges the debug and release config files. + +This function should almost always be used when a port has `*config.cmake` files, +even when the buildsystem of the project is not CMake. diff --git a/ports/vcpkg-cmake-config/copyright b/ports/vcpkg-cmake-config/copyright new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/vcpkg-cmake-config/copyright @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/vcpkg-cmake-config/portfile.cmake b/ports/vcpkg-cmake-config/portfile.cmake new file mode 100644 index 00000000000000..45ecf62fd9b88b --- /dev/null +++ b/ports/vcpkg-cmake-config/portfile.cmake @@ -0,0 +1,11 @@ +if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET) + message(FATAL_ERROR "vcpkg-cmake-config is a host-only port; please mark it as a host port in your dependencies.") +endif() + +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" + "${CMAKE_CURRENT_LIST_DIR}/copyright" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-cmake-config/vcpkg-port-config.cmake b/ports/vcpkg-cmake-config/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..980d411315c717 --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg-port-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake") diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json new file mode 100644 index 00000000000000..26737e44fd4292 --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -0,0 +1,4 @@ +{ + "name": "vcpkg-cmake-config", + "version-date": "2021-02-26" +} diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake new file mode 100644 index 00000000000000..e858c70e6766bf --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake @@ -0,0 +1,237 @@ +#[===[.md: +# vcpkg_cmake_config_fixup + +Merge release and debug CMake targets and configs to support multiconfig generators. + +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +```cmake +vcpkg_cmake_config_fixup( + [PACKAGE_NAME ] + [CONFIG_PATH ] + [DO_NOT_DELETE_CONFIG_PATH_PARENT] + [NO_PREFIX_CORRECTION] +) +``` + +For many ports, `vcpkg_cmake_config_fixup()` on its own should work, +as `PACKAGE_NAME` defaults to `${PORT}` and `CONFIG_PATH` defaults to `share/${PACKAGE_NAME}`. +For ports where the package name passed to `find_package` is distinct from the port name, +`PACKAGE_NAME` should be changed to be that name instead. +For ports where the directory of the `*config.cmake` files cannot be set, +use the `CONFIG_PATH` to change the directory where the files come from. + +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing the `DO_NOT_DELETE_PARENT_CONFIG_PATH` option disable such behavior, +as it is convenient for ports that install +more than one CMake package configuration file. + +The `NO_PREFIX_CORRECTION` option disables the correction of `_IMPORT_PREFIX` +done by vcpkg due to moving the config files. +Currently the correction does not take into account how the files are moved, +and applies a rather simply correction which in some cases will yield the wrong results. + +## How it Works + +1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. +2. Removes `/debug//*config.cmake`. +3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. +6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. + +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_config_fixup) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DO_NOT_DELETE_PARENT_CONFIG_PATH" "PACKAGE_NAME;CONFIG_PATH;NO_PREFIX_CORRECTION" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_config_fixup was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT arg_PACKAGE_NAME) + set(arg_PACKAGE_NAME "${PORT}") + endif() + if(NOT arg_CONFIG_PATH) + set(arg_CONFIG_PATH "share/${arg_PACKAGE_NAME}") + endif() + set(target_path "share/${arg_PACKAGE_NAME}") + + string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + + set(debug_share "${CURRENT_PACKAGES_DIR}/debug/${target_path}") + set(release_share "${CURRENT_PACKAGES_DIR}/${target_path}") + + if(NOT arg_CONFIG_PATH STREQUAL "share/${arg_PACKAGE_NAME}") + if(arg_CONFIG_PATH STREQUAL "share") + set(arg_CONFIG_PATH z_vcpkg_share) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}") + file(RENAME "${CURRENT_PACKAGES_DIR}/share" "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + endif() + + set(debug_config "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}") + set(release_config "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS "${debug_config}") + message(FATAL_ERROR "'${debug_config}' does not exist.") + endif() + + # This roundabout handling enables CONFIG_PATH = share + file(MAKE_DIRECTORY "${debug_share}") + file(GLOB files "${debug_config}/*") + file(COPY ${files} DESTINATION "${debug_share}") + file(REMOVE_RECURSE "${debug_config}") + endif() + + file(GLOB files "${release_config}/*") + file(COPY ${files} DESTINATION "${release_share}") + file(REMOVE_RECURSE "${release_config}") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + get_filename_component(debug_config_dir_name "${debug_config}" NAME) + string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name) + if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${debug_config}") + else() + get_filename_component(debug_config_parent_dir "${debug_config}" DIRECTORY) + get_filename_component(debug_config_dir_name "${debug_config_parent_dir}" NAME) + string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name) + if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${debug_config_parent_dir}") + endif() + endif() + endif() + + get_filename_component(release_config_dir_name "${release_config}" NAME) + string(TOLOWER "${release_config_dir_name}" release_config_dir_name) + if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${release_config}") + else() + get_filename_component(release_config_parent_dir "${release_config}" DIRECTORY) + get_filename_component(release_config_dir_name "${release_config_parent_dir}" NAME) + string(TOLOWER "${release_config_dir_name}" release_config_dir_name) + if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${release_config_parent_dir}") + endif() + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS "${debug_share}") + message(FATAL_ERROR "'${debug_share}' does not exist.") + endif() + endif() + + file(GLOB_RECURSE unused_files + "${debug_share}/*[Tt]argets.cmake" + "${debug_share}/*[Cc]onfig.cmake" + "${debug_share}/*[Cc]onfigVersion.cmake" + "${debug_share}/*[Cc]onfig-version.cmake" + ) + if(NOT unused_files STREQUAL "") + file(REMOVE "${unused_files}") + endif() + + file(GLOB_RECURSE release_targets + "${release_share}/*-release.cmake" + ) + foreach(release_target IN LISTS release_targets) + file(READ "${release_target}" contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + file(WRITE "${release_target}" "${contents}") + endforeach() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB_RECURSE debug_targets + "${debug_share}/*-debug.cmake" + ) + foreach(debug_target IN LISTS debug_targets) + file(RELATIVE_PATH debug_target_rel "${debug_share}" "${debug_target}") + + file(READ "${debug_target}" contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" contents "${contents}") + string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" contents "${contents}") + file(WRITE "${release_share}/${debug_target_rel}" "${contents}") + + file(REMOVE "${debug_target}") + endforeach() + endif() + + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Since those can be renamed we have to check in every *.cmake + file(GLOB_RECURSE main_cmakes "${release_share}/*.cmake") + + foreach(main_cmake IN LISTS main_cmakes) + file(READ "${main_cmake}" contents) + # Note: I think the following comment is no longer true, since we now require the path to be `share/blah` + # however, I don't know it for sure. + # - nimazzuc + + #This correction is not correct for all cases. To make it correct for all cases it needs to consider + #original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which + #is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although + #this requirement is only true for the *Config.cmake. The targets are not required to be in the same + #folder as the *Config.cmake! + if(NOT arg_NO_PREFIX_CORRECTION) + string(REGEX REPLACE +[[get_filename_component\(_IMPORT_PREFIX "\${CMAKE_CURRENT_LIST_FILE}" PATH\)( +get_filename_component\(_IMPORT_PREFIX "\${_IMPORT_PREFIX}" PATH\))*]] +[[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] + contents "${contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. + string(REGEX REPLACE +[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\./(\.\./)*" ABSOLUTE\)]] +[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]] + contents "${contents}") + string(REGEX REPLACE +[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\.((\\|/)\.\.)*" ABSOLUTE\)]] +[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]] + contents "${contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955 + endif() + + #Fix wrongly absolute paths to install dir with the correct dir using ${_IMPORT_PREFIX} + #This happens if vcpkg built libraries are directly linked to a target instead of using + #an imported target for it. We could add more logic here to identify defect target files. + #Since the replacement here in a multi config build always requires a generator expression + #in front of the absoulte path to ${CURRENT_INSTALLED_DIR}. So the match should always be at + #least >:${CURRENT_INSTALLED_DIR}. + #In general the following generator expressions should be there: + #\$<\$:${CURRENT_INSTALLED_DIR}/debug/lib/somelib> + #and/or + #\$<\$>:${CURRENT_INSTALLED_DIR}/lib/somelib> + #with ${CURRENT_INSTALLED_DIR} being fully expanded + string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${_IMPORT_PREFIX}]] contents "${contents}") + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" [[${_IMPORT_PREFIX}]] contents "${contents}") + + file(WRITE "${main_cmake}" "${contents}") + endforeach() + + # Remove /debug// if it's empty. + file(GLOB_RECURSE remaining_files "${debug_share}/*") + if(NOT remaining_files STREQUAL "") + file(REMOVE_RECURSE "${debug_share}") + endif() + + # Remove /debug/share/ if it's empty. + file(GLOB_RECURSE remaining_files "${CURRENT_PACKAGES_DIR}/debug/share/*") + if(NOT remaining_files STREQUAL "") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + endif() +endfunction() + + diff --git a/ports/vcpkg-cmake/README.md b/ports/vcpkg-cmake/README.md new file mode 100644 index 00000000000000..b84c58869c8e27 --- /dev/null +++ b/ports/vcpkg-cmake/README.md @@ -0,0 +1,7 @@ +# vcpkg-cmake + +This port contains cmake functions for dealing with a CMake buildsystem. + +In the common case, `vcpkg_cmake_configure()` (with appropriate arguments) +followed by `vcpkg_cmake_install()` will be enough to build and install a port. +`vcpkg_cmake_build()` is provided for more complex cases. diff --git a/ports/vcpkg-cmake/copyright b/ports/vcpkg-cmake/copyright new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/vcpkg-cmake/copyright @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/vcpkg-cmake/portfile.cmake b/ports/vcpkg-cmake/portfile.cmake new file mode 100644 index 00000000000000..7f275926e15050 --- /dev/null +++ b/ports/vcpkg-cmake/portfile.cmake @@ -0,0 +1,13 @@ +if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET) + message(FATAL_ERROR "vcpkg-cmake is a host-only port; please mark it as a host port in your dependencies.") +endif() + +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" + "${CMAKE_CURRENT_LIST_DIR}/copyright" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-cmake/vcpkg-port-config.cmake b/ports/vcpkg-cmake/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..f2a973d4ebcba6 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg-port-config.cmake @@ -0,0 +1,3 @@ +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake") diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json new file mode 100644 index 00000000000000..029b7d6eb3f933 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg.json @@ -0,0 +1,4 @@ +{ + "name": "vcpkg-cmake", + "version-date": "2021-02-28" +} diff --git a/ports/vcpkg-cmake/vcpkg_cmake_build.cmake b/ports/vcpkg-cmake/vcpkg_cmake_build.cmake new file mode 100644 index 00000000000000..ef27a6c91bf3f3 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_build.cmake @@ -0,0 +1,115 @@ +#[===[.md: +# vcpkg_cmake_build + +Build a cmake project. + +```cmake +vcpkg_cmake_build( + [TARGET ] + [LOGFILE_BASE ] + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_build` builds an already-configured cmake project. +You can use the alias [`vcpkg_cmake_install()`] function +if your CMake build system supports the `install` TARGET, +and this is something we recommend doing whenever possible. +Otherwise, you can use `TARGET` to set the target to build. +This function defaults to not passing a target to cmake. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `build`, and thus the logfiles end up being something like +`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`, +this is set to `install`, so you'll get log names like `install-x86-windows-dbg.log`. + +For build systems that are buggy when run in parallel, +using `DISABLE_PARALLEL` will run the build with only one job. + +Finally, `ADD_BIN_TO_PATH` adds the appropriate (either release or debug) +`bin/` directories to the path during the build, +such that executables run during the build will be able to access those DLLs. +#]===] +if(Z_VCPKG_CMAKE_BUILD_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_BUILD_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_build) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_BASE" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_LOGFILE_BASE) + set(arg_LOGFILE_BASE "build") + endif() + + set(build_args) + set(target_args) + set(parallel_args) + set(no_parallel_args) + + if(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Ninja") + set(build_args "-v") # verbose output + set(parallel_args "-j${VCPKG_CONCURRENCY}") + set(no_parallel_args "-j1") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "^Visual Studio") + set(build_args + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) + set(parallel_args "/m") + elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "NMake Makefiles") + # No options are currently added for nmake builds + else() + message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") + endif() + + if(DEFINED arg_TARGET) + set(target_args "--target" "${arg_TARGET}") + endif() + + foreach(buildtype IN ITEMS debug release) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL buildtype) + if(buildtype STREQUAL "debug") + set(short_buildtype "dbg") + set(cmake_config "Debug") + else() + set(short_buildtype "rel") + set(cmake_config "Release") + endif() + + message(STATUS "Building ${TARGET_TRIPLET}-${short_buildtype}") + + if(arg_ADD_BIN_TO_PATH) + set(env_path_backup "$ENV{PATH}") + if(buildtype STREQUAL "debug") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + else() + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") + endif() + endif() + + if (arg_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${no_parallel_args} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_buildtype}" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_buildtype}" + ) + else() + vcpkg_execute_build_process( + COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${parallel_args} + NO_PARALLEL_COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${no_parallel_args} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_buildtype}" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_buildtype}" + ) + endif() + + if(arg_ADD_BIN_TO_PATH) + set(ENV{PATH} "${env_path_backup}") + endif() + endif() + endforeach() +endfunction() diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake new file mode 100644 index 00000000000000..9f49a7d5c79717 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -0,0 +1,391 @@ +#[===[.md: +# vcpkg_cmake_configure + +Configure a CMake buildsystem. + +```cmake +vcpkg_cmake_configure( + SOURCE_PATH + [LOGFILE_BASE ] + [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] + [WINDOWS_USE_MSBUILD] + [GENERATOR ] + [OPTIONS + ...] + [OPTIONS_RELEASE + ...] + [OPTIONS_DEBUG + ...] +) +``` + +`vcpkg_cmake_configure` configures a CMake build system for use with +`vcpkg_cmake_buildsystem_build` and `vcpkg_cmake_buildsystem_install`. +`source-path` is where the source is located; by convention, +this is usually `${SOURCE_PATH}`, which is set by one of the `vcpkg_from_*` functions. +This function configures the build system for both Debug and Release builds by default, +assuming that `VCPKG_BUILD_TYPE` is not set; if it is, then it will only configure for +that build type. + +Use the `OPTIONS` argument to set the configure settings for both release and debug, +and use `OPTIONS_RELEASE` and `OPTIONS_DEBUG` to set the configure settings for +release only and debug only repsectively. + +By default, when possible, `vcpkg_cmake_configure` uses [ninja-build] +as its build system. If the `WINDOWS_USE_MSBUILD` argument is passed, then +`vcpkg_cmake_configure` will use a Visual Studio generator on Windows; +on every other platform, `vcpkg_cmake_configure` just uses Ninja. + +[ninja-build]: https://ninja-build.org/ + +Additionally, one may pass the specific generator a port should use with `GENERATOR`. +This is useful if some project-specific buildsystem +has been wrapped in a CMake build system that doesn't perform an actual build. +If used for this purpose, it should be set to `"NMake Makefiles"`. +`vcpkg_cmake_buildsystem_build` and `install` do not support this being set to anything +except for NMake. + +For libraries which cannot be configured in parallel, +pass the `DISABLE_PARALLEL_CONFIGURE` flag. This is needed, for example, +if the library's build system writes back into the source directory during configure. +This also disables the `CMAKE_DISABLE_SOURCE_CHANGES` option. + +By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` +which set the default character set to utf-8 for MSVC. +If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `config`, and thus the logfiles end up being something like +`config-x86-windows-dbg.log`. You can set it to anything you like; +if you set it to `config-the-first`, +you'll get something like `config-the-first-x86-windows.dbg.log`. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_CONFIGURE_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_CONFIGURE_GUARD ON CACHE INTERNAL "guard variable") + +macro(z_vcpkg_cmake_configure_both_set_or_unset var1 var2) + if(DEFINED ${var1} AND NOT DEFINED ${var2}) + message(FATAL_ERROR "If ${var1} is set, then ${var2} must be set.") + elseif(NOT DEFINED ${var1} AND DEFINED ${var2}) + message(FATAL_ERROR "If ${var2} is set, then ${var1} must be set.") + endif() +endmacro() + +function(vcpkg_cmake_configure) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG" + "SOURCE_PATH;GENERATOR;LOGFILE_BASE" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" + ) + + if(DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR}) + message(WARNING "vcpkg_cmake_configure already called; this function should only be called once.") + endif() + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_buildsystem_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be set") + endif() + if(NOT DEFINED arg_LOGFILE_BASE) + set(arg_LOGFILE_BASE "config") + endif() + + if(CMAKE_HOST_WIN32) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(host_architecture "$ENV{PROCESSOR_ARCHITEW6432}") + else() + set(host_architecture "$ENV{PROCESSOR_ARCHITECTURE}") + endif() + endif() + + set(ninja_can_be_used ON) # Ninja as generator + set(ninja_host ON) # Ninja as parallel configurator + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(targetting_uwp ON) + endif() + + if(host_architecture STREQUAL "x86") + # Prebuilt ninja binaries are only provided for x64 hosts + set(ninja_can_be_used OFF) + set(ninja_host OFF) + elseif(targetting_uwp) + # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility + set(ninja_can_be_used OFF) + endif() + + set(generator) + if(DEFINED arg_GENERATOR) + set(generator "${arg_GENERATOR}") + elseif(arg_WINDOWS_USE_MSBUILD OR NOT ninja_can_be_used) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v120") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 12 2013") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 12 2013 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 12 2013 ARM") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 14 2015") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 14 2015 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 14 2015 ARM") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 15 2017") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 15 2017 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 15 2017 ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(generator "Visual Studio 15 2017") + set(arch "ARM64") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(generator "Visual Studio 16 2019") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(arch "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(arch "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(arch "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(arch "ARM64") + else() + set(generator) + endif() + endif() + else() + set(generator "Ninja") + endif() + + if(NOT DEFINED generator) + if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_CMAKE_SYSTEM_NAME Windows) + endif() + message(FATAL_ERROR "Unable to determine appropriate generator for: " + "${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") + endif() + + # If we use Ninja, make sure it's on PATH + if(generator STREQUAL "Ninja" AND NOT DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES}) + vcpkg_find_acquire_program(NINJA) + get_filename_component(ninja_path "${NINJA}" DIRECTORY) + vcpkg_add_to_path("${ninja_path}") + list(APPEND arg_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") + endif() + + file(REMOVE_RECURSE + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + if(targetting_uwp AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 21) + endif() + endif() + + if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=ON") + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=OFF") + else() + message(FATAL_ERROR + "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " + "It must be \"static\" or \"dynamic\"") + endif() + + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG) + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE) + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) + + set(VCPKG_SET_CHARSET_FLAG ON) + if(arg_NO_CHARSET_FLAG) + set(VCPKG_SET_CHARSET_FLAG OFF) + endif() + + if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/ios.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/openbsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") + endif() + endif() + + + list(APPEND arg_OPTIONS + "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" + "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" + "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" + "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" + "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" + "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" + "-DCMAKE_VERBOSE_MAKEFILE=ON" + "-DVCPKG_APPLOCAL_DEPS=OFF" + "-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake" + "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" + "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" + "-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}" + "-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}" + "-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}" + "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" + "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" + "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" + "-DVCPKG_LINKER_FLAGS_RELEASE=${VCPKG_LINKER_FLAGS_RELEASE}" + "-DVCPKG_LINKER_FLAGS_DEBUG=${VCPKG_LINKER_FLAGS_DEBUG}" + "-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" + "-DCMAKE_INSTALL_BINDIR:STRING=bin" + "-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}" + "-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}" + "-DVCPKG_MANIFEST_INSTALL=OFF" + ) + + if(DEFINED arch) + list(APPEND arg_OPTIONS "-A${arch}") + endif() + + # Sets configuration variables for macOS builds + foreach(config_var IN ITEMS INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES) + if(DEFINED VCPKG_${config_var}) + list(APPEND arg_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") + endif() + endforeach() + + if(ninja_host AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE) + list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") + + vcpkg_find_acquire_program(NINJA) + + if(NOT DEFINED ninja_path) + # if ninja_path was defined above, we've already done this + get_filename_component(ninja_path "${NINJA}" DIRECTORY) + vcpkg_add_to_path("${ninja_path}") + endif() + + #parallelize the configure step + set(parallel_configure_contents + "rule CreateProcess\n command = $process\n\n" + ) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(line "build ../CMakeCache.txt: CreateProcess\n ") + string(APPEND line "process = \"${CMAKE_COMMAND}\" -S \"${arg_SOURCE_PATH}\" -B .. ") + + if(DEFINED arg_OPTIONS AND NOT arg_OPTIONS STREQUAL "") + list(JOIN arg_OPTIONS "\" \"" options) + string(APPEND line "\"${options}\" ") + endif() + if(DEFINED arg_OPTIONS_RELEASE AND NOT arg_OPTIONS_RELEASE STREQUAL "") + list(JOIN arg_OPTIONS_RELEASE "\" \"" options_rel) + string(APPEND line "\"${options_rel}\" ") + endif() + string(APPEND line "-G \"${generator}\" ") + string(APPEND line "\"-DCMAKE_BUILD_TYPE=Release\" ") + string(APPEND line "\"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}\"") + string(APPEND parallel_configure_contents "${line}\n\n") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(line "build ../../${TARGET_TRIPLET}-dbg/CMakeCache.txt: CreateProcess\n ") + string(APPEND line "process = \"${CMAKE_COMMAND}\" -S \"${arg_SOURCE_PATH}\" -B \"../../${TARGET_TRIPLET}-dbg\" ") + + if(DEFINED arg_OPTIONS AND NOT arg_OPTIONS STREQUAL "") + list(JOIN arg_OPTIONS "\" \"" options) + string(APPEND line "\"${options}\" ") + endif() + if(DEFINED arg_OPTIONS_DEBUG AND NOT arg_OPTIONS_DEBUG STREQUAL "") + list(JOIN arg_OPTIONS_DEBUG "\" \"" options_dbg) + string(APPEND line "\"${options_dbg}\" ") + endif() + string(APPEND line "-G \"${generator}\" ") + string(APPEND line "\"-DCMAKE_BUILD_TYPE=Debug\" ") + string(APPEND line "\"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug\"") + string(APPEND parallel_configure_contents "${line}\n\n") + endif() + + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure") + file(WRITE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure/build.ninja" "${parallel_configure_contents}") + + message(STATUS "Configuring ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND ninja -v + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}" + ) + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND + "${CMAKE_COMMAND}" "${arg_SOURCE_PATH}" + ${arg_OPTIONS} + ${arg_OPTIONS_DEBUG} + -G "${generator}" + "-DCMAKE_BUILD_TYPE=Debug" + "-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-dbg" + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND + "${CMAKE_COMMAND}" "${arg_SOURCE_PATH}" + ${arg_OPTIONS} + ${arg_OPTIONS_RELEASE} + -G "${generator}" + "-DCMAKE_BUILD_TYPE=Release" + "-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "${arg_LOGFILE_BASE}-rel" + ) + endif() + endif() + + set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.") +endfunction() diff --git a/ports/vcpkg-cmake/vcpkg_cmake_install.cmake b/ports/vcpkg-cmake/vcpkg_cmake_install.cmake new file mode 100644 index 00000000000000..0a609aa8da35fd --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_install.cmake @@ -0,0 +1,46 @@ +#[===[.md: +# vcpkg_cmake_install + +Build and install a cmake project. + +```cmake +vcpkg_cmake_install( + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_install` transparently forwards to [`vcpkg_cmake_build()`], +with additional parameters to set the `TARGET` to `install`, +and to set the `LOGFILE_ROOT` to `install` as well. + +[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_INSTALL_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_INSTALL_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_install) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(args) + foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH) + if(arg_${arg}) + list(APPEND args "${arg}") + endif() + endforeach() + + vcpkg_cmake_build( + ${args} + LOGFILE_BASE install + TARGET install + ) +endfunction() diff --git a/ports/wil/CONTROL b/ports/wil/CONTROL index 7d0e94202ae340..04acb2d1f4b299 100644 --- a/ports/wil/CONTROL +++ b/ports/wil/CONTROL @@ -1,5 +1,4 @@ Source: wil -Version: 2020-05-19 -Port-Version: 1 +Version: 2021-02-04 Homepage: https://github.com/microsoft/wil Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. diff --git a/ports/wil/fix-install-headers.patch b/ports/wil/fix-install-headers.patch deleted file mode 100644 index ae0e3aef39a13b..00000000000000 --- a/ports/wil/fix-install-headers.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 97a6737..4ae28fb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -48,4 +48,4 @@ install(EXPORT ${PROJECT_NAME}_targets - ) - - # Install the headers at a standard cmake location. --install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -\ No newline at end of file -+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/wil" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -\ No newline at end of file diff --git a/ports/wil/portfile.cmake b/ports/wil/portfile.cmake index d5fb8e7e043178..79011e711bc684 100644 --- a/ports/wil/portfile.cmake +++ b/ports/wil/portfile.cmake @@ -2,10 +2,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/wil - REF 3c00e7f1d8cf9930bbb8e5be3ef0df65c84e8928 - SHA512 c9c3b4a41f7523a6da6378def4a6b868e9f66438998d04ae8489b9784db91664af7af3ab6ef73c104b9ac100c0dc5ae6a13e9cb9f679ba428a4abc07b32a7dce + REF 86353933d5fba0caf61503c8b09e10e182dccdfb + SHA512 07694a3754c179aa629b8e3e8fc2a5554779601925131bffef311dee937b03db0d1be891eaee364b7a265b7268f39ad356d8302c02b05acf4fa8c7b2d4d51629 HEAD_REF master - PATCHES fix-install-headers.patch ) vcpkg_configure_cmake( @@ -22,4 +21,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/WIL) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/wil" RENAME copyright) \ No newline at end of file +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/scripts/azure-pipelines/windows-unstable/job.yml b/scripts/azure-pipelines/windows-unstable/job.yml index 256990e5eb4f6b..d440ef7fa82189 100644 --- a/scripts/azure-pipelines/windows-unstable/job.yml +++ b/scripts/azure-pipelines/windows-unstable/job.yml @@ -83,3 +83,18 @@ jobs: PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' ArtifactName: 'failure logs for ${{ parameters.triplet }}' condition: always() + - task: PowerShell@2 + displayName: 'Build a file list for all packages' + condition: always() + inputs: + targetType: inline + script: | + ./vcpkg.exe fetch python3 + & $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\ + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for ${{ parameters.triplet }}' diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index e4153aad407c32..779f7d24511b9f 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -45,7 +45,7 @@ while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" -& "$scriptsDir/tls12-download.exe" github.com "/microsoft/vcpkg-tool/releases/download/2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35/vcpkg.exe" "$vcpkgRootDir/vcpkg.exe" +& "$scriptsDir/tls12-download.exe" github.com "/microsoft/vcpkg-tool/releases/download/2021-02-24-d67989bce1043b98092ac45996a8230a059a2d7e/vcpkg.exe" "$vcpkgRootDir/vcpkg.exe" Write-Host "" if ($LASTEXITCODE -ne 0) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 2188b8af71ad89..28a5e24038cfdf 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -276,8 +276,8 @@ else fi # Do the build -vcpkgToolReleaseTag="2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35" -vcpkgToolReleaseSha="99c9949637f83bf361ee23557edc889e2865c2105c45306c39c40855a3e1440e2f6fb5ec59e95176fca61eff33929462d23c7b49feb1975f24adb8ca443a98a6" +vcpkgToolReleaseTag="2021-02-24-d67989bce1043b98092ac45996a8230a059a2d7e" +vcpkgToolReleaseSha="0b0f2cd40aa92556c28e1dfa9f8356313a859fb6acb6c730821a06bd9d554ab1ea0622da4026ea66fb11b9ed4fda1316cc388067d51ff1f09af85d033fe4323d" vcpkgToolReleaseTarball="$vcpkgToolReleaseTag.tar.gz" vcpkgToolUrl="https://github.com/microsoft/vcpkg-tool/archive/$vcpkgToolReleaseTarball" baseBuildDir="$vcpkgRootDir/buildtrees/_vcpkg" diff --git a/scripts/buildsystems/msbuild/vcpkg-general.xml b/scripts/buildsystems/msbuild/vcpkg-general.xml index 49865e74e4edaa..5c84aa0daaa740 100644 --- a/scripts/buildsystems/msbuild/vcpkg-general.xml +++ b/scripts/buildsystems/msbuild/vcpkg-general.xml @@ -65,6 +65,9 @@ + + diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 074d35d903f1df..b99011324513ed 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -30,6 +30,10 @@ debug\ true + + <_ZVcpkgHostTripletParameter Condition="'$(VcpkgHostTriplet)' != ''">"--host-triplet=$(VcpkgHostTriplet)" + <_ZVcpkgExecutable>$([System.IO.Path]::Combine($(VcpkgRoot), 'vcpkg.exe')) + VcpkgTriplet=$(VcpkgTriplet):$(ProjectStateLine) @@ -77,7 +81,7 @@ + Outputs="$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).read.1u.tlog;$(VcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(VcpkgHostTriplet).stamp"> @@ -85,15 +89,15 @@ <_VcpkgItemToDelete Include="$(VcpkgInstalledDir).msbuildstamp-*" /> - - - - + diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index e135d39ac3d94e..9bdf6573e30608 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -546,15 +546,6 @@ set(CMAKE_SYSTEM_IGNORE_PATH "C:/OpenSSL-Win64/lib/VC/static" ) -list(APPEND CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools") -file(GLOB Z_VCPKG_TOOLS_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*") -foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS) - if(IS_DIRECTORY "${Z_VCPKG_TOOLS_DIR}") - list(APPEND CMAKE_PROGRAM_PATH "${Z_VCPKG_TOOLS_DIR}") - endif() -endforeach() - - # CMAKE_EXECUTABLE_SUFFIX is not yet defined if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg.exe") @@ -587,6 +578,11 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT Z_VCPKG_CMAKE_IN_TRY_C message(STATUS "Running vcpkg install") set(Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS) + + if(DEFINED VCPKG_HOST_TRIPLET AND NOT VCPKG_HOST_TRIPLET STREQUAL "") + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--host-triplet=${VCPKG_HOST_TRIPLET}") + endif() + if(VCPKG_OVERLAY_PORTS) foreach(Z_VCPKG_OVERLAY_PORT IN LISTS VCPKG_OVERLAY_PORTS) list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-ports=${Z_VCPKG_OVERLAY_PORT}") @@ -655,6 +651,14 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT Z_VCPKG_CMAKE_IN_TRY_C endif() endif() +list(APPEND CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools") +file(GLOB Z_VCPKG_TOOLS_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*") +foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS) + if(IS_DIRECTORY "${Z_VCPKG_TOOLS_DIR}") + list(APPEND CMAKE_PROGRAM_PATH "${Z_VCPKG_TOOLS_DIR}") + endif() +endforeach() + function(add_executable) z_vcpkg_function_arguments(ARGS) _add_executable(${ARGS}) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 828802842973f2..a9ab3808409b2b 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -27,8 +27,24 @@ ## x86-windows ## - # Add new items alphabetically + +# script ports +vcpkg-cmake:arm64-windows=fail +vcpkg-cmake:arm-uwp=fail +vcpkg-cmake:x64-uwp=fail +vcpkg-cmake:x64-windows-static=fail +vcpkg-cmake:x64-windows-static-md=fail +vcpkg-cmake:x86-windows=fail + +vcpkg-cmake-config:arm64-windows=fail +vcpkg-cmake-config:arm-uwp=fail +vcpkg-cmake-config:x64-uwp=fail +vcpkg-cmake-config:x64-windows-static=fail +vcpkg-cmake-config:x64-windows-static-md=fail +vcpkg-cmake-config:x86-windows=fail + +# other ports # Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h apr:arm64-windows=fail # Requires ATL for ARM64 to be installed in CI @@ -619,8 +635,6 @@ liblo:x64-osx=fail liblo:x64-uwp=fail liblsl:arm64-windows=fail liblsl:arm-uwp=fail -liblsl:x64-linux=fail -liblsl:x64-osx=fail liblsl:x64-uwp=fail libmad:arm-uwp=fail libmad:x64-uwp=fail @@ -661,6 +675,14 @@ libmpeg2:x64-osx=fail libmpeg2:x64-uwp=fail libmupdf:x64-osx=fail libmysql:x86-windows=fail +#The official website of libnice https://nice.freedesktop.org cannot be accessed +libnice:x86-windows=skip +libnice:x64-windows=skip +libnice:x64-windows-static=skip +libnice:x64-uwp=skip +libnice:arm64-windows=skip +libnice:x64-linux=skip +libnice:x64-osx=skip libopenmpt:x64-linux=fail libopenmpt:x64-osx=fail libopusenc:arm-uwp=fail @@ -1232,6 +1254,7 @@ pmdk:x64-windows-static=fail pmdk:x86-windows=fail pngwriter:arm-uwp=fail pngwriter:x64-uwp=fail +popsift:x64-windows-static-md=fail portable-snippets:arm-uwp=fail pqp:arm-uwp=fail pqp:x64-uwp=fail @@ -1363,6 +1386,10 @@ rocksdb:x64-uwp=fail rpclib:arm64-windows=fail rpclib:arm-uwp=fail rpclib:x64-uwp=fail +rsasynccpp:arm64-windows=fail +rsasynccpp:arm-uwp=fail +rsasynccpp:x64-linux=fail +rsasynccpp:x64-osx=fail rsocket:x64-windows=fail rsocket:x64-windows-static=fail rsocket:x64-windows-static-md=fail @@ -1511,6 +1538,11 @@ stormlib:arm-uwp=fail stormlib:x64-uwp=fail stxxl:arm-uwp=fail stxxl:x64-uwp=fail +# upstream issue https://github.com/stxxl/stxxl/issues/99 +stxxl:x86-windows=skip +stxxl:x64-windows=skip +stxxl:x64-windows-static=skip +stxxl:x64-windows-static-md=skip symengine:arm64-windows=fail symengine:arm-uwp=fail systemc:arm64-windows=fail @@ -1770,4 +1802,3 @@ yato:x64-windows-static-md=fail zyre:x64-windows-static-md=fail workflow:x64-uwp=fail workflow:arm-uwp=fail - diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index b2e2263511241e..bd4325af4f9fe7 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -1,9 +1,10 @@ +# DEPRECATED: in favor of the `PATCHES` argument to `vcpkg_from_github()` et al. + #[===[.md # vcpkg_apply_patches -Apply a set of patches to a source tree. This function is deprecated in favor of the `PATCHES` argument to `vcpkg_from_github()` et al. +Apply a set of patches to a source tree. -## Usage ```cmake vcpkg_apply_patches( SOURCE_PATH <${SOURCE_PATH}> @@ -11,63 +12,22 @@ vcpkg_apply_patches( PATCHES ... ) ``` - -## Parameters -### SOURCE_PATH -The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. - -### PATCHES -A list of patches that are applied to the source tree. - -Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. - -### QUIET -Disables the warning message upon failure. - -This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. - -## Examples - -* [libbson](https://github.com/Microsoft/vcpkg/blob/master/ports/libbson/portfile.cmake) -* [gdal](https://github.com/Microsoft/vcpkg/blob/master/ports/gdal/portfile.cmake) #]===] -include(vcpkg_execute_in_download_mode) - function(vcpkg_apply_patches) - # parse parameters such that semicolons in options arguments to COMMAND don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _ap "QUIET" "SOURCE_PATH" "PATCHES") - - find_program(GIT NAMES git git.cmd) - if(DEFINED ENV{GIT_CONFIG_NOSYSTEM}) - set(GIT_CONFIG_NOSYSTEM_BACKUP "$ENV{GIT_CONFIG_NOSYSTEM}") - else() - unset(GIT_CONFIG_NOSYSTEM_BACKUP) - endif() - set(ENV{GIT_CONFIG_NOSYSTEM} 1) - set(PATCHNUM 0) - foreach(PATCH ${_ap_PATCHES}) - get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") - message(STATUS "Applying patch ${PATCH}") - set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) - vcpkg_execute_in_download_mode( - COMMAND ${GIT} -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply "${ABSOLUTE_PATCH}" --ignore-whitespace --whitespace=nowarn --verbose - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log - ERROR_VARIABLE error - WORKING_DIRECTORY ${_ap_SOURCE_PATH} - RESULT_VARIABLE error_code - ) - file(WRITE "${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log" "${error}") + z_vcpkg_deprecation_message("vcpkg_apply_patches has been deprecated in favor of the `PATCHES` argument to `vcpkg_from_*`.") - if(error_code AND NOT _ap_QUIET) - message(FATAL_ERROR "Applying patch failed. ${error}") - endif() + cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES") - math(EXPR PATCHNUM "${PATCHNUM}+1") - endforeach() - if(DEFINED GIT_CONFIG_NOSYSTEM_BACKUP) - set(ENV{GIT_CONFIG_NOSYSTEM} "${GIT_CONFIG_NOSYSTEM_BACKUP}") + if(arg_QUIET) + set(quiet "QUIET") else() - unset(ENV{GIT_CONFIG_NOSYSTEM}) + set(quiet) endif() + + z_vcpkg_apply_patches( + SOURCE_PATH "${arg_SOURCE_PATH}" + ${quiet} + PATCHES ${arg_PATCHES} + ) endfunction() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index d463d29c75cb4f..523999b4ed118b 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,6 +1,8 @@ #[===[.md: # vcpkg_build_cmake +**This function has been deprecated in favor of `vcpkg_cmake_build` from the vcpkg-cmake port.** + Build a cmake project. ## Usage: @@ -33,34 +35,41 @@ You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) functi #]===] function(vcpkg_build_cmake) - # parse parameters such that semicolons in options arguments to COMMAND don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "") + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "DISABLE_PARALLEL;ADD_BIN_TO_PATH" + "TARGET;LOGFILE_ROOT" + "" + ) + + if(Z_VCPKG_CMAKE_BUILD_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_build_cmake in the same port is unsupported.") + endif() - if(NOT _bc_LOGFILE_ROOT) - set(_bc_LOGFILE_ROOT "build") + if(NOT arg_LOGFILE_ROOT) + set(arg_LOGFILE_ROOT "build") endif() set(PARALLEL_ARG) set(NO_PARALLEL_ARG) - if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") + if(Z_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") set(BUILD_ARGS "-v") # verbose output set(PARALLEL_ARG "-j${VCPKG_CONCURRENCY}") set(NO_PARALLEL_ARG "-j1") - elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") set(BUILD_ARGS "/p:VCPkgLocalAppDataDisabled=true" "/p:UseIntelMKL=No" ) set(PARALLEL_ARG "/m") - elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "NMake") # No options are currently added for nmake builds else() message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") endif() - if(_bc_TARGET) - set(TARGET_PARAM "--target" ${_bc_TARGET}) + if(arg_TARGET) + set(TARGET_PARAM "--target" ${arg_TARGET}) else() set(TARGET_PARAM) endif() @@ -77,7 +86,7 @@ function(vcpkg_build_cmake) message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") - if(_bc_ADD_BIN_TO_PATH) + if(arg_ADD_BIN_TO_PATH) set(_BACKUP_ENV_PATH "$ENV{PATH}") if(BUILDTYPE STREQUAL "debug") vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") @@ -86,22 +95,22 @@ function(vcpkg_build_cmake) endif() endif() - if (_bc_DISABLE_PARALLEL) + if (arg_DISABLE_PARALLEL) vcpkg_execute_build_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} - LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" ) else() vcpkg_execute_build_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} NO_PARALLEL_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} - LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" ) endif() - if(_bc_ADD_BIN_TO_PATH) + if(arg_ADD_BIN_TO_PATH) set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() endif() diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake index be4e1265c69bf8..7679b0d11aa547 100644 --- a/scripts/cmake/vcpkg_check_features.cmake +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -2,53 +2,43 @@ # vcpkg_check_features Check if one or more features are a part of a package installation. -## Usage ```cmake vcpkg_check_features( - OUT_FEATURE_OPTIONS - [FEATURES - - [ ] - ...] - [INVERTED_FEATURES - - [ ] - ...] + OUT_FEATURE_OPTIONS + [PREFIX ] + [FEATURES + [ ]... + ] + [INVERTED_FEATURES + [ ]... + ] ) ``` -`vcpkg_check_features()` accepts these parameters: -* `OUT_FEATURE_OPTIONS`: - An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS` - and then set it to contain a list of option definitions (`-D=ON|OFF`). +The `` should be set to `FEATURE_OPTIONS` by convention. - This should be set to `FEATURE_OPTIONS` by convention. +`vcpkg_check_features()` will: -* `FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: +- for each `` passed in `FEATURES`: + - if the feature is set, add `-D=ON` to ``, + and set `_` to ON. + - if the feature is not set, add `-D=OFF` to ``, + and set `_` to OFF. +- for each `` passed in `INVERTED_FEATURES`: + - if the feature is set, add `-D=OFF` to ``, + and set `_` to OFF. + - if the feature is not set, add `-D=ON` to ``, + and set `_` to ON. - * `-D=ON`, if a feature is specified for installation, - * `-D=OFF`, otherwise. +If `` is not passed, then the feature vars set are simply ``, +not `_`. -* `INVERTED_FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: - - * `-D=OFF`, if a feature is specified for installation, - * `-D=ON`, otherwise. - - -## Notes - -The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used. - -At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call. - -Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication. -If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists, -two conflicting definitions are added to `OUT_FEATURE_OPTIONS`. +If `INVERTED_FEATURES` is not passed, then the `FEATURES` keyword is optional. +This behavior is deprecated. +If the same `` is passed multiple times, +then `vcpkg_check_features` will cause a fatal error, +since that is a bug. ## Examples @@ -59,18 +49,18 @@ $ ./vcpkg install mimalloc[asm,secure] # ports/mimalloc/portfile.cmake vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - # Keyword FEATURES is optional if INVERTED_FEATURES are not used - asm MI_SEE_ASM - override MI_OVERRIDE - secure MI_SECURE + FEATURES + asm MI_SEE_ASM + override MI_OVERRIDE + secure MI_SECURE ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DMI_SEE_ASM=ON;-DMI_OVERRIDE=OFF;-DMI_SECURE=ON" + ${FEATURE_OPTIONS} ) ``` @@ -80,18 +70,18 @@ vcpkg_configure_cmake( $ ./vcpkg install cpprestsdk[websockets] # ports/cpprestsdk/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required - brotli CPPREST_EXCLUDE_BROTLI - websockets CPPREST_EXCLUDE_WEBSOCKETS +vcpkg_check_features( + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + websockets CPPREST_EXCLUDE_WEBSOCKETS ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON;-DCPPREST_EXCLUDE_WEBSOCKETS=OFF" + ${FEATURE_OPTIONS} ) ``` @@ -101,18 +91,19 @@ vcpkg_configure_cmake( $ ./vcpkg install pcl[cuda] # ports/pcl/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - cuda WITH_CUDA - cuda BUILD_CUDA - cuda BUILD_GPU +vcpkg_check_features( + FEATURES + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_CUDA=ON;-DBUILD_CUDA=ON;-DBUILD_GPU=ON" + ${FEATURE_OPTIONS} ) ``` @@ -122,19 +113,19 @@ vcpkg_configure_cmake( $ ./vcpkg install rocksdb[tbb] # ports/rocksdb/portfile.cmake -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_check_features( + FEATURES + tbb WITH_TBB + INVERTED_FEATURES + tbb ROCKSDB_IGNORE_PACKAGE_TBB ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_TBB=ON;-DROCKSDB_IGNORE_PACKAGE_TBB=OFF" + ${FEATURE_OPTIONS} ) ``` @@ -145,52 +136,98 @@ vcpkg_configure_cmake( * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) #]===] +function(z_vcpkg_check_features_last_feature out_var features_name features_list) + list(LENGTH features_list features_length) + math(EXPR features_length_mod_2 "${features_length} % 2") + if(NOT features_length_mod_2 EQUAL 0) + message(FATAL_ERROR "vcpkg_check_features has an incorrect number of arguments to ${features_name}") + endif() + + math(EXPR last_feature "${features_length} / 2 - 1") + set("${out_var}" "${last_feature}" PARENT_SCOPE) +endfunction() + +function(z_vcpkg_check_features_get_feature idx features_list out_feature_name out_feature_var) + math(EXPR feature_name_idx "${idx} * 2") + math(EXPR feature_var_idx "${feature_name_idx} + 1") + + list(GET features_list "${feature_name_idx}" feature_name) + list(GET features_list "${feature_var_idx}" feature_var) + + set("${out_feature_name}" "${feature_name}" PARENT_SCOPE) + set("${out_feature_var}" "${feature_var}" PARENT_SCOPE) +endfunction() + function(vcpkg_check_features) - # parse parameters such that semicolons in options arguments to COMMAND don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES") + cmake_parse_arguments( + PARSE_ARGV 0 "arg" + "" + "OUT_FEATURE_OPTIONS;PREFIX" + "FEATURES;INVERTED_FEATURES" + ) + + if(NOT DEFINED arg_OUT_FEATURE_OPTIONS) + message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be defined.") + endif() + if(NOT DEFINED arg_PREFIX) + set(prefix "") + else() + set(prefix "${arg_PREFIX}_") + endif() - if (NOT DEFINED _vcf_OUT_FEATURE_OPTIONS) - message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be specified.") + set(feature_options) + set(feature_variables) + + if(NOT DEFINED arg_FEATURES AND NOT DEFINED arg_INVERTED_FEATURES) + message(DEPRECATION +"calling `vcpkg_check_features` without the `FEATURES` keyword has been deprecated. + Please add the `FEATURES` keyword to the call.") + set(arg_FEATURES "${arg_UNPARSED_ARGUMENTS}") + elseif(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_check_features called with unknown arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - macro(_check_features _vcf_ARGUMENT _set_if _set_else) - list(LENGTH ${_vcf_ARGUMENT} FEATURES_SET_LEN) - math(EXPR _vcf_INCORRECT_ARGN "${FEATURES_SET_LEN} % 2") - if(_vcf_INCORRECT_ARGN) - message(FATAL_ERROR "Called with incorrect number of arguments.") - endif() - set(_vcf_IS_FEATURE_NAME_ARG ON) - foreach(_vcf_ARG ${${_vcf_ARGUMENT}}) - if(_vcf_IS_FEATURE_NAME_ARG) - set(_vcf_FEATURE_NAME ${_vcf_ARG}) - if(NOT ${_vcf_FEATURE_NAME} IN_LIST ALL_FEATURES) - message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE_NAME}") - endif() - set(_vcf_IS_FEATURE_NAME_ARG OFF) + + z_vcpkg_check_features_last_feature(last_feature "FEATURES" "${arg_FEATURES}") + if(last_feature GREATER_EQUAL 0) + foreach(feature_pair_idx RANGE "${last_feature}") + z_vcpkg_check_features_get_feature("${feature_pair_idx}" "${arg_FEATURES}" feature_name feature_var) + + list(APPEND feature_variables "${feature_var}") + if(feature_name IN_LIST FEATURES) + list(APPEND feature_options "-D${feature_var}=ON") + set("${prefix}${feature_var}" ON PARENT_SCOPE) else() - set(_vcf_FEATURE_VARIABLE ${_vcf_ARG}) - if(${_vcf_FEATURE_NAME} IN_LIST FEATURES) - list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_if}") - set(${_vcf_FEATURE_VARIABLE} "${_set_if}" PARENT_SCOPE) - else() - list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_else}") - set(${_vcf_FEATURE_VARIABLE} "${_set_else}" PARENT_SCOPE) - endif() - set(_vcf_IS_FEATURE_NAME_ARG ON) + list(APPEND feature_options "-D${feature_var}=OFF") + set("${prefix}${feature_var}" OFF PARENT_SCOPE) endif() endforeach() - endmacro() + endif() - set(_vcf_FEATURE_OPTIONS) + z_vcpkg_check_features_last_feature(last_inverted_feature "INVERTED_FEATURES" "${arg_INVERTED_FEATURES}") + if(last_inverted_feature GREATER_EQUAL 0) + foreach(feature_pair_idx RANGE "${last_inverted_feature}") + z_vcpkg_check_features_get_feature("${feature_pair_idx}" "${arg_INVERTED_FEATURES}" feature_name feature_var) - if (DEFINED _vcf_FEATURES OR DEFINED _vcf_INVERTED_FEATURES) - _check_features(_vcf_FEATURES ON OFF) - _check_features(_vcf_INVERTED_FEATURES OFF ON) - else() - # Skip arguments that correspond to OUT_FEATURE_OPTIONS and its value. - list(SUBLIST ARGN 2 -1 _vcf_ARGN) - _check_features(_vcf_ARGN ON OFF) + list(APPEND feature_variables "${feature_var}") + if(feature_name IN_LIST FEATURES) + list(APPEND feature_options "-D${feature_var}=OFF") + set("${prefix}${feature_var}" OFF PARENT_SCOPE) + else() + list(APPEND feature_options "-D${feature_var}=ON") + set("${prefix}${feature_var}" ON PARENT_SCOPE) + endif() + endforeach() endif() - set(${_vcf_OUT_FEATURE_OPTIONS} "${_vcf_FEATURE_OPTIONS}" PARENT_SCOPE) + + list(SORT feature_variables) + set(last_variable) + foreach(variable IN LISTS feature_variables) + if(variable STREQUAL last_variable) + message(FATAL_ERROR "vcpkg_check_features passed the same feature variable multiple times: '${variable}'") + endif() + endforeach() + + set("${arg_OUT_FEATURE_OPTIONS}" "${feature_options}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake index f63d6467a1fbad..b505f3693bb23c 100644 --- a/scripts/cmake/vcpkg_common_definitions.cmake +++ b/scripts/cmake/vcpkg_common_definitions.cmake @@ -1,9 +1,8 @@ #[===[.md: # vcpkg_common_definitions -File contains helpful variabls for portfiles which are commonly needed or used. +This file defines the following variabls which are commonly needed or used in portfiles: -## The following variables are available: ```cmake VCPKG_TARGET_IS_ with being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD, OPENBSD. only defined if VCPKG_HOST_IS_ with being one of the following: WINDOWS, LINUX, OSX, FREEBSD, OPENBSD. only defined if @@ -19,6 +18,10 @@ VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg +TARGET_TRIPLET the name of the current triplet to build for +CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet +HOST_TRIPLET the name of the triplet corresponding to the host +CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet ``` CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target @@ -27,39 +30,39 @@ portfiles are able to use find_library calls to discover dependent libraries wit #]===] #Helper variable to identify the Target system. VCPKG_TARGET_IS_ -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(VCPKG_TARGET_IS_WINDOWS 1) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(VCPKG_TARGET_IS_UWP 1) - endif() +if (NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "") + set(VCPKG_TARGET_IS_WINDOWS ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_WINDOWS ON) + set(VCPKG_TARGET_IS_UWP ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_TARGET_IS_OSX 1) + set(VCPKG_TARGET_IS_OSX ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") - set(VCPKG_TARGET_IS_IOS 1) + set(VCPKG_TARGET_IS_IOS ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(VCPKG_TARGET_IS_LINUX 1) + set(VCPKG_TARGET_IS_LINUX ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") - set(VCPKG_TARGET_IS_ANDROID 1) + set(VCPKG_TARGET_IS_ANDROID ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(VCPKG_TARGET_IS_FREEBSD 1) + set(VCPKG_TARGET_IS_FREEBSD ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") - set(VCPKG_TARGET_IS_OPENBSD 1) + set(VCPKG_TARGET_IS_OPENBSD ON) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") - set(VCPKG_TARGET_IS_WINDOWS 1) - set(VCPKG_TARGET_IS_MINGW 1) + set(VCPKG_TARGET_IS_WINDOWS ON) + set(VCPKG_TARGET_IS_MINGW ON) endif() #Helper variables to identify the host system name if (CMAKE_HOST_WIN32) - set(VCPKG_HOST_IS_WINDOWS 1) + set(VCPKG_HOST_IS_WINDOWS ON) elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_HOST_IS_OSX 1) + set(VCPKG_HOST_IS_OSX ON) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") - set(VCPKG_HOST_IS_LINUX 1) + set(VCPKG_HOST_IS_LINUX ON) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") - set(VCPKG_HOST_IS_FREEBSD 1) + set(VCPKG_HOST_IS_FREEBSD ON) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD") - set(VCPKG_HOST_IS_OPENBSD 1) + set(VCPKG_HOST_IS_OPENBSD ON) endif() #Helper variable to identify the host path separator. @@ -152,12 +155,12 @@ endif() # Platforms with libstdc++ if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD OR VCPKG_TARGET_IS_MINGW) - list(APPEND VCPKG_SYSTEM_LIBRARIES [=[stdc\+\+]=]) + list(APPEND VCPKG_SYSTEM_LIBRARIES [[stdc\+\+]]) endif() # Platforms with libc++ if(VCPKG_TARGET_IS_OSX) - list(APPEND VCPKG_SYSTEM_LIBRARIES [=[c\+\+]=]) + list(APPEND VCPKG_SYSTEM_LIBRARIES [[c\+\+]]) endif() # Platforms with librt @@ -199,5 +202,5 @@ if(VCPKG_TARGET_IS_WINDOWS) list(APPEND VCPKG_SYSTEM_LIBRARIES wsock32) list(APPEND VCPKG_SYSTEM_LIBRARIES Ws2_32) list(APPEND VCPKG_SYSTEM_LIBRARIES wldap32) - list(APPEND VCPKG_SYSTEM_LIBRARIES crypt32) + list(APPEND VCPKG_SYSTEM_LIBRARIES crypt32) endif() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 8800d45eb2f102..1cac9f01587467 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -1,6 +1,8 @@ #[===[.md: # vcpkg_configure_cmake +**This function has been deprecated in favor of `vcpkg_cmake_configure` from the vcpkg-cmake port.** + Configure CMake for Debug and Release builds of a project. ## Usage @@ -67,8 +69,11 @@ This command supplies many common arguments to CMake. To see the full list, exam #]===] function(vcpkg_configure_cmake) - # parse parameters such that semicolons in arguments to OPTIONS don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _csc + if(Z_VCPKG_CMAKE_CONFIGURE_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_configure_cmake in the same port is unsupported.") + endif() + + cmake_parse_arguments(PARSE_ARGV 0 arg "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR;LOGNAME" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" @@ -79,15 +84,15 @@ function(vcpkg_configure_cmake) "however, vcpkg.exe must be rebuilt by re-running bootstrap-vcpkg.bat\n") endif() - if(NOT _csc_LOGNAME) - set(_csc_LOGNAME config-${TARGET_TRIPLET}) + if(NOT arg_LOGNAME) + set(arg_LOGNAME config-${TARGET_TRIPLET}) endif() if(CMAKE_HOST_WIN32) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) + set(arg_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) else() - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + set(arg_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() endif() @@ -98,7 +103,7 @@ function(vcpkg_configure_cmake) set(_TARGETTING_UWP 1) endif() - if(_csc_HOST_ARCHITECTURE STREQUAL "x86") + if(arg_HOST_ARCHITECTURE STREQUAL "x86") # Prebuilt ninja binaries are only provided for x64 hosts set(NINJA_CAN_BE_USED OFF) set(NINJA_HOST OFF) @@ -107,9 +112,9 @@ function(vcpkg_configure_cmake) set(NINJA_CAN_BE_USED OFF) endif() - if(_csc_GENERATOR) - set(GENERATOR ${_csc_GENERATOR}) - elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) + if(arg_GENERATOR) + set(GENERATOR ${arg_GENERATOR}) + elseif(arg_PREFER_NINJA AND NINJA_CAN_BE_USED) set(GENERATOR "Ninja") elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT _TARGETTING_UWP)) set(GENERATOR "Ninja") @@ -164,13 +169,13 @@ function(vcpkg_configure_cmake) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) vcpkg_add_to_path("${NINJA_PATH}") - list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") + list(APPEND arg_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") if(_TARGETTING_UWP AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) @@ -179,13 +184,13 @@ function(vcpkg_configure_cmake) endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) - list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) + list(APPEND arg_OPTIONS -DBUILD_SHARED_LIBS=ON) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) + list(APPEND arg_OPTIONS -DBUILD_SHARED_LIBS=OFF) else() message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " @@ -203,7 +208,7 @@ function(vcpkg_configure_cmake) check_both_vars_are_set(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) set(VCPKG_SET_CHARSET_FLAG ON) - if(_csc_NO_CHARSET_FLAG) + if(arg_NO_CHARSET_FLAG) set(VCPKG_SET_CHARSET_FLAG OFF) endif() @@ -228,7 +233,7 @@ function(vcpkg_configure_cmake) endif() - list(APPEND _csc_OPTIONS + list(APPEND arg_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" @@ -260,7 +265,7 @@ function(vcpkg_configure_cmake) ) if(DEFINED ARCH) - list(APPEND _csc_OPTIONS + list(APPEND arg_OPTIONS "-A${ARCH}" ) endif() @@ -268,23 +273,23 @@ function(vcpkg_configure_cmake) # Sets configuration variables for macOS builds foreach(config_var INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES) if(DEFINED VCPKG_${config_var}) - list(APPEND _csc_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") + list(APPEND arg_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") endif() endforeach() set(rel_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" + ${CMAKE_COMMAND} ${arg_SOURCE_PATH} "${arg_OPTIONS}" "${arg_OPTIONS_RELEASE}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}) set(dbg_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_DEBUG}" + ${CMAKE_COMMAND} ${arg_SOURCE_PATH} "${arg_OPTIONS}" "${arg_OPTIONS_DEBUG}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) - list(APPEND _csc_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") + if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE) + list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) @@ -319,7 +324,7 @@ function(vcpkg_configure_cmake) vcpkg_execute_required_process( COMMAND ninja -v WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure - LOGNAME ${_csc_LOGNAME} + LOGNAME ${arg_LOGNAME} ) else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") @@ -328,7 +333,7 @@ function(vcpkg_configure_cmake) vcpkg_execute_required_process( COMMAND ${dbg_command} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME ${_csc_LOGNAME}-dbg + LOGNAME ${arg_LOGNAME}-dbg ) endif() @@ -338,10 +343,10 @@ function(vcpkg_configure_cmake) vcpkg_execute_required_process( COMMAND ${rel_command} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME ${_csc_LOGNAME}-rel + LOGNAME ${arg_LOGNAME}-rel ) endif() endif() - set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) + set(Z_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index db91420b65e8f8..dd489db0219ca0 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -3,78 +3,70 @@ Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. -## Usage ```cmake -vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) +vcpkg_copy_pdbs( + [BUILD_PATHS ...]) ``` -## Notes -This command should always be called by portfiles after they have finished rearranging the binary output. +The ``s are patterns which will be passed to `file(GLOB_RECURSE)`, +for locating DLLs. It defaults to using: + +- `${CURRENT_PACKAGES_DIR}/bin/*.dll` +- `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll` -## Parameters -### BUILD_PATHS -Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. +since that is generally where DLLs are located. -Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output. ## Examples * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) #]===] - function(vcpkg_copy_pdbs) - # parse parameters such that semicolons in options arguments to COMMAND don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _vcp "" "" "BUILD_PATHS") - - if(NOT _vcp_BUILD_PATHS) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "" "BUILD_PATHS") + + if(NOT DEFINED arg_BUILD_PATHS) set( - _vcp_BUILD_PATHS - ${CURRENT_PACKAGES_DIR}/bin/*.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll + arg_BUILD_PATHS + "${CURRENT_PACKAGES_DIR}/bin/*.dll" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.dll" ) endif() - function(merge_filelist OUTVAR INVAR) - set(MSG "") - foreach(VAR ${${INVAR}}) - set(MSG "${MSG} ${VAR}\n") - endforeach() - set(${OUTVAR} ${MSG} PARENT_SCOPE) - endfunction() - - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND NOT VCPKG_TARGET_IS_MINGW) - file(GLOB_RECURSE DLLS ${_vcp_BUILD_PATHS}) + set(dlls_without_matching_pdbs) - set(DLLS_WITHOUT_MATCHING_PDBS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + file(GLOB_RECURSE dlls ${arg_BUILD_PATHS}) - set(PREVIOUS_VSLANG $ENV{VSLANG}) + set(vslang_backup "$ENV{VSLANG}") set(ENV{VSLANG} 1033) - foreach(DLL ${DLLS}) - execute_process(COMMAND dumpbin /PDBPATH ${DLL} + foreach(dll IN LISTS dlls) + execute_process(COMMAND dumpbin /PDBPATH ${dll} COMMAND findstr PDB - OUTPUT_VARIABLE PDB_LINE + OUTPUT_VARIABLE pdb_line ERROR_QUIET RESULT_VARIABLE error_code ) - if(NOT error_code AND PDB_LINE MATCHES "PDB file found at") - string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes - string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes - get_filename_component(DLL_DIR ${DLL} DIRECTORY) - file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR}) + if(NOT error_code AND pdb_line MATCHES "PDB file found at") + string(REGEX MATCH [['.*']] pdb_path "${pdb_line}") # Extract the path which is in single quotes + string(REPLACE "'" "" pdb_path "${pdb_path}") # Remove single quotes + get_filename_component(dll_dir "${dll}" DIRECTORY) + file(COPY "${pdb_path}" DESTINATION "${dll_dir}") else() - list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL}) + list(APPEND dlls_without_matching_pdbs "${dll}") endif() endforeach() - set(ENV{VSLANG} ${PREVIOUS_VSLANG}) + set(ENV{VSLANG} "${vslang_backup}") - list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) - if(UNMATCHED_DLLS_LENGTH GREATER 0) - merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) - message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}") + list(LENGTH dlls_without_matching_pdbs unmatched_dlls_length) + if(unmatched_dlls_length GREATER 0) + list(JOIN dlls_without_matching_pdbs "\n " message) + message(WARNING "Could not find a matching pdb file for:${message}\n") endif() endif() diff --git a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake index bef245b5acea7d..633b40b1aec571 100644 --- a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake @@ -54,7 +54,6 @@ Specifies that the default removal of the top level folder should not occur. * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) #]===] -include(vcpkg_apply_patches) include(vcpkg_extract_source_archive) function(vcpkg_extract_source_archive_ex) @@ -142,7 +141,7 @@ function(vcpkg_extract_source_archive_ex) set (QUIET) endif() - vcpkg_apply_patches( + z_vcpkg_apply_patches( ${QUIET} SOURCE_PATH ${TEMP_SOURCE_PATH} PATCHES ${_vesae_PATCHES} diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 96b59c5c65f7c3..dc8fb668ec5355 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -149,17 +149,17 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON3") if(CMAKE_HOST_WIN32) set(PROGNAME python) - set(PYTHON_VERSION 3.9.0) + set(PYTHON_VERSION 3.9.2) if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) set(SUBDIR "python-${PYTHON_VERSION}-x86") set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-win32.zip") set(ARCHIVE "python-${PYTHON_VERSION}-embed-win32.zip") - set(HASH 1501ad0b3ed1053466bef303e639c4d5cd9c270beacd07d70fb631db15503ea9e1f9de054cafe8759403e77aa898cd8b8878bf9024add4c081b28a4c5a9947ed) + set(HASH d792c6179887120ec3e945764b95ae8187032e1779f327feb90ded40ebd39cb78d000056df947f28c9e4257b60dd95ee43a3f77f47a1d8878cbe37ebc20f87a3) else() set(SUBDIR "python-${PYTHON_VERSION}-x64") set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip") set(ARCHIVE "python-${PYTHON_VERSION}-embed-amd64.zip") - set(HASH e969622b74ea79a6adcf41b4d628bd80c9320df2f3d797905872610172838f1ab70d9bb0c70fcf7da396e03c3a73de96fa69a4b212b26f97de0e4f3366accf51) + set(HASH 30f36938d264d160136eb7062846924b980b4f8f4373dab4fbc054c764041149f56760370de571be10410363563c5688a3f1f9ac19be5bb40ae914ddbdcb3c62) endif() set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E rm python39._pth) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 2da44f551eea77..d4eae04a651121 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -1,6 +1,8 @@ #[===[.md: # vcpkg_fixup_cmake_targets +**This function has been deprecated in favor of `vcpkg_cmake_config_fixup` from the vcpkg-cmake-config port.** + Merge release and debug CMake targets and configs to support multiconfig generators. Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. @@ -23,7 +25,7 @@ This needs to be specified if the port name differs from the `find_package()` na Defaults to `share/${PORT}`. -### DO_NOT_DELETE_PARENT_CONFIG_PATH +### DO_NOT_DELETE_PARENT_CONFIG_PATH By default the parent directory of CONFIG_PATH is removed if it is named "cmake". Passing this option disable such behavior, as it is convenient for ports that install more than one CMake package configuration file. @@ -51,31 +53,34 @@ Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targe #]===] function(vcpkg_fixup_cmake_targets) - # parse parameters such that semicolons in options arguments to COMMAND don't get erased - cmake_parse_arguments(PARSE_ARGV 0 _vfct "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH;NO_PREFIX_CORRECTION" "") + if(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake-config; using both vcpkg-cmake-config and vcpkg_fixup_cmake_targets in the same port is unsupported.") + endif() - if(_vfct_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") + cmake_parse_arguments(PARSE_ARGV 0 arg "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH;NO_PREFIX_CORRECTION" "") + + if(arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - if(NOT _vfct_TARGET_PATH) - set(_vfct_TARGET_PATH share/${PORT}) + if(NOT arg_TARGET_PATH) + set(arg_TARGET_PATH share/${PORT}) endif() string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") - set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${_vfct_TARGET_PATH}) - set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${arg_TARGET_PATH}) + set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${arg_TARGET_PATH}) - if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") - if(_vfct_CONFIG_PATH STREQUAL "share") + if(arg_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + if(arg_CONFIG_PATH STREQUAL "share") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share2) file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/share2) - set(_vfct_CONFIG_PATH share2) + set(arg_CONFIG_PATH share2) endif() - set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) - set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) + set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}) + set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if(NOT EXISTS ${DEBUG_CONFIG}) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") @@ -95,13 +100,13 @@ function(vcpkg_fixup_cmake_targets) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${DEBUG_CONFIG}) else() get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) endif() endif() @@ -109,13 +114,13 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${RELEASE_CONFIG}) else() get_filename_component(RELEASE_CONFIG_PARENT_DIR ${RELEASE_CONFIG} DIRECTORY) get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${RELEASE_CONFIG_PARENT_DIR}) endif() endif() @@ -165,18 +170,18 @@ function(vcpkg_fixup_cmake_targets) endforeach() endif() - #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; #Since those can be renamed we have to check in every *.cmake file(GLOB_RECURSE MAIN_CMAKES "${RELEASE_SHARE}/*.cmake") foreach(MAIN_CMAKE IN LISTS MAIN_CMAKES) file(READ ${MAIN_CMAKE} _contents) #This correction is not correct for all cases. To make it correct for all cases it needs to consider - #original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which - #is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although + #original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which + #is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although #this requirement is only true for the *Config.cmake. The targets are not required to be in the same #folder as the *Config.cmake! - if(NOT _vfct_NO_PREFIX_CORRECTION) + if(NOT arg_NO_PREFIX_CORRECTION) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" @@ -196,7 +201,7 @@ function(vcpkg_fixup_cmake_targets) #an imported target for it. We could add more logic here to identify defect target files. #Since the replacement here in a multi config build always requires a generator expression #in front of the absoulte path to ${CURRENT_INSTALLED_DIR}. So the match should always be at - #least >:${CURRENT_INSTALLED_DIR}. + #least >:${CURRENT_INSTALLED_DIR}. #In general the following generator expressions should be there: #\$<\$:${CURRENT_INSTALLED_DIR}/debug/lib/somelib> #and/or @@ -228,4 +233,4 @@ function(vcpkg_fixup_cmake_targets) endforeach() endfunction() - + diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index a1ba0cf2fb0922..82e6af05d8a99e 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,6 +1,8 @@ #[===[.md: # vcpkg_install_cmake +**This function has been deprecated in favor of `vcpkg_cmake_install` from the vcpkg-cmake port.** + Build and install a cmake project. ## Usage: @@ -24,5 +26,25 @@ parameter. #]===] function(vcpkg_install_cmake) - vcpkg_build_cmake(LOGFILE_ROOT install TARGET install ${ARGN}) + if(Z_VCPKG_CMAKE_INSTALL_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_install_cmake in the same port is unsupported.") + endif() + + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(args) + foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH) + if(arg_${arg}) + list(APPEND args "${arg}") + endif() + endforeach() + + vcpkg_build_cmake(Z_VCPKG_DISABLE_DEPRECATION MESSAGE + ${args} + LOGFILE_ROOT install + TARGET install + ) endfunction() diff --git a/scripts/cmake/z_vcpkg_apply_patches.cmake b/scripts/cmake/z_vcpkg_apply_patches.cmake new file mode 100644 index 00000000000000..3f91757490e5c4 --- /dev/null +++ b/scripts/cmake/z_vcpkg_apply_patches.cmake @@ -0,0 +1,67 @@ +#[===[.md: +# z_vcpkg_apply_patches + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** + +Apply a set of patches to a source tree. + +```cmake +z_vcpkg_apply_patches( + SOURCE_PATH + [QUIET] + PATCHES ... +) +``` + +The `` should be set to `${SOURCE_PATH}` by convention, +and is the path to apply the patches in. + +`z_vcpkg_apply_patches` will take the list of ``es, +which are by default relative to the port directory, +and apply them in order using `git apply`. +Generally, these ``es take the form of `some.patch` +to select patches in the port directory. +One may also download patches and use `${VCPKG_DOWNLOADS}/path/to/some.patch`. + +If `QUIET` is not passed, it is a fatal error for a patch to fail to apply; +otherwise, if `QUIET` is passed, no message is printed. +This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. +#]===] + +function(z_vcpkg_apply_patches) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES") + + find_program(GIT NAMES git git.cmd REQUIRED) + if(DEFINED ENV{GIT_CONFIG_NOSYSTEM}) + set(git_config_nosystem_backuP "$ENV{GIT_CONFIG_NOSYSTEM}") + else() + unset(git_config_nosystem_backup) + endif() + + set(ENV{GIT_CONFIG_NOSYSTEM} 1) + set(patchnum 0) + foreach(patch IN LISTS arg_PATCHES) + get_filename_component(absolute_patch "${patch}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") + message(STATUS "Applying patch ${patch}") + set(logname patch-${TARGET_TRIPLET}-${patchnum}) + vcpkg_execute_in_download_mode( + COMMAND "${GIT}" -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply "${absolute_patch}" --ignore-whitespace --whitespace=nowarn --verbose + OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/${logname}-out.log" + ERROR_VARIABLE error + WORKING_DIRECTORY "${arg_SOURCE_PATH}" + RESULT_VARIABLE error_code + ) + file(WRITE "${CURRENT_BUILDTREES_DIR}/${logname}-err.log" "${error}") + + if(error_code AND NOT arg_QUIET) + message(FATAL_ERROR "Applying patch failed: ${error}") + endif() + + math(EXPR patchnum "${patchnum} + 1") + endforeach() + if(DEFINED git_config_nosystem_backup) + set(ENV{GIT_CONFIG_NOSYSTEM} "${git_config_nosystem_backup}") + else() + unset(ENV{GIT_CONFIG_NOSYSTEM}) + endif() +endfunction() diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 68f2cbba721e82..4adb481493abde 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -10,6 +10,11 @@ function(debug_message) message(STATUS "[DEBUG] " "${ARG_STRING}") endif() endfunction() +function(z_vcpkg_deprecation_message) + z_vcpkg_function_arguments(ARGS) + list(JOIN ARGS " " ARG_STRING) + message(DEPRECATION "${ARG_STRING}") +endfunction() option(_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES "Controls whether use of a backcompat only support feature fails the build.") if (_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES) @@ -18,7 +23,7 @@ else() set(Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "WARNING") endif() -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${SCRIPTS}/cmake") include("${SCRIPTS}/cmake/vcpkg_minimum_required.cmake") vcpkg_minimum_required(VERSION 2021-01-13) @@ -74,6 +79,9 @@ if(CMD MATCHES "^BUILD$") endforeach() endif() + 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") + set(TRIPLET_SYSTEM_ARCH "${VCPKG_TARGET_ARCHITECTURE}") include("${SCRIPTS}/cmake/vcpkg_common_definitions.cmake") include("${SCRIPTS}/cmake/execute_process.cmake") @@ -128,6 +136,7 @@ if(CMD MATCHES "^BUILD$") include("${SCRIPTS}/cmake/vcpkg_replace_string.cmake") include("${SCRIPTS}/cmake/vcpkg_test_cmake.cmake") + include("${SCRIPTS}/cmake/z_vcpkg_apply_patches.cmake") include("${SCRIPTS}/cmake/z_vcpkg_prettify_command_line.cmake") include("${CURRENT_PORT_DIR}/portfile.cmake") diff --git a/scripts/vcpkg.schema.json b/scripts/vcpkg.schema.json index c485aa4158d189..215f5dd9c998ab 100644 --- a/scripts/vcpkg.schema.json +++ b/scripts/vcpkg.schema.json @@ -128,6 +128,10 @@ "$ref": "#/definitions/identifier" } }, + "host": { + "type": "boolean", + "default": false + }, "default-features": { "type": "boolean", "default": true @@ -190,9 +194,6 @@ "description": "A package feature that can be activated by consumers.", "type": "object", "properties": { - "name": { - "$ref": "#/definitions/identifier" - }, "description": { "$ref": "#/definitions/description-field" }, @@ -208,7 +209,6 @@ "^\\$": {} }, "required": [ - "name", "description" ], "additionalProperties": false @@ -279,10 +279,13 @@ } }, "features": { - "description": "An array of features supported by the package", - "type": "array", - "items": { - "$ref": "#/definitions/feature" + "description": "An object of features supported by the package", + "type": "object", + "patternProperties": { + "^\\$": {}, + "^[a-z-]+": { + "$ref": "#/definitions/feature" + } } }, "default-features": { diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 0ef21fd4d7cef5..50e0476fec7515 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,11 +1,11 @@ - 3.8.3 + 3.9.2 python.exe - https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-win32.zip - 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a - python-3.8.3-embed-win32.zip + https://www.python.org/ftp/python/3.9.2/python-3.9.2-embed-win32.zip + d792c6179887120ec3e945764b95ae8187032e1779f327feb90ded40ebd39cb78d000056df947f28c9e4257b60dd95ee43a3f77f47a1d8878cbe37ebc20f87a3 + python-3.9.2-embed-win32.zip 3.19.2 diff --git a/versions/a-/amqpcpp.json b/versions/a-/amqpcpp.json index 2372b1eb225339..433990e23f50b5 100644 --- a/versions/a-/amqpcpp.json +++ b/versions/a-/amqpcpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7f99b7612476d68b1cd6a026696741da9b90c230", + "version-string": "4.3.11", + "port-version": 0 + }, { "git-tree": "21de530c9f72229e46bff4a9d39036a4e355941e", "version-string": "4.1.7", diff --git a/versions/a-/azure-kinect-sensor-sdk.json b/versions/a-/azure-kinect-sensor-sdk.json index 9a466c027b0180..8e0136949b48dc 100644 --- a/versions/a-/azure-kinect-sensor-sdk.json +++ b/versions/a-/azure-kinect-sensor-sdk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c1df96d95d7403ee8b37344e4caf39184b410cb5", + "version-string": "1.4.1", + "port-version": 0 + }, { "git-tree": "dfd54f8c9eeba870d560c0a157996357aeda331c", "version-string": "1.4.0-alpha.0", diff --git a/versions/b-/boost-context.json b/versions/b-/boost-context.json index a379f68d36ddcd..507e3dcc722078 100644 --- a/versions/b-/boost-context.json +++ b/versions/b-/boost-context.json @@ -1,5 +1,15 @@ { "versions": [ + { + "git-tree": "fbf3476b81167645a5f053adfdb7f2bf9a4f4c44", + "version-string": "1.75.0", + "port-version": 2 + }, + { + "git-tree": "7f3c7f2174e6d43195a6468272d27bf68b12b56b", + "version-string": "1.75.0", + "port-version": 1 + }, { "git-tree": "a122c48db7645becfa084e9af1e57035870cb806", "version-string": "1.75.0", diff --git a/versions/b-/boost-modular-build-helper.json b/versions/b-/boost-modular-build-helper.json index 1523a44b1634bc..90aa6580af0c31 100644 --- a/versions/b-/boost-modular-build-helper.json +++ b/versions/b-/boost-modular-build-helper.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "71c0db71c5cdc6d6516ba3c15dfd4ad8d5e3834d", + "version-string": "1.75.0", + "port-version": 6 + }, { "git-tree": "b88a7b8df97734c03d2abaa3c562dfbfab07dbea", "version-string": "1.75.0", diff --git a/versions/b-/box2d.json b/versions/b-/box2d.json index 8999b7937d1a33..419e840df12085 100644 --- a/versions/b-/box2d.json +++ b/versions/b-/box2d.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "fc279cfa6011af543c0b1ebb043767acd13a7930", + "version-semver": "2.4.1", + "port-version": 0 + }, { "git-tree": "61a9394741ba7f08404d1c7f2b77a9d8b9456bc2", "version-string": "2.4.0", diff --git a/versions/b-/brotli.json b/versions/b-/brotli.json index 16c653fcd64b5e..248f9d41bc5429 100644 --- a/versions/b-/brotli.json +++ b/versions/b-/brotli.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8f55fe158d8bd753a6e6908164e03ae4f0b73cea", + "version-string": "1.0.9", + "port-version": 1 + }, { "git-tree": "4aaf6f174ede5bc58872943a5e32d96c5e0d45da", "version-string": "1.0.9", diff --git a/versions/b-/brynet.json b/versions/b-/brynet.json index ab15b0478296c8..8c93cbc19d0d99 100644 --- a/versions/b-/brynet.json +++ b/versions/b-/brynet.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2024f1be91419c1ce3f2df23b3d4facaadcfc7fc", + "version-string": "1.10.0", + "port-version": 0 + }, { "git-tree": "bad044dbd66d5067fee727b602485d30c4ab2c09", "version-string": "1.0.7", diff --git a/versions/baseline.json b/versions/baseline.json index e0a25ac7df8276..9038ec334e41a9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -65,7 +65,7 @@ "port-version": 0 }, "amqpcpp": { - "baseline": "4.1.7", + "baseline": "4.3.11", "port-version": 0 }, "anax": { @@ -257,8 +257,8 @@ "port-version": 0 }, "azure-kinect-sensor-sdk": { - "baseline": "1.4.0-alpha.0", - "port-version": 6 + "baseline": "1.4.1", + "port-version": 0 }, "azure-macro-utils-c": { "baseline": "2020-06-17", @@ -494,7 +494,7 @@ }, "boost-context": { "baseline": "1.75.0", - "port-version": 0 + "port-version": 2 }, "boost-contract": { "baseline": "1.75.0", @@ -698,7 +698,7 @@ }, "boost-modular-build-helper": { "baseline": "1.75.0", - "port-version": 5 + "port-version": 6 }, "boost-move": { "baseline": "1.75.0", @@ -1001,7 +1001,7 @@ "port-version": 0 }, "box2d": { - "baseline": "2.4.0", + "baseline": "2.4.1", "port-version": 0 }, "breakpad": { @@ -1014,7 +1014,7 @@ }, "brotli": { "baseline": "1.0.9", - "port-version": 0 + "port-version": 1 }, "brpc": { "baseline": "0.9.7", @@ -1025,7 +1025,7 @@ "port-version": 0 }, "brynet": { - "baseline": "1.0.7", + "baseline": "1.10.0", "port-version": 0 }, "bullet3": { @@ -1121,7 +1121,7 @@ "port-version": 0 }, "celero": { - "baseline": "2.6.0-1", + "baseline": "2.7.2", "port-version": 0 }, "cello": { @@ -1309,7 +1309,7 @@ "port-version": 1 }, "concurrentqueue": { - "baseline": "1.0.2", + "baseline": "1.0.3", "port-version": 0 }, "console-bridge": { @@ -1345,7 +1345,7 @@ "port-version": 0 }, "cpp-httplib": { - "baseline": "0.7.18", + "baseline": "0.8.4", "port-version": 0 }, "cpp-netlib": { @@ -1469,7 +1469,7 @@ "port-version": 0 }, "crow": { - "baseline": "0.1-1", + "baseline": "0.2", "port-version": 0 }, "cryptopp": { @@ -1849,7 +1849,7 @@ "port-version": 0 }, "exprtk": { - "baseline": "2020-09-14", + "baseline": "2021-01-01", "port-version": 0 }, "ezc3d": { @@ -1922,7 +1922,7 @@ }, "ffmpeg": { "baseline": "4.3.1", - "port-version": 11 + "port-version": 12 }, "ffnvcodec": { "baseline": "10.0.26.0", @@ -1994,7 +1994,7 @@ }, "fmt": { "baseline": "7.1.3", - "port-version": 0 + "port-version": 1 }, "folly": { "baseline": "2020.10.19.00", @@ -2021,7 +2021,7 @@ "port-version": 0 }, "fplus": { - "baseline": "0.2.3-p0", + "baseline": "0.2.13-p0", "port-version": 0 }, "freeglut": { @@ -2077,19 +2077,23 @@ "port-version": 0 }, "functions-framework-cpp": { - "baseline": "0.4.0", + "baseline": "0.5.0", "port-version": 0 }, "fuzzylite": { "baseline": "6.0", "port-version": 3 }, + "fxdiv": { + "baseline": "2021-02-21", + "port-version": 0 + }, "g2o": { "baseline": "2020-02-07", "port-version": 1 }, "g3log": { - "baseline": "2019-07-29", + "baseline": "1.3.4", "port-version": 0 }, "gainput": { @@ -2149,7 +2153,7 @@ "port-version": 0 }, "geos": { - "baseline": "3.9.0", + "baseline": "3.9.1", "port-version": 0 }, "geotrans": { @@ -2226,11 +2230,11 @@ }, "glm": { "baseline": "0.9.9.8", - "port-version": 0 + "port-version": 1 }, "globjects": { - "baseline": "1.1.0-3", - "port-version": 0 + "baseline": "1.1.0", + "port-version": 4 }, "glog": { "baseline": "0.4.0-3", @@ -2261,7 +2265,7 @@ "port-version": 3 }, "google-cloud-cpp": { - "baseline": "1.24.0", + "baseline": "1.25.0", "port-version": 2 }, "google-cloud-cpp-common": { @@ -2374,12 +2378,16 @@ }, "harfbuzz": { "baseline": "2.7.4", - "port-version": 0 + "port-version": 1 }, "hayai": { "baseline": "2019-08-10", "port-version": 0 }, + "hazelcast-cpp-client": { + "baseline": "4.0.1", + "port-version": 0 + }, "hdf5": { "baseline": "1.12.0", "port-version": 0 @@ -2410,7 +2418,7 @@ }, "hiredis": { "baseline": "1.0.0", - "port-version": 0 + "port-version": 1 }, "hpx": { "baseline": "1.6.0", @@ -2534,7 +2542,7 @@ }, "imgui": { "baseline": "1.81", - "port-version": 1 + "port-version": 2 }, "imgui-sfml": { "baseline": "2.1-2", @@ -2605,8 +2613,8 @@ "port-version": 5 }, "itpp": { - "baseline": "4.3.1-5", - "port-version": 0 + "baseline": "4.3.1", + "port-version": 6 }, "ixwebsocket": { "baseline": "11.0.4", @@ -2797,7 +2805,7 @@ "port-version": 1 }, "krabsetw": { - "baseline": "4.1.14", + "baseline": "4.1.18", "port-version": 0 }, "ktx": { @@ -3028,6 +3036,10 @@ "baseline": "1.1.0", "port-version": 0 }, + "libgnutls": { + "baseline": "3.6.15", + "port-version": 0 + }, "libgo": { "baseline": "3.1-1", "port-version": 0 @@ -3064,6 +3076,10 @@ "baseline": "2020.08.30", "port-version": 0 }, + "libhv": { + "baseline": "1.0.0", + "port-version": 0 + }, "libhydrogen": { "baseline": "2019-08-11", "port-version": 0 @@ -3137,7 +3153,7 @@ "port-version": 0 }, "liblsl": { - "baseline": "1.13.1", + "baseline": "1.14.0", "port-version": 0 }, "liblzma": { @@ -3206,7 +3222,7 @@ }, "libmysql": { "baseline": "8.0.20", - "port-version": 1 + "port-version": 2 }, "libnice": { "baseline": "0.1.15", @@ -3216,6 +3232,10 @@ "baseline": "1.0.0", "port-version": 1 }, + "libnop": { + "baseline": "2021-03-01", + "port-version": 0 + }, "libodb": { "baseline": "2.4.0-6", "port-version": 0 @@ -3281,7 +3301,7 @@ "port-version": 0 }, "libpmemobj-cpp": { - "baseline": "1.11", + "baseline": "1.12", "port-version": 0 }, "libpng": { @@ -3294,7 +3314,7 @@ }, "libpq": { "baseline": "12.2", - "port-version": 11 + "port-version": 12 }, "libpqxx": { "baseline": "7.3.1", @@ -3429,7 +3449,11 @@ "port-version": 0 }, "libsvm": { - "baseline": "323-1", + "baseline": "323", + "port-version": 2 + }, + "libtasn1": { + "baseline": "4.16.0", "port-version": 0 }, "libtheora": { @@ -3449,7 +3473,7 @@ "port-version": 0 }, "libtorrent": { - "baseline": "1.2.11", + "baseline": "1.2.12", "port-version": 0 }, "libu2f-server": { @@ -3513,8 +3537,8 @@ "port-version": 3 }, "libwebm": { - "baseline": "1.0.0.27-5", - "port-version": 0 + "baseline": "1.0.0.27", + "port-version": 6 }, "libwebp": { "baseline": "1.1.0", @@ -3598,7 +3622,7 @@ }, "llvm": { "baseline": "11.0.0", - "port-version": 0 + "port-version": 1 }, "lmdb": { "baseline": "0.9.24", @@ -3629,7 +3653,7 @@ "port-version": 0 }, "lua": { - "baseline": "5.4.1", + "baseline": "5.4.2", "port-version": 0 }, "luabridge": { @@ -3861,7 +3885,7 @@ "port-version": 1 }, "mongoose": { - "baseline": "6.15-2", + "baseline": "7.1", "port-version": 0 }, "monkeys-audio": { @@ -3961,8 +3985,8 @@ "port-version": 0 }, "msix": { - "baseline": "1.7-2", - "port-version": 0 + "baseline": "1.7", + "port-version": 3 }, "msmpi": { "baseline": "10.1", @@ -4365,7 +4389,7 @@ "port-version": 0 }, "openssl": { - "baseline": "1.1.1i", + "baseline": "1.1.1j", "port-version": 0 }, "openssl-unix": { @@ -4482,7 +4506,7 @@ }, "pangolin": { "baseline": "0.5", - "port-version": 11 + "port-version": 12 }, "pangomm": { "baseline": "2.40.1", @@ -4686,7 +4710,11 @@ }, "poppler": { "baseline": "20.12.1", - "port-version": 3 + "port-version": 4 + }, + "popsift": { + "baseline": "0.9", + "port-version": 0 }, "portable-snippets": { "baseline": "2019-09-20", @@ -4722,7 +4750,7 @@ }, "proj4": { "baseline": "7.2.1", - "port-version": 0 + "port-version": 1 }, "prometheus-cpp": { "baseline": "0.12.1", @@ -4737,7 +4765,7 @@ "port-version": 0 }, "protopuf": { - "baseline": "1.0.0", + "baseline": "1.0.1", "port-version": 0 }, "protozero": { @@ -4752,6 +4780,10 @@ "baseline": "1.0.0", "port-version": 0 }, + "psimd": { + "baseline": "2021-02-21", + "port-version": 0 + }, "ptex": { "baseline": "2.3.2", "port-version": 2 @@ -4781,8 +4813,8 @@ "port-version": 0 }, "python3": { - "baseline": "3.9.0", - "port-version": 3 + "baseline": "3.9.2", + "port-version": 0 }, "qca": { "baseline": "2.3.1", @@ -4801,7 +4833,7 @@ "port-version": 0 }, "qscintilla": { - "baseline": "2.11.4-2", + "baseline": "2.12.0", "port-version": 0 }, "qt-advanced-docking-system": { @@ -5093,8 +5125,8 @@ "port-version": 0 }, "realsense2": { - "baseline": "2.40.0", - "port-version": 1 + "baseline": "2.42.0", + "port-version": 0 }, "recast": { "baseline": "1.5.1-3", @@ -5180,6 +5212,10 @@ "baseline": "2020-09-14", "port-version": 0 }, + "rsasynccpp": { + "baseline": "0.0.7", + "port-version": 0 + }, "rsocket": { "baseline": "2020.05.04.00-1", "port-version": 0 @@ -5245,7 +5281,7 @@ "port-version": 0 }, "scintilla": { - "baseline": "4.4.5", + "baseline": "4.4.6", "port-version": 0 }, "sciter": { @@ -5282,7 +5318,7 @@ }, "sdl2": { "baseline": "2.0.14", - "port-version": 2 + "port-version": 3 }, "sdl2-gfx": { "baseline": "1.0.4", @@ -5309,7 +5345,7 @@ "port-version": 0 }, "seal": { - "baseline": "3.6.1", + "baseline": "3.6.2", "port-version": 0 }, "secp256k1": { @@ -5325,7 +5361,7 @@ "port-version": 0 }, "sentry-native": { - "baseline": "0.4.7", + "baseline": "0.4.8", "port-version": 0 }, "septag-sx": { @@ -5445,7 +5481,7 @@ "port-version": 0 }, "sobjectizer": { - "baseline": "5.7.2.2", + "baseline": "5.7.2.3", "port-version": 0 }, "soci": { @@ -5593,7 +5629,7 @@ "port-version": 0 }, "sqlite3": { - "baseline": "3.33.0", + "baseline": "3.34.1", "port-version": 0 }, "sqlitecpp": { @@ -5689,7 +5725,7 @@ "port-version": 0 }, "taglib": { - "baseline": "1.11.1-20190531", + "baseline": "1.12.0", "port-version": 0 }, "taocpp-json": { @@ -5921,7 +5957,7 @@ "port-version": 0 }, "trantor": { - "baseline": "1.2.0", + "baseline": "1.3.0", "port-version": 0 }, "tre": { @@ -6065,7 +6101,7 @@ "port-version": 0 }, "uwebsockets": { - "baseline": "18.13.0", + "baseline": "19.0.0", "port-version": 0 }, "v-hacd": { @@ -6096,6 +6132,14 @@ "baseline": "1.0.1", "port-version": 0 }, + "vcpkg-cmake": { + "baseline": "2021-02-28", + "port-version": 0 + }, + "vcpkg-cmake-config": { + "baseline": "2021-02-26", + "port-version": 0 + }, "vcpkg-gfortran": { "baseline": "3", "port-version": 0 @@ -6185,8 +6229,8 @@ "port-version": 0 }, "wil": { - "baseline": "2020-05-19", - "port-version": 1 + "baseline": "2021-02-04", + "port-version": 0 }, "wildmidi": { "baseline": "0.4.3-1", diff --git a/versions/c-/celero.json b/versions/c-/celero.json index 16a9ece3871643..a1baf67c079a36 100644 --- a/versions/c-/celero.json +++ b/versions/c-/celero.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "25d338809366c358afe158e52694be2a670ab054", + "version-string": "2.7.2", + "port-version": 0 + }, { "git-tree": "754905c9baebd27cf1312f7054403f3e901d5d53", "version-string": "2.6.0-1", diff --git a/versions/c-/concurrentqueue.json b/versions/c-/concurrentqueue.json index db7c25ecd39968..444fe721b1b2f4 100644 --- a/versions/c-/concurrentqueue.json +++ b/versions/c-/concurrentqueue.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "929e70702c63103c0ec48d7de8cfe3da02f699ba", + "version": "1.0.3", + "port-version": 0 + }, { "git-tree": "c3ff6de6bf5fe5a62c4fc71aa6b58aff79d246d2", "version-string": "1.0.2", diff --git a/versions/c-/cpp-httplib.json b/versions/c-/cpp-httplib.json index 61d34e47692122..44e675708cf3d7 100644 --- a/versions/c-/cpp-httplib.json +++ b/versions/c-/cpp-httplib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "809d4b6bc7857c3f787172729508b9af6d11ef78", + "version-string": "0.8.4", + "port-version": 0 + }, { "git-tree": "c91293d5ebdef52d74de927342c75230d17f741f", "version-string": "0.7.18", diff --git a/versions/c-/crow.json b/versions/c-/crow.json index dcbe0b3be7d310..91322832919bdc 100644 --- a/versions/c-/crow.json +++ b/versions/c-/crow.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8af7b33a4f59eec6613b9d8e55f9aac403bb7490", + "version": "0.2", + "port-version": 0 + }, { "git-tree": "5759b9679960c34a0e663f83ad32ba2e1320e2d5", "version-string": "0.1-1", diff --git a/versions/e-/exprtk.json b/versions/e-/exprtk.json index cbfa2ce9b965d5..4cc90df9844c12 100644 --- a/versions/e-/exprtk.json +++ b/versions/e-/exprtk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "497f4b1dc2da32e75f934ba6d0e496a4dc0b01ae", + "version-string": "2021-01-01", + "port-version": 0 + }, { "git-tree": "8052628829fe4c863db89f423ea72afb169db258", "version-string": "2020-09-14", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 2b34eb5c357f2f..e22cc861a9c6d3 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "15e92ca783e70105ccbf4fda0225a2587a760fe9", + "version-string": "4.3.1", + "port-version": 12 + }, { "git-tree": "985bdde5191e69e38ecda3472663614fcd491052", "version-string": "4.3.1", diff --git a/versions/f-/fmt.json b/versions/f-/fmt.json index 504ff0772ba413..9fc6b3c8c739e3 100644 --- a/versions/f-/fmt.json +++ b/versions/f-/fmt.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4f8427eb0bd40da1856d4e67bde39a4fda689d72", + "version": "7.1.3", + "port-version": 1 + }, { "git-tree": "dd8cf5e1a2dce2680189a0744102d4b0f1cfb8b6", "version-string": "7.1.3", diff --git a/versions/f-/fplus.json b/versions/f-/fplus.json index dcf18dfb9b6c4c..d4e5d80e3042b7 100644 --- a/versions/f-/fplus.json +++ b/versions/f-/fplus.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3c2d60588fe82f0001bd8bdf1a7b765c7e51eb6d", + "version-semver": "0.2.13-p0", + "port-version": 0 + }, { "git-tree": "20f3419dc98addfb673ee94bc256aed778dfc568", "version-string": "0.2.3-p0", diff --git a/versions/f-/functions-framework-cpp.json b/versions/f-/functions-framework-cpp.json index 6b03f79b741c79..1e2242af21c3e6 100644 --- a/versions/f-/functions-framework-cpp.json +++ b/versions/f-/functions-framework-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "48d17ad88b188aa35db1a9d18f78b4fa9b9a8e22", + "version": "0.5.0", + "port-version": 0 + }, { "git-tree": "7018d9db8c166cb81ffb1c291535491aad98b339", "version": "0.4.0", diff --git a/versions/f-/fxdiv.json b/versions/f-/fxdiv.json new file mode 100644 index 00000000000000..faae1bc5eb42cc --- /dev/null +++ b/versions/f-/fxdiv.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "58ee7e759479e81a3218ff4d5efb8ada40c40d65", + "version-string": "2021-02-21", + "port-version": 0 + } + ] +} diff --git a/versions/g-/g3log.json b/versions/g-/g3log.json index 87ea9bcf4e48ed..4ad7cbc87cd089 100644 --- a/versions/g-/g3log.json +++ b/versions/g-/g3log.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2d5c7967292d8363c14af69e0b4d37fa9d48dd0e", + "version": "1.3.4", + "port-version": 0 + }, { "git-tree": "dea4491e152ae900d6677244552b14be3bf4c125", "version-string": "2019-07-29", diff --git a/versions/g-/geos.json b/versions/g-/geos.json index bb44976f17fa2e..09e59a000bc404 100644 --- a/versions/g-/geos.json +++ b/versions/g-/geos.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "97c3e5f08174b7f7b4634064f4f2ae6da4351e97", + "version-string": "3.9.1", + "port-version": 0 + }, { "git-tree": "6f0db53a1f1de01b660fe82145abc3f1208f7fc4", "version-string": "3.9.0", diff --git a/versions/g-/glm.json b/versions/g-/glm.json index e1a52539f9bdb3..e7873160aee5dc 100644 --- a/versions/g-/glm.json +++ b/versions/g-/glm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4aafac80f39a72fadaf6a31afb961790678062de", + "version-string": "0.9.9.8", + "port-version": 1 + }, { "git-tree": "14a7c57c30809e4f4c953dd60fa335bb194d0be5", "version-string": "0.9.9.8", diff --git a/versions/g-/globjects.json b/versions/g-/globjects.json index 75d9b7d96859a4..75340cf939c43f 100644 --- a/versions/g-/globjects.json +++ b/versions/g-/globjects.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0d9e98af47d7eb383a98e39c5661e573b1197e8c", + "version-string": "1.1.0", + "port-version": 4 + }, { "git-tree": "b2e73ec8949205afcdcf9c8b7f5e536275f0ed19", "version-string": "1.1.0-3", diff --git a/versions/g-/google-cloud-cpp.json b/versions/g-/google-cloud-cpp.json index db38ac08b80cda..d5f290c76c098c 100644 --- a/versions/g-/google-cloud-cpp.json +++ b/versions/g-/google-cloud-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f6cb8953a3026ff687125228a7149cd23f2ed231", + "version": "1.25.0", + "port-version": 2 + }, { "git-tree": "720f34d5340392fe35e2ed3553b378225c8bb211", "version": "1.24.0", diff --git a/versions/h-/harfbuzz.json b/versions/h-/harfbuzz.json index b21931e21943bf..7bdb4e94c9a0f2 100644 --- a/versions/h-/harfbuzz.json +++ b/versions/h-/harfbuzz.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e985af9b39fb57ee491c1a773c43334665ddb3d3", + "version-string": "2.7.4", + "port-version": 1 + }, { "git-tree": "bb9ea75cd35a35e57fb0bf79ff78818c95148fcf", "version-string": "2.7.4", diff --git a/versions/h-/hazelcast-cpp-client.json b/versions/h-/hazelcast-cpp-client.json new file mode 100644 index 00000000000000..6b24b7591ee09b --- /dev/null +++ b/versions/h-/hazelcast-cpp-client.json @@ -0,0 +1,14 @@ +{ + "versions": [ + { + "git-tree": "1d4ad2dfd6a51e8867868bfa7a2ce80226d767c8", + "version-semver": "4.0.1", + "port-version": 0 + }, + { + "git-tree": "d0f516ea034e3c58e0c1621f4230445eb303a1b0", + "version-semver": "4.0.0", + "port-version": 0 + } + ] +} diff --git a/versions/h-/hiredis.json b/versions/h-/hiredis.json index 5522d98ffdad13..50d4361ee4c3eb 100644 --- a/versions/h-/hiredis.json +++ b/versions/h-/hiredis.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3ce136eecabedaebd15eb4a454c2ecf89f90e9c3", + "version": "1.0.0", + "port-version": 1 + }, { "git-tree": "e9c2ffbff25b0e22f0b09ec594b3f4288f685762", "version-string": "1.0.0", diff --git a/versions/i-/imgui.json b/versions/i-/imgui.json index 4adf95168d208c..29d5d331808f80 100644 --- a/versions/i-/imgui.json +++ b/versions/i-/imgui.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "82e2ab3945def5ecc234f9586425f4dc8cb6d15e", + "version": "1.81", + "port-version": 2 + }, { "git-tree": "6f5ea94c84f8e4d7883a613421ef285960ce7482", "version-string": "1.81", diff --git a/versions/i-/itpp.json b/versions/i-/itpp.json index d016af1d127f7c..6c3a4abd91b11a 100644 --- a/versions/i-/itpp.json +++ b/versions/i-/itpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ef6b3ce5f6b2522df8dc27959244a73581a44b6d", + "version-semver": "4.3.1", + "port-version": 6 + }, { "git-tree": "9a79efa802d935151cca213146c0a7102ca76940", "version-string": "4.3.1-5", diff --git a/versions/k-/krabsetw.json b/versions/k-/krabsetw.json index 056f5f4db32912..703e3ecf76d438 100644 --- a/versions/k-/krabsetw.json +++ b/versions/k-/krabsetw.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "eafa1dce01b80f2483c3dd6b74b17b4d5b8bb215", + "version-string": "4.1.18", + "port-version": 0 + }, { "git-tree": "f52a420a5f5f9df0d47f89b047879aac82b03eed", "version-string": "4.1.14", diff --git a/versions/l-/libgnutls.json b/versions/l-/libgnutls.json new file mode 100644 index 00000000000000..2348a766795ba0 --- /dev/null +++ b/versions/l-/libgnutls.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "089f1c103a3f2c52e6ae54e8956a98345502e286", + "version": "3.6.15", + "port-version": 0 + } + ] +} diff --git a/versions/l-/libhv.json b/versions/l-/libhv.json new file mode 100644 index 00000000000000..bf02f81211913c --- /dev/null +++ b/versions/l-/libhv.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "53457f5b0cce060b81f86072bde37a9607fe38a8", + "version": "1.0.0", + "port-version": 0 + } + ] +} diff --git a/versions/l-/liblsl.json b/versions/l-/liblsl.json index 7f82764116fda7..66cfc9907203ef 100644 --- a/versions/l-/liblsl.json +++ b/versions/l-/liblsl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5be8e82edc3261bef4114e428191a4ccc9271892", + "version-string": "1.14.0", + "port-version": 0 + }, { "git-tree": "1b86d81c846a0b8f0ad92ce19598e58b56096d08", "version-string": "1.13.1", diff --git a/versions/l-/libmysql.json b/versions/l-/libmysql.json index b58553e67f2f4b..6ad4a2384e3ab5 100644 --- a/versions/l-/libmysql.json +++ b/versions/l-/libmysql.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "55f99b850b59d83a2bc77a7a3980e96ccb67c875", + "version": "8.0.20", + "port-version": 2 + }, { "git-tree": "0ef74d8a7cfbd48a4f57f48775212ccd9cdb06fb", "version-string": "8.0.20", diff --git a/versions/l-/libnop.json b/versions/l-/libnop.json new file mode 100644 index 00000000000000..2b8d1a131a7517 --- /dev/null +++ b/versions/l-/libnop.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "97da98d4a3cd4e60972f53211892baa5b2f066df", + "version-date": "2021-03-01", + "port-version": 0 + } + ] +} diff --git a/versions/l-/libpmemobj-cpp.json b/versions/l-/libpmemobj-cpp.json index f2f53a032cd175..8594fb9d9cf8b9 100644 --- a/versions/l-/libpmemobj-cpp.json +++ b/versions/l-/libpmemobj-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "debedff0ebcfc704948550b14af45cfa1b7cf3bb", + "version-string": "1.12", + "port-version": 0 + }, { "git-tree": "aa560d230ac6435fd6c8a25ac2b5930a7340e5b5", "version-string": "1.11", diff --git a/versions/l-/libpq.json b/versions/l-/libpq.json index a076337a1a6791..79bd9d64cdab02 100644 --- a/versions/l-/libpq.json +++ b/versions/l-/libpq.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "04f39fd5eb9744d0d5a649098fe92281028d30f1", + "version-string": "12.2", + "port-version": 12 + }, { "git-tree": "e09ebfc1a310be48ed9f5f3e6d2a648cfddff424", "version-string": "12.2", diff --git a/versions/l-/libsvm.json b/versions/l-/libsvm.json index d3fe0a9f594045..8f919ee33bbd6f 100644 --- a/versions/l-/libsvm.json +++ b/versions/l-/libsvm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "14f75f50d38f27beddb27fb54bf0927942db9954", + "version-string": "323", + "port-version": 2 + }, { "git-tree": "81c8a12b8a8abcbfe0eefa7ea1643ea3118b49a2", "version-string": "323-1", diff --git a/versions/l-/libtasn1.json b/versions/l-/libtasn1.json new file mode 100644 index 00000000000000..68d29b657dd6ee --- /dev/null +++ b/versions/l-/libtasn1.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "bf9ef7a92f92205f0c883a302b7dae4eea9effee", + "version": "4.16.0", + "port-version": 0 + } + ] +} diff --git a/versions/l-/libtorrent.json b/versions/l-/libtorrent.json index 5d8a41ba090509..ac282a58f1e209 100644 --- a/versions/l-/libtorrent.json +++ b/versions/l-/libtorrent.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6bd8c71880f419aa740153f9cd01cdf26453794e", + "version-string": "1.2.12", + "port-version": 0 + }, { "git-tree": "ffa53a6b67da728e6ae5ec3dfc4aca172cb39ea6", "version-string": "1.2.11", diff --git a/versions/l-/libwebm.json b/versions/l-/libwebm.json index 9e06264666f0cf..d24a3f5fe03adc 100644 --- a/versions/l-/libwebm.json +++ b/versions/l-/libwebm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "09eeb5a939e4dcb87f405fea40875b2a803cd381", + "version-string": "1.0.0.27", + "port-version": 6 + }, { "git-tree": "f0a6e61554dbc2b0682711214e704f8fc04275ae", "version-string": "1.0.0.27-5", diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 5385da85f49547..b149b5beef5138 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9a8e86d3dc793c4404435e87c04470da6d9cccce", + "version-string": "11.0.0", + "port-version": 1 + }, { "git-tree": "0188d318ae61d867088f8717bc5ed178479f14a1", "version-string": "11.0.0", diff --git a/versions/l-/lua.json b/versions/l-/lua.json index cf97ca34ac33f8..a0badb27561fe6 100644 --- a/versions/l-/lua.json +++ b/versions/l-/lua.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5f3de4a36739615d9ffba11571f50226b385721b", + "version-string": "5.4.2", + "port-version": 0 + }, { "git-tree": "3bf3ea5ddf8760d12d37e7a2e95cb3db3cc51b7f", "version-string": "5.4.1", diff --git a/versions/m-/mongoose.json b/versions/m-/mongoose.json index ddd3ddc3faf4ed..fae1081ea31f2e 100644 --- a/versions/m-/mongoose.json +++ b/versions/m-/mongoose.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a706659c49d7ac73bfa869a3497ffeec2c57af71", + "version": "7.1", + "port-version": 0 + }, { "git-tree": "065f3b19bed7c1cf3bb66d777eda7f4e74818f77", "version-string": "6.15-2", diff --git a/versions/m-/msix.json b/versions/m-/msix.json index b886d12d861062..f76cdce2f4a33a 100644 --- a/versions/m-/msix.json +++ b/versions/m-/msix.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e544825ca69bfca4e3f54141bf62cacb1cd878ea", + "version": "1.7", + "port-version": 3 + }, { "git-tree": "d99bfeedaecfb8155ed9a404e3aa683f1b1df72a", "version-string": "1.7-2", diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json index 3dc1fae1bc301d..56c4f2c66b378f 100644 --- a/versions/o-/openssl.json +++ b/versions/o-/openssl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "009a7ee95741b939859c77b8e1ddd6c146ffe54e", + "version-string": "1.1.1j", + "port-version": 0 + }, { "git-tree": "30228fb5d272c8554937ac94b77fb971249c7c8a", "version-string": "1.1.1i", diff --git a/versions/p-/pangolin.json b/versions/p-/pangolin.json index 3f934431c95d22..dabe35abea93e4 100644 --- a/versions/p-/pangolin.json +++ b/versions/p-/pangolin.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a27ee268db34edfd09ce5d0b51e574c7e6719931", + "version-string": "0.5", + "port-version": 12 + }, { "git-tree": "4632fbe85a4a6afb145b500f689fe47b99b45c71", "version-string": "0.5", diff --git a/versions/p-/poppler.json b/versions/p-/poppler.json index e961e39267d9be..aa5ea95145df5f 100644 --- a/versions/p-/poppler.json +++ b/versions/p-/poppler.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "39df7895fae1b7440dd7c453679f6e0d782a8a5a", + "version-string": "20.12.1", + "port-version": 4 + }, { "git-tree": "a6d078aca2d1c5803ddd287701692b891856c3fd", "version-string": "20.12.1", diff --git a/versions/p-/popsift.json b/versions/p-/popsift.json new file mode 100644 index 00000000000000..cf040e4c3b211a --- /dev/null +++ b/versions/p-/popsift.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "807871ff30d3f2e5f40fbe3ff72dde0254b30c8d", + "version-string": "0.9", + "port-version": 0 + } + ] +} diff --git a/versions/p-/proj4.json b/versions/p-/proj4.json index a369731624a731..b265df005421fa 100644 --- a/versions/p-/proj4.json +++ b/versions/p-/proj4.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0c1b88cfe555f41f69ccd31d61cf695d07d5753f", + "version-string": "7.2.1", + "port-version": 1 + }, { "git-tree": "5106324dbb2ce3a08bb9603c5f458aabb67d2a27", "version-string": "7.2.1", diff --git a/versions/p-/protopuf.json b/versions/p-/protopuf.json index b27507d6605158..5f2e712aa17e27 100644 --- a/versions/p-/protopuf.json +++ b/versions/p-/protopuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "253908cb8154ef1ef1a04266260c21a7d6f9bfdf", + "version-string": "1.0.1", + "port-version": 0 + }, { "git-tree": "bd7a8f750bdae5bd3b872062a8319420d159bcd9", "version-string": "1.0.0", diff --git a/versions/p-/psimd.json b/versions/p-/psimd.json new file mode 100644 index 00000000000000..61f3e7034fbbec --- /dev/null +++ b/versions/p-/psimd.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "d96e70295af788d6abe87bdad2a48d80f24ecfb5", + "version-string": "2021-02-21", + "port-version": 0 + } + ] +} diff --git a/versions/p-/python3.json b/versions/p-/python3.json index fa150d4cd28587..5bb4d449871ffe 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9af42bd2d8ec6a2e8b563c9cb7544ffa7e2f938e", + "version-string": "3.9.2", + "port-version": 0 + }, { "git-tree": "b2f9a57528c88d1deef5b695e56edd7a671c97c2", "version-string": "3.9.0", diff --git a/versions/q-/qscintilla.json b/versions/q-/qscintilla.json index 988d01c01d56e8..680be05850362a 100644 --- a/versions/q-/qscintilla.json +++ b/versions/q-/qscintilla.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "753c09c98e94157f9998e6528d5bb7dce4337ced", + "version-string": "2.12.0", + "port-version": 0 + }, { "git-tree": "3279799f70de1a88e50db50b7e99dcdf1b08ac31", "version-string": "2.11.4-2", diff --git a/versions/r-/realsense2.json b/versions/r-/realsense2.json index 71d781a592db43..8be85f6c0ccbf2 100644 --- a/versions/r-/realsense2.json +++ b/versions/r-/realsense2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4d8620f1907de79152086b5f98a2fce0cb24c438", + "version-string": "2.42.0", + "port-version": 0 + }, { "git-tree": "7a17b91ddec89be9345ca08ba098ffec3ee4618d", "version-string": "2.40.0", diff --git a/versions/r-/rsasynccpp.json b/versions/r-/rsasynccpp.json new file mode 100644 index 00000000000000..398e8cc0f510ab --- /dev/null +++ b/versions/r-/rsasynccpp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "80995d80f9e7e551f8305ce2cecb0a91bc9c457a", + "version": "0.0.7", + "port-version": 0 + } + ] +} diff --git a/versions/s-/scintilla.json b/versions/s-/scintilla.json index 6494ee11e5d9dd..95e2051826303a 100644 --- a/versions/s-/scintilla.json +++ b/versions/s-/scintilla.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "725d3e47a1e30713a272b1ef12251b65696f8a3e", + "version": "4.4.6", + "port-version": 0 + }, { "git-tree": "1bb13f73af518651e5dafcd0767ca409d3219ac3", "version-string": "4.4.5", diff --git a/versions/s-/sdl2.json b/versions/s-/sdl2.json index b1b45b6ec27053..fba093c63f0a29 100644 --- a/versions/s-/sdl2.json +++ b/versions/s-/sdl2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "07b3a3a427d35ed4ba0a154d7ff3e34be2f0ddfb", + "version-string": "2.0.14", + "port-version": 3 + }, { "git-tree": "df27b00967d099fabd3b9315a02105bd3e1be3d1", "version-string": "2.0.14", diff --git a/versions/s-/seal.json b/versions/s-/seal.json index 1fbf01d50b5146..ec7b69ca64bd4d 100644 --- a/versions/s-/seal.json +++ b/versions/s-/seal.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e04ddee56f805cd71ea28de648a86a3a978ac29e", + "version-string": "3.6.2", + "port-version": 0 + }, { "git-tree": "7f0e988ad7a2c1b8c2c0d39f9954d1782886dd93", "version-string": "3.6.1", diff --git a/versions/s-/sentry-native.json b/versions/s-/sentry-native.json index 0df48147374482..261f308706b8d9 100644 --- a/versions/s-/sentry-native.json +++ b/versions/s-/sentry-native.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "32821f7371500deb01b4c67b47e74918b44635dd", + "version-semver": "0.4.8", + "port-version": 0 + }, { "git-tree": "718ff7a01b0f2cca16bb8f89e6a47450efe84e4c", "version-string": "0.4.7", diff --git a/versions/s-/sobjectizer.json b/versions/s-/sobjectizer.json index 380d4371a869c7..26ddc335cdf9b9 100644 --- a/versions/s-/sobjectizer.json +++ b/versions/s-/sobjectizer.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3c620a2c9fef044243960bce44d471b818ddda98", + "version": "5.7.2.3", + "port-version": 0 + }, { "git-tree": "eae0bbd622d8f9b414bcbb45ceb0ff69ff075fc7", "version-string": "5.7.2.2", diff --git a/versions/s-/sqlite3.json b/versions/s-/sqlite3.json index 2c41708578c584..64ea062219fffe 100644 --- a/versions/s-/sqlite3.json +++ b/versions/s-/sqlite3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a4f8c5e08012ca84ac1b505c65ad1c3d174255ec", + "version": "3.34.1", + "port-version": 0 + }, { "git-tree": "34f1a969f91790b20ff5bd583f25adac17c4d9c2", "version-string": "3.33.0", diff --git a/versions/t-/taglib.json b/versions/t-/taglib.json index ed661250233474..205aae2a5235fa 100644 --- a/versions/t-/taglib.json +++ b/versions/t-/taglib.json @@ -1,5 +1,15 @@ { "versions": [ + { + "git-tree": "c4559ad74a4b1757cc6f7b11abce3b6c4cab66c7", + "version-semver": "1.12.0", + "port-version": 0 + }, + { + "git-tree": "e9d856fb23e6cf5ad4b86f2098549ba88098a0cb", + "version-string": "1.12.0-20210123", + "port-version": 0 + }, { "git-tree": "8aee2b399d4cd5af999057cbbe5e9476272b5a24", "version-string": "1.11.1-20190531", diff --git a/versions/t-/trantor.json b/versions/t-/trantor.json index f4a822e2ed4734..fe7ad96d918a0e 100644 --- a/versions/t-/trantor.json +++ b/versions/t-/trantor.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "469e31dd5aceacb2bb3485e4f1b2091e70a2d5e2", + "version-string": "1.3.0", + "port-version": 0 + }, { "git-tree": "af52c9e7b3dd398e61ef6ea0a34a48cdcfce7f42", "version-string": "1.2.0", diff --git a/versions/u-/uwebsockets.json b/versions/u-/uwebsockets.json index 1e8d802af8ea9c..752495168cf4d8 100644 --- a/versions/u-/uwebsockets.json +++ b/versions/u-/uwebsockets.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6d67d8f414f4789cfa069992488834f5c79fd9e6", + "version": "19.0.0", + "port-version": 0 + }, { "git-tree": "ac495f3a5f075ad4d93f1b627095e4dae7a4c517", "version-string": "18.13.0", diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json new file mode 100644 index 00000000000000..555f90f1a327c0 --- /dev/null +++ b/versions/v-/vcpkg-cmake-config.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "d255b3d566a8861dcc99a958240463e678528066", + "version-date": "2021-02-26", + "port-version": 0 + } + ] +} diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json new file mode 100644 index 00000000000000..b93fc75088ccc4 --- /dev/null +++ b/versions/v-/vcpkg-cmake.json @@ -0,0 +1,14 @@ +{ + "versions": [ + { + "git-tree": "b627b47898864ee5a880cea03b4dea64b9d81953", + "version-date": "2021-02-28", + "port-version": 0 + }, + { + "git-tree": "51896aa8073adb5c8450daa423d03eedf0dfc61f", + "version-date": "2021-02-26", + "port-version": 0 + } + ] +} diff --git a/versions/w-/wil.json b/versions/w-/wil.json index 76614119d1b8c1..012bcfe15f3d1f 100644 --- a/versions/w-/wil.json +++ b/versions/w-/wil.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1085a9ee690f6718715b28396f5250ad67d6f828", + "version-string": "2021-02-04", + "port-version": 0 + }, { "git-tree": "48d7b90ae1c7d5f223caad5330a293463f470860", "version-string": "2020-05-19",