mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
Merge branch 'master' into vcpkg_nuget
This commit is contained in:
commit
45f4b820e5
10
.github/ISSUE_TEMPLATE/i-have-a-question.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/i-have-a-question.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
name: I have a question
|
||||
about: I have a question and don't see a clear answer in documentation
|
||||
title: How do I ...
|
||||
labels: Question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
When asking a question please also include where you looked for an answer (so we can update the documentation if needed).
|
31
.github/ISSUE_TEMPLATE/other-type-of-bug-report.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/other-type-of-bug-report.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Other type of bug report
|
||||
about: Let us know about an issues that does not fit into any of the other issues
|
||||
types
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Environment**
|
||||
- OS: [e.g. Windows/Linux etc...]
|
||||
- Compiler: revision
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. ./vcpkg install xxxx
|
||||
2. See error
|
||||
Repro code when
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Failure logs**
|
||||
-(please attached failure logs)
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
23
.github/ISSUE_TEMPLATE/report-package-build-failure.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/report-package-build-failure.md
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Report package build failure
|
||||
about: Let us know about build failures in ports.
|
||||
title: "[<port name>] build failure"
|
||||
labels: port bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Host Environment**
|
||||
- OS: [e.g. Windows/Linux etc...]
|
||||
- Compiler: revision
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
`./vcpkg install xxxx`
|
||||
|
||||
**Failure logs**
|
||||
-Cut and past the appropriate build messages from the console output.
|
||||
-Please attach any additional failure logs mentioned in the console output.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here, such as what you have already tried to resolve the issue.
|
22
.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Request a feature or improvement to a port
|
||||
about: Suggest an improvement to one the the ports/libraries in vcpkg
|
||||
title: "[<portname>] <short description of feature>"
|
||||
labels: port feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
****
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Proposed solution**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered if applicable.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
22
.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Request a feature or improvement
|
||||
about: Suggest an improvement to vcpkg
|
||||
title: ''
|
||||
labels: vcpkg feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
****
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Proposed solution**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
18
.github/ISSUE_TEMPLATE/request-a-new-port.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/request-a-new-port.md
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Request a new port
|
||||
about: Request a new port/library that vcpkg should support
|
||||
title: "[New Port Request] <library name here>"
|
||||
labels: new port request - consider making a PR!
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Library name:
|
||||
|
||||
Library description:
|
||||
|
||||
Source repository URL:
|
||||
|
||||
Project homepage (if different from the source repository):
|
||||
|
||||
Anything else that is useful to know when adding (such as optional features the library may have that should be included):
|
14
.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md
vendored
Normal file
14
.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Request an update to an existing port
|
||||
about: Let us know about a new version of a library we should pick up.
|
||||
title: "[<port name>] update to <version>"
|
||||
labels: port feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Library name:
|
||||
|
||||
New version number:
|
||||
|
||||
Other information that may be useful (release notes, etc...)
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,7 +11,7 @@
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
toolsrc/out
|
||||
toolsrc/out*
|
||||
toolsrc/CMakeSettings.json
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
|
4215
CHANGELOG.md
4215
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,3 @@
|
||||
Port Tree
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
46
NOTICE.txt
Normal file
46
NOTICE.txt
Normal file
@ -0,0 +1,46 @@
|
||||
vcpkg uses third party material from the projects listed below.
|
||||
The original copyright notice and the license under which Microsoft
|
||||
received such third party material are set forth below. Microsoft
|
||||
reserves all other rights not expressly granted, whether by
|
||||
implication, estoppel or otherwise.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention by posting an issue.
|
||||
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
vcpkg incorporates third party material from the projects listed below.
|
||||
The original copyright notice and the license under which Microsoft received
|
||||
such third party materials are set forth below. Microsoft reserved all other
|
||||
rights not expressly granted, whether by implication, estoppel or otherwise.
|
||||
|
||||
1. Catch2
|
||||
|
||||
%% Catch2 NOTICES, INFORMATION, AND LICENSE BEGIN HERE
|
||||
=========================================
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF Catch2 NOTICES, INFORMATION, AND LICENSE
|
@ -5,6 +5,14 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too
|
||||
|
||||
For short description of available commands, run `vcpkg help`.
|
||||
|
||||
* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
|
||||
* Slack: [https://cpplang.now.sh/](https://cpplang.now.sh/), the #vcpkg channel
|
||||
* Docs: [Documentation](docs/index.md)
|
||||
|
||||
| Windows (x86, x64, arm, uwp) | MacOS | Linux |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=9&branchName=master) | [](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=11&branchName=master) | [](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=6&branchName=master) |
|
||||
|
||||
## Quick Start
|
||||
Prerequisites:
|
||||
- Windows 10, 8.1, 7, Linux, or MacOS
|
||||
|
72
README_zh_CN.md
Normal file
72
README_zh_CN.md
Normal file
@ -0,0 +1,72 @@
|
||||
# Vcpkg
|
||||
|
||||
## 概要
|
||||
Vcpkg 可帮助您在 Windows、Linux 和 MacOS 上管理 C 和 C++ 库。这个工具和生态系统正在不断发展,您的参与对它的成功至关重要!
|
||||
|
||||
如需获取有关可用命令的简短描述, 请执行 `vcpkg help`。
|
||||
|
||||
## 快速开始
|
||||
需求:
|
||||
- Windows 10、8.1、7、Linux、或 MacOS
|
||||
- Visual Studio 2015 Update 3 或更新的版本 (Windows 中)
|
||||
- Git
|
||||
- *可选:* CMake 3.12.4
|
||||
|
||||
如何开始:
|
||||
```
|
||||
> git clone https://github.com/Microsoft/vcpkg.git
|
||||
> cd vcpkg
|
||||
|
||||
PS> .\bootstrap-vcpkg.bat
|
||||
Linux:~/$ ./bootstrap-vcpkg.sh
|
||||
```
|
||||
|
||||
然后,[集成](docs/users/integration.md)至本机环境中,执行 (注意: 首次启动需要管理员权限)
|
||||
```
|
||||
PS> .\vcpkg integrate install
|
||||
Linux:~/$ ./vcpkg integrate install
|
||||
```
|
||||
|
||||
使用以下命令安装任意包
|
||||
```
|
||||
PS> .\vcpkg install sdl2 curl
|
||||
Linux:~/$ ./vcpkg install sdl2 curl
|
||||
```
|
||||
|
||||
与CMake一起使用已安装库的最佳方法是通过工具链文件 `scripts\buildsystems\vcpkg.cmake`。要使用此文件,您只需将 `-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake` 作为参数添加到CMake命令行中。
|
||||
|
||||
在Visual Studio中,您可以创建一个新项目(或打开一个已有项目)。所有已安装的库都可以使用 `#include` 在您的项目中使用,而无需进行其他配置。
|
||||
|
||||
若需获取更多信息,请查看[使用一个包](docs/examples/installing-and-using-packages.md)具体示例。 若您需要使用的库不在vcpkg中,请[在GitHub上创建一个issue](https://github.com/microsoft/vcpkg/issues) ,开发团队和贡献者会看到它,并有可能为此库创建端口文件。
|
||||
|
||||
有关 macOS 和 Linux 支持的其他说明,请参见[官方公告](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/)。
|
||||
|
||||
## Tab补全/自动补全
|
||||
`vcpkg`支持在 Powershell 和 bash 中自动补全命令、程序包名称、选项等。如需启用自动补全功能,请使用以下命令:
|
||||
```
|
||||
PS> .\vcpkg integrate powershell
|
||||
Linux:~/$ ./vcpkg integrate bash
|
||||
```
|
||||
并重启您的控制台。
|
||||
|
||||
|
||||
## 示例
|
||||
请查看[文档](docs/index.md)获取具体示例,其包含[安装并使用包](docs/examples/installing-and-using-packages.md),[使用压缩文件添加包](docs/examples/packaging-zipfiles.md),和[从GitHub源中添加一个包](docs/examples/packaging-github-repos.md)。
|
||||
|
||||
我们的文档现在也可以从[ReadTheDocs](https://vcpkg.readthedocs.io/)在线获取。
|
||||
|
||||
观看4分钟[demo视频](https://www.youtube.com/watch?v=y41WFKbQFTw)。
|
||||
|
||||
## 贡献者
|
||||
Vcpkg通过您的贡献不断发展。下面是一些您可以贡献的方式:
|
||||
|
||||
* 创建一个关于vcpkg或已支持包的[新issue](https://github.com/Microsoft/vcpkg/issues)
|
||||
* [创建修复PR和创建新包](https://github.com/Microsoft/vcpkg/pulls)
|
||||
|
||||
请参阅我们的[贡献准则](CONTRIBUTING.md)了解更多详细信息。
|
||||
|
||||
该项目采用了[Microsoft开源行为准则](https://opensource.microsoft.com/codeofconduct/)。获取更多信息请查看 [行为准则FAQ](https://opensource.microsoft.com/codeofconduct/faq/)或联系[opencode@microsoft.com](mailto:opencode@microsoft.com)提出其他问题或意见。
|
||||
|
||||
## License
|
||||
|
||||
使用的代码 License 为[MIT License](LICENSE.txt)。
|
@ -52,11 +52,12 @@ Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurat
|
||||
|
||||
First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly.
|
||||
|
||||
For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration.
|
||||
For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. Unfortunately, due to the sequential nature of MSBuild, you'll need to add those settings much higher in your vcxproj so that it is declared before the Vcpk integration is loaded. It is recommend that the `$(VcpkgConfiguration)` macro is added to the "Globals" PropertyGroup.
|
||||
|
||||
For example, you can add support for your "MyRelease" configuration by adding in your project file:
|
||||
```
|
||||
<PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
...
|
||||
<VcpkgConfiguration Condition="'$(Configuration)' == 'MyRelease'">Release</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
```
|
||||
|
126
docs/examples/overlay-triplets-linux-dynamic.md
Normal file
126
docs/examples/overlay-triplets-linux-dynamic.md
Normal file
@ -0,0 +1,126 @@
|
||||
# Overlay triplets example
|
||||
|
||||
## Building dynamic libraries on Linux
|
||||
|
||||
Using **vcpkg** you can build libraries for many configurations out of the box. However, this doesn't currently include shared libraries on Linux and Mac OS.
|
||||
|
||||
This doesn't mean that you cannot use **vcpkg** to build your dynamic libraries on these platforms! This document will guide you through creating your own custom triplets with `--overlay-triplets` to easily build dynamic libraries on Linux.
|
||||
|
||||
### Step 1: Create the custom triplet files
|
||||
|
||||
To save time, copy the existing `x64-linux.cmake` triplet file.
|
||||
|
||||
```sh
|
||||
~/git$ mkdir custom-triplets
|
||||
~/git$ cp vcpkg/triplets/x64-linux.cmake custom-triplets/x64-linux-dynamic.cmake
|
||||
```
|
||||
|
||||
And modify `custom-triplets/x64-linux-dynamic.cmake` to match the contents below:
|
||||
```cmake
|
||||
# ~/git/custom-triplets/x64-linux-dynamic.cmake
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic) # This changed from static to dynamic
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
```
|
||||
|
||||
### Step 2: Use `--overlay-triplets` to build dynamic libraries
|
||||
|
||||
Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory.
|
||||
|
||||
```
|
||||
~/git$ vcpkg/vcpkg install sqlite3:x64-linux-dynamic --overlay-triplets=custom-triplets
|
||||
The following packages will be built and installed:
|
||||
sqlite3[core]:x64-linux-dynamic
|
||||
Starting package 1/1: sqlite3:x64-linux-dynamic
|
||||
Building package sqlite3[core]:x64-linux-dynamic...
|
||||
-- Loading triplet configuration from: /home/victor/git/custom-triplets/x64-linux-dynamic.cmake
|
||||
-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip...
|
||||
-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip
|
||||
-- Applying patch fix-arm-uwp.patch
|
||||
-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92
|
||||
-- Configuring x64-linux-dynamic-dbg
|
||||
-- Configuring x64-linux-dynamic-rel
|
||||
-- Building x64-linux-dynamic-dbg
|
||||
-- Building x64-linux-dynamic-rel
|
||||
-- Performing post-build validation
|
||||
-- Performing post-build validation done
|
||||
Building package sqlite3[core]:x64-linux-dynamic... done
|
||||
Installing package sqlite3[core]:x64-linux-dynamic...
|
||||
Installing package sqlite3[core]:x64-linux-dynamic... done
|
||||
Elapsed time for package sqlite3:x64-linux-dynamic: 44.82 s
|
||||
|
||||
Total elapsed time: 44.82 s
|
||||
|
||||
The package sqlite3:x64-linux-dynamic provides CMake targets:
|
||||
|
||||
find_package(sqlite3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE sqlite3)
|
||||
```
|
||||
|
||||
Overlay triplets enables your custom triplet files when using `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, and `vcpkg remove`.
|
||||
|
||||
When using the `--overlay-triplets` option, a message like the following lets you know that a custom triplet is being used:
|
||||
|
||||
```
|
||||
-- Loading triplet configuration from: /home/custom-triplets/x64-linux-dynamic.cmake
|
||||
```
|
||||
|
||||
## Overriding default triplets
|
||||
|
||||
As you may have noticed, the default triplets for Windows (`x86-windows` and `x64-windows`) install dynamic libraries, while a suffix (`-static`) is needed for static libraries. This is different with Linux and Mac OS where static libraries are built by `x64-linux` and `x64-osx`.
|
||||
|
||||
Using `--overlay-ports` it is possible to override the default triplets to accomplish the same behavior on Linux:
|
||||
|
||||
* `x64-linux`: Builds dynamic libraries,
|
||||
* `x64-linux-static`: Builds static libraries.
|
||||
|
||||
### Step 1: Create the overlay triplets
|
||||
|
||||
Using the custom triplet created in the previous example, rename `custom-triplets/x64-linux-dynamic.cmake` to `custom-triplets/x64-linux.cmake`. Then, copy the default `x64-linux` triplet (which builds static libraries) in your `custom-triplets` folder and rename it to `x64-linux-static.cmake`.
|
||||
|
||||
```sh
|
||||
~/git$ mv custom-triplets/x64-linux-dynamic.cmake custom-triplets/x64-linux.cmake
|
||||
~/git$ cp vcpkg/triplets/x64-linux.cmake custom-triplets/x64-linux-static.cmake
|
||||
```
|
||||
|
||||
### Step 2: Use `--overlay-ports` to override default triplets
|
||||
|
||||
Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory.
|
||||
|
||||
```
|
||||
~/git$ vcpkg/vcpkg install sqlite3:x64-linux --overlay-triplets=custom-triplets
|
||||
The following packages will be built and installed:
|
||||
sqlite3[core]:x64-linux
|
||||
Starting package 1/1: sqlite3:x64-linux
|
||||
Building package sqlite3[core]:x64-linux...
|
||||
-- Loading triplet configuration from: /home/victor/git/custom-triplets/x64-linux.cmake
|
||||
-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip...
|
||||
-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip
|
||||
-- Applying patch fix-arm-uwp.patch
|
||||
-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92
|
||||
-- Configuring x64-linux-dbg
|
||||
-- Configuring x64-linux-rel
|
||||
-- Building x64-linux-dbg
|
||||
-- Building x64-linux-rel
|
||||
-- Performing post-build validation
|
||||
-- Performing post-build validation done
|
||||
Building package sqlite3[core]:x64-linux... done
|
||||
Installing package sqlite3[core]:x64-linux...
|
||||
Installing package sqlite3[core]:x64-linux... done
|
||||
Elapsed time for package sqlite3:x64-linux: 44.82 s
|
||||
|
||||
Total elapsed time: 44.82 s
|
||||
|
||||
The package sqlite3:x64-linux provides CMake targets:
|
||||
|
||||
find_package(sqlite3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE sqlite3)
|
||||
```
|
||||
|
||||
Note that the default triplet is masked by your custom triplet:
|
||||
|
||||
```
|
||||
-- Loading triplet configuration from: /home/victor/git/custom-triplets/x64-linux.cmake
|
||||
```
|
@ -19,6 +19,14 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too
|
||||
|
||||
- [Control files](maintainers/control-files.md)
|
||||
- [Portfile functions](maintainers/portfile-functions.md)
|
||||
- [Maintainer Guidelines](maintainers/maintainer-guide.md)
|
||||
|
||||
### Tool Maintainer Help
|
||||
|
||||
- [Testing](tool-maintainers/testing.md)
|
||||
- [Benchmarking](tool-maintainers/benchmarking.md)
|
||||
- [Layout of the vcpkg source tree](tool-maintainers/layout.md)
|
||||
- [Maintainer Guidelines](maintainers/maintainer-guide.md)
|
||||
|
||||
### Specifications
|
||||
|
||||
|
@ -43,16 +43,27 @@ The port version.
|
||||
|
||||
This field is an alphanumeric string that may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bit strings and are only evaluated for equality.
|
||||
|
||||
By convention, if a portfile is modified without incrementing the "upstream" version, a `-#` is appended to create a unique version string.
|
||||
For tagged-release ports, we follow the following convention:
|
||||
|
||||
Some projects do not have named releases. In these cases use the date of the version do not have labeled releases, in these cases use the date of the last commit in `YYYY-MM-DD` format. See the `abseil` port as an example.
|
||||
1. If the port follows a scheme like `va.b.c`, we remove the leading `v`. In this case, it becomes `a.b.c`.
|
||||
2. If the port includes its own name in the version like `curl-7_65_1`, we remove the leading name: `7_65_1`
|
||||
3. If the port has been modified, we append a `-N` to distinguish the versions: `1.2.1-4`
|
||||
|
||||
For rolling-release ports, we use the date that the _commit was accessed by you_, formatted as `YYYY-MM-DD`. Stated another way: if someone had a time machine and went to that date, they would see this commit as the latest master.
|
||||
|
||||
For example, given:
|
||||
1. The latest commit was made on 2019-04-19
|
||||
2. The current version string is `2019-02-14-1`
|
||||
3. Today's date is 2019-06-01.
|
||||
|
||||
Then if you update the source version today, you should give it version `2019-06-01`. If you need to make a change which doesn't adjust the source version, you should give it version `2019-02-14-2`.
|
||||
|
||||
Example:
|
||||
```no-highlight
|
||||
Version: 1.0.5-2
|
||||
```
|
||||
```no-highlight
|
||||
Version: 2019-3-21
|
||||
Version: 2019-03-21
|
||||
```
|
||||
|
||||
#### Description
|
||||
|
10
docs/maintainers/execute_process.md
Normal file
10
docs/maintainers/execute_process.md
Normal file
@ -0,0 +1,10 @@
|
||||
# execute_process
|
||||
|
||||
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 `_execute_process()` instead.
|
||||
|
||||
|
||||
## Source
|
||||
[scripts/cmake/execute_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/execute_process.cmake)
|
236
docs/maintainers/maintainer-guide.md
Normal file
236
docs/maintainers/maintainer-guide.md
Normal file
@ -0,0 +1,236 @@
|
||||
# Maintainer Guidelines and Policies
|
||||
|
||||
This document lists a set of policies that you should apply when adding or updating a port recipe.
|
||||
It is intended to serve the role of
|
||||
[Debian's Policy Manual](https://www.debian.org/doc/debian-policy/),
|
||||
[Homebrew's Maintainer Guidelines](https://docs.brew.sh/Maintainer-Guidelines), and
|
||||
[Homebrew's Formula Cookbook](https://docs.brew.sh/Formula-Cookbook).
|
||||
|
||||
## PR Structure
|
||||
|
||||
### Make separate Pull Requests per port
|
||||
|
||||
Whenever possible, separate changes into multiple PRs.
|
||||
This makes them significantly easier to review and prevents issues with one set of changes from holding up every other change.
|
||||
|
||||
### Avoid trivial changes in untouched files
|
||||
|
||||
For example, avoid reformatting or renaming variables in portfiles that otherwise have no reason to be modified for the issue at hand.
|
||||
However, if you need to modify the file for the primary purpose of the PR (updating the library),
|
||||
then obviously beneficial changes like fixing typos are appreciated!
|
||||
|
||||
### Check names against other repositories
|
||||
|
||||
A good service to check many at once is [Repology](https://repology.org/).
|
||||
If the library you are adding could be confused with another one,
|
||||
consider renaming to make it clear.
|
||||
|
||||
### Use GitHub Draft PRs
|
||||
|
||||
GitHub Draft PRs are a great way to get CI or human feedback on work that isn't yet ready to merge.
|
||||
Most new PRs should be opened as drafts and converted to normal PRs once the CI passes.
|
||||
|
||||
More information about GitHub Draft PRs:
|
||||
https://github.blog/2019-02-14-introducing-draft-pull-requests/
|
||||
|
||||
## Portfiles
|
||||
|
||||
### Avoid deprecated helper functions
|
||||
|
||||
At this time, the following helpers are deprecated:
|
||||
|
||||
1. `vcpkg_extract_source_archive()` should be replaced by [`vcpkg_extract_source_archive_ex()`](vcpkg_extract_source_archive_ex.md)
|
||||
2. `vcpkg_apply_patches()` should be replaced by the `PATCHES` arguments to the "extract" helpers (e.g. [`vcpkg_from_github()`](vcpkg_from_github.md))
|
||||
3. `vcpkg_build_msbuild()` should be replaced by [`vcpkg_install_msbuild()`](vcpkg_install_msbuild.md)
|
||||
|
||||
### Avoid excessive comments in portfiles
|
||||
|
||||
Ideally, portfiles should be short, simple, and as declarative as possible.
|
||||
Remove any boiler plate comments introduced by the `create` command before submitting a PR.
|
||||
|
||||
## Build Techniques
|
||||
|
||||
### Do not use vendored dependencies
|
||||
|
||||
Do not use embedded copies of libraries.
|
||||
All dependencies should be split out and packaged separately so they can be updated and maintained.
|
||||
|
||||
### Prefer using CMake
|
||||
|
||||
When multiple buildsystems are available, prefer using CMake.
|
||||
Additionally, when appropriate, it can be easier and more maintainable to rewrite alternative buildsystems into CMake using `file(GLOB)` directives.
|
||||
|
||||
Examples: [abseil](../../ports/abseil/portfile.cmake)
|
||||
|
||||
### Choose either static or shared binaries
|
||||
|
||||
By default, `vcpkg_configure_cmake()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`,
|
||||
however for libraries that don't respect that variable, you can switch on `VCPKG_LIBRARY_LINKAGE`:
|
||||
|
||||
```cmake
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC}
|
||||
-DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED}
|
||||
)
|
||||
```
|
||||
|
||||
### When defining features, explicitly control dependencies
|
||||
|
||||
When defining a feature that captures an optional dependency,
|
||||
ensure that the dependency will not be used accidentally when the feature is not explicitly enabled.
|
||||
|
||||
```cmake
|
||||
if ("zlib" IN_LIST FEATURES)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB OFF)
|
||||
else()
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-CMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB}
|
||||
)
|
||||
```
|
||||
|
||||
The snippet below using `vcpkg_check_features()` is equivalent, [see the documentation](vcpkg_check_features.md).
|
||||
|
||||
```cmake
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
INVERTED_FEATURES
|
||||
"zlib" CMAKE_DISABLE_FIND_PACKAGE_ZLIB
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
|
||||
Note that `ZLIB` in the above is case-sensitive. See the [cmake documentation](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) for more details.
|
||||
|
||||
### Place conflicting libs in a `manual-link` directory
|
||||
|
||||
A lib is considered conflicting if it does any of the following:
|
||||
+ Define `main`
|
||||
+ Define malloc
|
||||
+ Define symbols that are also declared in other libraries
|
||||
|
||||
Conflicting libs are typically by design and not considered a defect. Because some build systems link against everything in the lib directory, these should be moved into a subdirectory named `manual-link`.
|
||||
|
||||
## Versioning
|
||||
|
||||
### Follow common conventions for the `Version:` field
|
||||
|
||||
See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions.
|
||||
|
||||
### Update the `Version:` field in the `CONTROL` file of any modified ports
|
||||
|
||||
Vcpkg uses this field to determine whether a given port is out-of-date and should be changed whenever the port's behavior changes.
|
||||
|
||||
Our convention for this field is to append a `-N` to the upstream version when changes need to be made.
|
||||
|
||||
For Example:
|
||||
|
||||
- Zlib's package version is currently `1.2.1`.
|
||||
- You've discovered that the wrong copyright file has been deployed, and fixed that in the portfile.
|
||||
- You should update the `Version:` field in the control file to `1.2.1-1`.
|
||||
|
||||
See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions.
|
||||
|
||||
## Patching
|
||||
|
||||
### Prefer options over patching
|
||||
|
||||
It is preferable to set options in a call to `vcpkg_configure_xyz()` over patching the settings directly.
|
||||
|
||||
Common options that allow avoiding patching:
|
||||
1. [MSBUILD] `<PropertyGroup>` settings inside the project file can be overridden via `/p:` parameters
|
||||
2. [CMAKE] Calls to `find_package(XYz)` in CMake scripts can be disabled via [`-DCMAKE_DISABLE_FIND_PACKAGE_XYz=ON`](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html)
|
||||
3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overridden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html)
|
||||
|
||||
### Prefer patching over overriding `VCPKG_<VARIABLE>` values
|
||||
|
||||
Some variables prefixed with `VCPKG_<VARIABLE>` have an equivalent `CMAKE_<VARIABLE>`.
|
||||
However, not all of them are passed to the internal package build [(see implementation: Windows toolchain)](../../scripts/toolchains/windows.cmake).
|
||||
|
||||
Consider the following example:
|
||||
|
||||
```cmake
|
||||
set(VCPKG_C_FLAGS "-O2 ${VCPKG_C_FLAGS}")
|
||||
set(VCPKG_CXX_FLAGS "-O2 ${VCPKG_CXX_FLAGS}")
|
||||
```
|
||||
|
||||
Using `vcpkg`'s built-in toolchains this works, because the value of `VCPKG_<LANG>_FLAGS` is forwarded to the appropriate `CMAKE_LANG_FLAGS` variable. But, a custom toolchain that is not aware of `vcpkg`'s variables will not forward them.
|
||||
|
||||
Because of this, it is preferable to patch the buildsystem directly when setting `CMAKE_<LANG>_FLAGS`.
|
||||
|
||||
### Minimize patches
|
||||
|
||||
When making changes to a library, strive to minimize the final diff. This means you should _not_ reformat the upstream source code when making changes that affect a region. Also, when disabling a conditional, it is better to add a `AND FALSE` or `&& 0` to the condition than to delete every line of the conditional.
|
||||
|
||||
This helps to keep the size of the vcpkg repository down as well as improves the likelihood that the patch will apply to future code versions.
|
||||
|
||||
### Do not implement features in patches
|
||||
|
||||
The purpose of patching in vcpkg is to enable compatibility with compilers, libraries, and platforms. It is not to implement new features in lieu of following proper Open Source procedure (submitting an Issue/PR/etc).
|
||||
|
||||
## Do not build tests/docs/examples by default
|
||||
|
||||
When submitting a new port, check for any options like `BUILD_TESTS` or `WITH_TESTS` or `POCO_ENABLE_SAMPLES` and ensure the additional binaries are disabled. This minimizes build times and dependencies for the average user.
|
||||
|
||||
Optionally, you can add a `test` feature which enables building the tests, however this should not be in the `Default-Features` list.
|
||||
|
||||
## Enable existing users of the library to switch to vcpkg
|
||||
|
||||
### Do not add `CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS`
|
||||
|
||||
Unless the author of the library is already using it, we should not use this CMake functionality because it interacts poorly with C++ templates and breaks certain compiler features. Libraries that don't provide a .def file and do not use __declspec() declarations simply do not support shared builds for Windows and should be marked as such with `vcpkg_check_linkage(ONLY_STATIC_LIBRARY)`.
|
||||
|
||||
### Do not rename binaries outside the names given by upstream
|
||||
|
||||
This means that if the upstream library has different names in release and debug (libx versus libxd), then the debug library should not be renamed to `libx`. Vice versa, if the upstream library has the same name in release and debug, we should not introduce a new name.
|
||||
|
||||
Important caveat:
|
||||
- Static and shared variants often should be renamed to a common scheme. This enables consumers to use a common name and be ignorant of the downstream linkage. This is safe because we only make one at a time available.
|
||||
|
||||
Note that if a library generates CMake integration files (`foo-config.cmake`), renaming must be done through patching the CMake build itself instead of simply calling `file(RENAME)` on the output archives/LIBs.
|
||||
|
||||
Finally, DLL files on Windows should never be renamed post-build because it breaks the generated LIBs.
|
||||
|
||||
## Useful implementation notes
|
||||
|
||||
### Portfiles are run in Script Mode
|
||||
|
||||
While `portfile.cmake`'s and `CMakeLists.txt`'s share a common syntax and core CMake language constructs, portfiles run in "Script Mode", whereas `CMakeLists.txt` files run in "Build Mode" (unofficial term). The most important difference between these two modes is that "Script Mode" does not have a concept of "Target" -- any behaviors that depend on the "target" machine (`CMAKE_CXX_COMPILER`, `CMAKE_EXECUTABLE_SUFFIX`, `CMAKE_SYSTEM_NAME`, etc) will not be correct.
|
||||
|
||||
Portfiles have direct access to variables set in the triplet file, but `CMakeLists.txt`s do not (though there is often a translation that happens -- `VCPKG_LIBRARY_LINKAGE` versus `BUILD_SHARED_LIBS`).
|
||||
|
||||
Portfiles and CMake builds invoked by portfiles are run in different processes. Conceptually:
|
||||
|
||||
```no-highlight
|
||||
+----------------------------+ +------------------------------------+
|
||||
| CMake.exe | | CMake.exe |
|
||||
+----------------------------+ +------------------------------------+
|
||||
| Triplet file | ====> | Toolchain file |
|
||||
| (x64-windows.cmake) | | (scripts/buildsystems/vcpkg.cmake) |
|
||||
+----------------------------+ +------------------------------------+
|
||||
| Portfile | ====> | CMakeLists.txt |
|
||||
| (ports/foo/portfile.cmake) | | (buildtrees/../CMakeLists.txt) |
|
||||
+----------------------------+ +------------------------------------+
|
||||
```
|
||||
|
||||
To determine the host in a portfile, the standard CMake variables are fine (`CMAKE_HOST_WIN32`).
|
||||
|
||||
To determine the target in a portfile, the vcpkg triplet variables should be used (`VCPKG_CMAKE_SYSTEM_NAME`).
|
||||
|
||||
See also our [triplet documentation](../users/triplets.md) for a full enumeration of possible settings.
|
@ -1,25 +1,36 @@
|
||||
<!-- Run regenerate.ps1 to extract documentation from scripts\cmake\*.cmake -->
|
||||
|
||||
# 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\_build\_cmake](vcpkg_build_cmake.md)
|
||||
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)
|
||||
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)
|
||||
- [vcpkg\_build\_make](vcpkg_build_make.md)
|
||||
- [vcpkg\_build\_nmake](vcpkg_build_nmake.md)
|
||||
- [vcpkg\_check\_features](vcpkg_check_features.md)
|
||||
- [vcpkg\_check\_linkage](vcpkg_check_linkage.md)
|
||||
- [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md)
|
||||
- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md)
|
||||
- [vcpkg\_common\_definitions](vcpkg_common_definitions.md)
|
||||
- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md)
|
||||
- [vcpkg\_configure\_make](vcpkg_configure_make.md)
|
||||
- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md)
|
||||
- [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md)
|
||||
- [vcpkg\_download\_distfile](vcpkg_download_distfile.md)
|
||||
- [vcpkg\_execute\_build\_process](vcpkg_execute_build_process.md)
|
||||
- [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md)
|
||||
- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md)
|
||||
- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md)
|
||||
- [vcpkg\_fail\_port\_install](vcpkg_fail_port_install.md)
|
||||
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
|
||||
- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
|
||||
- [vcpkg\_from\_git](vcpkg_from_git.md)
|
||||
- [vcpkg\_from\_github](vcpkg_from_github.md)
|
||||
- [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md)
|
||||
- [vcpkg\_install\_cmake](vcpkg_install_cmake.md)
|
||||
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
|
||||
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
|
||||
- [vcpkg\_install\_make](vcpkg_install_make.md)
|
||||
- [vcpkg\_install\_nmake](vcpkg_install_nmake.md)
|
||||
- [vcpkg\_prettify\_command](vcpkg_prettify_command.md)
|
||||
- [vcpkg\_test\_cmake](vcpkg_test_cmake.md)
|
||||
|
30
docs/maintainers/vcpkg_build_make.md
Normal file
30
docs/maintainers/vcpkg_build_make.md
Normal file
@ -0,0 +1,30 @@
|
||||
# vcpkg_build_make
|
||||
|
||||
Build a linux makefile project.
|
||||
|
||||
## Usage:
|
||||
```cmake
|
||||
vcpkg_build_make([TARGET <target>])
|
||||
```
|
||||
|
||||
### TARGET
|
||||
The target passed to the configure/make build command (`./configure/make/make install`). If not specified, no target will
|
||||
be passed.
|
||||
|
||||
### ADD_BIN_TO_PATH
|
||||
Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs.
|
||||
|
||||
## Notes:
|
||||
This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md).
|
||||
You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the
|
||||
"install" target
|
||||
|
||||
## Examples
|
||||
|
||||
* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)
|
||||
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
||||
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
|
||||
* [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)
|
75
docs/maintainers/vcpkg_build_nmake.md
Normal file
75
docs/maintainers/vcpkg_build_nmake.md
Normal file
@ -0,0 +1,75 @@
|
||||
# vcpkg_build_nmake
|
||||
|
||||
Build a msvc makefile project.
|
||||
|
||||
## Usage:
|
||||
```cmake
|
||||
vcpkg_build_nmake(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[NO_DEBUG]
|
||||
PROJECT_SUBPATH <${SUBPATH}>
|
||||
PROJECT_NAME <${MAKEFILE_NAME}>
|
||||
[PRERUN_SHELL <${SHELL_PATH}>]
|
||||
[PRERUN_SHELL_DEBUG <${SHELL_PATH}>]
|
||||
[PRERUN_SHELL_RELEASE <${SHELL_PATH}>]
|
||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
||||
[TARGET <target>])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### SOURCE_PATH
|
||||
Specifies the directory containing the source files.
|
||||
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
|
||||
### PROJECT_SUBPATH
|
||||
Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile.
|
||||
|
||||
### PROJECT_NAME
|
||||
Specifies the name of msvc makefile name.
|
||||
Default is `makefile.vc`
|
||||
|
||||
### NO_DEBUG
|
||||
This port doesn't support debug mode.
|
||||
|
||||
### ENABLE_INSTALL
|
||||
Install binaries after build.
|
||||
|
||||
### PRERUN_SHELL
|
||||
Script that needs to be called before build
|
||||
|
||||
### PRERUN_SHELL_DEBUG
|
||||
Script that needs to be called before debug build
|
||||
|
||||
### PRERUN_SHELL_RELEASE
|
||||
Script that needs to be called before release build
|
||||
|
||||
### OPTIONS
|
||||
Additional options passed to generate during the generation.
|
||||
|
||||
### OPTIONS_RELEASE
|
||||
Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`.
|
||||
|
||||
### OPTIONS_DEBUG
|
||||
Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`.
|
||||
|
||||
### TARGET
|
||||
The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will
|
||||
be passed.
|
||||
|
||||
### ADD_BIN_TO_PATH
|
||||
Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs.
|
||||
|
||||
## Notes:
|
||||
This command should be preceeded by a call to [`vcpkg_configure_nmake()`](vcpkg_configure_nmake.md).
|
||||
You can use the alias [`vcpkg_install_nmake()`](vcpkg_configure_nmake.md) function if your CMake script supports the
|
||||
"install" target
|
||||
|
||||
## Examples
|
||||
|
||||
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
||||
* [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)
|
148
docs/maintainers/vcpkg_check_features.md
Normal file
148
docs/maintainers/vcpkg_check_features.md
Normal file
@ -0,0 +1,148 @@
|
||||
# vcpkg_check_features
|
||||
Check if one or more features are a part of a package installation.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS <FEATURE_OPTIONS>
|
||||
[FEATURES
|
||||
<cuda> <WITH_CUDA>
|
||||
[<opencv> <WITH_OPENCV>]
|
||||
...]
|
||||
[INVERTED_FEATURES
|
||||
<cuda> <IGNORE_PACKAGE_CUDA>
|
||||
[<opencv> <IGNORE_PACKAGE_OPENCV>]
|
||||
...]
|
||||
)
|
||||
```
|
||||
`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<OPTION_NAME>=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<OPTION_NAME>=ON`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=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<OPTION_NAME>=OFF`, if a feature is specified for installation,
|
||||
* `-D<OPTION_NAME>=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`.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Regular features
|
||||
|
||||
```cmake
|
||||
$ ./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
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
# Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
|
||||
### Example 2: Inverted features
|
||||
|
||||
```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_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
# Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
|
||||
### Example 3: Set multiple options for same feature
|
||||
|
||||
```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_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
# Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
|
||||
### Example 4: Use regular and inverted features
|
||||
|
||||
```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_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
# Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF"
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
```
|
||||
|
||||
## Examples in portfiles
|
||||
|
||||
* [cpprestsdk](https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
|
||||
* [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.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)
|
19
docs/maintainers/vcpkg_common_definitions.md
Normal file
19
docs/maintainers/vcpkg_common_definitions.md
Normal file
@ -0,0 +1,19 @@
|
||||
# vcpkg_common_definitions
|
||||
|
||||
File contains helpful variabls for portfiles which are commonly needed or used.
|
||||
|
||||
## The following variables are available:
|
||||
```cmake
|
||||
VCPKG_TARGET_IS_<target> with <target> being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD. only defined if <target>
|
||||
VCPKG_TARGET_STATIC_LIBRARY_PREFIX static library prefix for target (same as CMAKE_STATIC_LIBRARY_PREFIX)
|
||||
VCPKG_TARGET_STATIC_LIBRARY_SUFFIX static library suffix for target (same as CMAKE_STATIC_LIBRARY_SUFFIX)
|
||||
VCPKG_TARGET_SHARED_LIBRARY_PREFIX shared library prefix for target (same as CMAKE_SHARED_LIBRARY_PREFIX)
|
||||
VCPKG_TARGET_SHARED_LIBRARY_SUFFIX shared library suffix for target (same as CMAKE_SHARED_LIBRARY_SUFFIX)
|
||||
```
|
||||
|
||||
CMAKE_STATIC_LIBRARY_PREFIX, CMAKE_STATIC_LIBRARY_SUFFIX, CMAKE_SHARED_LIBRARY_PREFIX, CMAKE_SHARED_LIBRARY_SUFFIX are defined for the target so that
|
||||
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)
|
@ -7,6 +7,8 @@ Configure CMake for Debug and Release builds of a project.
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[PREFER_NINJA]
|
||||
[DISABLE_PARALLEL_CONFIGURE]
|
||||
[NO_CHARSET_FLAG]
|
||||
[GENERATOR <"NMake Makefiles">]
|
||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||
@ -16,20 +18,27 @@ vcpkg_configure_cmake(
|
||||
|
||||
## Parameters
|
||||
### SOURCE_PATH
|
||||
Specifies the directory containing the `CMakeLists.txt`. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
Specifies the directory containing the `CMakeLists.txt`.
|
||||
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
|
||||
### PREFER_NINJA
|
||||
Indicates that, when available, Vcpkg should use Ninja to perform the build. This should be specified unless the port is known to not work under Ninja.
|
||||
Indicates that, when available, Vcpkg should use Ninja to perform the build.
|
||||
This should be specified unless the port is known to not work under Ninja.
|
||||
|
||||
### DISABLE_PARALLEL_CONFIGURE
|
||||
Disables running the CMake configure step in parallel.
|
||||
|
||||
This is needed for libraries which write back into their source directory during configure.
|
||||
|
||||
### NO_CHARSET_FLAG
|
||||
Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`.
|
||||
|
||||
This is needed for libraries that set their own source code's character set.
|
||||
|
||||
### GENERATOR
|
||||
Specifies the precise generator to use.
|
||||
|
||||
This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. If used for this purpose, it should be set to "NMake Makefiles".
|
||||
This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build.
|
||||
If used for this purpose, it should be set to "NMake Makefiles".
|
||||
|
||||
### OPTIONS
|
||||
Additional options passed to CMake during the configuration.
|
||||
|
78
docs/maintainers/vcpkg_configure_make.md
Normal file
78
docs/maintainers/vcpkg_configure_make.md
Normal file
@ -0,0 +1,78 @@
|
||||
# vcpkg_configure_make
|
||||
|
||||
Configure `configure` for Debug and Release builds of a project.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[AUTOCONFIG]
|
||||
[DISABLE_AUTO_HOST]
|
||||
[DISABLE_AUTO_DST]
|
||||
[GENERATOR]
|
||||
[NO_DEBUG]
|
||||
[SKIP_CONFIGURE]
|
||||
[PROJECT_SUBPATH <${PROJ_SUBPATH}>]
|
||||
[PRERUN_SHELL <${SHELL_PATH}>]
|
||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### SOURCE_PATH
|
||||
Specifies the directory containing the `configure`/`configure.ac`.
|
||||
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
|
||||
### PROJECT_SUBPATH
|
||||
Specifies the directory containing the ``configure`/`configure.ac`.
|
||||
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
Should use `GENERATOR NMake` first.
|
||||
|
||||
### NO_DEBUG
|
||||
This port doesn't support debug mode.
|
||||
|
||||
### SKIP_CONFIGURE
|
||||
Skip configure process
|
||||
|
||||
### AUTOCONFIG
|
||||
Need to use autoconfig to generate configure file.
|
||||
|
||||
### DISABLE_AUTO_HOST
|
||||
Don't set host automatically, the default value is `i686`.
|
||||
If use this option, you will need to set host manually.
|
||||
|
||||
### DISABLE_AUTO_DST
|
||||
Don't set installation path automatically, the default value is `${CURRENT_PACKAGES_DIR}` and `${CURRENT_PACKAGES_DIR}/debug`
|
||||
If use this option, you will need to set dst path manually.
|
||||
|
||||
### GENERATOR
|
||||
Specifies the precise generator to use.
|
||||
NMake: nmake(windows) make(unix)
|
||||
MAKE: make(windows) make(unix)
|
||||
|
||||
### PRERUN_SHELL
|
||||
Script that needs to be called before configuration
|
||||
|
||||
### OPTIONS
|
||||
Additional options passed to configure during the configuration.
|
||||
|
||||
### OPTIONS_RELEASE
|
||||
Additional options passed to configure during the Release configuration. These are in addition to `OPTIONS`.
|
||||
|
||||
### OPTIONS_DEBUG
|
||||
Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`.
|
||||
|
||||
## Notes
|
||||
This command supplies many common arguments to configure. To see the full list, examine the source.
|
||||
|
||||
## Examples
|
||||
|
||||
* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)
|
||||
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
||||
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
|
||||
* [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)
|
36
docs/maintainers/vcpkg_execute_build_process.md
Normal file
36
docs/maintainers/vcpkg_execute_build_process.md
Normal file
@ -0,0 +1,36 @@
|
||||
# vcpkg_execute_build_process
|
||||
|
||||
Execute a required build process
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND <cmd> [<args>...]
|
||||
[NO_PARALLEL_COMMAND <cmd> [<args>...]]
|
||||
WORKING_DIRECTORY </path/to/dir>
|
||||
LOGNAME <log_name>)
|
||||
)
|
||||
```
|
||||
## Parameters
|
||||
### COMMAND
|
||||
The command to be executed, along with its arguments.
|
||||
|
||||
### NO_PARALLEL_COMMAND
|
||||
Optional parameter which specifies a non-parallel command to attempt if a
|
||||
failure potentially due to parallelism is detected.
|
||||
|
||||
### WORKING_DIRECTORY
|
||||
The directory to execute the command in.
|
||||
|
||||
### LOGNAME
|
||||
The prefix to use for the log files.
|
||||
|
||||
This should be a unique name for different triplets so that the logs don't
|
||||
conflict when building multiple at once.
|
||||
|
||||
## Examples
|
||||
|
||||
* [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)
|
@ -11,6 +11,10 @@ vcpkg_execute_required_process(
|
||||
)
|
||||
```
|
||||
## Parameters
|
||||
### ALLOW_IN_DOWNLOAD_MODE
|
||||
Allows the command to execute in Download Mode.
|
||||
[See execute_process() override](../../scripts/cmake/execute_process.cmake).
|
||||
|
||||
### COMMAND
|
||||
The command to be executed, along with its arguments.
|
||||
|
||||
|
@ -25,7 +25,7 @@ The full path to the archive to be extracted.
|
||||
This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md).
|
||||
|
||||
### REF
|
||||
A friendly name that will be used instead of the filename of the archive.
|
||||
A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated.
|
||||
|
||||
By convention, this is set to the version number or tag fetched
|
||||
|
||||
|
34
docs/maintainers/vcpkg_fail_port_install.md
Normal file
34
docs/maintainers/vcpkg_fail_port_install.md
Normal file
@ -0,0 +1,34 @@
|
||||
# vcpkg_fail_port_install
|
||||
|
||||
Fails the current portfile with a (default) error message
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_fail_port_install([MESSAGE <message>] [ON_TARGET <target1> [<target2> ...]]
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### MESSAGE
|
||||
Additional failure message. If non is given a default message will be displayed depending on the failure condition
|
||||
|
||||
### ALWAYS
|
||||
will always fail early
|
||||
|
||||
### ON_TARGET
|
||||
targets for which the build should fail early. Valid targets are <target> from VCPKG_IS_TARGET_<target> (see vcpkg_common_definitions.cmake)
|
||||
|
||||
### ON_ARCH
|
||||
architecture for which the build should fail early.
|
||||
|
||||
### ON_CRT_LINKAGE
|
||||
CRT linkage for which the build should fail early.
|
||||
|
||||
### ON_LIBRARY_LINKAGE
|
||||
library linkage for which the build should fail early.
|
||||
|
||||
## Examples
|
||||
|
||||
* [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)
|
@ -24,6 +24,7 @@ The current list of programs includes:
|
||||
- MESON
|
||||
- NASM
|
||||
- NINJA
|
||||
- NUGET
|
||||
- YASM
|
||||
- ARIA2 (Downloader)
|
||||
|
||||
|
30
docs/maintainers/vcpkg_fixup_cmake_targets.md
Normal file
30
docs/maintainers/vcpkg_fixup_cmake_targets.md
Normal file
@ -0,0 +1,30 @@
|
||||
# vcpkg_fixup_cmake_targets
|
||||
|
||||
Transforms all `/debug/share/\<port\>/\*targets-debug.cmake` files and move them to `/share/\<port\>`.
|
||||
Removes all `/debug/share/\<port\>/\*targets.cmake and /debug/share/\<port\>/\*config.cmake`.
|
||||
|
||||
Transforms all references matching `/bin/\*.exe tools/\<port\>/\*.exe` on Windows.
|
||||
Transforms all references matching `/bin/\* to /tools/\<port\>/\*` on other platforms.
|
||||
|
||||
Fixups *${_IMPORT_PREFIX}* in auto generated targets to be one folder deeper.
|
||||
Replaces *${CURRENT_INSTALLED_DIR}* with *${_IMPORT_PREFIX}* in config files and targets.
|
||||
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH <config_path>)
|
||||
```
|
||||
|
||||
## Parameters:
|
||||
### CONFIG_PATH
|
||||
*.cmake files subdirectory (e.g. "lib/cmake/${PORT}" or "cmake/${PORT}).
|
||||
### TARGET_PATH
|
||||
Optional location to place fixup'd files. Unecessary if target is "share/${PORT}".
|
||||
|
||||
## Examples:
|
||||
- [Azure-uamqp-c](https://github.com/microsoft/vcpkg/blob/master/ports/azure-uamqp-c/portfile.cmake)
|
||||
- [Brigand](https://github.com/microsoft/vcpkg/blob/master/ports/brigand/portfile.cmake)
|
||||
- [cctz](https://github.com/microsoft/vcpkg/blob/master/ports/cctz/portfile.cmake)
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_fixup_cmake_targets.cmake](https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake)
|
@ -8,7 +8,6 @@ vcpkg_from_git(
|
||||
OUT_SOURCE_PATH <SOURCE_PATH>
|
||||
URL <https://android.googlesource.com/platform/external/fdlibm>
|
||||
REF <59f7335e4d...>
|
||||
SHA512 <abcdef123...>
|
||||
[PATCHES <patch1.patch> <patch2.patch>...]
|
||||
)
|
||||
```
|
||||
@ -20,17 +19,10 @@ Specifies the out-variable that will contain the extracted location.
|
||||
This should be set to `SOURCE_PATH` by convention.
|
||||
|
||||
### URL
|
||||
The url of the git repository.
|
||||
|
||||
### SHA512
|
||||
The SHA512 hash that should match the archive form of the commit.
|
||||
|
||||
This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile.
|
||||
The url of the git repository. Must start with `https`.
|
||||
|
||||
### REF
|
||||
A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.**
|
||||
|
||||
For repositories without official releases, this can be set to the full commit id of the current latest master.
|
||||
The git sha of the commit to download.
|
||||
|
||||
### PATCHES
|
||||
A list of patches to be applied to the extracted sources.
|
||||
@ -38,7 +30,7 @@ A list of patches to be applied to the extracted sources.
|
||||
Relative paths are based on the port directory.
|
||||
|
||||
## Notes:
|
||||
`OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified.
|
||||
`OUT_SOURCE_PATH`, `REF`, and `URL` must be specified.
|
||||
|
||||
## Examples:
|
||||
|
||||
|
24
docs/maintainers/vcpkg_install_make.md
Normal file
24
docs/maintainers/vcpkg_install_make.md
Normal file
@ -0,0 +1,24 @@
|
||||
# vcpkg_install_make
|
||||
|
||||
Build and install a make project.
|
||||
|
||||
## Usage:
|
||||
```cmake
|
||||
vcpkg_install_make(...)
|
||||
```
|
||||
|
||||
## Parameters:
|
||||
See [`vcpkg_build_make()`](vcpkg_build_make.md).
|
||||
|
||||
## Notes:
|
||||
This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.md), adding `ENABLE_INSTALL`
|
||||
|
||||
## Examples
|
||||
|
||||
* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)
|
||||
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
||||
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
|
||||
* [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)
|
60
docs/maintainers/vcpkg_install_nmake.md
Normal file
60
docs/maintainers/vcpkg_install_nmake.md
Normal file
@ -0,0 +1,60 @@
|
||||
# vcpkg_install_nmake
|
||||
|
||||
Build and install a msvc makefile project.
|
||||
|
||||
## Usage:
|
||||
```cmake
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[NO_DEBUG]
|
||||
PROJECT_SUBPATH <${SUBPATH}>
|
||||
PROJECT_NAME <${MAKEFILE_NAME}>
|
||||
[PRERUN_SHELL <${SHELL_PATH}>]
|
||||
[PRERUN_SHELL_DEBUG <${SHELL_PATH}>]
|
||||
[PRERUN_SHELL_RELEASE <${SHELL_PATH}>]
|
||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### SOURCE_PATH
|
||||
Specifies the directory containing the source files.
|
||||
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
||||
|
||||
### PROJECT_SUBPATH
|
||||
Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile.
|
||||
|
||||
### PROJECT_NAME
|
||||
Specifies the name of msvc makefile name.
|
||||
Default is makefile.vc
|
||||
|
||||
### NO_DEBUG
|
||||
This port doesn't support debug mode.
|
||||
|
||||
### PRERUN_SHELL
|
||||
Script that needs to be called before build
|
||||
|
||||
### PRERUN_SHELL_DEBUG
|
||||
Script that needs to be called before debug build
|
||||
|
||||
### PRERUN_SHELL_RELEASE
|
||||
Script that needs to be called before release build
|
||||
|
||||
### OPTIONS
|
||||
Additional options passed to generate during the generation.
|
||||
|
||||
### OPTIONS_RELEASE
|
||||
Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`.
|
||||
|
||||
### OPTIONS_DEBUG
|
||||
Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`.
|
||||
|
||||
## Parameters:
|
||||
See [`vcpkg_build_nmake()`](vcpkg_build_nmake.md).
|
||||
|
||||
## Notes:
|
||||
This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL`
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_install_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake)
|
17
docs/maintainers/vcpkg_prettify_command.md
Normal file
17
docs/maintainers/vcpkg_prettify_command.md
Normal file
@ -0,0 +1,17 @@
|
||||
# vcpkg_prettify_command
|
||||
|
||||
Turns list of command arguments into a formatted string.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_prettify_command()
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
* `scripts/cmake/vcpkg_execute_build_process.cmake`
|
||||
* `scripts/cmake/vcpkg_execute_required_process.cmake`
|
||||
* `scripts/cmake/vcpkg_execute_required_process_repeat.cmake`
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_prettify_command.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_prettify_command.cmake)
|
182
docs/specifications/ports-overlay.md
Normal file
182
docs/specifications/ports-overlay.md
Normal file
@ -0,0 +1,182 @@
|
||||
# Ports Overlay (Jun 19, 2019)
|
||||
|
||||
|
||||
## 1. Motivation
|
||||
|
||||
### A. Allow users to override ports with alternate versions
|
||||
|
||||
It's a common scenario for `vcpkg` users to keep specific versions of libraries to use in their own projects. The current recommendation for users is to fork `vcpkg`'s repository and create tags for commits containing the specific versions of the ports they want to use.
|
||||
|
||||
This proposal adds an alternative to solve this problem. By allowing `vcpkg` users to specify additional locations in their file system containing ports for:
|
||||
|
||||
* older or newer versions of libraries,
|
||||
* modified libraries, or
|
||||
* libraries not available in `vcpkg`.
|
||||
|
||||
These locations will be searched when resolving port names during package installation, and override ports in `<vcpkg-root>/ports`.
|
||||
|
||||
### B. Allow users to keep unmodified upstream ports
|
||||
|
||||
Users will be able to keep unmodified versions of the ports shipped with `vcpkg` and update them via `vcpkg update` and `vcpkg upgrade` without having to solve merge conflicts.
|
||||
|
||||
|
||||
## 2. Other design concerns
|
||||
|
||||
* Allow a set of `vcpkg` commands to optionally accept additional paths to be used when searching for ports.
|
||||
* Additional paths must take precedence when resolving names of ports to install.
|
||||
* Allow users to specify multiple additional paths.
|
||||
* Provide a simple disambiguation mechanism to resolve ambiguous port names.
|
||||
* After resolving a port name, the installation process has to work the same as for ports shipped by `vcpkg`.
|
||||
* This **DOES NOT ENABLE MULTIPLE VERSIONS** of a same library to be **INSTALLED SIDE-BY-SIDE**.
|
||||
|
||||
|
||||
## 3. Proposed solution
|
||||
|
||||
This document proposes allowing additional locations to search for ports during package installation that will override and complement the set of ports provided by `vcpkg` (ports under the `<vcpkg_root>/ports` directory).`
|
||||
|
||||
A new option `--overlay-ports` will be added to the `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, `vcpkg export`, and `vcpkg depend-info` commands to specify additional paths containing ports.
|
||||
|
||||
From a user experience perspective, a user expresses interest in adding additional lookup locations by passing the `--overlay-ports` option followed by a path to:
|
||||
|
||||
* an individual port (directory containing a `CONTROL` file),
|
||||
* `vcpkg install sqlite3 --overlay-ports="C:\custom-ports\sqlite3"`
|
||||
|
||||
* a directory containing ports,
|
||||
* `vcpkg install sqlite3 --overlay-ports=\\share\org\custom-ports`
|
||||
|
||||
* a file listing paths to the former two.
|
||||
> NOTE: Reading paths from a text file is not available in the current implementation, some revisions to this part of the specification are being made and will be implemented in a future date.
|
||||
|
||||
* `vcpkg install sqlite3 --overlay-ports=..\port-repos.txt`
|
||||
|
||||
_port-repos.txt_
|
||||
|
||||
```
|
||||
.\experimental-ports\sqlite3
|
||||
C:\custom-ports
|
||||
\\share\team\custom-ports
|
||||
\\share\org\custom-ports
|
||||
```
|
||||
*Relative paths inside this file are resolved relatively to the file's location. In this case a `experimental-ports` directory should exist at the same level as the `port-repos.txt` file.*
|
||||
|
||||
_NOTE: It is not the goal of this document to discuss library versioning or project dependency management solutions, which require the ability to install multiple versions of a same library side-by-side._
|
||||
|
||||
### Multiple additional paths
|
||||
|
||||
Users can provide multiple additional paths by repeating the `--overlay-ports` option.
|
||||
|
||||
```
|
||||
vcpkg install sqlite3
|
||||
--overlay-ports="..\experimental-ports\sqlite3"
|
||||
--overlay-ports="C:\custom-ports"
|
||||
--overlay-ports="\\share\team\custom-ports
|
||||
```
|
||||
|
||||
### Overlaying ports
|
||||
|
||||
Port name resolution follows the order in which additional paths are specified, with the first match being selected for installation, and falling back to `<vcpkg-root>/ports` if the port is not found in any of the additional paths.
|
||||
|
||||
No effort is made to compare version numbers inside the `CONTROL` files, or to determine which port contains newer or older files.
|
||||
|
||||
### Examples
|
||||
|
||||
Given the following directory structure:
|
||||
|
||||
```
|
||||
team-ports/
|
||||
|-- sqlite3/
|
||||
|---- CONTROL
|
||||
|-- rapidjson/
|
||||
|---- CONTROL
|
||||
|-- curl/
|
||||
|---- CONTROL
|
||||
|
||||
my-ports/
|
||||
|-- sqlite3/
|
||||
|---- CONTROL
|
||||
|-- rapidjson/
|
||||
|---- CONTROL
|
||||
|
||||
vcpkg
|
||||
|-- ports/
|
||||
|---- <upstream ports>
|
||||
|-- vcpkg.exe
|
||||
|-- preferred-ports.txt
|
||||
```
|
||||
* #### Example #1:
|
||||
|
||||
Running:
|
||||
|
||||
```
|
||||
vcpkg/vcpkg.exe install sqlite3 --overlay-ports=my-ports --overlay-ports=team-ports
|
||||
```
|
||||
|
||||
Results in `my-ports/sqlite3` getting installed as that location appears first in the command line arguments.
|
||||
|
||||
* #### Example #2:
|
||||
|
||||
A specific version of a port can be given priority by adding its path first in the list of arguments:
|
||||
|
||||
```
|
||||
vcpkg/vcpkg.exe install sqlite3 rapidjson curl
|
||||
--overlay-ports=my-ports/rapidjson
|
||||
--overlay-ports=vcpkg/ports/curl
|
||||
--overlay-ports=team-ports
|
||||
```
|
||||
|
||||
Installs:
|
||||
* `sqlite3` from `team-ports/sqlite3`
|
||||
* `rapidjson` from `my-ports/rapidjson`
|
||||
* `curl` from `vcpkg/ports/curl`
|
||||
|
||||
* #### Example #3:
|
||||
|
||||
> NOTE: Reading paths from a text file is not available in the current implementation, some revisions to this part of the specification are being made and will be implemented in a future date.
|
||||
|
||||
Given the content of `preferred-ports.txt` as:
|
||||
|
||||
```
|
||||
./ports/curl
|
||||
/my-ports/rapidjson
|
||||
/team-ports
|
||||
```
|
||||
|
||||
A location can be appended or prepended to those included in `preferred-ports.txt` via the command line, like this:
|
||||
|
||||
```
|
||||
vcpkg/vcpkg.exe install sqlite3 curl --overlay-ports=my-ports --overlay-ports=vcpkg/preferred-ports.txt
|
||||
```
|
||||
|
||||
Which results in `my-ports/sqlite3` and `vcpkg/ports/curl` getting installed.
|
||||
|
||||
|
||||
## 4. Proposed User experience
|
||||
|
||||
### i. User wants to preserve an older version of a port
|
||||
|
||||
Developer Alice and her team use `vcpkg` to acquire **OpenCV** and some other packages. She has even contributed many patches to add features to the **OpenCV 3** port in `vcpkg`. But, one day, she notices that a PR to update **OpenCV** to the next major version has been merged.
|
||||
|
||||
Alice wants to update some packages available in `vcpkg`. Unfortunately, updating her project to use the latest **OpenCV** is not immediately possible.
|
||||
|
||||
Alice creates a private GitHub repository and checks in the set of ports that she wants to preserve. Then provides her teammates with the link to clone her private ports repository.
|
||||
|
||||
```
|
||||
mkdir vcpkg-custom-ports
|
||||
cd vcpkg-custom-ports
|
||||
git init
|
||||
cp -r %VCPKG_ROOT%/ports/opencv .
|
||||
git add .
|
||||
git commit -m "[opencv] Add OpenCV 3 port"
|
||||
git remote add origin https://github.com/<Alice's GitHub username>/vcpkg-custom-ports.git
|
||||
git push -u origin master
|
||||
```
|
||||
|
||||
Now her team is able to use:
|
||||
|
||||
```
|
||||
git clone https://github.com/<Alice's GitHub username>/vcpkg-custom-ports.git
|
||||
vcpkg update --overlay-ports=./vcpkg-custom-ports
|
||||
vcpkg upgrade --no-dry-run --overlay-ports=./vcpkg-custom-ports
|
||||
```
|
||||
|
||||
to upgrade their packages and preserve the old version of **OpenCV** they require.
|
195
docs/tool-maintainers/benchmarking.md
Normal file
195
docs/tool-maintainers/benchmarking.md
Normal file
@ -0,0 +1,195 @@
|
||||
# Benchmarking
|
||||
|
||||
Benchmarking new code against old code is extremely important whenever making
|
||||
large changes to how something works. If you are attempting to make something
|
||||
faster, and you end up slowing it down, you'll never know if you don't
|
||||
benchmark! We have benchmarks in the `toolsrc/src/vcpkg-test` directory, just
|
||||
like the tests -- they're treated as a special kind of test.
|
||||
|
||||
## Running Benchmarks
|
||||
|
||||
Unlike normal tests, benchmarks are hidden behind a special define -- `CATCH_CONFIG_ENABLE_BENCHMARKING` -- so that you never try to run benchmarks
|
||||
unless you specifically want to. This is because benchmarks actually take quite
|
||||
a long time! However, if you want to run benchmarks (and I recommend running
|
||||
only specific benchmarks at a time), you can do so by passing the
|
||||
`VCPKG_ENABLE_BENCHMARKING` option at cmake configure time.
|
||||
|
||||
```sh
|
||||
$ cmake -B toolsrc/out -S toolsrc -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DVCPKG_BUILD_BENCHMARKING=On
|
||||
|
||||
-- The C compiler identification is MSVC 19.22.27905.0
|
||||
-- The CXX compiler identification is MSVC 19.22.27905.0
|
||||
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
|
||||
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
|
||||
-- Detecting C compiler ABI info
|
||||
-- Detecting C compiler ABI info - done
|
||||
-- Detecting C compile features
|
||||
-- Detecting C compile features - done
|
||||
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
|
||||
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
|
||||
-- Detecting CXX compiler ABI info
|
||||
-- Detecting CXX compiler ABI info - done
|
||||
-- Detecting CXX compile features
|
||||
-- Detecting CXX compile features - done
|
||||
-- Looking for pthread.h
|
||||
-- Looking for pthread.h - not found
|
||||
-- Found Threads: TRUE
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: C:/Users/t-nimaz/src/vcpkg/toolsrc/out
|
||||
|
||||
$ cmake --build toolsrc/out
|
||||
|
||||
[0/2] Re-checking globbed directories...
|
||||
[80/80] Linking CXX executable vcpkg-test.exe
|
||||
```
|
||||
|
||||
You can then run benchmarks easily with the following command (which run the
|
||||
files benchmarks):
|
||||
|
||||
```sh
|
||||
$ ./toolsrc/out/vcpkg-test [!benchmark][file]
|
||||
```
|
||||
|
||||
You can switch out `[file]` for a different set -- `[hash]`, for example.
|
||||
|
||||
## Writing Benchmarks
|
||||
|
||||
First, before anything else, I recommend reading the
|
||||
[benchmarking documentation] at Catch2's repository.
|
||||
|
||||
Now, after that, let's say that you wanted to benchmark, say, our ASCII
|
||||
case-insensitive string compare against your new implementation. We place
|
||||
benchmarks for code in the same file as their tests, so open
|
||||
`vcpkg-test/strings.cpp`, and add the following at the bottom:
|
||||
|
||||
```cpp
|
||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||
TEST_CASE ("case insensitive ascii equals: benchmark", "[strings][!benchmark]")
|
||||
{
|
||||
BENCHMARK("qwertyuiop") {
|
||||
return vcpkg::Strings::case_insensitive_ascii_equals("qwertyuiop", "QWERTYUIOP");
|
||||
};
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
Remember the `;` at the end of the benchmark -- it's not required for
|
||||
`TEST_CASE`s, but is for `BENCHMARK`s.
|
||||
|
||||
Now, let's rebuild and run:
|
||||
|
||||
```sh
|
||||
$ cmake --build toolsrc/out
|
||||
[0/2] Re-checking globbed directories...
|
||||
[2/2] Linking CXX executable vcpkg-test.exe
|
||||
$ ./toolsrc/out/vcpkg-test [strings][!benchmark]
|
||||
Filters: [strings][!benchmark]
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
vcpkg-test.exe is a Catch v2.9.1 host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
case insensitive ascii equals: benchmark
|
||||
-------------------------------------------------------------------------------
|
||||
C:\Users\t-nimaz\src\vcpkg\toolsrc\src\vcpkg-test\strings.cpp(36)
|
||||
...............................................................................
|
||||
|
||||
benchmark name samples iterations estimated
|
||||
mean low mean high mean
|
||||
std dev low std dev high std dev
|
||||
-------------------------------------------------------------------------------
|
||||
qwertyuiop 100 2088 3.9672 ms
|
||||
25 ns 24 ns 26 ns
|
||||
6 ns 5 ns 8 ns
|
||||
|
||||
|
||||
===============================================================================
|
||||
test cases: 1 | 1 passed
|
||||
assertions: - none -
|
||||
```
|
||||
|
||||
You've now written your first benchmark!
|
||||
|
||||
But wait. This seems kind of silly. Benchmarking the comparison of literal
|
||||
strings is great and all, but could we make it a little more realistic?
|
||||
|
||||
This is where `BENCHMARK_ADVANCED` comes in. `BENCHMARK_ADVANCED` allows one to
|
||||
write a benchmark that has a little setup to it without screwing up the numbers.
|
||||
Let's try it now:
|
||||
|
||||
```cpp
|
||||
TEST_CASE ("case insensitive ascii equals: benchmark", "[strings][!benchmark]")
|
||||
{
|
||||
BENCHMARK_ADVANCED("equal strings")(Catch::Benchmark::Chronometer meter)
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
strings.resize(meter.runs());
|
||||
std::mt19937_64 urbg;
|
||||
std::uniform_int_distribution<std::uint64_t> data_generator;
|
||||
|
||||
std::generate(strings.begin(), strings.end(), [&] {
|
||||
std::string result;
|
||||
for (std::size_t i = 0; i < 1000; ++i)
|
||||
{
|
||||
result += vcpkg::Strings::b32_encode(data_generator(urbg));
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
meter.measure(
|
||||
[&](int run) { return vcpkg::Strings::case_insensitive_ascii_equals(strings[run], strings[run]); });
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Then, run it again!
|
||||
|
||||
```sh
|
||||
$ cmake --build toolsrc/out
|
||||
[0/2] Re-checking globbed directories...
|
||||
[2/2] Linking CXX executable vcpkg-test.exe
|
||||
$ toolsrc/out/vcpkg-test [strings][!benchmark]
|
||||
Filters: [strings][!benchmark]
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
vcpkg-test.exe is a Catch v2.9.1 host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
case insensitive ascii equals: benchmark
|
||||
-------------------------------------------------------------------------------
|
||||
C:\Users\t-nimaz\src\vcpkg\toolsrc\src\vcpkg-test\strings.cpp(36)
|
||||
...............................................................................
|
||||
|
||||
benchmark name samples iterations estimated
|
||||
mean low mean high mean
|
||||
std dev low std dev high std dev
|
||||
-------------------------------------------------------------------------------
|
||||
equal strings 100 2 5.4806 ms
|
||||
22.098 us 21.569 us 23.295 us
|
||||
3.842 us 2.115 us 7.41 us
|
||||
|
||||
|
||||
===============================================================================
|
||||
test cases: 1 | 1 passed
|
||||
assertions: - none -
|
||||
```
|
||||
|
||||
And now you have a working benchmark to test the speed of the existing code, and
|
||||
of new code!
|
||||
|
||||
If you're writing a lot of benchmarks that follow the same sort of pattern, with
|
||||
some differences in constants, look into `vcpkg-test/files.cpp`'s benchmarks --
|
||||
there are a lot of things one can do to make writing new benchmarks really easy.
|
||||
|
||||
If you wish to add a benchmark for a piece of code that has not yet been tested,
|
||||
please read the [testing documentation], and please write some unit tests.
|
||||
The speed of your code isn't very important if it doesn't work at all!
|
||||
|
||||
[benchmarking documentation]: https://github.com/catchorg/Catch2/blob/master/docs/benchmarks.md#top
|
||||
[testing documentation]: ./testing.md#adding-new-test-files
|
85
docs/tool-maintainers/layout.md
Normal file
85
docs/tool-maintainers/layout.md
Normal file
@ -0,0 +1,85 @@
|
||||
# Layout of the vcpkg source tree
|
||||
|
||||
All vcpkg sources and build systems are in `toolsrc`. If you'd like to
|
||||
contribute to the vcpkg tool itself, most of your time will be spent in here.
|
||||
|
||||
## Build Files
|
||||
|
||||
These are the files used to build and configure the project. In order to build
|
||||
with CMake, the only files you should be interested in are `CMakeLists.txt`, and
|
||||
`.clang-format`; in order to build with msbuild or the Visual Studio IDE, you
|
||||
will be interested in `dirs.proj` or `vcpkg.sln`. However, if you add or remove
|
||||
files, you will need to edit the MSBuild project files in the `vcpkg*`
|
||||
directories no matter what system you use.
|
||||
|
||||
### Top Level
|
||||
|
||||
We have six files in this directory -- one `.clang-format` file, one
|
||||
`CMakeLists.txt` file, three Visual Studio files, and `VERSION.txt`.
|
||||
|
||||
- `.clang-format`: This is where we store the formatting settings of the
|
||||
project. If you want to format the project, you can use the `format` target
|
||||
with the CMake build system.
|
||||
- `CMakeLists.txt`: This is where the CMake build system definition lives. If
|
||||
you want to modify how one builds the project, or add a target, you can do
|
||||
it here.
|
||||
- `VERSION.txt`: This is a file which tells `vcpkg` to tell the user to
|
||||
rebuild. If this version is different from the version when the user built
|
||||
the binary (for example, after a `git pull` or a `vcpkg update`), then
|
||||
`vcpkg` will print a message to re-bootstrap. This is updated whenever major
|
||||
changes are made to the `vcpkg` tool.
|
||||
- The Visual Studio files:
|
||||
- `vcpkg.natvis`: NATVIS files allow one to visualize objects of user
|
||||
defined type in the debugger -- this one contains the definitions for
|
||||
`vcpkg`'s types.
|
||||
- `dirs.proj`: This is how one builds with `msbuild` without calling into
|
||||
the IDE.
|
||||
- `vcpkg.sln`: The solution file is how one opens the project in the VS IDE.
|
||||
|
||||
### `vcpkg`, `vcpkglib`, `vcpkgmetricsuploader`, and `vcpkgtest`
|
||||
|
||||
These four contain exactly one `<name>.vcxproj` and one
|
||||
`<name>.vcxproj.filters`. The `<name>.vcxproj` file contains the source files
|
||||
and the `<name>.vcxproj.filters` contains information on how Visual Studio
|
||||
should lay out the project's source files in the IDE's project view.
|
||||
|
||||
`vcpkgtest` should not be touched. It's likely that it will be deleted soon. If
|
||||
you want to test your code, use the cmake build system.
|
||||
|
||||
## Source Files
|
||||
|
||||
If you're modifying the project, it's likely that these are the directories that
|
||||
you're going to deal with.
|
||||
|
||||
### `include`
|
||||
|
||||
There's one file in here -- `pch.h`. This contains most of the C++ standard
|
||||
library, and acts as a [precompiled header]. You can read more at the link.
|
||||
|
||||
There are three directories:
|
||||
|
||||
- `catch2` -- This contains the single-header library [catch2]. We use this
|
||||
library for both [testing] and [benchmarking].
|
||||
- `vcpkg` -- This contains the header files for the `vcpkg` project. All of
|
||||
the interfaces for building, installing, and generally "port stuff" live
|
||||
here.
|
||||
- `vcpkg/base` -- This contains the interfaces for the
|
||||
"vcpkg standard library" -- file handling, hashing, strings,
|
||||
`Span<T>`, printing, etc.
|
||||
- `vcpkg-test` -- This contains the interfaces for any common utilities
|
||||
required by the tests.
|
||||
|
||||
### `src`
|
||||
|
||||
The source files live here. `pch.cpp` is the source file for the
|
||||
[precompiled header]; `vcpkg.cpp` is where the `vcpkg` binary lives; and
|
||||
`vcpkgmetricsuploader.cpp` is where the metrics uploader lives.
|
||||
|
||||
The interesting files live in the `vcpkg` and `vcpkg-test` directories. In
|
||||
`vcpkg`, you have the implementation for the interfaces that live in
|
||||
`include/vcpkg`; and in `vcpkg-test`, you have the tests and benchmarks.
|
||||
|
||||
[precompiled header]: https://en.wikipedia.org/wiki/Precompiled_header
|
||||
[catch2]: https://github.com/catchorg/Catch2
|
||||
[testing]: ./testing.md
|
||||
[benchmarking]: ./benchmarking.md
|
152
docs/tool-maintainers/testing.md
Normal file
152
docs/tool-maintainers/testing.md
Normal file
@ -0,0 +1,152 @@
|
||||
# Testing
|
||||
|
||||
Testing vcpkg is important whenever one makes changes to the tool itself, and
|
||||
writing new tests and keeping them up to date is also very important. If one's
|
||||
code is subtly broken, we'd rather find it out right away than a few weeks down
|
||||
the line when someone complains!
|
||||
|
||||
## Running Tests
|
||||
|
||||
Before anything else, we should know whether you can actually run the tests!
|
||||
All you should need is a way to build vcpkg -- anything will do! All you have to
|
||||
do is follow the guide 😄
|
||||
|
||||
With `$VCPKG_DIRECTORY` being the directory where you have cloned vcpkg, create
|
||||
a build directory in `$VCPKG_DIRECTORY/toolsrc` (commonly named `out`), and
|
||||
`cd` into it. Make sure to clean it out if it already exists!
|
||||
|
||||
```sh
|
||||
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja
|
||||
$ cmake --build .
|
||||
$ ./vcpkg-test # ./vcpkg-test [$SPECIFIC_TEST] for a specific set of tests
|
||||
$ # i.e., ./vcpkg-test [arguments]
|
||||
```
|
||||
|
||||
If you make any modifications to `vcpkg`, you'll have to do the
|
||||
`cmake --build .` step again.
|
||||
|
||||
## Writing Tests
|
||||
|
||||
In your journey to write new tests, and to modify existing tests, reading the
|
||||
[Catch2 documentation] will be very helpful! Come back after reading those 😀
|
||||
|
||||
You'll want to place your tests in one of the existing files, or, if it doesn't
|
||||
belong in any of those, in a [new file](#adding-new-test-files).
|
||||
|
||||
The layout of these tests is as follows:
|
||||
|
||||
```cpp
|
||||
// ... includes
|
||||
|
||||
TEST_CASE("Name of test", "[filename without the .cpp]") {
|
||||
// setup and the like
|
||||
REQUIRE(some boolean expression);
|
||||
}
|
||||
|
||||
// etc.
|
||||
```
|
||||
|
||||
You want to give these test cases good, descriptive, unique names, like
|
||||
`SourceParagraph construct minimum` -- it doesn't need to be extremely clear
|
||||
english, and shorthand is good, but make sure it's clear what the test is from
|
||||
the name. For the latter parameter, known as "tags", you should at least put the
|
||||
name of the file which the test case is in -- e.g., in `arguments.cpp`, you'd
|
||||
tag all of the test cases with `[arguments]`.
|
||||
|
||||
If you wish to add helper functions, make sure to place them in an anonymous
|
||||
namespace -- this will ensure that they don't trample over anybody else's
|
||||
space. Additionally, there are a few helper functions that live in
|
||||
`<vcpkg-test/util.h>` and `src/vcpkg-test/util.cpp` -- make sure to look into
|
||||
them so that you're not rewriting functionality.
|
||||
|
||||
That should be all you need to know to start writing your own tests!
|
||||
Remember to check out the [Catch2 documentation]
|
||||
if you'd like to get more advanced with your tests,
|
||||
and good luck on your testing journey!
|
||||
|
||||
## Adding New Test Files
|
||||
|
||||
Adding new test files should be easy and straightforward. All it requires is
|
||||
creating a new source file in `toolsrc/src/vcpkg-test`.
|
||||
|
||||
### Example
|
||||
|
||||
Let's try writing a new test file called `example` (very creative, I know).
|
||||
|
||||
First, we should create a file, `example.cpp`, in `toolsrc/src/vcpkg-test`:
|
||||
|
||||
```cpp
|
||||
// vcpkg-test/example.cpp
|
||||
#include <vcpkg-test/catch.h>
|
||||
```
|
||||
|
||||
This is the minimum file needed for tests; let's rebuild!
|
||||
|
||||
```sh
|
||||
$ cmake --build .
|
||||
[80/80] Linking CXX executable vcpkg.exe
|
||||
```
|
||||
|
||||
Okay, now let's make sure this worked; add a test case to `example.cpp`:
|
||||
|
||||
```cpp
|
||||
TEST_CASE("Example 1 - fail", "[example]") {
|
||||
REQUIRE(false);
|
||||
}
|
||||
```
|
||||
|
||||
Now build the tests again, and run them:
|
||||
|
||||
```sh
|
||||
$ cmake --build .
|
||||
[2/2] Linking CXX executable vcpkg-test.exe
|
||||
$ ./vcpkg-test
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
vcpkg-test.exe is a Catch v2.9.1 host application.
|
||||
Run with -? for options
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Example 1 - fail
|
||||
-------------------------------------------------------------------------------
|
||||
$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(3)
|
||||
...............................................................................
|
||||
|
||||
$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(14): FAILED:
|
||||
REQUIRE( false )
|
||||
|
||||
===============================================================================
|
||||
test cases: 102 | 101 passed | 1 failed
|
||||
assertions: 3611 | 3610 passed | 1 failed
|
||||
```
|
||||
|
||||
Hopefully, that worked! It should compile correctly, and have one failing test.
|
||||
Now let's try a more complex test, after deleting the old one;
|
||||
|
||||
```cpp
|
||||
// add #include <vcpkg/base/strings.h> to the top of the file
|
||||
namespace Strings = vcpkg::Strings;
|
||||
|
||||
TEST_CASE("Example 2 - success", "[example]") {
|
||||
std::string hello = "Hello";
|
||||
REQUIRE(Strings::case_insensitive_ascii_equals(hello, "hELLo"));
|
||||
REQUIRE_FALSE(Strings::case_insensitive_ascii_starts_with(hello, "E"));
|
||||
}
|
||||
```
|
||||
|
||||
Now compile and build the tests, and this time let's only run our example tests:
|
||||
|
||||
```sh
|
||||
$ cmake --build .
|
||||
[2/2] Linking CXX executable vcpkg-test.exe
|
||||
$ ./vcpkg-test [example]
|
||||
Filters: [example]
|
||||
===============================================================================
|
||||
All tests passed (2 assertions in 1 test case)
|
||||
```
|
||||
|
||||
Hopefully you have one test running and succeeding! If you have that, you have
|
||||
succeeded at adding a new file to vcpkg's tests. Congratulations! Have fun on
|
||||
the rest of your journey 🐱👤😁
|
||||
|
||||
[Catch2 documentation]: https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#top
|
374
ports/7zip/CMakeLists.txt
Normal file
374
ports/7zip/CMakeLists.txt
Normal file
@ -0,0 +1,374 @@
|
||||
# Created from 7-zip v19.00 - 7zip/CPP/7zip/Bundles/Format7zF
|
||||
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
cmake_policy(VERSION 3.11)
|
||||
|
||||
project(7zip LANGUAGES C CXX ASM_MASM)
|
||||
|
||||
set(SRC_ASM
|
||||
Asm/x86/AesOpt.asm
|
||||
Asm/x86/7zCrcOpt.asm
|
||||
Asm/x86/XzCrc64Opt.asm
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-Dx64")
|
||||
else()
|
||||
set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-safeseh")
|
||||
endif()
|
||||
|
||||
set(SRC_COMPRESS
|
||||
CPP/7zip/Compress/Bcj2Coder.cpp
|
||||
CPP/7zip/Compress/Bcj2Register.cpp
|
||||
CPP/7zip/Compress/BcjCoder.cpp
|
||||
CPP/7zip/Compress/BcjRegister.cpp
|
||||
CPP/7zip/Compress/BitlDecoder.cpp
|
||||
CPP/7zip/Compress/BranchMisc.cpp
|
||||
CPP/7zip/Compress/BranchRegister.cpp
|
||||
CPP/7zip/Compress/ByteSwap.cpp
|
||||
CPP/7zip/Compress/BZip2Crc.cpp
|
||||
CPP/7zip/Compress/BZip2Decoder.cpp
|
||||
CPP/7zip/Compress/BZip2Encoder.cpp
|
||||
CPP/7zip/Compress/BZip2Register.cpp
|
||||
CPP/7zip/Compress/CopyCoder.cpp
|
||||
CPP/7zip/Compress/CopyRegister.cpp
|
||||
CPP/7zip/Compress/Deflate64Register.cpp
|
||||
CPP/7zip/Compress/DeflateDecoder.cpp
|
||||
CPP/7zip/Compress/DeflateEncoder.cpp
|
||||
CPP/7zip/Compress/DeflateRegister.cpp
|
||||
CPP/7zip/Compress/DeltaFilter.cpp
|
||||
CPP/7zip/Compress/ImplodeDecoder.cpp
|
||||
CPP/7zip/Compress/LzfseDecoder.cpp
|
||||
CPP/7zip/Compress/LzhDecoder.cpp
|
||||
CPP/7zip/Compress/Lzma2Decoder.cpp
|
||||
CPP/7zip/Compress/Lzma2Encoder.cpp
|
||||
CPP/7zip/Compress/Lzma2Register.cpp
|
||||
CPP/7zip/Compress/LzmaDecoder.cpp
|
||||
CPP/7zip/Compress/LzmaEncoder.cpp
|
||||
CPP/7zip/Compress/LzmaRegister.cpp
|
||||
CPP/7zip/Compress/LzmsDecoder.cpp
|
||||
CPP/7zip/Compress/LzOutWindow.cpp
|
||||
CPP/7zip/Compress/LzxDecoder.cpp
|
||||
CPP/7zip/Compress/PpmdDecoder.cpp
|
||||
CPP/7zip/Compress/PpmdEncoder.cpp
|
||||
CPP/7zip/Compress/PpmdRegister.cpp
|
||||
CPP/7zip/Compress/PpmdZip.cpp
|
||||
CPP/7zip/Compress/QuantumDecoder.cpp
|
||||
CPP/7zip/Compress/Rar1Decoder.cpp
|
||||
CPP/7zip/Compress/Rar2Decoder.cpp
|
||||
CPP/7zip/Compress/Rar3Decoder.cpp
|
||||
CPP/7zip/Compress/Rar3Vm.cpp
|
||||
CPP/7zip/Compress/Rar5Decoder.cpp
|
||||
CPP/7zip/Compress/RarCodecsRegister.cpp
|
||||
CPP/7zip/Compress/ShrinkDecoder.cpp
|
||||
CPP/7zip/Compress/XpressDecoder.cpp
|
||||
CPP/7zip/Compress/XzDecoder.cpp
|
||||
CPP/7zip/Compress/XzEncoder.cpp
|
||||
CPP/7zip/Compress/ZlibDecoder.cpp
|
||||
CPP/7zip/Compress/ZlibEncoder.cpp
|
||||
CPP/7zip/Compress/ZDecoder.cpp
|
||||
CPP/7zip/Compress/CodecExports.cpp
|
||||
)
|
||||
|
||||
set(SRC_CRYPTO
|
||||
CPP/7zip/Crypto/7zAes.cpp
|
||||
CPP/7zip/Crypto/7zAesRegister.cpp
|
||||
CPP/7zip/Crypto/HmacSha1.cpp
|
||||
CPP/7zip/Crypto/HmacSha256.cpp
|
||||
CPP/7zip/Crypto/MyAes.cpp
|
||||
CPP/7zip/Crypto/MyAesReg.cpp
|
||||
CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp
|
||||
CPP/7zip/Crypto/RandGen.cpp
|
||||
CPP/7zip/Crypto/Rar20Crypto.cpp
|
||||
CPP/7zip/Crypto/Rar5Aes.cpp
|
||||
CPP/7zip/Crypto/RarAes.cpp
|
||||
CPP/7zip/Crypto/WzAes.cpp
|
||||
CPP/7zip/Crypto/ZipCrypto.cpp
|
||||
CPP/7zip/Crypto/ZipStrong.cpp
|
||||
)
|
||||
|
||||
set(SRC_C
|
||||
C/7zBuf2.c
|
||||
C/7zStream.c
|
||||
C/Alloc.c
|
||||
C/Bcj2.c
|
||||
C/Bcj2Enc.c
|
||||
C/Blake2s.c
|
||||
C/Bra.c
|
||||
C/Bra86.c
|
||||
C/BraIA64.c
|
||||
C/BwtSort.c
|
||||
C/CpuArch.c
|
||||
C/Delta.c
|
||||
C/HuffEnc.c
|
||||
C/LzFind.c
|
||||
C/LzFindMt.c
|
||||
C/Lzma2Dec.c
|
||||
C/Lzma2DecMt.c
|
||||
C/Lzma2Enc.c
|
||||
C/LzmaDec.c
|
||||
C/LzmaEnc.c
|
||||
C/MtCoder.c
|
||||
C/MtDec.c
|
||||
C/Ppmd7.c
|
||||
C/Ppmd7Dec.c
|
||||
C/Ppmd7Enc.c
|
||||
C/Ppmd8.c
|
||||
C/Ppmd8Dec.c
|
||||
C/Ppmd8Enc.c
|
||||
C/Sha1.c
|
||||
C/Sha256.c
|
||||
C/Sort.c
|
||||
C/Threads.c
|
||||
C/Xz.c
|
||||
C/XzDec.c
|
||||
C/XzEnc.c
|
||||
C/XzIn.c
|
||||
C/Aes.c
|
||||
C/7zCrc.c
|
||||
C/XzCrc64.c
|
||||
)
|
||||
|
||||
set_source_files_properties(
|
||||
${SRC_COMPRESS}
|
||||
${SRC_CRYPTO}
|
||||
${SRC_C}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS $<$<CONFIG:RELEASE>:"/O2">
|
||||
)
|
||||
|
||||
set(SRC_OTHER
|
||||
CPP/Common/CRC.cpp
|
||||
CPP/Common/CrcReg.cpp
|
||||
CPP/Common/DynLimBuf.cpp
|
||||
CPP/Common/IntToString.cpp
|
||||
CPP/Common/MyMap.cpp
|
||||
CPP/Common/MyString.cpp
|
||||
CPP/Common/MyVector.cpp
|
||||
CPP/Common/MyXml.cpp
|
||||
CPP/Common/NewHandler.cpp
|
||||
CPP/Common/Sha1Reg.cpp
|
||||
CPP/Common/Sha256Reg.cpp
|
||||
CPP/Common/StringConvert.cpp
|
||||
CPP/Common/StringToInt.cpp
|
||||
CPP/Common/UTFConvert.cpp
|
||||
CPP/Common/Wildcard.cpp
|
||||
CPP/Common/XzCrc64Init.cpp
|
||||
CPP/Common/XzCrc64Reg.cpp
|
||||
|
||||
CPP/Windows/FileDir.cpp
|
||||
CPP/Windows/FileFind.cpp
|
||||
CPP/Windows/FileIO.cpp
|
||||
CPP/Windows/FileName.cpp
|
||||
CPP/Windows/PropVariant.cpp
|
||||
CPP/Windows/PropVariantUtils.cpp
|
||||
CPP/Windows/Synchronization.cpp
|
||||
CPP/Windows/System.cpp
|
||||
CPP/Windows/TimeUtils.cpp
|
||||
|
||||
CPP/7zip/Common/CreateCoder.cpp
|
||||
CPP/7zip/Common/CWrappers.cpp
|
||||
CPP/7zip/Common/InBuffer.cpp
|
||||
CPP/7zip/Common/InOutTempBuffer.cpp
|
||||
CPP/7zip/Common/FilterCoder.cpp
|
||||
CPP/7zip/Common/LimitedStreams.cpp
|
||||
CPP/7zip/Common/LockedStream.cpp
|
||||
CPP/7zip/Common/MemBlocks.cpp
|
||||
CPP/7zip/Common/MethodId.cpp
|
||||
CPP/7zip/Common/MethodProps.cpp
|
||||
CPP/7zip/Common/OffsetStream.cpp
|
||||
CPP/7zip/Common/OutBuffer.cpp
|
||||
CPP/7zip/Common/OutMemStream.cpp
|
||||
CPP/7zip/Common/ProgressMt.cpp
|
||||
CPP/7zip/Common/ProgressUtils.cpp
|
||||
CPP/7zip/Common/PropId.cpp
|
||||
CPP/7zip/Common/StreamBinder.cpp
|
||||
CPP/7zip/Common/StreamObjects.cpp
|
||||
CPP/7zip/Common/StreamUtils.cpp
|
||||
CPP/7zip/Common/UniqBlocks.cpp
|
||||
CPP/7zip/Common/VirtThread.cpp
|
||||
|
||||
CPP/7zip/Archive/ApmHandler.cpp
|
||||
CPP/7zip/Archive/ArHandler.cpp
|
||||
CPP/7zip/Archive/ArjHandler.cpp
|
||||
CPP/7zip/Archive/Bz2Handler.cpp
|
||||
CPP/7zip/Archive/ComHandler.cpp
|
||||
CPP/7zip/Archive/CpioHandler.cpp
|
||||
CPP/7zip/Archive/CramfsHandler.cpp
|
||||
CPP/7zip/Archive/DeflateProps.cpp
|
||||
CPP/7zip/Archive/DmgHandler.cpp
|
||||
CPP/7zip/Archive/ElfHandler.cpp
|
||||
CPP/7zip/Archive/ExtHandler.cpp
|
||||
CPP/7zip/Archive/FatHandler.cpp
|
||||
CPP/7zip/Archive/FlvHandler.cpp
|
||||
CPP/7zip/Archive/GzHandler.cpp
|
||||
CPP/7zip/Archive/GptHandler.cpp
|
||||
CPP/7zip/Archive/HandlerCont.cpp
|
||||
CPP/7zip/Archive/HfsHandler.cpp
|
||||
CPP/7zip/Archive/IhexHandler.cpp
|
||||
CPP/7zip/Archive/LzhHandler.cpp
|
||||
CPP/7zip/Archive/LzmaHandler.cpp
|
||||
CPP/7zip/Archive/MachoHandler.cpp
|
||||
CPP/7zip/Archive/MbrHandler.cpp
|
||||
CPP/7zip/Archive/MslzHandler.cpp
|
||||
CPP/7zip/Archive/MubHandler.cpp
|
||||
CPP/7zip/Archive/NtfsHandler.cpp
|
||||
CPP/7zip/Archive/PeHandler.cpp
|
||||
CPP/7zip/Archive/PpmdHandler.cpp
|
||||
CPP/7zip/Archive/QcowHandler.cpp
|
||||
CPP/7zip/Archive/RpmHandler.cpp
|
||||
CPP/7zip/Archive/SplitHandler.cpp
|
||||
CPP/7zip/Archive/SquashfsHandler.cpp
|
||||
CPP/7zip/Archive/SwfHandler.cpp
|
||||
CPP/7zip/Archive/UefiHandler.cpp
|
||||
CPP/7zip/Archive/VdiHandler.cpp
|
||||
CPP/7zip/Archive/VhdHandler.cpp
|
||||
CPP/7zip/Archive/VmdkHandler.cpp
|
||||
CPP/7zip/Archive/XarHandler.cpp
|
||||
CPP/7zip/Archive/XzHandler.cpp
|
||||
CPP/7zip/Archive/ZHandler.cpp
|
||||
CPP/7zip/Archive/ArchiveExports.cpp
|
||||
CPP/7zip/Archive/DllExports2.cpp
|
||||
|
||||
CPP/7zip/Archive/Common/CoderMixer2.cpp
|
||||
CPP/7zip/Archive/Common/DummyOutStream.cpp
|
||||
CPP/7zip/Archive/Common/FindSignature.cpp
|
||||
CPP/7zip/Archive/Common/InStreamWithCRC.cpp
|
||||
CPP/7zip/Archive/Common/ItemNameUtils.cpp
|
||||
CPP/7zip/Archive/Common/MultiStream.cpp
|
||||
CPP/7zip/Archive/Common/OutStreamWithCRC.cpp
|
||||
CPP/7zip/Archive/Common/OutStreamWithSha1.cpp
|
||||
CPP/7zip/Archive/Common/HandlerOut.cpp
|
||||
CPP/7zip/Archive/Common/ParseProperties.cpp
|
||||
|
||||
CPP/7zip/Archive/7z/7zCompressionMode.cpp
|
||||
CPP/7zip/Archive/7z/7zDecode.cpp
|
||||
CPP/7zip/Archive/7z/7zEncode.cpp
|
||||
CPP/7zip/Archive/7z/7zExtract.cpp
|
||||
CPP/7zip/Archive/7z/7zFolderInStream.cpp
|
||||
CPP/7zip/Archive/7z/7zHandler.cpp
|
||||
CPP/7zip/Archive/7z/7zHandlerOut.cpp
|
||||
CPP/7zip/Archive/7z/7zHeader.cpp
|
||||
CPP/7zip/Archive/7z/7zIn.cpp
|
||||
CPP/7zip/Archive/7z/7zOut.cpp
|
||||
CPP/7zip/Archive/7z/7zProperties.cpp
|
||||
CPP/7zip/Archive/7z/7zSpecStream.cpp
|
||||
CPP/7zip/Archive/7z/7zUpdate.cpp
|
||||
CPP/7zip/Archive/7z/7zRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Cab/CabBlockInStream.cpp
|
||||
CPP/7zip/Archive/Cab/CabHandler.cpp
|
||||
CPP/7zip/Archive/Cab/CabHeader.cpp
|
||||
CPP/7zip/Archive/Cab/CabIn.cpp
|
||||
CPP/7zip/Archive/Cab/CabRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Chm/ChmHandler.cpp
|
||||
CPP/7zip/Archive/Chm/ChmIn.cpp
|
||||
|
||||
CPP/7zip/Archive/Iso/IsoHandler.cpp
|
||||
CPP/7zip/Archive/Iso/IsoHeader.cpp
|
||||
CPP/7zip/Archive/Iso/IsoIn.cpp
|
||||
CPP/7zip/Archive/Iso/IsoRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Nsis/NsisDecode.cpp
|
||||
CPP/7zip/Archive/Nsis/NsisHandler.cpp
|
||||
CPP/7zip/Archive/Nsis/NsisIn.cpp
|
||||
CPP/7zip/Archive/Nsis/NsisRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Rar/RarHandler.cpp
|
||||
CPP/7zip/Archive/Rar/Rar5Handler.cpp
|
||||
|
||||
CPP/7zip/Archive/Tar/TarHandler.cpp
|
||||
CPP/7zip/Archive/Tar/TarHandlerOut.cpp
|
||||
CPP/7zip/Archive/Tar/TarHeader.cpp
|
||||
CPP/7zip/Archive/Tar/TarIn.cpp
|
||||
CPP/7zip/Archive/Tar/TarOut.cpp
|
||||
CPP/7zip/Archive/Tar/TarUpdate.cpp
|
||||
CPP/7zip/Archive/Tar/TarRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Udf/UdfHandler.cpp
|
||||
CPP/7zip/Archive/Udf/UdfIn.cpp
|
||||
|
||||
CPP/7zip/Archive/Wim/WimHandler.cpp
|
||||
CPP/7zip/Archive/Wim/WimHandlerOut.cpp
|
||||
CPP/7zip/Archive/Wim/WimIn.cpp
|
||||
CPP/7zip/Archive/Wim/WimRegister.cpp
|
||||
|
||||
CPP/7zip/Archive/Zip/ZipAddCommon.cpp
|
||||
CPP/7zip/Archive/Zip/ZipHandler.cpp
|
||||
CPP/7zip/Archive/Zip/ZipHandlerOut.cpp
|
||||
CPP/7zip/Archive/Zip/ZipIn.cpp
|
||||
CPP/7zip/Archive/Zip/ZipItem.cpp
|
||||
CPP/7zip/Archive/Zip/ZipOut.cpp
|
||||
CPP/7zip/Archive/Zip/ZipUpdate.cpp
|
||||
CPP/7zip/Archive/Zip/ZipRegister.cpp
|
||||
)
|
||||
|
||||
add_library(7zip
|
||||
${SRC_ASM}
|
||||
${SRC_OTHER}
|
||||
${SRC_COMPRESS}
|
||||
${SRC_CRYPTO}
|
||||
${SRC_C}
|
||||
CPP/7zip/Archive/Archive2.def
|
||||
)
|
||||
|
||||
target_compile_definitions(7zip
|
||||
PUBLIC
|
||||
-DEXTERNAL_CODECS
|
||||
-D_7ZIP_LARGE_PAGES
|
||||
-DUNICODE
|
||||
-D_UNICODE
|
||||
)
|
||||
|
||||
target_compile_options(7zip
|
||||
PRIVATE
|
||||
/wd5043
|
||||
$<$<CONFIG:RELEASE>:/guard:cf>
|
||||
)
|
||||
|
||||
target_include_directories(7zip
|
||||
INTERFACE
|
||||
$<INSTALL_INTERFACE:include>/7zip/CPP
|
||||
)
|
||||
|
||||
set(PUBLIC_HEADERS
|
||||
C/7zTypes.h
|
||||
CPP/7zip/Archive/IArchive.h
|
||||
CPP/7zip/ICoder.h
|
||||
CPP/7zip/IDecl.h
|
||||
CPP/7zip/IPassword.h
|
||||
CPP/7zip/IProgress.h
|
||||
CPP/7zip/IStream.h
|
||||
CPP/7zip/PropID.h
|
||||
CPP/Common/Defs.h
|
||||
CPP/Common/MyTypes.h
|
||||
CPP/Common/MyUnknown.h
|
||||
CPP/Common/MyWindows.h
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS 7zip
|
||||
EXPORT 7zip
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
# Headers makes relative includes so directory structure must be kept
|
||||
foreach(HEADER ${PUBLIC_HEADERS})
|
||||
get_filename_component(HEADER_DIR ${HEADER} DIRECTORY)
|
||||
install(
|
||||
FILES ${HEADER}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION include/7zip/${HEADER_DIR}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
EXPORT 7zip
|
||||
DESTINATION share/7zip
|
||||
FILE 7zipConfig.cmake
|
||||
NAMESPACE 7zip::
|
||||
CONFIGURATIONS Release
|
||||
)
|
3
ports/7zip/CONTROL
Normal file
3
ports/7zip/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: 7zip
|
||||
Version: 19.00
|
||||
Description: Library for archiving file with a high compression ratio.
|
90
ports/7zip/License.txt
Normal file
90
ports/7zip/License.txt
Normal file
@ -0,0 +1,90 @@
|
||||
7-Zip source code
|
||||
~~~~~~~~~~~~~~~~~
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
7-Zip Copyright (C) 1999-2019 Igor Pavlov.
|
||||
|
||||
The licenses for files are:
|
||||
|
||||
1) CPP/7zip/Compress/Rar* files: the "GNU LGPL" with "unRAR license restriction"
|
||||
2) CPP/7zip/Compress/LzfseDecoder.cpp: the "BSD 3-clause License"
|
||||
3) Some files are "public domain" files, if "public domain" status is stated in source file.
|
||||
4) the "GNU LGPL" for all other files. If there is no license information in
|
||||
some source file, that file is under the "GNU LGPL".
|
||||
|
||||
The "GNU LGPL" with "unRAR license restriction" means that you must follow both
|
||||
"GNU LGPL" rules and "unRAR license restriction" rules.
|
||||
|
||||
|
||||
|
||||
|
||||
GNU LGPL information
|
||||
--------------------
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
|
||||
|
||||
BSD 3-clause License
|
||||
--------------------
|
||||
|
||||
The "BSD 3-clause License" is used for the code in LzfseDecoder.cpp that implements LZFSE data decompression.
|
||||
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
|
||||
that also uses the "BSD 3-clause License":
|
||||
|
||||
----
|
||||
Copyright (c) 2015-2016, Apple Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
||||
unRAR license restriction
|
||||
-------------------------
|
||||
|
||||
The decompression engine for RAR archives was developed using source
|
||||
code of unRAR program.
|
||||
All copyrights to original unRAR code are owned by Alexander Roshal.
|
||||
|
||||
The license for original unRAR code has the following restriction:
|
||||
|
||||
The unRAR sources cannot be used to re-create the RAR compression algorithm,
|
||||
which is proprietary. Distribution of modified unRAR sources in separate form
|
||||
or as a part of other software is permitted, provided that it is clearly
|
||||
stated in the documentation and source comments that the code may
|
||||
not be used to develop a RAR (WinRAR) compatible archiver.
|
||||
|
||||
|
||||
--
|
||||
Igor Pavlov
|
34
ports/7zip/portfile.cmake
Normal file
34
ports/7zip/portfile.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(7ZIP_VERSION 19.00)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.7-zip.org/a/7z1900-src.7z"
|
||||
FILENAME "7z1900-src.7z"
|
||||
SHA512 d68b308e175224770adc8b1495f1ba3cf3e7f67168a7355000643d3d32560ae01aa34266f0002395181ed91fb5e682b86e0f79c20625b42d6e2c62dd24a5df93
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${7ZIP_VERSION}
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(
|
||||
INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/7zip
|
||||
RENAME copyright
|
||||
)
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME 7zip)
|
41
ports/7zip/unRarLicense.txt
Normal file
41
ports/7zip/unRarLicense.txt
Normal file
@ -0,0 +1,41 @@
|
||||
****** ***** ****** unRAR - free utility for RAR archives
|
||||
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
****** ******* ****** License for use and distribution of
|
||||
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
** ** ** ** ** ** FREE portable version
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The source code of unRAR utility is freeware. This means:
|
||||
|
||||
1. All copyrights to RAR and the utility unRAR are exclusively
|
||||
owned by the author - Alexander Roshal.
|
||||
|
||||
2. The unRAR sources may be used in any software to handle RAR
|
||||
archives without limitations free of charge, but cannot be used
|
||||
to re-create the RAR compression algorithm, which is proprietary.
|
||||
Distribution of modified unRAR sources in separate form or as a
|
||||
part of other software is permitted, provided that it is clearly
|
||||
stated in the documentation and source comments that the code may
|
||||
not be used to develop a RAR (WinRAR) compatible archiver.
|
||||
|
||||
3. The unRAR utility may be freely distributed. No person or company
|
||||
may charge a fee for the distribution of unRAR without written
|
||||
permission from the copyright holder.
|
||||
|
||||
4. THE RAR ARCHIVER AND THE UNRAR UTILITY ARE DISTRIBUTED "AS IS".
|
||||
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT
|
||||
YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
|
||||
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
|
||||
OR MISUSING THIS SOFTWARE.
|
||||
|
||||
5. Installing and using the unRAR utility signifies acceptance of
|
||||
these terms and conditions of the license.
|
||||
|
||||
6. If you don't agree with terms of the license you must remove
|
||||
unRAR files from your storage devices and cease to use the
|
||||
utility.
|
||||
|
||||
Thank you for your interest in RAR and unRAR.
|
||||
|
||||
|
||||
Alexander L. Roshal
|
@ -1,93 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(abseil CXX)
|
||||
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
else()
|
||||
option(INSTALL_HEADERS "Install header files" OFF)
|
||||
endif()
|
||||
|
||||
function(add_sublibrary LIB)
|
||||
file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$|_benchmark.cc$")
|
||||
file(GLOB_RECURSE HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc")
|
||||
|
||||
if(SOURCES)
|
||||
if("STATIC" IN_LIST ARGN)
|
||||
add_library(${LIB} STATIC ${SOURCES})
|
||||
else()
|
||||
add_library(${LIB} ${SOURCES})
|
||||
endif()
|
||||
set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}")
|
||||
target_include_directories(${LIB} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
else()
|
||||
add_library(${LIB} INTERFACE)
|
||||
target_include_directories(${LIB} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${LIB} EXPORT unofficial-abseil-targets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(INSTALL_HEADERS)
|
||||
if(HEADERS)
|
||||
foreach(file IN LISTS HEADERS)
|
||||
get_filename_component(dir ${file} DIRECTORY)
|
||||
file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/absl/${LIB} ${dir})
|
||||
install(FILES ${file} DESTINATION "include/absl/${LIB}/${rel_dir}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(target_link_public_libraries A)
|
||||
get_target_property(A_TYPE ${A} TYPE)
|
||||
if(A_TYPE STREQUAL INTERFACE_LIBRARY)
|
||||
target_link_libraries(${A} INTERFACE ${ARGN})
|
||||
else()
|
||||
target_link_libraries(${A} PUBLIC ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_sublibrary(algorithm)
|
||||
add_sublibrary(base)
|
||||
add_sublibrary(container STATIC)
|
||||
add_sublibrary(debugging)
|
||||
add_sublibrary(hash)
|
||||
add_sublibrary(memory)
|
||||
add_sublibrary(meta)
|
||||
add_sublibrary(numeric)
|
||||
add_sublibrary(strings)
|
||||
add_sublibrary(synchronization STATIC)
|
||||
# Time must be static because there are global variables intended for export
|
||||
add_sublibrary(time STATIC)
|
||||
add_sublibrary(types)
|
||||
add_sublibrary(utility)
|
||||
|
||||
target_link_public_libraries(algorithm base meta)
|
||||
target_link_public_libraries(container algorithm base memory time)
|
||||
target_link_public_libraries(debugging base)
|
||||
target_link_public_libraries(hash base)
|
||||
target_link_public_libraries(memory meta)
|
||||
target_link_public_libraries(meta base)
|
||||
target_link_public_libraries(numeric base)
|
||||
target_link_public_libraries(strings base memory meta numeric)
|
||||
target_link_public_libraries(types base utility meta algorithm strings)
|
||||
target_link_public_libraries(utility base meta)
|
||||
target_link_public_libraries(time base numeric)
|
||||
target_link_public_libraries(synchronization base time)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-abseil-targets
|
||||
FILE unofficial-abseil-config.cmake
|
||||
NAMESPACE unofficial::abseil::
|
||||
DESTINATION share/unofficial-abseil
|
||||
)
|
@ -1,5 +1,5 @@
|
||||
Source: abseil
|
||||
Version: 2019-05-08
|
||||
Version: 2019-05-08-1
|
||||
Homepage: https://github.com/abseil/abseil-cpp
|
||||
Description: an open-source collection designed to augment the C++ standard library.
|
||||
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
|
||||
|
26
ports/abseil/fix-config.patch
Normal file
26
ports/abseil/fix-config.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/CMake/abslConfig.cmake.in b/CMake/abslConfig.cmake.in
|
||||
index 60847fa..4641d44 100644
|
||||
--- a/CMake/abslConfig.cmake.in
|
||||
+++ b/CMake/abslConfig.cmake.in
|
||||
@@ -4,4 +4,8 @@ include(FindThreads)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+
|
||||
+set_and_check(absl_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
+
|
||||
include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
\ No newline at end of file
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e7587f7..3079534 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -132,6 +132,7 @@ if(ABSL_ENABLE_INSTALL)
|
||||
CMake/abslConfig.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
INSTALL_DESTINATION "${ABSL_INSTALL_CONFIGDIR}"
|
||||
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
||||
)
|
||||
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
DESTINATION "${ABSL_INSTALL_CONFIGDIR}"
|
@ -12,20 +12,24 @@ vcpkg_from_github(
|
||||
REF aa468ad75539619b47979911297efbb629c52e44
|
||||
SHA512 4254d8599103d8f06b03f60a0386eba07f314184217d0bca404d41fc0bd0a8df287fe6d07158d10cde096af3097aff2ecc1a5e8f7c3046ecf956b5fde709ad1d
|
||||
HEAD_REF master
|
||||
PATCHES fix-usage-lnk-error.patch
|
||||
PATCHES
|
||||
fix-usage-lnk-error.patch
|
||||
fix-config.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl TARGET_PATH share/absl)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/copts
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata)
|
@ -1,5 +1,5 @@
|
||||
Source: ace
|
||||
Version: 6.5.5-1
|
||||
Version: 6.5.7
|
||||
Homepage: https://www.dre.vanderbilt.edu/~schmidt/ACE.html
|
||||
Description: The ADAPTIVE Communication Environment
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
# Don't change to vcpkg_from_github! This points to a release and not an archive
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_7/ACE-src-6.5.7.zip"
|
||||
FILENAME ACE-src-6.5.7.zip
|
||||
SHA512 6ce6954941521b34ae8913dfe053d0f066632c55adf4091dae6bc180c79963d6f4ddfec7796cd6d9fc8ff59037ee162d20b017c4c296828913498bdbac2fc8a7
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
)
|
||||
|
||||
set(ACE_ROOT ${SOURCE_PATH})
|
||||
set(ENV{ACE_ROOT} ${ACE_ROOT})
|
||||
set(ACE_SOURCE_PATH ${ACE_ROOT}/ace)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
||||
endif()
|
||||
@ -23,16 +41,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
endif()
|
||||
set(MPC_STATIC_FLAG -static)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
set(ACE_ROOT ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers)
|
||||
set(ENV{ACE_ROOT} ${ACE_ROOT})
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_5/ACE-src-6.5.5.zip"
|
||||
FILENAME ACE-src-6.5.5.zip
|
||||
SHA512 65696e6f2776fd9c015adb78a92f1c87edacde62ff11f20f88c416d4420a6fc6e5176412c5f93262d06e67b89717499f8108f68582f70fea6ce05466c53415e9
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
|
||||
@ -58,7 +66,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
else()
|
||||
set(SOLUTION_TYPE vc14)
|
||||
endif()
|
||||
file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"")
|
||||
file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
@ -67,8 +75,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(LIB_DEBUG_SUFFIX .a)
|
||||
set(LIB_PREFIX lib)
|
||||
set(SOLUTION_TYPE gnuace)
|
||||
file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"")
|
||||
file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)include/makeinclude/platform_linux.GNU")
|
||||
file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"")
|
||||
file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU")
|
||||
endif()
|
||||
|
||||
# Invoke mwc.pl to generate the necessary solution and project files
|
||||
@ -80,7 +88,7 @@ vcpkg_execute_required_process(
|
||||
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/ace.sln
|
||||
PROJECT_PATH ${ACE_SOURCE_PATH}/ace.sln
|
||||
PLATFORM ${MSBUILD_PLATFORM}
|
||||
USE_VCPKG_INTEGRATION
|
||||
)
|
||||
@ -101,34 +109,34 @@ endif()
|
||||
# ACE itself does not define an install target, so it is not clear which
|
||||
# headers are public and which not. For the moment we install everything
|
||||
# that is in the source path and ends in .h, .inl
|
||||
function(install_ace_headers_subdirectory SOURCE_PATH RELATIVE_PATH)
|
||||
file(GLOB HEADER_FILES ${SOURCE_PATH}/${RELATIVE_PATH}/*.h ${SOURCE_PATH}/${RELATIVE_PATH}/*.inl)
|
||||
function(install_ace_headers_subdirectory ORIGINAL_PATH RELATIVE_PATH)
|
||||
file(GLOB HEADER_FILES ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.h ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.inl)
|
||||
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ace/${RELATIVE_PATH})
|
||||
endfunction()
|
||||
|
||||
# We manually install header found in the ace directory because in that case
|
||||
# we are supposed to install also *cpp files, see ACE_wrappers\debian\libace-dev.install file
|
||||
file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h ${SOURCE_PATH}/*.inl ${SOURCE_PATH}/*.cpp)
|
||||
file(GLOB HEADER_FILES ${ACE_SOURCE_PATH}/*.h ${ACE_SOURCE_PATH}/*.inl ${ACE_SOURCE_PATH}/*.cpp)
|
||||
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ace/)
|
||||
|
||||
# Install headers in subdirectory
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "Compression")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "Compression/rle")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "ETCL")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "QoS")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "Monitor_Control")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "os_include")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/arpa")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/net")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/netinet")
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/sys")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "Compression")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "Compression/rle")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "ETCL")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "QoS")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "Monitor_Control")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "os_include")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "os_include/arpa")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "os_include/net")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "os_include/netinet")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "os_include/sys")
|
||||
if("ssl" IN_LIST FEATURES)
|
||||
install_ace_headers_subdirectory(${SOURCE_PATH} "SSL")
|
||||
install_ace_headers_subdirectory(${ACE_SOURCE_PATH} "SSL")
|
||||
endif()
|
||||
|
||||
# Install the libraries
|
||||
function(install_ace_library SOURCE_PATH ACE_LIBRARY)
|
||||
set(LIB_PATH ${SOURCE_PATH}/lib/)
|
||||
function(install_ace_library ORIGINAL_PATH ACE_LIBRARY)
|
||||
set(LIB_PATH ${ORIGINAL_PATH}/lib/)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
# Install the DLL files
|
||||
file(INSTALL
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: activemq-cpp
|
||||
Version: 3.9.5
|
||||
Version: 3.9.5-1
|
||||
Build-Depends: apr
|
||||
Description: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.
|
||||
|
@ -5,12 +5,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
endif()
|
||||
|
||||
set(VERSION 3.9.5)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/activemq-cpp-library-${VERSION})
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.apache.org/dist/activemq/activemq-cpp/${VERSION}/activemq-cpp-library-${VERSION}-src.tar.bz2"
|
||||
FILENAME "activemq-cpp-library-${VERSION}-src.tar.bz2"
|
||||
SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2
|
||||
SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
@ -42,12 +41,12 @@ vcpkg_build_msbuild(
|
||||
)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/activemq-cpp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/copyright)
|
||||
|
||||
|
||||
|
||||
file(
|
||||
COPY
|
||||
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.lib
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: ade
|
||||
Version: 0.1.1d
|
||||
Version: 0.1.1f
|
||||
Description: ADE Framework is a graph construction, manipulation, and processing framework. ADE Framework is suitable for organizing data flow processing and execution.
|
@ -3,8 +3,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO opencv/ade
|
||||
REF v0.1.1d
|
||||
SHA512 c493cb57e59ba859ca0cbf5d48bae4233f22104dfb4a96864d07e9422bb700c27af2d53a602f2230d68b7bcc598920d0652c3d9fdf8fad94a7e5b4d21664a44e
|
||||
REF v0.1.1f
|
||||
SHA512 fbdec8f3d5811a573abb81f1ceb6fb8d40274439013f749645db5430c6d9cdc52227c25203f1a68177b263d648bb65197ea7c2bea7871264a06585e59892631c
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: aixlog
|
||||
Version: 1.2.1
|
||||
Version: 1.2.2
|
||||
Description: Header-only C++ logging library
|
||||
|
@ -1,32 +1,16 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO badaix/aixlog
|
||||
REF v1.2.1
|
||||
SHA512 776558fdd911f0cc9e8d467bf8e00a1930d2e51bb8ccd5f36f95955fefecab65faf575a80fdaacfe83fd32808f8b9c2e0323b16823e0431300df7bc0c1dfde12
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO badaix/aixlog
|
||||
REF v1.2.2
|
||||
SHA512 384ffe4a40970150d7cbc64f5bd5a64486415f11487b5a432502f16e190f9a96383e65173cbb6624b4ec8bc5168addef93a895dc9b16f874e4a4c8d93be55dd6
|
||||
)
|
||||
|
||||
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aixlog)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/aixlog/LICENSE ${CURRENT_PACKAGES_DIR}/share/aixlog/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
# Post-build test for cmake libraries
|
||||
# vcpkg_test_cmake(PACKAGE_NAME aixlog)
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: alac-decoder
|
||||
Version: 0.2-1
|
||||
Homepage: https://distfiles.macports.org/alac_decoder
|
||||
Description: ALAC C implementation of a decoder, written from reverse engineering the file format
|
||||
Source: alac-decoder
|
||||
Version: 0.2-3
|
||||
Homepage: https://distfiles.macports.org/alac_decoder
|
||||
Description: ALAC C implementation of a decoder, written from reverse engineering the file format
|
||||
|
@ -1,14 +1,14 @@
|
||||
diff --git a/alac.c b/alac.c
|
||||
index b829e29..8e8805f 100644
|
||||
--- a/alac.c
|
||||
+++ b/alac.c
|
||||
@@ -284,7 +284,9 @@ static int count_leading_zeros(int input)
|
||||
return output;
|
||||
}
|
||||
#else
|
||||
+#if !defined(_MSC_VER)
|
||||
#warning using generic count leading zeroes. You may wish to write one for your CPU / compiler
|
||||
+#endif
|
||||
static int count_leading_zeros(int input)
|
||||
{
|
||||
int output = 0;
|
||||
diff --git a/alac.c b/alac.c
|
||||
index b829e29..8e8805f 100644
|
||||
--- a/alac.c
|
||||
+++ b/alac.c
|
||||
@@ -284,7 +284,9 @@ static int count_leading_zeros(int input)
|
||||
return output;
|
||||
}
|
||||
#else
|
||||
+#if !defined(_MSC_VER)
|
||||
#warning using generic count leading zeroes. You may wish to write one for your CPU / compiler
|
||||
+#endif
|
||||
static int count_leading_zeros(int input)
|
||||
{
|
||||
int output = 0;
|
||||
|
@ -2,33 +2,33 @@ include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/alac_decoder)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://distfiles.macports.org/alac_decoder/alac_decoder-0.2.0.tgz"
|
||||
FILENAME "alac_decoder-0.2.0.tgz"
|
||||
SHA512 4b37d4fe37681bfccaa4a27fbaf11eb2a1fba5f14e77d219a6d9814ff44d1168534d05eb19443dd2fd11e6fcdf4da3a22e3f3c79314cb7a6767c152351b13e29
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
remove_stdint_headers.patch
|
||||
no-pragma-warning.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/decomp.c DESTINATION ${SOURCE_PATH})
|
||||
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/remove_stdint_headers.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/no-pragma-warning.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac-decoder)
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac-decoder RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: alembic
|
||||
Version: 1.7.11
|
||||
Version: 1.7.11-5
|
||||
Build-Depends: ilmbase, hdf5
|
||||
Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.
|
||||
Homepage: https://alembic.io/
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ce0a8e0..229fc77 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -226,7 +226,24 @@ INCLUDE_DIRECTORIES(${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY})
|
||||
IF (USE_HDF5)
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
SET(ALEMBIC_WITH_HDF5 "1")
|
||||
- INCLUDE("./cmake/AlembicHDF5.cmake")
|
||||
+ #INCLUDE("./cmake/AlembicHDF5.cmake")
|
||||
+ FIND_LIBRARY(HDF5_LIBRARIES_RELEASE
|
||||
+ NAMES hdf5
|
||||
+ PATHS ${HDF5_ROOT}/lib
|
||||
+ )
|
||||
+ MESSAGE(STATUS ${HDF5_LIBRARIES_RELEASE})
|
||||
+ FIND_LIBRARY(HDF5_LIBRARIES_DEBUG
|
||||
+ NAMES hdf5_D
|
||||
+ PATHS ${HDF5_ROOT}/debug/lib
|
||||
+ )
|
||||
+ MESSAGE(STATUS ${HDF5_LIBRARIES_DEBUG})
|
||||
+ SET(HDF5_LIBRARIES
|
||||
+ optimized ${HDF5_LIBRARIES_RELEASE}
|
||||
+ debug ${HDF5_LIBRARIES_DEBUG}
|
||||
+ )
|
||||
+ SET(HDF5_INCLUDE_DIRS
|
||||
+ ${HDF5_ROOT}/include
|
||||
+ )
|
||||
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5_USE_18_API")
|
||||
ENDIF()
|
381
ports/alembic/fix-find-openexr-ilmbase.patch
Normal file
381
ports/alembic/fix-find-openexr-ilmbase.patch
Normal file
@ -0,0 +1,381 @@
|
||||
diff --git a/cmake/AlembicIlmBase.cmake b/cmake/AlembicIlmBase.cmake
|
||||
index cd00d70..a73c8db 100644
|
||||
--- a/cmake/AlembicIlmBase.cmake
|
||||
+++ b/cmake/AlembicIlmBase.cmake
|
||||
@@ -33,11 +33,25 @@
|
||||
##
|
||||
##-*****************************************************************************
|
||||
|
||||
-FIND_PACKAGE(IlmBase)
|
||||
+FIND_PACKAGE(OpenEXR)
|
||||
|
||||
-IF (ILMBASE_FOUND)
|
||||
+IF (OPENEXR_FOUND)
|
||||
SET(ALEMBIC_ILMBASE_FOUND 1 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise")
|
||||
|
||||
+ set(ALEMBIC_ILMBASE_INCLUDE_DIRECTORY ${OpenEXR_INCLUDE_DIRS}/OpenEXR)
|
||||
+ set(ALEMBIC_ILMBASE_HALF_LIB ${OPENEXR_HALF_LIBRARY})
|
||||
+ set(ALEMBIC_ILMBASE_IEX_LIB ${OPENEXR_IEX_LIBRARY})
|
||||
+ set(ALEMBIC_ILMBASE_IEXMATH_LIB ${OpenEXR_IEXMATH_LIBRARY})
|
||||
+ set(ALEMBIC_ILMBASE_ILMTHREAD_LIB ${OPENEXR_ILMTHREAD_LIBRARY})
|
||||
+ set(ALEMBIC_ILMBASE_IMATH_LIB ${OPENEXR_IMATH_LIBRARY})
|
||||
+
|
||||
+ MESSAGE( STATUS "ILMBASE INCLUDE PATH: ${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY}" )
|
||||
+ MESSAGE( STATUS "HALF LIB: ${ALEMBIC_ILMBASE_HALF_LIB}" )
|
||||
+ MESSAGE( STATUS "IEX LIB: ${ALEMBIC_ILMBASE_IEX_LIB}" )
|
||||
+ MESSAGE( STATUS "IEXMATH LIB: ${ALEMBIC_ILMBASE_IEXMATH_LIB}" )
|
||||
+ MESSAGE( STATUS "ILMTHREAD LIB: ${ALEMBIC_ILMBASE_ILMTHREAD_LIB}" )
|
||||
+ MESSAGE( STATUS "IMATH LIB: ${ALEMBIC_ILMBASE_IMATH_LIB}" )
|
||||
+
|
||||
SET(ALEMBIC_ILMBASE_LIBS
|
||||
${ALEMBIC_ILMBASE_IMATH_LIB}
|
||||
${ALEMBIC_ILMBASE_ILMTHREAD_LIB}
|
||||
diff --git a/cmake/AlembicOpenEXR.cmake b/cmake/AlembicOpenEXR.cmake
|
||||
index 0833b32..a9180cd 100644
|
||||
--- a/cmake/AlembicOpenEXR.cmake
|
||||
+++ b/cmake/AlembicOpenEXR.cmake
|
||||
@@ -38,8 +38,12 @@
|
||||
FIND_PACKAGE( OpenEXR )
|
||||
|
||||
IF( OPENEXR_FOUND )
|
||||
- SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS} )
|
||||
+ SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS}/OpenEXR )
|
||||
SET( ALEMBIC_OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} )
|
||||
+
|
||||
+ MESSAGE( STATUS "OPENEXR INCLUDE PATH: ${ALEMBIC_OPENEXR_INCLUDE_PATH}" )
|
||||
+ MESSAGE( STATUS "OPENEXR LIB: ${ALEMBIC_OPENEXR_LIBRARIES}" )
|
||||
+
|
||||
# SET( ALEMBIC_OPENEXR_DEFINITIONS ${OPENEXR_DEFINITIONS} )
|
||||
|
||||
SET( ALEMBIC_OPENEXR_FOUND 1 CACHE STRING "Set to 1 if OpenEXR is found, 0 otherwise" )
|
||||
diff --git a/cmake/Modules/FindIlmBase.cmake b/cmake/Modules/FindIlmBase.cmake
|
||||
deleted file mode 100644
|
||||
index 679a02f..0000000
|
||||
--- a/cmake/Modules/FindIlmBase.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,190 +0,0 @@
|
||||
-##-*****************************************************************************
|
||||
-##
|
||||
-## Copyright (c) 2009-2016,
|
||||
-## Sony Pictures Imageworks Inc. and
|
||||
-## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
-##
|
||||
-## All rights reserved.
|
||||
-##
|
||||
-## Redistribution and use in source and binary forms, with or without
|
||||
-## modification, are permitted provided that the following conditions are
|
||||
-## met:
|
||||
-## * Redistributions of source code must retain the above copyright
|
||||
-## notice, this list of conditions and the following disclaimer.
|
||||
-## * Redistributions in binary form must reproduce the above
|
||||
-## copyright notice, this list of conditions and the following disclaimer
|
||||
-## in the documentation and/or other materials provided with the
|
||||
-## distribution.
|
||||
-## * Neither the name of Industrial Light & Magic nor the names of
|
||||
-## its contributors may be used to endorse or promote products derived
|
||||
-## from this software without specific prior written permission.
|
||||
-##
|
||||
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-##
|
||||
-##-*****************************************************************************
|
||||
-
|
||||
-#-******************************************************************************
|
||||
-#-******************************************************************************
|
||||
-# FIRST, ILMBASE STUFF
|
||||
-#-******************************************************************************
|
||||
-#-******************************************************************************
|
||||
-
|
||||
-# If ILMBASE_ROOT was defined in the environment, use it.
|
||||
-IF(NOT ILMBASE_ROOT AND NOT $ENV{ILMBASE_ROOT} STREQUAL "")
|
||||
- SET(ILMBASE_ROOT $ENV{ILMBASE_ROOT})
|
||||
-ENDIF()
|
||||
-
|
||||
-IF(NOT DEFINED ILMBASE_ROOT)
|
||||
- MESSAGE(STATUS "ILMBASE_ROOT is undefined" )
|
||||
- IF ( ${CMAKE_HOST_UNIX} )
|
||||
- IF( ${DARWIN} )
|
||||
- # TODO: set to default install path when shipping out
|
||||
- SET( ALEMBIC_ILMBASE_ROOT NOTFOUND )
|
||||
- ELSE()
|
||||
- # TODO: set to default install path when shipping out
|
||||
- SET( ALEMBIC_ILMBASE_ROOT "/usr/local/ilmbase-1.0.1/" )
|
||||
- ENDIF()
|
||||
- ELSE()
|
||||
- IF ( ${WINDOWS} )
|
||||
- # TODO: set to 32-bit or 64-bit path
|
||||
- SET( ALEMBIC_ILMBASE_ROOT "C:/Program Files (x86)/ilmbase-1.0.1/" )
|
||||
- ELSE()
|
||||
- SET( ALEMBIC_ILMBASE_ROOT NOTFOUND )
|
||||
- ENDIF()
|
||||
- ENDIF()
|
||||
-ELSE()
|
||||
- SET( ALEMBIC_ILMBASE_ROOT ${ILMBASE_ROOT} )
|
||||
-ENDIF()
|
||||
-
|
||||
-SET(_ilmbase_FIND_COMPONENTS
|
||||
- Half
|
||||
- Iex
|
||||
- IexMath
|
||||
- IlmThread
|
||||
- Imath
|
||||
-)
|
||||
-
|
||||
-SET(_ilmbase_SEARCH_DIRS
|
||||
- ${ALEMBIC_ILMBASE_ROOT}
|
||||
- ~/Library/Frameworks
|
||||
- /Library/Frameworks
|
||||
- /usr/local
|
||||
- /usr
|
||||
- /sw
|
||||
- /opt/local
|
||||
- /opt/csw
|
||||
- /opt
|
||||
- /usr/freeware
|
||||
-)
|
||||
-
|
||||
-FIND_PATH(ILMBASE_INCLUDE_DIR
|
||||
- NAMES
|
||||
- IlmBaseConfig.h
|
||||
- HINTS
|
||||
- ${_ilmbase_SEARCH_DIRS}
|
||||
- PATH_SUFFIXES
|
||||
- include
|
||||
- include/OpenEXR
|
||||
-)
|
||||
-
|
||||
-# If the headers were found, get the version from config file, if not already set.
|
||||
-IF(ILMBASE_INCLUDE_DIR)
|
||||
- SET(ALEMBIC_ILMBASE_INCLUDE_DIRECTORY ${ILMBASE_INCLUDE_DIR})
|
||||
- IF(NOT ILMBASE_VERSION)
|
||||
-
|
||||
- FIND_FILE(_ilmbase_CONFIG
|
||||
- NAMES
|
||||
- IlmBaseConfig.h
|
||||
- PATHS
|
||||
- "${ILMBASE_INCLUDE_DIR}"
|
||||
- "${ILMBASE_INCLUDE_DIR}/OpenEXR"
|
||||
- )
|
||||
-
|
||||
- IF(_ilmbase_CONFIG)
|
||||
- FILE(STRINGS "${_ilmbase_CONFIG}" ILMBASE_BUILD_SPECIFICATION
|
||||
- REGEX "^[ \t]*#define[ \t]+(ILMBASE_VERSION_STRING|VERSION)[ \t]+\"[.0-9]+\".*$")
|
||||
- ELSE()
|
||||
- MESSAGE(WARNING "Could not find \"OpenEXRConfig.h\" in \"${ILMBASE_INCLUDE_DIR}\"")
|
||||
- ENDIF()
|
||||
-
|
||||
- IF(ILMBASE_BUILD_SPECIFICATION)
|
||||
- STRING(REGEX REPLACE ".*#define[ \t]+(ILMBASE_VERSION_STRING|VERSION)[ \t]+\"([.0-9]+)\".*"
|
||||
- "\\2" _ilmbase_libs_ver_init ${ILMBASE_BUILD_SPECIFICATION})
|
||||
- ELSE()
|
||||
- MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_ilmbase_libs_ver_init}.")
|
||||
- ENDIF()
|
||||
-
|
||||
- UNSET(_ilmbase_CONFIG CACHE)
|
||||
-
|
||||
- ENDIF()
|
||||
-
|
||||
- SET("ILMBASE_VERSION" ${_ilmbase_libs_ver_init} CACHE STRING "Version of OpenEXR lib")
|
||||
- UNSET(_ilmbase_libs_ver_init)
|
||||
-
|
||||
- STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
|
||||
-ENDIF()
|
||||
-
|
||||
-
|
||||
-SET(_ilmbase_LIBRARIES)
|
||||
-FOREACH(COMPONENT ${_ilmbase_FIND_COMPONENTS})
|
||||
- STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
-
|
||||
- FIND_LIBRARY(ALEMBIC_ILMBASE_${UPPERCOMPONENT}_LIB
|
||||
- NAMES
|
||||
- ${COMPONENT}-${_ilmbase_libs_ver} ${COMPONENT}
|
||||
- HINTS
|
||||
- ${_ilmbase_SEARCH_DIRS}
|
||||
- PATH_SUFFIXES
|
||||
- lib64 lib
|
||||
- )
|
||||
- LIST(APPEND _ilmbase_LIBRARIES "${ILMBASE_${UPPERCOMPONENT}_LIBRARY}")
|
||||
-ENDFOREACH()
|
||||
-
|
||||
-UNSET(_ilmbase_libs_ver)
|
||||
-
|
||||
-IF ( ${ALEMBIC_ILMBASE_HALF_LIB} STREQUAL "ALEMBIC_ILMBASE_HALF_LIB-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase libraries (Half, Iex, IlmThread, Imath) not found, required" )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( ${ALEMBIC_ILMBASE_IEX_LIB} STREQUAL "ALEMBIC_ILMBASE_IEX_LIB-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase libraries (Half, Iex, IlmThread, Imath) not found, required" )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( DEFINED USE_IEXMATH AND USE_IEXMATH )
|
||||
- IF ( ${ALEMBIC_ILMBASE_IEXMATH_LIB} STREQUAL
|
||||
- "ALEMBIC_ILMBASE_IEXMATH_LIB-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase libraries (Half, Iex, IexMath, IlmThread, Imath) not found, required" )
|
||||
- ENDIF()
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( ${ALEMBIC_ILMBASE_ILMTHREAD_LIB} STREQUAL "ALEMBIC_ILMBASE_ILMTHREAD_LIB-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase libraries (Half, Iex, IlmThread, Imath) not found, required" )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( ${ALEMBIC_ILMBASE_IMATH_LIB} STREQUAL "ALEMBIC_ILMBASE_IMATH_LIB-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase libraries (Half, Iex, IlmThread, Imath) not found, required" )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( ${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY} STREQUAL "ALEMBIC_ILMBASE_INCLUDE_DIRECTORY-NOTFOUND" )
|
||||
- MESSAGE( FATAL_ERROR "ilmbase header files not found, required: ALEMBIC_ILMBASE_ROOT: ${ALEMBIC_ILMBASE_ROOT}" )
|
||||
-ENDIF()
|
||||
-
|
||||
-
|
||||
-MESSAGE( STATUS "ILMBASE INCLUDE PATH: ${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY}" )
|
||||
-MESSAGE( STATUS "HALF LIB: ${ALEMBIC_ILMBASE_HALF_LIB}" )
|
||||
-MESSAGE( STATUS "IEX LIB: ${ALEMBIC_ILMBASE_IEX_LIB}" )
|
||||
-MESSAGE( STATUS "IEXMATH LIB: ${ALEMBIC_ILMBASE_IEXMATH_LIB}" )
|
||||
-MESSAGE( STATUS "ILMTHREAD LIB: ${ALEMBIC_ILMBASE_ILMTHREAD_LIB}" )
|
||||
-MESSAGE( STATUS "IMATH LIB: ${ALEMBIC_ILMBASE_IMATH_LIB}" )
|
||||
-
|
||||
-SET( ILMBASE_FOUND TRUE )
|
||||
diff --git a/cmake/Modules/FindOpenEXR.cmake b/cmake/Modules/FindOpenEXR.cmake
|
||||
deleted file mode 100644
|
||||
index 935fe6f..0000000
|
||||
--- a/cmake/Modules/FindOpenEXR.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,129 +0,0 @@
|
||||
-##-*****************************************************************************
|
||||
-##
|
||||
-## Copyright (c) 2009-2011,
|
||||
-## Sony Pictures Imageworks Inc. and
|
||||
-## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
-##
|
||||
-## All rights reserved.
|
||||
-##
|
||||
-## Redistribution and use in source and binary forms, with or without
|
||||
-## modification, are permitted provided that the following conditions are
|
||||
-## met:
|
||||
-## * Redistributions of source code must retain the above copyright
|
||||
-## notice, this list of conditions and the following disclaimer.
|
||||
-## * Redistributions in binary form must reproduce the above
|
||||
-## copyright notice, this list of conditions and the following disclaimer
|
||||
-## in the documentation and/or other materials provided with the
|
||||
-## distribution.
|
||||
-## * Neither the name of Industrial Light & Magic nor the names of
|
||||
-## its contributors may be used to endorse or promote products derived
|
||||
-## from this software without specific prior written permission.
|
||||
-##
|
||||
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-##
|
||||
-##-*****************************************************************************
|
||||
-
|
||||
-
|
||||
-# We shall worry about windowsification later.
|
||||
-
|
||||
-#-******************************************************************************
|
||||
-#-******************************************************************************
|
||||
-# NOW, OPENEXR STUFF. EXR IS OPTIONAL, WHERASE ILMBASE IS NOT
|
||||
-#-******************************************************************************
|
||||
-#-******************************************************************************
|
||||
-
|
||||
-IF(NOT DEFINED OPENEXR_ROOT)
|
||||
- IF ( ${CMAKE_HOST_UNIX} )
|
||||
- IF( ${DARWIN} )
|
||||
- # TODO: set to default install path when shipping out
|
||||
- SET( ALEMBIC_OPENEXR_ROOT NOTFOUND )
|
||||
- ELSE()
|
||||
- # TODO: set to default install path when shipping out
|
||||
- SET( ALEMBIC_OPENEXR_ROOT "/usr/local/openexr-1.6.1/" )
|
||||
- ENDIF()
|
||||
- ELSE()
|
||||
- IF ( ${WINDOWS} )
|
||||
- # TODO: set to 32-bit or 64-bit path
|
||||
- SET( ALEMBIC_OPENEXR_ROOT NOTFOUND )
|
||||
- ELSE()
|
||||
- SET( ALEMBIC_OPENEXR_ROOT NOTFOUND )
|
||||
- ENDIF()
|
||||
- ENDIF()
|
||||
-ELSE()
|
||||
- SET( ALEMBIC_OPENEXR_ROOT ${OPENEXR_ROOT} )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF(NOT $ENV{OPENEXR_ROOT}x STREQUAL "x")
|
||||
- SET( ALEMBIC_OPENEXR_ROOT $ENV{OPENEXR_ROOT})
|
||||
-ELSE()
|
||||
- SET( ENV{OPENEXR_ROOT} ${OPENEXR_ROOT} )
|
||||
-ENDIF()
|
||||
-
|
||||
-
|
||||
-SET(LIBRARY_PATHS
|
||||
- ${ALEMBIC_OPENEXR_ROOT}/lib
|
||||
- ~/Library/Frameworks
|
||||
- /Library/Frameworks
|
||||
- /usr/local/lib
|
||||
- /usr/lib
|
||||
- /sw/lib
|
||||
- /opt/local/lib
|
||||
- /opt/csw/lib
|
||||
- /opt/lib
|
||||
- /usr/freeware/lib64
|
||||
-)
|
||||
-
|
||||
-SET(INCLUDE_PATHS
|
||||
- ${ALEMBIC_OPENEXR_ROOT}/include/OpenEXR/
|
||||
- ~/Library/Frameworks
|
||||
- /Library/Frameworks
|
||||
- /usr/local/include/OpenEXR/
|
||||
- /usr/local/include
|
||||
- /usr/include
|
||||
- /sw/include # Fink
|
||||
- /opt/local/include # DarwinPorts
|
||||
- /opt/csw/include # Blastwave
|
||||
- /opt/include
|
||||
- /usr/freeware/include
|
||||
-)
|
||||
-
|
||||
-FIND_PATH( ALEMBIC_OPENEXR_INCLUDE_PATH ImfRgba.h
|
||||
- PATHS
|
||||
- ${INCLUDE_PATHS}
|
||||
- DOC "The directory where ImfRgba.h resides" )
|
||||
-
|
||||
-FIND_LIBRARY( ALEMBIC_OPENEXR_ILMIMF_LIB IlmImf
|
||||
- PATHS
|
||||
- ${LIBRARY_PATHS}
|
||||
- DOC "The IlmImf library" )
|
||||
-
|
||||
-
|
||||
-SET( OPENEXR_FOUND TRUE )
|
||||
-
|
||||
-IF ( ${ALEMBIC_OPENEXR_INCLUDE_PATH} STREQUAL "ALEMBIC_OPENEXR_INCLUDE_PATH-NOTFOUND" )
|
||||
- MESSAGE( STATUS "OpenEXR include path not found, disabling" )
|
||||
- SET( OPENEXR_FOUND FALSE )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF ( ${ALEMBIC_OPENEXR_ILMIMF_LIB} STREQUAL "ALEMBIC_OPENEXR_ILMIMF_LIB-NOTFOUND" )
|
||||
- MESSAGE( STATUS "OpenEXR libraries not found, disabling" )
|
||||
- SET( OPENEXR_FOUND FALSE )
|
||||
- SET( ALEMBIC_OPENEXR_LIBS NOTFOUND )
|
||||
-ENDIF()
|
||||
-
|
||||
-IF (OPENEXR_FOUND)
|
||||
- MESSAGE( STATUS "OPENEXR INCLUDE PATH: ${ALEMBIC_OPENEXR_INCLUDE_PATH}" )
|
||||
- SET( ALEMBIC_OPENEXR_LIBS ${ALEMBIC_OPENEXR_ILMIMF_LIB} )
|
||||
-ENDIF()
|
||||
-
|
||||
-
|
@ -1,17 +0,0 @@
|
||||
diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt
|
||||
index 5028c91..1f81d50 100644
|
||||
--- a/lib/Alembic/CMakeLists.txt
|
||||
+++ b/lib/Alembic/CMakeLists.txt
|
||||
@@ -49,6 +49,12 @@ ADD_SUBDIRECTORY(AbcMaterial)
|
||||
ADD_SUBDIRECTORY(Ogawa)
|
||||
|
||||
ADD_LIBRARY(Alembic ${LIB_TYPE} ${CXX_FILES})
|
||||
+IF (USE_HDF5)
|
||||
+ TARGET_LINK_LIBRARIES(Alembic
|
||||
+ ${HDF5_LIBRARIES}
|
||||
+ )
|
||||
+ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
|
||||
+ENDIF()
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(Alembic
|
||||
PUBLIC
|
@ -1,11 +1,6 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32)
|
||||
message(WARNING "Alembic's buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
vcpkg_buildpath_length_warning(37)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
@ -16,21 +11,20 @@ vcpkg_from_github(
|
||||
SHA512 94b9c218a2fe6e2e24205aff4a2f6bab784851c2aa15592fb60ea91f0e8038b0c0656a118f3a5cba0d3de8917dd90b74d0e2d1c4ac034b9ee3f5d0741d9f6b70
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-hdf5link.patch
|
||||
bypass-findhdf5.patch
|
||||
fix-C1083.patch
|
||||
fix-find-openexr-ilmbase.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DUSE_HDF5=ON
|
||||
-DHDF5_ROOT=${CURRENT_INSTALLED_DIR}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Alembic")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Alembic)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
|
@ -1,44 +1,29 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO liballeg/allegro5
|
||||
REF 5.2.5.0
|
||||
SHA512 9b97a46f0fd146c3958a5f8333822665ae06b984b3dbedc1356afdac8fe3248203347cb08b30ebda049a7320948c7844e9d00dc055c317836c2557b5bfc2ab04
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(ALLEGRO_USE_STATIC ON)
|
||||
else()
|
||||
set(ALLEGRO_USE_STATIC OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch
|
||||
fix-pdb-install.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(VCPKG_BUILD_SHARED_LIBS ON)
|
||||
else()
|
||||
set(VCPKG_BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DWANT_DOCS=OFF
|
||||
-DALLEGRO_SDL=OFF
|
||||
-DWANT_DEMO=OFF
|
||||
-DSHARED=${ALLEGRO_USE_STATIC}
|
||||
-DSHARED=${VCPKG_BUILD_SHARED_LIBS}
|
||||
-DWANT_EXAMPLES=OFF
|
||||
-DWANT_CURL_EXAMPLE=OFF
|
||||
-DWANT_TESTS=OFF
|
||||
@ -81,14 +66,11 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/allegro5/copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb)
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
|
||||
file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5 RENAME copyright)
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: ampl-mp
|
||||
Version: 2019-03-21
|
||||
Version: 2019-03-21-1
|
||||
Description: An open-source library for mathematical programming
|
||||
|
@ -20,6 +20,7 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD=asl
|
||||
-DBUILD_TESTING=OFF
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: amqpcpp
|
||||
Version: 4.1.4
|
||||
Version: 4.1.5
|
||||
Description: AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker
|
||||
Build-Depends: openssl (linux)
|
||||
|
@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO CopernicaMarketingSoftware/AMQP-CPP
|
||||
REF v4.1.4
|
||||
SHA512 d589756ad8e27ce6b6772128479083293c4dbb8c7aa79b7b08f0036ced9ab76ecb75e55458f04de8e2745c9732a6322f4e910f3f8611633c5cd5c35fb7dcaed1
|
||||
REF v4.1.5
|
||||
SHA512 71c54ddf43230fb3e9726257b073d117a329030052f768f985c2e9ebde5a320f0042d2ef67604b87940bfa1ed61339c334af0362238d10f30845521dff8ce43c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
find-openssl.patch
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: anax
|
||||
Version: 2.1.0-5
|
||||
Version: 2.1.0-6
|
||||
Description: An open source C++ entity system.
|
||||
Homepage: https://github.com/miguelmartin75/anax
|
||||
|
@ -14,6 +14,7 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
Source: angelscript
|
||||
Version: 2.33.0
|
||||
Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer.
|
||||
Source: angelscript
|
||||
Version: 2.34.0
|
||||
Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer.
|
||||
|
||||
Feature: addons
|
||||
Description: Installs all addons for use in compiling scripts addons
|
||||
|
@ -1,13 +1,13 @@
|
||||
AngelCode Scripting Library
|
||||
|
||||
Copyright © 2003-2018 Andreas Jönsson
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
This notice may not be removed or altered from any source distribution.
|
||||
AngelCode Scripting Library
|
||||
|
||||
Copyright © 2003-2018 Andreas Jönsson
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
This notice may not be removed or altered from any source distribution.
|
||||
|
@ -1,13 +1,13 @@
|
||||
diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt
|
||||
index 7c800c5..982ad8b 100644
|
||||
--- a/angelscript/projects/cmake/CMakeLists.txt
|
||||
+++ b/angelscript/projects/cmake/CMakeLists.txt
|
||||
@@ -145,7 +145,7 @@ endif()
|
||||
|
||||
# Don't override the default library output path to avoid conflicts when building for multiple target platforms
|
||||
#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib)
|
||||
-target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads)
|
||||
+target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE Threads::Threads)
|
||||
|
||||
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
|
||||
diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt
|
||||
index 7c800c5..982ad8b 100644
|
||||
--- a/angelscript/projects/cmake/CMakeLists.txt
|
||||
+++ b/angelscript/projects/cmake/CMakeLists.txt
|
||||
@@ -145,7 +145,7 @@ endif()
|
||||
|
||||
# Don't override the default library output path to avoid conflicts when building for multiple target platforms
|
||||
#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib)
|
||||
-target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads)
|
||||
+target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE Threads::Threads)
|
||||
|
||||
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
|
||||
|
@ -1,50 +1,31 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.33.0.zip"
|
||||
FILENAME "angelscript_2.33.0.zip"
|
||||
SHA512 eaf972ecf965fe4f72e55755f5e796499018e918f93cfd835b1ca20f9338e299e8dbd707240341eef81ae920f07d2280646151f515f5990a62550689445c86f0
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
# (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag).
|
||||
# REF 1.0.0
|
||||
# (Optional) Read the docs for how to generate patches at:
|
||||
# https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md
|
||||
PATCHES
|
||||
mark-threads-private.patch
|
||||
# 002_more_port_fixes.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/angelscript/projects/cmake
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Angelscript")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angelscript RENAME copyright)
|
||||
|
||||
# Post-build test for cmake libraries
|
||||
# vcpkg_test_cmake(PACKAGE_NAME angelscript)
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://angelcode.com/angelscript/sdk/files/angelscript_2.34.0.zip"
|
||||
FILENAME "angelscript_2.34.0.zip"
|
||||
SHA512 c26dba452ab52c300da9c95fde8398acf4840cbc0e653ededf978d4a3e942cfe5b77292c74c49dc0279250a27cfd324c696c49d139a97c844b2a1eead9aae2f4
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
mark-threads-private.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/angelscript/projects/cmake
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Angelscript)
|
||||
|
||||
# Copy the addon files
|
||||
if("addons" IN_LIST FEATURES)
|
||||
file(INSTALL ${SOURCE_PATH}/add_on/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/angelscript FILES_MATCHING PATTERN "*.h" PATTERN "*.cpp")
|
||||
endif()
|
||||
|
||||
file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,274 +1,262 @@
|
||||
diff --git a/src/common/system_utils_win.cpp b/src/common/system_utils_win.cpp
|
||||
index e4c146091..974b1b3ba 100644
|
||||
--- a/src/common/system_utils_win.cpp
|
||||
+++ b/src/common/system_utils_win.cpp
|
||||
@@ -110,7 +110,7 @@ class Win32Library : public Library
|
||||
int ret = snprintf(buffer, MAX_PATH, "%s.%s", libraryName, GetSharedLibraryExtension());
|
||||
if (ret > 0 && ret < MAX_PATH)
|
||||
{
|
||||
- mModule = LoadLibraryA(buffer);
|
||||
+ // mModule = LoadLibraryA(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/libANGLE/renderer/d3d/RendererD3D.cpp b/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
index 2a8d0221b..362c95a6f 100644
|
||||
--- a/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
@@ -229,7 +229,6 @@ GLenum DefaultGLErrorCode(HRESULT hr)
|
||||
{
|
||||
switch (hr)
|
||||
{
|
||||
- case D3DERR_OUTOFVIDEOMEMORY:
|
||||
case E_OUTOFMEMORY:
|
||||
return GL_OUT_OF_MEMORY;
|
||||
default:
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
index 9da5cfdae..6eaab6aa7 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "common/tls.h"
|
||||
#include "common/utilities.h"
|
||||
+#include "common/debug.h"
|
||||
#include "libANGLE/Buffer.h"
|
||||
#include "libANGLE/Context.h"
|
||||
#include "libANGLE/Display.h"
|
||||
@@ -1189,10 +1190,11 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions
|
||||
outExtensions->robustResourceInitialization = true;
|
||||
|
||||
// Compositor Native Window capabilies require WinVer >= 1803
|
||||
- if (CompositorNativeWindow11::IsSupportedWinRelease())
|
||||
- {
|
||||
- outExtensions->windowsUIComposition = true;
|
||||
- }
|
||||
+#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ outExtensions->windowsUIComposition = NativeWindow11WinRT::IsSupportedWin10Release();
|
||||
+#else
|
||||
+outExtensions->windowsUIComposition = CompositorNativeWindow11::IsSupportedWinRelease();
|
||||
+#endif
|
||||
}
|
||||
|
||||
angle::Result Renderer11::flush(Context11 *context11)
|
||||
@@ -1266,16 +1268,24 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window,
|
||||
const egl::Config *config,
|
||||
const egl::AttributeMap &attribs) const
|
||||
{
|
||||
- auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
+#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ auto useWinUiComp = window != nullptr && !NativeWindow11WinRT::IsValidNativeWindow(window);
|
||||
+#else
|
||||
+ auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
+#endif
|
||||
|
||||
if (useWinUiComp)
|
||||
{
|
||||
- return new CompositorNativeWindow11(window, config->alphaSize > 0);
|
||||
+#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ return new NativeWindow11WinRT(window, config->alphaSize > 0);
|
||||
+#else
|
||||
+ return new CompositorNativeWindow11(window, config->alphaSize > 0);
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
- UNUSED_VARIABLE(attribs);
|
||||
+ ANGLE_UNUSED_VARIABLE(attribs);
|
||||
return new NativeWindow11WinRT(window, config->alphaSize > 0);
|
||||
#else
|
||||
return new NativeWindow11Win32(
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
index cb2f279e4..a8761e29c 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
@@ -145,6 +145,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain)
|
||||
{
|
||||
if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 ||
|
||||
@@ -158,6 +159,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
swapChainDesc.Height = height;
|
||||
swapChainDesc.Format = format;
|
||||
swapChainDesc.Stereo = FALSE;
|
||||
+ swapChainDesc.SampleDesc.Count = samples;
|
||||
swapChainDesc.SampleDesc.Count = 1;
|
||||
swapChainDesc.SampleDesc.Quality = 0;
|
||||
swapChainDesc.BufferUsage =
|
||||
@@ -213,11 +215,9 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind
|
||||
|
||||
static float GetLogicalDpi()
|
||||
{
|
||||
- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
|
||||
+ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> displayProperties;
|
||||
|
||||
- if (SUCCEEDED(GetActivationFactory(
|
||||
- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(),
|
||||
- displayProperties.GetAddressOf())))
|
||||
+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayProperties.GetAddressOf())))
|
||||
{
|
||||
float dpi = 96.0f;
|
||||
if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
index ae57cfb83..983a20ada 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
@@ -36,6 +36,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain) override;
|
||||
|
||||
protected:
|
||||
@@ -49,7 +50,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow,
|
||||
ComPtr<IMap<HSTRING, IInspectable *>> mPropertyMap;
|
||||
};
|
||||
|
||||
-[uuid(7F924F66 - EBAE - 40E5 - A10B - B8F35E245190)] class CoreWindowSizeChangedHandler
|
||||
+[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)] class CoreWindowSizeChangedHandler
|
||||
: public Microsoft::WRL::RuntimeClass<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
IWindowSizeChangedEventHandler>
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
index 708e8a212..aa6c6f375 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
@@ -53,6 +53,7 @@ class InspectableNativeWindow
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain) = 0;
|
||||
|
||||
bool getClientRect(RECT *rect)
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
index 8972ca227..ed3576a8c 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
|
||||
#include "libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h"
|
||||
|
||||
+#include <windows.foundation.metadata.h>
|
||||
+
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
|
||||
@@ -88,6 +90,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
|
||||
DXGI_FORMAT format,
|
||||
UINT width,
|
||||
UINT height,
|
||||
+ UINT samples,
|
||||
IDXGISwapChain **swapChain)
|
||||
{
|
||||
if (mImpl)
|
||||
@@ -95,7 +98,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
|
||||
IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject<IDXGIFactory2>(factory);
|
||||
IDXGISwapChain1 *swapChain1 = nullptr;
|
||||
HRESULT result =
|
||||
- mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1);
|
||||
+ mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1);
|
||||
SafeRelease(factory2);
|
||||
*swapChain = static_cast<IDXGISwapChain *>(swapChain1);
|
||||
return result;
|
||||
@@ -119,4 +122,44 @@ bool NativeWindow11WinRT::IsValidNativeWindow(EGLNativeWindowType window)
|
||||
return IsCoreWindow(window) || IsSwapChainPanel(window) || IsEGLConfiguredPropertySet(window);
|
||||
}
|
||||
|
||||
+bool NativeWindow11WinRT::IsSupportedWin10Release()
|
||||
+{
|
||||
+ HSTRING className, contractName;
|
||||
+ HSTRING_HEADER classNameHeader, contractNameHeader;
|
||||
+ boolean isSupported = false;
|
||||
+
|
||||
+ const wchar_t *str = static_cast<const wchar_t *>(RuntimeClass_Windows_Foundation_Metadata_ApiInformation);
|
||||
+ unsigned int length;
|
||||
+ SizeTToUInt32(::wcslen(str), &length);
|
||||
+ HRESULT hr = WindowsCreateStringReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation, length, &classNameHeader, &className);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api;
|
||||
+
|
||||
+ hr = RoGetActivationFactory(className, __uuidof(ABI::Windows::Foundation::Metadata::IApiInformationStatics), &api);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ str = static_cast<const wchar_t *>(L"Windows.Foundation.UniversalApiContract");
|
||||
+ SizeTToUInt32(::wcslen(str), &length);
|
||||
+ hr = WindowsCreateStringReference(L"Windows.Foundation.UniversalApiContract", length, &contractNameHeader,
|
||||
+ &contractName);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ api->IsApiContractPresentByMajor(contractName, 6, &isSupported);
|
||||
+
|
||||
+ return isSupported;
|
||||
+}
|
||||
+
|
||||
} // namespace rx
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
index eac5b21b7..36b20371e 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
@@ -34,11 +34,13 @@ class NativeWindow11WinRT : public NativeWindow11
|
||||
DXGI_FORMAT format,
|
||||
UINT width,
|
||||
UINT height,
|
||||
+ UINT samples,
|
||||
IDXGISwapChain **swapChain) override;
|
||||
|
||||
void commitChange() override;
|
||||
|
||||
static bool IsValidNativeWindow(EGLNativeWindowType window);
|
||||
+ static bool IsSupportedWin10Release();
|
||||
|
||||
private:
|
||||
bool mHasAlpha;
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
index af0beb635..9f7face1b 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
@@ -247,6 +247,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain)
|
||||
{
|
||||
if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 ||
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
index 09642eec5..1f2c090d5 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
@@ -28,6 +28,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain) override;
|
||||
|
||||
protected:
|
||||
@@ -43,7 +44,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow,
|
||||
ComPtr<IDXGISwapChain1> mSwapChain;
|
||||
};
|
||||
|
||||
-[uuid(8ACBD974 - 8187 - 4508 - AD80 - AEC77F93CF36)] class SwapChainPanelSizeChangedHandler
|
||||
+[uuid(8ACBD974-8187-4508-AD80-AEC77F93CF36)] class SwapChainPanelSizeChangedHandler
|
||||
: public Microsoft::WRL::RuntimeClass<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
ABI::Windows::UI::Xaml::ISizeChangedEventHandler>
|
||||
diff --git a/src/libANGLE/renderer/d3d/RendererD3D.cpp b/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
index fa46476..ad56164 100644
|
||||
--- a/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/RendererD3D.cpp
|
||||
@@ -240,7 +240,6 @@ GLenum DefaultGLErrorCode(HRESULT hr)
|
||||
{
|
||||
switch (hr)
|
||||
{
|
||||
- case D3DERR_OUTOFVIDEOMEMORY:
|
||||
case E_OUTOFMEMORY:
|
||||
return GL_OUT_OF_MEMORY;
|
||||
default:
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
index 62f263b..b8efe15 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "common/tls.h"
|
||||
#include "common/utilities.h"
|
||||
+#include "common/debug.h"
|
||||
#include "libANGLE/Buffer.h"
|
||||
#include "libANGLE/Context.h"
|
||||
#include "libANGLE/Display.h"
|
||||
@@ -1142,9 +1143,11 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions
|
||||
|
||||
// Compositor Native Window capabilies require WinVer >= 1803
|
||||
if (CompositorNativeWindow11::IsSupportedWinRelease())
|
||||
- {
|
||||
- outExtensions->windowsUIComposition = true;
|
||||
- }
|
||||
+ #ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ outExtensions->windowsUIComposition = NativeWindow11WinRT::IsSupportedWin10Release();
|
||||
+ #else
|
||||
+ outExtensions->windowsUIComposition = CompositorNativeWindow11::IsSupportedWinRelease();
|
||||
+ #endif
|
||||
}
|
||||
|
||||
angle::Result Renderer11::flush(Context11 *context11)
|
||||
@@ -1218,16 +1221,23 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window,
|
||||
const egl::Config *config,
|
||||
const egl::AttributeMap &attribs) const
|
||||
{
|
||||
- auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
-
|
||||
+#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ auto useWinUiComp = window != nullptr && !NativeWindow11WinRT::IsValidNativeWindow(window);
|
||||
+#else
|
||||
+ auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
+#endif
|
||||
if (useWinUiComp)
|
||||
{
|
||||
- return new CompositorNativeWindow11(window, config->alphaSize > 0);
|
||||
+#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ return new NativeWindow11WinRT(window, config->alphaSize > 0);
|
||||
+#else
|
||||
+ return new CompositorNativeWindow11(window, config->alphaSize > 0);
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ANGLE_ENABLE_WINDOWS_STORE
|
||||
- UNUSED_VARIABLE(attribs);
|
||||
+ ANGLE_UNUSED_VARIABLE(attribs);
|
||||
return new NativeWindow11WinRT(window, config->alphaSize > 0);
|
||||
#else
|
||||
return new NativeWindow11Win32(
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
index cb2f279..d76905c 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
@@ -145,6 +145,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain)
|
||||
{
|
||||
if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 ||
|
||||
@@ -158,6 +159,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
swapChainDesc.Height = height;
|
||||
swapChainDesc.Format = format;
|
||||
swapChainDesc.Stereo = FALSE;
|
||||
+ swapChainDesc.SampleDesc.Count = samples;
|
||||
swapChainDesc.SampleDesc.Count = 1;
|
||||
swapChainDesc.SampleDesc.Quality = 0;
|
||||
swapChainDesc.BufferUsage =
|
||||
@@ -213,11 +215,9 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind
|
||||
|
||||
static float GetLogicalDpi()
|
||||
{
|
||||
- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
|
||||
-
|
||||
- if (SUCCEEDED(GetActivationFactory(
|
||||
- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(),
|
||||
- displayProperties.GetAddressOf())))
|
||||
+ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> displayProperties;
|
||||
+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(),
|
||||
+ displayProperties.GetAddressOf())))
|
||||
{
|
||||
float dpi = 96.0f;
|
||||
if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
index ae57cfb..dd77b42 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
|
||||
@@ -36,6 +36,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain) override;
|
||||
|
||||
protected:
|
||||
@@ -49,7 +50,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow,
|
||||
ComPtr<IMap<HSTRING, IInspectable *>> mPropertyMap;
|
||||
};
|
||||
|
||||
-[uuid(7F924F66 - EBAE - 40E5 - A10B - B8F35E245190)] class CoreWindowSizeChangedHandler
|
||||
+[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)] class CoreWindowSizeChangedHandler
|
||||
: public Microsoft::WRL::RuntimeClass<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
IWindowSizeChangedEventHandler>
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
index 708e8a2..9bfa4c4 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
|
||||
@@ -53,6 +53,7 @@ class InspectableNativeWindow
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
bool containsAlpha,
|
||||
+ unsigned int samples,
|
||||
IDXGISwapChain1 **swapChain) = 0;
|
||||
|
||||
bool getClientRect(RECT *rect)
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
index 8972ca2..caf2a7e 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
|
||||
#include "libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h"
|
||||
|
||||
+#include <windows.foundation.metadata.h>
|
||||
+
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
|
||||
@@ -88,6 +90,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
|
||||
DXGI_FORMAT format,
|
||||
UINT width,
|
||||
UINT height,
|
||||
+ UINT samples,
|
||||
IDXGISwapChain **swapChain)
|
||||
{
|
||||
if (mImpl)
|
||||
@@ -95,7 +98,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
|
||||
IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject<IDXGIFactory2>(factory);
|
||||
IDXGISwapChain1 *swapChain1 = nullptr;
|
||||
HRESULT result =
|
||||
- mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1);
|
||||
+ mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1);
|
||||
SafeRelease(factory2);
|
||||
*swapChain = static_cast<IDXGISwapChain *>(swapChain1);
|
||||
return result;
|
||||
@@ -118,5 +121,44 @@ bool NativeWindow11WinRT::IsValidNativeWindow(EGLNativeWindowType window)
|
||||
// Anything else will be rejected as an invalid IInspectable.
|
||||
return IsCoreWindow(window) || IsSwapChainPanel(window) || IsEGLConfiguredPropertySet(window);
|
||||
}
|
||||
+bool NativeWindow11WinRT::IsSupportedWin10Release()
|
||||
+{
|
||||
+ HSTRING className, contractName;
|
||||
+ HSTRING_HEADER classNameHeader, contractNameHeader;
|
||||
+ boolean isSupported = false;
|
||||
+
|
||||
+ const wchar_t *str = static_cast<const wchar_t *>(RuntimeClass_Windows_Foundation_Metadata_ApiInformation);
|
||||
+ unsigned int length;
|
||||
+ SizeTToUInt32(::wcslen(str), &length);
|
||||
+ HRESULT hr = WindowsCreateStringReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation, length, &classNameHeader, &className);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api;
|
||||
+
|
||||
+ hr = RoGetActivationFactory(className, __uuidof(ABI::Windows::Foundation::Metadata::IApiInformationStatics), &api);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ str = static_cast<const wchar_t *>(L"Windows.Foundation.UniversalApiContract");
|
||||
+ SizeTToUInt32(::wcslen(str), &length);
|
||||
+ hr = WindowsCreateStringReference(L"Windows.Foundation.UniversalApiContract", length, &contractNameHeader,
|
||||
+ &contractName);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ return isSupported;
|
||||
+ }
|
||||
+
|
||||
+ api->IsApiContractPresentByMajor(contractName, 6, &isSupported);
|
||||
+
|
||||
+ return isSupported;
|
||||
+}
|
||||
|
||||
} // namespace rx
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
index eac5b21..b9ee344 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h
|
||||
@@ -34,11 +34,14 @@ class NativeWindow11WinRT : public NativeWindow11
|
||||
DXGI_FORMAT format,
|
||||
UINT width,
|
||||
UINT height,
|
||||
+ UINT samples,
|
||||
IDXGISwapChain **swapChain) override;
|
||||
|
||||
void commitChange() override;
|
||||
|
||||
static bool IsValidNativeWindow(EGLNativeWindowType window);
|
||||
+ static bool IsSupportedWin10Release();
|
||||
+
|
||||
|
||||
private:
|
||||
bool mHasAlpha;
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
index af0beb6..20fd632 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
|
||||
@@ -246,6 +246,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,
|
||||
DXGI_FORMAT format,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
+ unsigned int samples,
|
||||
bool containsAlpha,
|
||||
IDXGISwapChain1 **swapChain)
|
||||
{
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
index 09642ee..fc69bf4 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h
|
||||
@@ -27,6 +27,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow,
|
||||
DXGI_FORMAT format,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
+ unsigned int samples,
|
||||
bool containsAlpha,
|
||||
IDXGISwapChain1 **swapChain) override;
|
||||
|
||||
@@ -43,7 +44,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow,
|
||||
ComPtr<IDXGISwapChain1> mSwapChain;
|
||||
};
|
||||
|
||||
-[uuid(8ACBD974 - 8187 - 4508 - AD80 - AEC77F93CF36)] class SwapChainPanelSizeChangedHandler
|
||||
+[uuid(8ACBD974-8187-4508-AD80-AEC77F93CF36)] class SwapChainPanelSizeChangedHandler
|
||||
: public Microsoft::WRL::RuntimeClass<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
ABI::Windows::UI::Xaml::ISizeChangedEventHandler>
|
||||
|
@ -30,6 +30,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
add_definitions(
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_WARNINGS
|
||||
-DGL_SILENCE_DEPRECATION
|
||||
-D_HAS_EXCEPTIONS=0
|
||||
-DNOMINMAX
|
||||
-DANGLE_STANDALONE_BUILD
|
||||
@ -49,18 +50,18 @@ elseif(APPLE)
|
||||
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win")
|
||||
endif()
|
||||
file(GLOB ANGLE_COMMON_SOURCES
|
||||
"src/common/*.h"
|
||||
"src/common/*.inl"
|
||||
"src/common/*.cpp"
|
||||
"src/common/third_party/base/anglebase/*.h"
|
||||
"src/common/third_party/base/anglebase/*.cc"
|
||||
"src/common/third_party/base/anglebase/containers/*.h"
|
||||
"src/common/third_party/base/anglebase/numerics/*.h"
|
||||
"src/common/third_party/base/anglebase/numerics/*.cc"
|
||||
"src/common/third_party/xxhash/*.h"
|
||||
"src/common/third_party/xxhash/*.c"
|
||||
"src/common/third_party/smhasher/src/*.h"
|
||||
"src/common/third_party/smhasher/src/*.cpp")
|
||||
"src/common/*.h"
|
||||
"src/common/*.inl"
|
||||
"src/common/*.cpp"
|
||||
"src/common/third_party/base/anglebase/*.h"
|
||||
"src/common/third_party/base/anglebase/*.cc"
|
||||
"src/common/third_party/base/anglebase/containers/*.h"
|
||||
"src/common/third_party/base/anglebase/numerics/*.h"
|
||||
"src/common/third_party/base/anglebase/numerics/*.cc"
|
||||
"src/common/third_party/xxhash/*.h"
|
||||
"src/common/third_party/xxhash/*.c"
|
||||
"src/common/third_party/smhasher/src/*.h"
|
||||
"src/common/third_party/smhasher/src/*.cpp")
|
||||
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
|
||||
add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES})
|
||||
target_include_directories(angle_common PUBLIC src/common/third_party/base)
|
||||
@ -191,13 +192,43 @@ if(WIN32)
|
||||
add_library(angle::renderer::d3d ALIAS angle_renderer_d3d)
|
||||
endif()
|
||||
|
||||
## angle::gpu_info_util
|
||||
file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES
|
||||
"src/gpu_info_util/SystemInfo.h"
|
||||
"src/gpu_info_util/SystemInfo_internal.h"
|
||||
"src/gpu_info_util/SystemInfo.cpp"
|
||||
)
|
||||
add_library(angle_gpu_info_util STATIC ${ANGLE_GPU_INFO_UTIL_SOURCES})
|
||||
if(WIN32)
|
||||
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
|
||||
target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib)
|
||||
elseif(APPLE)
|
||||
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_mac.mm")
|
||||
find_library(IOKit IOKit)
|
||||
find_library(CoreFoundation CoreFoundation)
|
||||
find_library(CoreGraphics CoreGraphics)
|
||||
target_link_libraries(angle_gpu_info_util PRIVATE ${IOKit} ${CoreFoundation} ${CoreGraphics})
|
||||
elseif(LINUX)
|
||||
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_linux.cpp" "src/gpu_info_util/SystemInfo_x11.cpp")
|
||||
target_compile_definitions(angle_gpu_info_util PRIVATE GPU_INFO_USE_X11)
|
||||
target_link_libraries(angle_gpu_info_util PRIVATE X11 Xi Xext)
|
||||
elseif(ANDROID)
|
||||
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_android.cpp")
|
||||
endif()
|
||||
target_link_libraries(angle_gpu_info_util PRIVATE angle::common)
|
||||
add_library(angle::gpu_info_util ALIAS angle_gpu_info_util)
|
||||
|
||||
## Core libANGLE library
|
||||
if(WIN32)
|
||||
set(LIBANGLE_SOURCES_PLATFORM
|
||||
"src/third_party/systeminfo/SystemInfo.cpp"
|
||||
)
|
||||
elseif(APPLE)
|
||||
file(GLOB LIBANGLE_SOURCES_PLATFORM
|
||||
"src/libANGLE/renderer/*.mm"
|
||||
)
|
||||
else()
|
||||
set(LIBANGLE_SOURCES_PLATFORM )
|
||||
set(LIBANGLE_SOURCES_PLATFORM)
|
||||
endif()
|
||||
|
||||
file(GLOB LIBANGLE_SOURCES
|
||||
@ -252,6 +283,7 @@ add_library(libANGLE STATIC ${LIBANGLE_SOURCES})
|
||||
target_link_libraries(libANGLE PRIVATE
|
||||
angle::common
|
||||
angle::image_util
|
||||
angle::gpu_info_util
|
||||
angle::translator
|
||||
angle::preprocessor
|
||||
${LIBANGLE_RENDERER_PLATFORM}
|
||||
@ -267,7 +299,35 @@ add_library(angle::libANGLE ALIAS libANGLE)
|
||||
|
||||
##########
|
||||
# libGLESv2
|
||||
file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2_autogen.def")
|
||||
# Modified according to the file src/libGLESv2.gni
|
||||
list(APPEND LIBGLESV2_SOURCES
|
||||
"src/common/angleutils.h"
|
||||
"src/common/debug.h"
|
||||
"src/libANGLE/entry_points_enum_autogen.h"
|
||||
"src/libANGLE/entry_points_utils.h"
|
||||
"src/libGLESv2/entry_points_egl.cpp"
|
||||
"src/libGLESv2/entry_points_egl.h"
|
||||
"src/libGLESv2/entry_points_egl_ext.cpp"
|
||||
"src/libGLESv2/entry_points_egl_ext.h"
|
||||
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp"
|
||||
"src/libGLESv2/entry_points_gles_1_0_autogen.h"
|
||||
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp"
|
||||
"src/libGLESv2/entry_points_gles_2_0_autogen.h"
|
||||
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp"
|
||||
"src/libGLESv2/entry_points_gles_3_0_autogen.h"
|
||||
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp"
|
||||
"src/libGLESv2/entry_points_gles_3_1_autogen.h"
|
||||
"src/libGLESv2/entry_points_gles_ext_autogen.cpp"
|
||||
"src/libGLESv2/entry_points_gles_ext_autogen.h"
|
||||
"src/libGLESv2/global_state.cpp"
|
||||
"src/libGLESv2/global_state.h"
|
||||
"src/libGLESv2/libGLESv2_autogen.cpp"
|
||||
"src/libGLESv2/libGLESv2.rc"
|
||||
"src/libGLESv2/proc_table_egl.h"
|
||||
"src/libGLESv2/proc_table_egl_autogen.cpp"
|
||||
"src/libGLESv2/resource.h"
|
||||
"src/libGLESv2/libGLESv2_autogen.def"
|
||||
)
|
||||
add_library(libGLESv2 ${LIBGLESV2_SOURCES})
|
||||
target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
|
||||
target_compile_definitions(libGLESv2
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: angle
|
||||
Version: 2019-03-13-c2ee2cc-3
|
||||
Version: 2019-07-19-2
|
||||
Homepage: https://github.com/google/angle
|
||||
Description: A conformant OpenGL ES implementation for Windows, Mac and Linux.
|
||||
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.
|
||||
|
@ -2,6 +2,10 @@ include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(WARNING "Building with a gcc version less than 6.1 is not supported.")
|
||||
endif()
|
||||
|
||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
@ -15,8 +19,8 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/angle
|
||||
REF chromium/3672
|
||||
SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81
|
||||
REF 8f08fed925c54835c4faee4d7dd61d6ed2964ffd
|
||||
SHA512 037ebe356371924088563180c4a37a31eaffa41ca21c42554391672c28e62fabc19d787516b88baa192b771e05c370c5a6cfec0863b70e08d65216f41d89923f
|
||||
PATCHES
|
||||
001-fix-uwp.patch
|
||||
)
|
||||
|
0
ports/antlr4/portfile.cmake
Executable file → Normal file
0
ports/antlr4/portfile.cmake
Executable file → Normal file
4
ports/anyrpc/CONTROL
Normal file
4
ports/anyrpc/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: anyrpc
|
||||
Version: 2017-12-01-1
|
||||
Homepage: https://github.com/sgieseking/anyrpc
|
||||
Description: A multiprotocol remote procedure call system for C++.
|
16
ports/anyrpc/arm_endian_detection.patch
Normal file
16
ports/anyrpc/arm_endian_detection.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/include/anyrpc/api.h b/include/anyrpc/api.h
|
||||
index a67fa32..e7d74ad 100644
|
||||
--- a/include/anyrpc/api.h
|
||||
+++ b/include/anyrpc/api.h
|
||||
@@ -158,9 +158,9 @@ typedef int socklen_t;
|
||||
# elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||
# define ANYRPC_ENDIAN ANYRPC_BIGENDIAN
|
||||
// Detect with architecture macros
|
||||
-# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
|
||||
+# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__) || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__)
|
||||
# define ANYRPC_ENDIAN ANYRPC_BIGENDIAN
|
||||
-# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
|
||||
+# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) || defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(_M_ARM)
|
||||
# define ANYRPC_ENDIAN ANYRPC_LITTLEENDIAN
|
||||
# elif defined(ANYRPC_DOXYGEN_RUNNING)
|
||||
# define ANYRPC_ENDIAN
|
29
ports/anyrpc/portfile.cmake
Normal file
29
ports/anyrpc/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO sgieseking/anyrpc
|
||||
REF bfd50aa6dd620066ed308258599127cd46be818b
|
||||
SHA512 604e92a2a2936fb95e74e05dd1ac578e67e2877357443d83f8fac319ab244a27d1fac2ebd8bcd9ac8108e7a198752776974027b8f020643bb039b5f84406049b
|
||||
HEAD_REF master
|
||||
PATCHES "arm_endian_detection.patch"
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ANYRPC_LIB_BUILD_SHARED)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_WITH_LOG4CPLUS=OFF
|
||||
-DANYRPC_LIB_BUILD_SHARED=${ANYRPC_LIB_BUILD_SHARED}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/anyrpc RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -1,5 +1,5 @@
|
||||
Source: apr-util
|
||||
Version: 1.6.0-3
|
||||
Version: 1.6.0-5
|
||||
Homepage: https://apr.apache.org/
|
||||
Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation
|
||||
Build-Depends: expat, apr, openssl
|
||||
|
@ -3,11 +3,11 @@ index 69e45541..19b86129 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h")
|
||||
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.")
|
||||
ENDIF()
|
||||
FOREACH(onelib ${APR_LIBRARIES})
|
||||
- IF(NOT EXISTS ${onelib})
|
||||
+ IF(${onelib} MATCHES "NOTFOUND")
|
||||
MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.")
|
||||
ENDIF()
|
||||
FOREACH(onelib ${APR_LIBRARIES})
|
||||
- IF(NOT EXISTS ${onelib})
|
||||
+ IF(${onelib} MATCHES "NOTFOUND")
|
||||
MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -1,37 +1,39 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-util-1.6.0)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://archive.apache.org/dist/apr/apr-util-1.6.0-win32-src.zip"
|
||||
FILENAME "apr-util-1.6.0-win32-src.zip"
|
||||
SHA512 98679ea181d3132020713481703bbefa0c174e0b2a0df65dfdd176e9771935e1f9455c4242bac19dded9414abe2b9d293fcc674ab16f96d8987bcf26346fce3a
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
use-vcpkg-expat.patch
|
||||
apr.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DAPU_DECLARE_EXPORT=ON
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
set(APU_DECLARE_EXPORT ON)
|
||||
set(APU_DECLARE_STATIC OFF)
|
||||
else()
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DAPU_DECLARE_STATIC=ON
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
set(APU_DECLARE_EXPORT OFF)
|
||||
set(APU_DECLARE_STATIC ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DAPU_DECLARE_EXPORT=${APU_DECLARE_EXPORT}
|
||||
-DAPU_DECLARE_STATIC=${APU_DECLARE_STATIC}
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
@ -41,7 +43,4 @@ else()
|
||||
endif()
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}")
|
||||
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr-util RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: apr
|
||||
Version: 1.6.5-1
|
||||
Version: 1.6.5-3
|
||||
Homepage: https://apr.apache.org/
|
||||
Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.
|
||||
|
||||
|
@ -6,13 +6,16 @@ include(vcpkg_common_functions)
|
||||
|
||||
set(VERSION 1.6.5)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-${VERSION})
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2"
|
||||
FILENAME "apr-${VERSION}.tar.bz2"
|
||||
SHA512 d3511e320457b5531f565813e626e7941f6b82864852db6aa03dd298a65dbccdcdc4bd580f5314f8be45d268388edab25efe88cf8340b7d2897a4dbe9d0a41fc
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
)
|
||||
|
||||
if("private-headers" IN_LIST FEATURES)
|
||||
set(INSTALL_PRIVATE_H ON)
|
||||
@ -22,6 +25,7 @@ endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DINSTALL_PDB=OFF
|
||||
-DMIN_WINDOWS_VER=Windows7
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: arb
|
||||
Version: 2.16.0
|
||||
Version: 2.17.0
|
||||
Homepage: https://github.com/fredrik-johansson/arb
|
||||
Description: a C library for arbitrary-precision interval arithmetic
|
||||
Build-Depends: flint
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/acb_dirichlet/stieltjes.c b/acb_dirichlet/stieltjes.c
|
||||
index ad6937b..4ca9690 100644
|
||||
--- a/acb_dirichlet/stieltjes.c
|
||||
+++ b/acb_dirichlet/stieltjes.c
|
||||
@@ -340,16 +340,16 @@ stieltjes_mag(double n)
|
||||
return t;
|
||||
}
|
||||
|
||||
-static double _hypot(double x, double y) { return sqrt(x * x + y * y); }
|
||||
+static double __hypot(double x, double y) { return sqrt(x * x + y * y); }
|
||||
|
||||
/* log2 magnitude of integrand at z = x+yi; alpha = a+bi */
|
||||
static double
|
||||
integrand_mag(double n, double x, double y, double a, double b)
|
||||
{
|
||||
double t, u;
|
||||
- t = log(_hypot(a - y, b + x));
|
||||
+ t = log(__hypot(a - y, b + x));
|
||||
u = atan2(b + x, a - y);
|
||||
- t = log(_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x;
|
||||
+ t = log(__hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x;
|
||||
return t * 1.44269504088896341;
|
||||
}
|
||||
|
@ -1,14 +1,11 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO fredrik-johansson/arb
|
||||
REF 2.16.0
|
||||
SHA512 171c965aeb03cd2830df8a53990403c6da480a94d44385dadfbb2d02697f7c03e8b9a217094b0ad93f796d889a1564f4b9ae9db35ef9de90f61bb2e3220911be
|
||||
REF eeef7bdd349366be4d1691da05e49dcf9c01a394 # 2.17.0
|
||||
SHA512 d4c53c0343bec32e0b6c0d3a41e92663b13f9648a08c28c56a3098dd77d71248718b414dbb70c116bd7e07648646bdb663c1b9560e41d971d5c12d2d0466e9a0
|
||||
HEAD_REF master
|
||||
PATCHES fix-build-error.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/CMakeLists.txt)
|
||||
@ -26,4 +23,4 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/arb RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: argagg
|
||||
Version: 2019-01-25
|
||||
Version: 0.4.6
|
||||
Description: A simple C++11 command line argument parser
|
||||
|
@ -5,8 +5,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO vietjtnguyen/argagg
|
||||
REF e678cebf90d8f132f5e54f19c6b95b75e655226c
|
||||
SHA512 10085caaf9bfb507ae7117b61bfe6174dc2af91c347393c3cbb994fe5b824d4b439e1e0d2e2580dc34568d8046529acc211f76863be047d05d3845e9ff19ccbf
|
||||
REF 0.4.6
|
||||
SHA512 7d8cf04a7c679518f01120830637c68719dd67a765457789eb4afedbead7be9efadc6bcdf640999329aaaf8659a5e5d1896f66587068cc668a7c49703aca3070
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: argh
|
||||
Version: 2018-12-18
|
||||
Version: 2018-12-18-1
|
||||
Description: Argh! A minimalist argument handler.
|
||||
|
@ -13,6 +13,7 @@ vcpkg_from_github(
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: argparse
|
||||
Version: 2019-06-10
|
||||
Version: 1.9
|
||||
Description: Argument parser for modern C++
|
||||
Homepage: https://github.com/p-ranav/argparse
|
||||
|
@ -5,8 +5,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO p-ranav/argparse
|
||||
REF 2c71311b5fa49b7d65e6628375f2748d58830856
|
||||
SHA512 08a28a3fb424befe7df9a428fbad8e2687a1b331d7099bfaca2c3e04d8d4b4888e99d481226407bf90bfce282388545b09e4125128215cc95dc56fb313641bf6
|
||||
REF v1.9
|
||||
SHA512 6cfc7fc274a11093fe5254f244adaacdcc81123b1d7e9b51110ffdfe9a344fb59044ec9d98017f25aa8ea417d57cfca330fdea7161226da26f1b4fc199fdc4fb
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: args
|
||||
Version: 2019-05-01
|
||||
Version: 2019-07-11
|
||||
Homepage: https://github.com/Taywee/args
|
||||
Description: A simple header-only C++ argument parser library.
|
||||
|
@ -4,8 +4,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Taywee/args
|
||||
REF 623e52cb128cfc572ad4e79de8d5f8861d13d017
|
||||
SHA512 b951caed125fd937549db6702de8615eac0f380026ea4de5937721143b0929f5aa47ecc8068b7d9689822d303b25d6350f00a8e6346a53d51a0ea40872488533
|
||||
REF 401663c1d57006566db6d8e5b37a21018fbd0bc3
|
||||
SHA512 2e0506f41ee8527e7fb67c0b926ff892fafe79db90920624c84eb603e374eb74c5640e4d0d0d88554db7a57424095b0da96238b4182ac515ae96dc202df95013
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user