First commit

This commit is contained in:
Andrea 2020-10-10 14:36:42 +02:00
commit f98ff9d6d6
5370 changed files with 283247 additions and 0 deletions

5
vcpkg/.gitattributes vendored Normal file
View File

@ -0,0 +1,5 @@
* -text
ports/** -linguist-detectable
# Declare files that will always have LF line endings on checkout.
scripts/ci.baseline.txt text eol=lf

322
vcpkg/.gitignore vendored Normal file
View File

@ -0,0 +1,322 @@
############################################################
# Visual Studio - Start
############################################################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
toolsrc/out*
toolsrc/CMakeSettings.json
# fuzzing
sync_dir*
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# VS Code build
toolsrc/build
# Ignore the executable
/vcpkg
/vcpkg.exe
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
############################################################
# Visual Studio - End
############################################################
############################################################
# vcpkg - Start
############################################################
.vscode/
*.code-workspace
/buildtrees/
/build*/
/downloads/
/installed*/
/packages/
/scripts/buildsystems/tmp/
/toolsrc/build.rel/
/toolsrc/windows-bootstrap/msbuild.x86.debug/
/toolsrc/windows-bootstrap/msbuild.x86.release/
/toolsrc/windows-bootstrap/msbuild.x64.debug/
/toolsrc/windows-bootstrap/msbuild.x64.release/
#ignore custom triplets
/triplets/*
#add vcpkg-designed triplets back in
!/triplets/arm-uwp.cmake
!/triplets/arm64-windows.cmake
!/triplets/x64-linux.cmake
!/triplets/x64-osx.cmake
!/triplets/x64-uwp.cmake
!/triplets/x64-windows-static.cmake
!/triplets/x64-windows.cmake
!/triplets/x86-windows.cmake
!/triplets/community
!/triplets/community/**
*.exe
*.zip
############################################################
# vcpkg - End
############################################################
archives
.DS_Store
prefab/
*.swp

0
vcpkg/.vcpkg-root Normal file
View File

12145
vcpkg/CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

33
vcpkg/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,33 @@
# Contribution Guidelines
Vcpkg is a community driven effort to build a productive and robust ecosystem of native libraries - your contributions are invaluable!
## Issues
The easiest way to contribute is by reporting issues with either `vcpkg.exe` or an existing package on [GitHub](https://github.com/Microsoft/vcpkg). When reporting an issue with `vcpkg.exe`, make sure to clearly state:
- The machine setup: "I'm using Windows 10 Anniversary Update. My machine is using the fr-fr locale. I successfully ran 'install boost'."
- The steps to reproduce: "I run 'vcpkg list'"
- The outcome you expected: "I expected to see 'boost:x86-windows'"
- The actual outcome: "I get no output at all" or "I get a crash dialog"
When reporting an issue with a package, make sure to clearly state:
- The machine setup (as above)
- What package and version you're building: "opencv 3.1.0"
- Any relevant error logs from the build process.
## Pull Requests
We are happy to accept pull requests for fixes, features, new packages, and updates to existing packages. In order to avoid wasting your time, we highly encourage opening an issue to discuss whether the PR you're thinking about making will be acceptable. This is doubly true for features and new packages.
### New package Guidelines
We're glad you're interested in submitting a new package! Here are some guidelines to help you author an excellent portfile:
- Avoid functional patches. Patches should be considered a last resort to implement compatibility when there's no other way.
- When patches can't be avoided, do not modify the default behavior. The ideal lifecycle of a patch is to get merged upstream and no longer be needed. Try to keep this goal in mind when deciding how to patch something.
- Prefer to use the `vcpkg_xyz` functions over raw `execute_command` calls. This makes long term maintenance easier when new features (such as custom compiler flags or generators) are added.
## Legal
You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it.
You can complete the CLA by going through the steps at https://cla.microsoft.com. Once we have received the signed CLA, we'll review the request. You will only need to do this once.

23
vcpkg/LICENSE.txt Normal file
View File

@ -0,0 +1,23 @@
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

46
vcpkg/NOTICE.txt Normal file
View 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

349
vcpkg/README.md Normal file
View File

@ -0,0 +1,349 @@
# Vcpkg: Overview
[中文总览](README_zh_CN.md)
[Español](README_es.md)
Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS.
This tool and ecosystem are constantly evolving, and we always appreciate contributions!
If you've never used vcpkg before, or if you're trying to figure out how to use vcpkg,
check out our [Getting Started](#getting-started) section for how to start using vcpkg.
For short description of available commands, once you've installed vcpkg,
you can run `vcpkg help`, or `vcpkg help [command]` for command-specific help.
* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), the #vcpkg channel
* Discord: [\#include \<C++\>](https://www.includecpp.org), the #🌏vcpkg channel
* Docs: [Documentation](docs/index.md)
[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master)
# Table of Contents
- [Vcpkg: Overview](#vcpkg-overview)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Quick Start: Windows](#quick-start-windows)
- [Quick Start: Unix](#quick-start-unix)
- [Installing Linux Developer Tools](#installing-linux-developer-tools)
- [Installing macOS Developer Tools](#installing-macos-developer-tools)
- [Installing GCC for macOS before 10.15](#installing-gcc-for-macos-before-1015)
- [Using vcpkg with CMake](#using-vcpkg-with-cmake)
- [Visual Studio Code with CMake Tools](#visual-studio-code-with-cmake-tools)
- [Vcpkg with Visual Studio CMake Projects](#vcpkg-with-visual-studio-cmake-projects)
- [Vcpkg with CLion](#vcpkg-with-clion)
- [Vcpkg as a Submodule](#vcpkg-as-a-submodule)
- [Tab-Completion/Auto-Completion](#tab-completionauto-completion)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
- [Telemetry](#telemetry)
# Getting Started
First, follow the quick start guide for either
[Windows](#quick-start-windows), or [macOS and Linux](#quick-start-unix),
depending on what you're using.
For more information, see [Installing and Using Packages][getting-started:using-a-package].
If a library you need is not present in the vcpkg catalog,
you can [open an issue on the GitHub repo][contributing:submit-issue]
where the vcpkg team and community can see it,
and potentially add the port to vcpkg.
After you've gotten vcpkg installed and working,
you may wish to add [tab completion](#tab-completionauto-completion) to your shell.
Finally, if you're interested in the future of vcpkg,
check out the [manifest][getting-started:manifest-spec] guide!
This is an experimental feature and will likely have bugs,
so try it out and [open all the issues][contributing:submit-issue]!
## Quick Start: Windows
Prerequisites:
- Windows 7 or newer
- [Git][getting-started:git]
- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack
First, download and bootstrap vcpkg itself; it can be installed anywhere,
but generally we recommend using vcpkg as a submodule for CMake projects,
and installing it globally for Visual Studio projects.
We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`,
since otherwise you may run into path issues for some port build systems.
```cmd
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```
To install the libraries for your project, run:
```cmd
> .\vcpkg\vcpkg install [packages to install]
```
You can also search for the libraries you need with the `search` subcommand:
```cmd
> .\vcpkg\vcpkg search [search term]
```
In order to use vcpkg with Visual Studio,
run the following command (may require administrator elevation):
```cmd
> .\vcpkg\vcpkg integrate install
```
After this, you can now create a New non-CMake Project (or open an existing one).
All installed libraries are immediately ready to be `#include`'d and used
in your project without additional configuration.
If you're using CMake with Visual Studio,
continue [here](#vcpkg-with-visual-studio-cmake-projects).
In order to use vcpkg with CMake outside of an IDE,
you can use the toolchain file:
```cmd
> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [build directory]
```
With CMake, you will still need to `find_package` and the like to use the libraries.
Check out the [CMake section](#using-vcpkg-with-cmake) for more information,
including on using CMake with an IDE.
For any other tools, including Visual Studio Code,
check out the [integration guide][getting-started:integration].
## Quick Start: Unix
Prerequisites for Linux:
- [Git][getting-started:git]
- [g++][getting-started:linux-gcc] >= 6
Prerequisites for macOS:
- [Apple Developer Tools][getting-started:macos-dev-tools]
- On macOS 10.14 or below, you will also need:
- [Homebrew][getting-started:macos-brew]
- [g++][getting-started:macos-gcc] >= 6 from Homebrew
First, download and bootstrap vcpkg itself; it can be installed anywhere,
but generally we recommend using vcpkg as a submodule for CMake projects.
```sh
$ git clone https://github.com/microsoft/vcpkg
$ ./vcpkg/bootstrap-vcpkg.sh
```
To install the libraries for your project, run:
```sh
$ ./vcpkg/vcpkg install [packages to install]
```
You can also search for the libraries you need with the `search` subcommand:
```sh
$ ./vcpkg/vcpkg search [search term]
```
In order to use vcpkg with CMake, you can use the toolchain file:
```sh
$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
$ cmake --build [build directory]
```
With CMake, you will still need to `find_package` and the like to use the libraries.
Check out the [CMake section](#using-vcpkg-with-cmake)
for more information on how best to use vcpkg with CMake,
and CMake Tools for VSCode.
For any other tools, check out the [integration guide][getting-started:integration].
## Installing Linux Developer Tools
Across the different distros of Linux, there are different packages you'll
need to install:
- Debian, Ubuntu, popOS, and other Debian-based distributions:
```sh
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
```
- CentOS
```sh
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash
```
For any other distributions, make sure you're installing g++ 6 or above.
If you want to add instructions for your specific distro,
[please open a PR][contributing:submit-pr]!
## Installing macOS Developer Tools
On macOS 10.15, the only thing you should need to do is run the following in your terminal:
```sh
$ xcode-select --install
```
Then follow along with the prompts in the windows that comes up.
On macOS 10.14 and previous, you'll also need to install g++ from homebrew;
follow the instructions in the following section.
### Installing GCC for macOS before 10.15
This will _only_ be necessary if you're using a macOS version from before 10.15.
Installing homebrew should be very easy; check out <brew.sh> for more information,
but at its simplest, run the following command:
```sh
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
Then, in order to grab an up-to-date version of gcc, run the following:
```sh
$ brew install gcc
```
You'll then be able to bootstrap vcpkg along with the [quick start guide](#quick-start-unix)
## Using vcpkg with CMake
If you're using vcpkg with CMake, the following may help!
### Visual Studio Code with CMake Tools
Adding the following to your workspace `settings.json` will make
CMake Tools automatically use vcpkg for libraries:
```json
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
}
```
### Vcpkg with Visual Studio CMake Projects
Open the CMake Settings Editor, and under `CMake toolchain file`,
add the path to the vcpkg toolchain file:
```
[vcpkg root]/scripts/buildsystems/vcpkg.cmake
```
### Vcpkg with CLion
Open the Toolchains settings
(File > Settings on Windows and Linux, CLion > Preferences on macOS),
and go to the CMake settings (Build, Execution, Deployment > CMake).
Finally, in `CMake options`, add the following line:
```
-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake
```
Unfortunately, you'll have to add this to each profile.
### Vcpkg as a Submodule
When using vcpkg as a submodule of your project,
you can add the following to your CMakeLists.txt before the first `project()` call,
instead of passing `CMAKE_TOOLCHAIN_FILE` to the cmake invocation.
```cmake
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file")
```
This will still allow people to not use vcpkg,
by passing the `CMAKE_TOOLCHAIN_FILE` directly,
but it will make the configure-build step slightly easier.
[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md
[getting-started:integration]: docs/users/integration.md
[getting-started:git]: https://git-scm.com/downloads
[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
[getting-started:linux-gcc]: #installing-linux-developer-tools
[getting-started:macos-dev-tools]: #installing-macos-developer-tools
[getting-started:macos-brew]: #installing-gcc-on-macos
[getting-started:macos-gcc]: #installing-gcc-on-macos
[getting-started:visual-studio]: https://visualstudio.microsoft.com/
[getting-started:manifest-spec]: docs/specifications/manifests.md
# Tab-Completion/Auto-Completion
`vcpkg` supports auto-completion of commands, package names,
and options in both powershell and bash.
To enable tab-completion in the shell of your choice, run:
```pwsh
> .\vcpkg integrate powershell
```
or
```sh
$ ./vcpkg integrate bash
```
depending on the shell you use, then restart your console.
# Examples
See the [documentation](docs/index.md) for specific walkthroughs,
including [installing and using a package](docs/examples/installing-and-using-packages.md),
[adding a new package from a zipfile](docs/examples/packaging-zipfiles.md),
and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md).
Our docs are now also available online at ReadTheDocs: <https://vcpkg.readthedocs.io/>!
See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw).
# Contributing
Vcpkg is an open source project, and is thus built with your contributions.
Here are some ways you can contribute:
* [Submit Issues][contributing:submit-issue] in vcpkg or existing packages
* [Submit Fixes and New Packages][contributing:submit-pr]
Please refer to our [Contributing Guide](CONTRIBUTING.md) for more details.
This project has adopted the [Microsoft Open Source Code of Conduct][contributing:coc].
For more information see the [Code of Conduct FAQ][contributing:coc-faq]
or email [opencode@microsoft.com](mailto:opencode@microsoft.com)
with any additional questions or comments.
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/
# License
The code in this repository is licensed under the [MIT License](LICENSE.txt).
# Telemetry
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.
Read more about vcpkg telemetry at docs/about/privacy.md

399
vcpkg/README_es.md Normal file
View File

@ -0,0 +1,399 @@
# Vcpkg
Vcpkg ayuda a manejar librerías de C y C++ en Windows, Linux y MacOS.
Esta herramienta y ecosistema se encuentran en constante evolución ¡Siempre apreciamos contribuciones nuevas!
Si nunca ha usado Vcpkg antes,
o si está intentando aprender a usar vcpkg, consulte nuestra sección
[Primeros pasos](#primeros-pasos) para iniciar a usar Vcpkg.
Para una descripción corta de los comandos disponibles,
una vez instalado Vcpkg puede ejecutar `vcpkg help`, o
`vcpkg help [comando]` para obtener ayuda específica de un comando.
* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), en el canal #vcpkg
* Discord: [\#include \<C++\>](https://www.includecpp.org), en el canal #🌏vcpkg
* Docs: [Documentación](docs/index.md)
[![Estado de compilación](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master)
## Tabla de contenido
* [Vcpkg: General](#vcpkg-general)
* [Tabla de contenidos](#tabla-de-contenidos)
* ["Primeros pasos"](#primeros-pasos)
+ [Inicio rápido: Windows](#inicio-rápido-windows)
+ [Inicio rápido: Unix](#inicio-rápido-unix)
+ [Instalando herramientas de desarrollo en Linux](#instalando-herramientas-de-desarrollo-en-Linux)
+ [Instalando herramientas de desarrollo en macOS](#instalando-herramientas-de-desarrollo-en-macos)
- [Instalando GCC en MacOS previo a 10.15](#instalando-gcc-en-macos-previo-a-10.15)
+ [Usando Vcpkg con CMake](#usando-vcpkg-con-cmake)
- [Visual Studio Code con CMake Tools](#visual-studio-code-con-cmake-tools)
- [Vcpkg con proyectos de Visual Studio (CMake)](#vcpkg-con-proyectos-de-visual-studio\(CMake\))
- [Vcpkg con CLion](#vcpkg-con-clion)
- [Vcpkg como submódulo](#vcpkg-como-submódulo)
+ [Inicio rápido: archivos de Manifiesto](#inicio-rápido-manifiestos)
* [Tab-Completado/Autocompletado](#Completado-TabAutocompletado)
* [Ejemplos](#ejemplos)
* [Contribuyendo](#contribuyendo)
* [Licencia](#licencia)
* [telemetría](#telemetría)
## Primeros pasos
Antes de iniciar, siga la guía ya sea para [Windows](#inicio-rápido-windows),
o [macOS y Linux](#inicio-rápido-unix) dependiendo del SO que use.
Para más información, ver [Instalando y Usando Paquetes][getting-started:using-a-package].
Si una librería que necesita no está presente en el catálogo de vcpkg,
puede [abrir una incidencia en el repositorio de GitHub][contributing:submit-issue]
donde el equipo de vcpkg y la comunidad pueden verlo, y potencialmente hacer un port a vcpkg.
Después de tener Vcpkg instalado y funcionando,
puede que desee añadir [completado con tab](#Completado-TabAuto-Completado) en su terminal.
Finalmente, si está interesado en el futuro de Vcpkg,
puede ver la guía de [archivos de manifiesto][getting-started:manifest-spec]!
esta es una característica experimental y es probable que tenga errores,
así que se recomienda revisar y [crear incidencias][contributing:submit-issue]!
### Inicio Rápido: Windows
Prerrequisitos:
- Windows 7 o superior
- [Git][getting-started:git]
- [Visual Studio][getting-started:visual-studio] 2015 Update 3 o superior con el paquete Inglés de Visual Studio.
Primero, descargue y compile vcpkg; puede ser instalado en cualquier lugar,
pero generalmente recomendamos usar vcpkg como submódulo para proyectos de CMake,
e instalándolo globalmente para Proyectos de Visual Studio.
recomendamos un lugar como `C:\src\vcpkg` o `C:\dev\vcpkg`,
ya que de otra forma puede encontrarse problemas de ruta para algunos sistemas de port.
```cmd
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```
Para instalar las librerías para su proyecto, ejecute:
```cmd
> .\vcpkg\vcpkg install [paquetes a instalar]
```
también puede buscar librerías que necesite usar el comando `search`:
```cmd
> .\vcpkg\vcpkg search [término de búsqueda]
```
Para poder utilizar vcpkg con Visual Studio,
ejecute el siguiente comando (puede requerir privilegios de administrador):
```cmd
> .\vcpkg\vcpkg integrate install
```
Después de esto, puede crear un nuevo proyecto que no sea de CMake(MSBuild) o abrir uno existente.
Todas las librerías estarán listas para ser incluidas y
usadas en su proyecto sin configuración adicional.
Si está usando CMake con Visual Studio,
continúe [aquí](#vcpkg-con-proyectos-de-visual-studio\(CMake\)).
Para utilizar Vcpkg con CMake sin un IDE,
puede utilizar el archivo de herramientas incluido:
```cmd
> cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [directorio de compilación]
```
Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería.
Revise la [Sección de Cmake](#usando-vcpkg-con-cmake) para más información,
incluyendo el uso de CMake con un IDE.
Para cualquier otra herramienta, incluyendo Visual Studio Code,
reviste la [guía de integración][getting-started:integration].
### Inicio rápido: Unix
Prerrequisitos para Linux:
- [Git][getting-started:git]
- [G++/GCC][getting-started:linux-gcc] >= 6
Prerrequisitos para macOS:
- [Herramientas de desarrollo de Apple][getting-started:macos-dev-tools]
- En macOS 10.14 o inferior, también necesita:
- [Homebrew][getting-started:macos-brew]
- [g++][getting-started:macos-gcc] >= 6 de Homebrew
Primero, descargue y compile vcpkg, puede ser instalado donde sea,
pero recomendamos usar vcpkg como submodulo para proyectos de CMake.
```sh
$ git clone https://github.com/microsoft/vcpkg
$ ./vcpkg/bootstrap-vcpkg.sh
```
Para instalar las librerías para su proyecto, ejecute:
```sh
$ ./vcpkg/vcpkg install [paquetes a instalar]
```
También puede buscar las librerías que necesita con el subcomando `search`:
```sh
$ ./vcpkg/vcpkg search [término de búsqueda]
```
Para usar vcpkg con CMake, tiene que usar el siguiente archivo toolchain:
```sh
$ cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
$ cmake --build [directorio de compilación]
```
Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería.
Revise la [Sección de CMake](#usando-vcpkg-con-cmake)
para más información en cómo aprovechar mejor Vcpkg con CMake,
y CMake tools para VSCode.
Para cualquier otra herramienta, visite la [guía de integración][getting-started:integration].
### Instalando Herramientas de desarrollo en Linux
Según las distribuciones de Linux, hay diferentes paquetes
que necesitará instalar:
- Debian, Ubuntu, popOS, y otra distribución basada en Debian:
```sh
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
```
- CentOS
```sh
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash
```
Para cualquier otra distribución, asegúrese que dispone de g++ 6 o superior.
Si desea añadir instrucción para una distribución específica,
[cree un pull request][contributing:submit-pr]
### Instalando Herramientas de desarrollo en macOS
En macOS 10.15, solo tiene que ejecutar el siguiente comando en la terminal:
```sh
$ xcode-select --install
```
Luego seguir los pasos que aparecerán en las ventanas que se muestran.
En macOS 10.14 y previos, también requiere instalar g++ de homebrew;
siguiendo los pasos en la sección siguiente.
#### Instalando GCC en macOS previo a 10.15
Este paso _solo_ es requerido si está usando una versión de macOS previa a 10.15.
Instalar homebrew debería ser sencillo; visite <brew.sh> para mas información,
pero de manera simple, ejecute el siguiente comando:
```sh
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
luego, para obtener una versión actualizada de gcc, ejecute el comando:
```sh
$ brew install gcc
```
Posteriormente podrá compilar vcpkg junto con la [guía de inicio rápido](#inicio-rápido-unix)
### Usando Vcpkg con CMake
¡Si está usando Vcpkg con CMake, lo siguiente puede ayudar!
#### Visual Studio Code con CMake Tools
Agregando lo siguiente al espacio de trabajo `settings.json` permitirá que
CMake Tools use automáticamente Vcpkg para las librerías:
```json
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake"
}
}
```
#### Vcpkg con proyectos de Visual Studio(CMake)
Abra el editor de Ajustes de CMake, bajo la sección `CMake toolchain file`,
posteriormente agregue al path el archivo de cadena de herramientas de Vcpkg:
```sh
[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake
```
#### Vcpkg con CLion
Abra los ajustes de Cadena de Herramientas (Toolchains)
(File > Settings en Windows y Linux, Clion > Preferences en macOS),
y entre en la sección de ajustes de CMake (Build, Execution, Deployment > CMake).
Finalmente, en `CMake options`, agregue la línea siguiente:
```sh
-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake
```
Desafortunadamente, tendrá que hacerlo para cada perfil.
#### Vcpkg como Submódulo
Cuando este usando Vcpkg como un submódulo para su proyecto,
puede agregar lo siguiente as su CMakeLists,txt antes de la primera llamada a `project()`,
en vez de pasar `CMAKE_TOOLCHAIN_FILE` a la invocación de CMake.
```cmake
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file")
```
Esto permitirá a las personas no usar Vcpkg,
indicando el `CMAKE_TOOLCHAIN_FILE` directamente,
sin embargo, hará el proceso de configuración y compilación más sencillo.
### Inicio rápido: Manifiestos
Así que desea ver cómo será el futuro de Vcpkg!
realmente lo apreciamos. Sin embargo, primero una advertencia:
el soporte de archivos de manifiesto aún está en beta,
aun así la mayoría debería funcionar,
pero no hay garantía de esto y es muy probable que encuentre uno o más bugs
mientras use Vcpkg en este modo.
Adicionalmente, es probablemente que se rompan comportamientos antes de que se pueda considerar estable,
así que está advertido.
Por favor [Abra un Problema][contributing:submit-issue] si encuentra algún error
Primero, instale vcpkg normalmente para [Windows](#inicio-rápido-windows) o
[Unix](#inicio-rápido-unix).
Puede que desee instalar Vcpkg en un lugar centralizado,
ya que el directorio existe localmente,
y está bien ejecutar múltiples comandos desde el mismo directorio de vcpkg al mismo tiempo.
Luego, se requiere activar la bandera de característica `manifests` en vcpkg agregando
`manifests` a los valores separados por coma en la opción `--feature-flags`,
o agregándole en los valores separados por coma en la variable de entorno `VCPKG_FEATURE_FLAGS`
también puede que desee agregar Vcpkg al `PATH`.
Luego, todo lo que hay que hacer es crear un manifiesto;
cree un archivo llamado `vcpkg.json`, y escriba lo siguiente:
```json
{
"name": "<nombre de su proyecto>",
"version-string": "<versión de su proyecto>",
"dependencies": [
"abseil",
"boost"
]
}
```
Las librerías serán instaladas en el directorio `vcpkg_installed`,
en el mismo directorio que su `vcpkg.json`.
Si puede usar el regular conjunto de herramientas de CMake,
o mediante la integración de Visual Studio/MSBuild,
este instalará las dependencias automáticamente,
pero necesitará ajustar `VcpkgManifestEnabled` en `On` para MSBuild.
Si desea instalar sus dependencias sin usar CMake o MSBuild,
puede usar un simple `vcpkg install --feature-flags=manifests`
Para más información, revise la especificación de [manifiesto][getting-started:manifest-spec]
[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md
[getting-started:integration]: docs/users/integration.md
[getting-started:git]: https://git-scm.com/downloads
[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
[getting-started:linux-gcc]: #installing-linux-developer-tools
[getting-started:macos-dev-tools]: #installing-macos-developer-tools
[getting-started:macos-brew]: #installing-gcc-on-macos
[getting-started:macos-gcc]: #installing-gcc-on-macos
[getting-started:visual-studio]: https://visualstudio.microsoft.com/
[getting-started:manifest-spec]: docs/specifications/manifests.md
## Completado-Tab/Autocompletado
`vcpkg` soporta autocompletado para los comandos, nombres de paquetes,
y opciones, tanto en PowerShell como en bash.
para activar el autocompletado en la terminal de elección ejecute:
```pwsh
> .\vcpkg integrate powershell
```
o
```sh
$ ./vcpkg integrate bash
```
según la terminal que use, luego reinicie la consola.
## Ejemplos
ver la [documentación](docs/index.md) para tutoriales específicos, incluyendo
[instalando y usando un paquete](docs/examples/installing-and-using-packages.md),
[agregando un nuevo paquete desde un archivo comprimido](docs/examples/packaging-zipfiles.md),
[agregando un nuevo paquete desde un repositorio en GitHub](docs/examples/packaging-github-repos.md).
Nuestra documentación se encuentra online en ReadTheDocs: <https://vcpkg.readthedocs.io/>!
Ver un [video de demostración](https://www.youtube.com/watch?v=y41WFKbQFTw) de 4 minutos.
## Contribuyendo
Vcpkg es un proyecto de código abierto, y está construido con sus contribuciones.
Aquí hay unas de las maneras en las que puede contribuir:
* [Creando Incidencias][contributing:submit-issue] en vcpkg o paquetes existentes
* [Creando Correcciones y Nuevos Paquetes][contributing:submit-pr]
Por favor visite nuestra [Guía de Contribución](CONTRIBUTING.md) para más detalles.
Este proyecto ha adoptado el [Código de Conducta de Microsoft de Código Abierto][contributing:coc].
Para más información ver [Preguntas frecuentes del Código de Conducta][contributing:coc-faq]
o envíe un correo a [opencode@microsoft.com](mailto:opencode@microsoft.com)
con cualquier pregunta adicional o comentarios.
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/
## Licencia
El código en este repositorio se encuentra licenciado mediante la [Licencia MIT](LICENSE.txt).
## Telemetría
vcpkg recolecta datos de uso para mejorar su experiencia.
La información obtenida por Microsoft es anónima.
puede ser dado de baja de la telemetría ejecutando de nuevo el script `bootstrap-vcpkg` con `-disableMetrics`,
pasando `--disable-metrics` a vcpkg en la línea de comandos,
o creando la variable de entorno `VCPKG_DISABLE_METRICS`.
Se puede leer más sobre la telemetría de vcpkg en docs/about/privacy.md

325
vcpkg/README_zh_CN.md Normal file
View File

@ -0,0 +1,325 @@
# Vcpkg: 总览
[English Overview](README.md)
Vcpkg 可帮助您在 Windows、 Linux 和 MacOS 上管理 C 和 C++ 库。
这个工具和生态链正在不断发展,我们一直期待您的贡献!
若您从未使用过vcpkg或希望了解如何使用vcpkg请查阅[快速开始](#入门)章节。
如需获取有关可用命令的简短描述请在编译vcpkg后执行 `vcpkg help` 或执行 `vcpkg help [command]` 来获取具体的帮助信息。
* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg)
* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/) #vcpkg 频道
* Discord: [\#include \<C++\>](https://www.includecpp.org) #🌏vcpkg 频道
* 文档: [Documentation](docs/index.md)
[![当前生成状态](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master)
# 目录
- [Vcpkg: 总览](#vcpkg-总览)
- [目录](#目录)
- [入门](#入门)
- [快速开始: Windows](#快速开始-windows)
- [快速开始: Unix](#快速开始-unix)
- [安装 Linux Developer Tools](#安装-linux-developer-tools)
- [安装 macOS Developer Tools](#安装-macos-developer-tools)
- [在 macOS 10.15 之前版本中安装 GCC](#在-macos-1015-之前版本中安装-gcc)
- [在 CMake 中使用 vcpkg](#在-cmake-中使用-vcpkg)
- [Visual Studio Code 中的 CMake Tools](#visual-studio-code-中的-cmake-tools)
- [Visual Studio CMake 工程中使用 vcpkg](#visual-studio-cmake-工程中使用-vcpkg)
- [CLion 中使用 vcpkg](#clion-中使用-vcpkg)
- [将 vcpkg 作为一个子模块](#将-vcpkg-作为一个子模块)
- [Tab补全/自动补全](#tab补全自动补全)
- [示例](#示例)
- [贡献者](#贡献者)
- [License](#license)
- [数据收集](#数据收集)
# 入门
首先,请阅读以下任一方面的快速入门指南:
[Windows](#快速开始-windows) 或 [macOS和Linux](#快速开始-unix)
这取决于您使用的是什么平台。
有关更多信息,请参见 [安装和使用软件包][getting-started:using-a-package]。
如果vcpkg目录中没有您需要的库
您可以 [在GitHub上打开问题][contributing:submit-issue]。
vcpkg团队和贡献者可以看到它的地方
并可能将这个库添加到vcpkg。
安装并运行vcpkg后
您可能希望将 [TAB补全](#tab补全自动补全) 添加到您的Shell中。
最后如果您对vcpkg的未来感兴趣请查看 [清单][getting-started:manifest-spec]
这是一项实验性功能,可能会出现错误。
因此,请尝试一下并[打开所有问题][contributing:submit-issue]!
## 快速开始: Windows
需求:
- Windows 7 或更新的版本
- [Git][getting-started:git]
- [Visual Studio 2015 Update 3][getting-started:visual-studio] 或更新的版本(包含英文语言包)
首先请下载vcpkg并执行 bootstrap.bat 脚本。
它可以安装在任何地方,但是通常我们建议您使用 vcpkg 作为 CMake 项目的子模块,并将其全局安装到 Visual Studio 项目中。
我们建议您使用例如 `C:\src\vcpkg``C:\dev\vcpkg` 的安装目录,否则您可能遇到某些库构建系统的路径问题。
```cmd
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```
使用以下命令安装您的项目所需要的库:
```cmd
> .\vcpkg\vcpkg install [packages to install]
```
您也可以使用 `search` 子命令来查找vcpkg中集成的库:
```cmd
> .\vcpkg\vcpkg search [search term]
```
若您希望在 Visual Studio 中使用vcpkg请运行以下命令 (首次启动需要管理员权限)
```cmd
> .\vcpkg\vcpkg integrate install
```
在此之后您可以创建一个非cmake项目 (或打开已有的项目)。
在您的项目中,所有已安装的库均可立即使用 `#include` 包含您需使用的库的头文件并无需添加额外配置。
若您在 Visual Studio 中使用cmake工程请查阅[这里](#visual-studio-cmake-工程中使用-vcpkg)。
为了在IDE以外在cmake中使用vcpkg您需要使用以下工具链文件:
```cmd
> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [build directory]
```
在cmake中您仍需通过 `find_package` 来使用第三方库。
请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获取更多信息其中包含了在IDE中使用cmake的内容。
对于其他工具 (包括Visual Studio Code),请查阅 [集成指南][getting-started:integration]。
## 快速开始: Unix
Linux平台的使用需求:
- [Git][getting-started:git]
- [g++][getting-started:linux-gcc] >= 6
macOS平台的使用需求:
- [Apple Developer Tools][getting-started:macos-dev-tools]
- macOS 10.14 或更低版本中,您也需要:
- [Homebrew][getting-started:macos-brew]
- Homebrew 中 [g++][getting-started:macos-gcc] >= 6
首先请下载vcpkg并执行 bootstrap.sh 脚本。
我们建议您将vcpkg作为cmake项目的子模块使用。
```sh
$ git clone https://github.com/microsoft/vcpkg
$ ./vcpkg/bootstrap-vcpkg.sh
```
使用以下命令安装任意包:
```sh
$ ./vcpkg/vcpkg install [packages to install]
```
您也可以使用 `search` 子命令来查找vcpkg中已集成的库:
```sh
$ ./vcpkg/vcpkg search [search term]
```
为了在cmake中使用vcpkg您需要使用以下工具链文件:
```sh
$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
$ cmake --build [build directory]
```
在cmake中您仍需通过 `find_package` 来使用第三方库。
为了您更好的在cmake或 VSCode CMake Tools 中使用vcpkg
请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获取更多信息,
其中包含了在IDE中使用cmake的内容。
对于其他工具,请查阅 [集成指南][getting-started:integration]。
## 安装 Linux Developer Tools
在Linux的不同发行版中您需要安装不同的工具包:
- DebianUbuntupopOS或其他基于 Debian 的发行版:
```sh
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
```
- CentOS
```sh
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash
```
对于其他的发行版,请确保已安装 g++ 6 或更新的版本。
若您希望添加特定发行版的说明,[请提交一个 PR][contributing:submit-pr]!
## 安装 macOS Developer Tools
在 macOS 10.15 中,唯一需要做的是在终端中运行以下命令:
```sh
$ xcode-select --install
```
然后按照出现的窗口中的提示进行操作。
在 macOS 10.14 及先前版本中,您也需要使用 homebrew 安装 g++。
请遵循以下部分中的说明:
### 在 macOS 10.15 之前版本中安装 GCC
此条只在您的macOS版本低于 10.15 时是必须的。
安装homebrew应当很轻松请查阅 <brew.sh> 以获取更多信息。
为了更简便,请使用以下命令:
```sh
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
然后为了获取最新版本的gcc请运行以下命令
```sh
$ brew install gcc
```
此时,您就可以使用 bootstrap.sh 编译vcpkg了。 请参阅 [快速开始](#快速开始-unix)
## 在 CMake 中使用 vcpkg
若您希望在CMake中使用vcpkg以下内容可能帮助您
### Visual Studio Code 中的 CMake Tools
将以下内容添加到您的工作区的 `settings.json` 中将使CMake Tools自动使用vcpkg中的第三方库:
```json
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
}
```
### Visual Studio CMake 工程中使用 vcpkg
打开CMake设置选项将 vcpkg toolchain 文件路径在 `CMake toolchain file` 中:
```
[vcpkg root]/scripts/buildsystems/vcpkg.cmake
```
### CLion 中使用 vcpkg
打开 Toolchains 设置
(File > Settings on Windows and Linux, CLion > Preferences on macOS)
并打开 CMake 设置 (Build, Execution, Deployment > CMake)。
最后在 `CMake options` 中添加以下行:
```
-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake
```
遗憾的是,您必须手动将此选项加入每个项目配置文件中。
### 将 vcpkg 作为一个子模块
当您希望将vcpkg作为一个子模块加入到您的工程中时
您可以在第一个 `project()` 调用之前将以下内容添加到 CMakeLists.txt 中,
而无需将 `CMAKE_TOOLCHAIN_FILE` 传递给cmake调用。
```cmake
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file")
```
使用此种方式可无需设置 `CMAKE_TOOLCHAIN_FILE` 即可使用vcpkg且更容易完成配置工作。
[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md
[getting-started:integration]: docs/users/integration.md
[getting-started:git]: https://git-scm.com/downloads
[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
[getting-started:linux-gcc]: #installing-linux-developer-tools
[getting-started:macos-dev-tools]: #installing-macos-developer-tools
[getting-started:macos-brew]: #installing-gcc-on-macos
[getting-started:macos-gcc]: #installing-gcc-on-macos
[getting-started:visual-studio]: https://visualstudio.microsoft.com/
[getting-started:manifest-spec]: docs/specifications/manifests.md
# Tab补全/自动补全
`vcpkg` 支持命令,包名称,以及 Powershell 和 Bash 中的选项。
若您需要在指定的 shell 中启用Tab补全功能请依据您使用的shell运行
```pwsh
> .\vcpkg integrate powershell
```
```sh
$ ./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][contributing:submit-issue]
* [提交修复PR和创建新包][contributing:submit-pr]
请参阅我们的 [贡献准则](CONTRIBUTING.md) 了解更多详细信息。
该项目采用了 [Microsoft开源行为准则][contributing:coc]。
获取更多信息请查看 [行为准则FAQ][contributing:coc-faq] 或联系 [opencode@microsoft.com](mailto:opencode@microsoft.com)提出其他问题或意见。
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/
# License
在此存储库中使用的代码均遵循 [MIT License](LICENSE.txt)。
# 数据收集
vcpkg会收集使用情况数据以帮助我们改善您的体验。
Microsoft收集的数据是匿名的。
您也可以通过使用 `-disableMetrics` 、在命令行上将`--disable-metrics`传递给vcpkg或通过设置环境变量 `VCPKG_DISABLE_METRICS` 并重新运行 bootstrap-vcpkg 脚本来选择禁用数据收集。
请在 [privacy.md](docs/about/privacy.md) 中了解有关 vcpkg 数据收集的更多信息。

View File

@ -0,0 +1,2 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass "& {& '%~dp0scripts\bootstrap.ps1' %*}"

4
vcpkg/bootstrap-vcpkg.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh -e
vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P)
. "$vcpkgRootDir/scripts/bootstrap.sh"

View File

@ -0,0 +1,107 @@
diff --git a/3FD/broker_impl_reader.cpp b/3FD/broker_impl_reader.cpp
index 98bd68a..d5948b5 100644
--- a/3FD/broker_impl_reader.cpp
+++ b/3FD/broker_impl_reader.cpp
@@ -185,7 +185,7 @@ namespace broker
core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION);
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
CALL_STACK_TRACE;
std::ostringstream oss;
@@ -264,7 +264,7 @@ namespace broker
m_messages.reserve(msgCountStepLimit);
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
CALL_STACK_TRACE;
std::ostringstream oss;
@@ -317,7 +317,7 @@ namespace broker
{
core::Logger::Write(ex, core::Logger::PRIO_CRITICAL);
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to end transaction reading messages from broker queue. "
@@ -520,7 +520,7 @@ namespace broker
m_dbSession.rollback();
return true;
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to rollback transaction reading messages from broker queue. "
@@ -563,7 +563,7 @@ namespace broker
m_dbSession.commit();
return true;
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to commit transaction reading messages from broker queue. "
diff --git a/3FD/broker_impl_writer.cpp b/3FD/broker_impl_writer.cpp
index b237ba4..f9531c4 100644
--- a/3FD/broker_impl_writer.cpp
+++ b/3FD/broker_impl_writer.cpp
@@ -241,7 +241,7 @@ namespace broker
core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION);
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
CALL_STACK_TRACE;
std::ostringstream oss;
@@ -348,7 +348,7 @@ namespace broker
{
core::Logger::Write(ex, core::Logger::PRIO_CRITICAL);
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to end transaction writing messages into broker queue. "
@@ -405,7 +405,7 @@ namespace broker
{
m_future->get();
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to write messages into broker queue. "
@@ -455,7 +455,7 @@ namespace broker
m_dbSession.rollback();
return true;
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to rollback transaction writing messages into broker queue. "
@@ -498,7 +498,7 @@ namespace broker
m_dbSession.commit();
return true;
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to commit transaction writing messages into broker queue. "
@@ -589,7 +589,7 @@ namespace broker
{
throw; // just forward exceptions from errors known to have been already handled
}
- catch (Poco::Data::DataException &ex)
+ catch (Poco::DataException &ex)
{
std::ostringstream oss;
oss << "Failed to write messages into broker queue. "

View File

@ -0,0 +1,13 @@
diff --git a/3FD/configuration.cpp b/3FD/configuration.cpp
index b9ca804..207a397 100644
--- a/3FD/configuration.cpp
+++ b/3FD/configuration.cpp
@@ -2,7 +2,7 @@
#include "configuration.h"
#include "exceptions.h"
#include "utils_io.h"
-#include <rapidxml.hpp>
+#include <rapidxml/rapidxml.hpp>
#ifdef _3FD_PLATFORM_WINRT
# include "utils_winrt.h"

View File

@ -0,0 +1,105 @@
include(vcpkg_common_functions)
# Check architecture:
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(BUILD_ARCH "Win32")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(BUILD_ARCH "x64")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(BUILD_ARCH "ARM")
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
# Check library linkage:
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
# Get source code:
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO faburaya/3FD
REF v2.6.2
SHA512 a2444cc07d8741540c6071ac59bc8c63785db52e412a843aa18a5dfa0144b5001d428e44bcb520238e3d476440bc74526343f025005f05d534e732645f59cbe0
HEAD_REF master
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch"
"${CMAKE_CURRENT_LIST_DIR}/DataException.patch"
"${CMAKE_CURRENT_LIST_DIR}/RapidXML.patch"
)
# Copy the sources to ensure a clean, out-of-source build
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
get_filename_component(LAST_DIR_NAME "${SOURCE_PATH}" NAME)
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all/${LAST_DIR_NAME}")
# Build:
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP:
vcpkg_build_msbuild(
USE_VCPKG_INTEGRATION
PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.WinRT.UWP.vcxproj
PLATFORM ${BUILD_ARCH}
)
elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32:
vcpkg_build_msbuild(
USE_VCPKG_INTEGRATION
PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.vcxproj
PLATFORM ${BUILD_ARCH}
TARGET Build
)
else()
message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!")
endif()
# Install:
file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h")
file(INSTALL
${HEADER_FILES}
DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD
PATTERN "*_impl*.h" EXCLUDE
PATTERN "*example*.h" EXCLUDE
PATTERN "stdafx.h" EXCLUDE
PATTERN "targetver.h" EXCLUDE
)
file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD)
file(INSTALL
${SOURCE_PATH}/3FD/3fd-config-template.xml
DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD
)
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Visual C++, UWP app:
file(INSTALL
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/3FD.WinRT.UWP.lib
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/WinRT.UWP/3FD.WinRT.UWP.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/3FD.WinRT.UWP.lib
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/WinRT.UWP/3FD.WinRT.UWP.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
else() # Visual C++, Win32 app:
file(INSTALL
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.lib
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.lib
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright)
file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd)
vcpkg_copy_pdbs()

View File

@ -0,0 +1,13 @@
diff --git a/3fd/web_wws_impl_host.cpp b/3fd/web_wws_impl_host.cpp
index b87dc75..1cff45f 100644
--- a/3fd/web_wws_impl_host.cpp
+++ b/3fd/web_wws_impl_host.cpp
@@ -48,7 +48,7 @@ namespace wws
throw AppException<std::runtime_error>(oss.str());
}
- const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg().seekpos(); // move cursor to the end to get the zize
+ const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg(); // move cursor to the end to get the zize
// File is not trunked:
if (fileSizeBytes > 0)

View File

@ -0,0 +1,22 @@
{
"name": "3fd",
"version-string": "2.6.2",
"port-version": 3,
"description": "C++ Framework For Fast Development",
"dependencies": [
{
"name": "boost-lockfree",
"platform": "windows"
},
{
"name": "boost-regex",
"platform": "windows"
},
{
"name": "poco",
"platform": "windows"
},
"rapidxml",
"sqlite3"
]
}

View File

@ -0,0 +1,384 @@
# 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/LzmaLib.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
C/Util/LzmaLib/LzmaLib.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
C/Alloc.h
C/LzFind.h
C/LzFindMt.h
C/LzHash.h
C/LzmaDec.h
C/LzmaEnc.h
C/LzmaLib.h
C/Threads.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
)

6
vcpkg/ports/7zip/CONTROL Normal file
View File

@ -0,0 +1,6 @@
Source: 7zip
Version: 19.00
Port-Version: 2
Homepage: https://www.7-zip.org
Description: Library for archiving file with a high compression ratio.
Supports: !(linux|osx|arm|uwp)

View 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

View File

@ -0,0 +1,32 @@
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "linux" "osx")
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/${PORT}
RENAME copyright
)

View 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

View File

@ -0,0 +1,65 @@
diff --git a/absl/container/internal/compressed_tuple.h b/absl/container/internal/compressed_tuple.h
index 4bfe92f..02bfd03 100644
--- a/absl/container/internal/compressed_tuple.h
+++ b/absl/container/internal/compressed_tuple.h
@@ -169,9 +169,33 @@ constexpr bool ShouldAnyUseBase() {
}
template <typename T, typename V>
-using TupleMoveConstructible = typename std::conditional<
- std::is_reference<T>::value, std::is_convertible<V, T>,
- std::is_constructible<T, V&&>>::type;
+using TupleElementMoveConstructible =
+ typename std::conditional<std::is_reference<T>::value,
+ std::is_convertible<V, T>,
+ std::is_constructible<T, V&&>>::type;
+
+template <bool SizeMatches, class T, class... Vs>
+struct TupleMoveConstructible : std::false_type {};
+
+template <class... Ts, class... Vs>
+struct TupleMoveConstructible<true, CompressedTuple<Ts...>, Vs...>
+ : std::integral_constant<
+ bool, absl::conjunction<
+ TupleElementMoveConstructible<Ts, Vs&&>...>::value> {};
+
+template <typename T>
+struct compressed_tuple_size;
+
+template <typename... Es>
+struct compressed_tuple_size<CompressedTuple<Es...>>
+ : public std::integral_constant<std::size_t, sizeof...(Es)> {};
+
+template <class T, class... Vs>
+struct TupleItemsMoveConstructible
+ : std::integral_constant<
+ bool, TupleMoveConstructible<compressed_tuple_size<T>::value ==
+ sizeof...(Vs),
+ T, Vs...>::value> {};
} // namespace internal_compressed_tuple
@@ -217,17 +241,18 @@ class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple
explicit constexpr CompressedTuple(const Ts&... base)
: CompressedTuple::CompressedTupleImpl(absl::in_place, base...) {}
- template <typename... Vs,
+ template <typename First, typename... Vs,
absl::enable_if_t<
absl::conjunction<
// Ensure we are not hiding default copy/move constructors.
absl::negation<std::is_same<void(CompressedTuple),
- void(absl::decay_t<Vs>...)>>,
- internal_compressed_tuple::TupleMoveConstructible<
- Ts, Vs&&>...>::value,
+ void(absl::decay_t<First>)>>,
+ internal_compressed_tuple::TupleItemsMoveConstructible<
+ CompressedTuple<Ts...>, First, Vs...>>::value,
bool> = true>
- explicit constexpr CompressedTuple(Vs&&... base)
+ explicit constexpr CompressedTuple(First&& first, Vs&&... base)
: CompressedTuple::CompressedTupleImpl(absl::in_place,
+ absl::forward<First>(first),
absl::forward<Vs>(base)...) {}
template <int I>

View File

@ -0,0 +1,23 @@
diff --git a/absl/time/internal/cctz/src/zone_info_source.cc b/absl/time/internal/cctz/src/zone_info_source.cc
index 98ea161..3f75d56 100644
--- a/absl/time/internal/cctz/src/zone_info_source.cc
+++ b/absl/time/internal/cctz/src/zone_info_source.cc
@@ -65,7 +65,7 @@ ZoneInfoSourceFactory zone_info_source_factory __attribute__((weak)) =
extern ZoneInfoSourceFactory zone_info_source_factory;
extern ZoneInfoSourceFactory default_factory;
ZoneInfoSourceFactory default_factory = DefaultFactory;
-#if defined(_M_IX86)
+#if defined(_M_IX86) || ((defined(_M_ARM) || defined(_M_ARM64)) && defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP))
#pragma comment( \
linker, \
"/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \
@@ -83,7 +83,8 @@ ZoneInfoSourceFactory default_factory = DefaultFactory;
"@@U?$default_delete@VZoneInfoSource@cctz@time_internal@" ABSL_INTERNAL_MANGLED_NS \
"@@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z@" ABSL_INTERNAL_MANGLED_BACKREFERENCE \
"@@ZA")
-#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM64)
+#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM) || \
+ defined(_M_ARM64)
#pragma comment( \
linker, \
"/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \

View File

@ -0,0 +1,13 @@
diff --git a/CMake/abslConfig.cmake.in b/CMake/abslConfig.cmake.in
index 60847fa77..6d23f63d3 100644
--- a/CMake/abslConfig.cmake.in
+++ b/CMake/abslConfig.cmake.in
@@ -1,6 +1,7 @@
# absl CMake configuration file.
-include(FindThreads)
+include(CMakeFindDependencyMacro)
+find_dependency(Threads)
@PACKAGE_INIT@

View File

@ -0,0 +1,40 @@
diff --git a/absl/base/options.h b/absl/base/options.h
index 234137c..1fb77e4 100644
--- a/absl/base/options.h
+++ b/absl/base/options.h
@@ -100,7 +100,7 @@
// User code should not inspect this macro. To check in the preprocessor if
// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY.
-#define ABSL_OPTION_USE_STD_ANY 2
+#define ABSL_OPTION_USE_STD_ANY 0
// ABSL_OPTION_USE_STD_OPTIONAL
@@ -127,7 +127,7 @@
// absl::optional is a typedef of std::optional, use the feature macro
// ABSL_USES_STD_OPTIONAL.
-#define ABSL_OPTION_USE_STD_OPTIONAL 2
+#define ABSL_OPTION_USE_STD_OPTIONAL 0
// ABSL_OPTION_USE_STD_STRING_VIEW
@@ -154,7 +154,7 @@
// absl::string_view is a typedef of std::string_view, use the feature macro
// ABSL_USES_STD_STRING_VIEW.
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0
// ABSL_OPTION_USE_STD_VARIANT
//
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE

View File

@ -0,0 +1,40 @@
diff --git a/absl/base/options.h b/absl/base/options.h
index 234137c..1fb77e4 100644
--- a/absl/base/options.h
+++ b/absl/base/options.h
@@ -100,7 +100,7 @@
// User code should not inspect this macro. To check in the preprocessor if
// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY.
-#define ABSL_OPTION_USE_STD_ANY 2
+#define ABSL_OPTION_USE_STD_ANY 1
// ABSL_OPTION_USE_STD_OPTIONAL
@@ -127,7 +127,7 @@
// absl::optional is a typedef of std::optional, use the feature macro
// ABSL_USES_STD_OPTIONAL.
-#define ABSL_OPTION_USE_STD_OPTIONAL 2
+#define ABSL_OPTION_USE_STD_OPTIONAL 1
// ABSL_OPTION_USE_STD_STRING_VIEW
@@ -154,7 +154,7 @@
// absl::string_view is a typedef of std::string_view, use the feature macro
// ABSL_USES_STD_STRING_VIEW.
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
+#define ABSL_OPTION_USE_STD_STRING_VIEW 1
// ABSL_OPTION_USE_STD_VARIANT
//
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 1
// ABSL_OPTION_USE_INLINE_NAMESPACE

View File

@ -0,0 +1,66 @@
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
index a0930e9..2ec5793 100644
--- a/absl/base/internal/sysinfo.cc
+++ b/absl/base/internal/sysinfo.cc
@@ -72,6 +72,12 @@ static int GetNumCPUs() {
#if defined(_WIN32)
static double GetNominalCPUFrequency() {
+// UWP apps don't have access to the registry and currently don't provide an
+// API informing about CPU nominal frequency.
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ return 1.0;
+#else
#pragma comment(lib, "advapi32.lib") // For Reg* functions.
HKEY key;
// Use the Reg* functions rather than the SH functions because shlwapi.dll
@@ -91,6 +97,7 @@ static double GetNominalCPUFrequency() {
}
}
return 1.0;
+#endif // WINAPI_PARTITION_APP && !WINAPI_PARTITION_DESKTOP
}
#elif defined(CTL_HW) && defined(HW_CPU_FREQ)
diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc
index c3df46f..d324fc1 100644
--- a/absl/debugging/symbolize_win32.inc
+++ b/absl/debugging/symbolize_win32.inc
@@ -36,6 +36,11 @@ ABSL_NAMESPACE_BEGIN
static HANDLE process = NULL;
void InitializeSymbolizer(const char*) {
+// UWP doesn't support this function
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ return;
+#else
if (process != nullptr) {
return;
}
@@ -52,9 +57,16 @@ void InitializeSymbolizer(const char*) {
const unsigned long long error{GetLastError()}; // NOLINT(runtime/int)
ABSL_RAW_LOG(FATAL, "SymInitialize() failed: %llu", error);
}
+#endif
}
bool Symbolize(const void* pc, char* out, int out_size) {
+
+// UWP doesn't support this function
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ return false;
+#else
if (out_size <= 0) {
return false;
}
@@ -75,6 +87,7 @@ bool Symbolize(const void* pc, char* out, int out_size) {
out[out_size - 1] = '\0';
}
return true;
+#endif
}
ABSL_NAMESPACE_END

View File

@ -0,0 +1,73 @@
if (NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
set(ABSEIL_PATCHES
fix-uwp-build.patch
# This patch is an upstream commit, the related PR: https://github.com/abseil/abseil-cpp/pull/637
fix-MSVCbuildfail.patch
# Remove this patch in next update, see https://github.com/google/cctz/pull/145
fix-arm-build.patch
# This patch is an upstream commit: https://github.com/abseil/abseil-cpp/commit/68494aae959dfbbf781cdf03a988d2f5fc7e4802
fix-cmake-threads-dependency.patch
)
if("cxx17" IN_LIST FEATURES)
# in C++17 mode, use std::any, std::optional, std::string_view, std::variant
# instead of the library replacement types
list(APPEND ABSEIL_PATCHES fix-use-cxx17-stdlib-types.patch)
else()
# fore use of library replacement types, otherwise the automatic
# detection can cause ABI issues depending on which compiler options
# are enabled for consuming user code
list(APPEND ABSEIL_PATCHES fix-lnk2019-error.patch)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
REF 06f0e767d13d4d68071c4fc51e25724e0fc8bc74 #commit 2020-03-03
SHA512 f6e2302676ddae39d84d8ec92dbd13520ae214013b43455f14ced3ae6938b94cedb06cfc40eb1781dac48f02cd35ed80673ed2d871541ef4438c282a9a4133b9
HEAD_REF master
PATCHES ${ABSEIL_PATCHES}
)
set(CMAKE_CXX_STANDARD 11)
if("cxx17" IN_LIST FEATURES)
set(CMAKE_CXX_STANDARD 17)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl TARGET_PATH share/absl)
vcpkg_copy_pdbs()
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
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/config.h
"#elif defined(ABSL_CONSUME_DLL)" "#elif 1"
)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h
"&& !defined(ABSL_CONSUME_DLL)" "&& 0"
)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/container/internal/hashtablez_sampler.h
"!defined(ABSL_CONSUME_DLL)" "0"
)
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,17 @@
{
"name": "abseil",
"version-string": "2020-03-03",
"port-version": 8,
"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.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
"Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole."
],
"homepage": "https://github.com/abseil/abseil-cpp",
"features": {
"cxx17": {
"description": "Enable compiler C++17."
}
}
}

View File

@ -0,0 +1,4 @@
Source: absent
Version: 0.3.1
Homepage: https://github.com/rvarago/absent
Description: A small C++17 library meant to simplify the composition of nullable types in a generic, type-safe, and declarative way

View File

@ -0,0 +1,33 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rvarago/absent
REF 0.3.1
SHA512 c7b7d29422ef8afc48e3093496e1dd055cfe9969ae037c2b06ea70fe4283e7a7e9129171efaa257e909c535e24df5861b992b24b00ec03f965730e6a22e13015
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/${PORT}
)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)
file(INSTALL
${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)

21
vcpkg/ports/ace/CONTROL Normal file
View File

@ -0,0 +1,21 @@
Source: ace
Version: 6.5.11
Homepage: https://www.dre.vanderbilt.edu/~schmidt/ACE.html
Description: The ADAPTIVE Communication Environment
Feature: wchar
Description: Enable extra wide char functions in ACE
Feature: ssl
Description: Enable SSL/TLS features in ACE
Build-Depends: openssl
Feature: xml
Description: Enable XML features in ACE
Feature: zlib
Build-Depends: zlib
Description: Enable zlib support
Feature: tao
Description: The ACE ORB

View File

@ -0,0 +1,340 @@
# Using zip archive under Linux would cause sh/perl to report "No such file or directory" or "bad interpreter"
# when invoking `prj_install.pl`.
# So far this issue haven't yet be triggered under WSL 1 distributions. Not sure the root cause of it.
set(ACE_VERSION 6.5.11)
string(REPLACE "." "_" ACE_VERSION_DIRECTORY ${ACE_VERSION})
if("tao" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS)
# 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-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.zip"
FILENAME ACE-TAO-${ACE_VERSION}.zip
SHA512 82c4aa9718814f72f6ecc45da064d8d30f104d9b4785f357525c4c4a8ceb709e5885ddb1c4729df0cab9f69282c8f58cce3a23573a74e1dbdc677a6a54c1c894
)
else()
# VCPKG_TARGET_IS_LINUX
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.tar.gz"
FILENAME ACE-TAO-${ACE_VERSION}.tar.gz
SHA512 82d69ed23b049948b104677afb93fcaad4468335268b101e5b7d73aa15b380d120253415b42cadf6ba45bbf2ed3771d51f7b56c56eb93ff9e33a044f118f9191
)
endif()
else()
if(VCPKG_TARGET_IS_WINDOWS)
# 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-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.zip"
FILENAME ACE-src-${ACE_VERSION}.zip
SHA512 36f286240ac81c9de0c4a21a54e9e61a4efd0ae9e8381732dadfba496768b697dec9fb448e0d252293bfd686e114c644c7602ddbdbe74c5d73eb6423d00d0ae5
)
else(VCPKG_TARGET_IS_WINDOWS)
# VCPKG_TARGET_IS_LINUX
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.tar.gz"
FILENAME ACE-src-${ACE_VERSION}.tar.gz
SHA512 e47e1ef2e8d517aed3c647a1e7dd9ac8b54ed187f9d6adf1e535bb7c4da6e8e808d72850ae18f2e42842ea9487ef774f7af90d1fbede17e0858e2b5846650580
)
endif()
endif()
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("tao" IN_LIST FEATURES)
set(TAO_ROOT ${SOURCE_PATH}/TAO)
set(ENV{TAO_ROOT} ${TAO_ROOT})
set(WORKSPACE ${TAO_ROOT}/TAO_ACE)
else()
set(WORKSPACE ${ACE_ROOT}/ace/ace)
endif()
if("wchar" IN_LIST FEATURES)
list(APPEND ACE_FEATURE_LIST "uses_wchar=1")
endif()
if("zlib" IN_LIST FEATURES)
list(APPEND ACE_FEATURE_LIST "zlib=1")
set(ENV{ZLIB_ROOT} ${CURRENT_INSTALLED_DIR})
else()
list(APPEND ACE_FEATURE_LIST "zlib=0")
endif()
if("ssl" IN_LIST FEATURES)
list(APPEND ACE_FEATURE_LIST "ssl=1")
list(APPEND ACE_FEATURE_LIST "openssl11=1")
set(ENV{SSL_ROOT} ${CURRENT_INSTALLED_DIR})
else()
list(APPEND ACE_FEATURE_LIST "ssl=0")
endif()
list(JOIN ACE_FEATURE_LIST "," ACE_FEATURES)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(MPC_STATIC_FLAG -static)
endif()
# Acquire Perl and add it to PATH (for execution of MPC)
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})
if (TRIPLET_SYSTEM_ARCH MATCHES "x86")
set(MSBUILD_PLATFORM "Win32")
else ()
set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
# Add ace/config.h file
# see https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html
if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(SOLUTION_TYPE vs2019)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(SOLUTION_TYPE vs2017)
else()
set(SOLUTION_TYPE vc14)
endif()
file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"")
elseif(VCPKG_TARGET_IS_LINUX)
set(SOLUTION_TYPE gnuace)
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")
elseif(VCPKG_TARGET_IS_OSX)
set(SOLUTION_TYPE gnuace)
file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-macosx.h\"")
file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU")
endif()
if(VCPKG_TARGET_IS_UWP)
set(MPC_VALUE_TEMPLATE -value_template link_options+=/APPCONTAINER)
endif()
# Invoke mwc.pl to generate the necessary solution and project files
vcpkg_execute_build_process(
COMMAND ${PERL} ${ACE_ROOT}/bin/mwc.pl -type ${SOLUTION_TYPE} -features "${ACE_FEATURES}" ${WORKSPACE}.mwc ${MPC_STATIC_FLAG} ${MPC_VALUE_TEMPLATE}
WORKING_DIRECTORY ${ACE_ROOT}
LOGNAME mwc-${TARGET_TRIPLET}
)
if(VCPKG_TARGET_IS_WINDOWS)
file(RELATIVE_PATH PROJECT_SUBPATH ${SOURCE_PATH} ${WORKSPACE}.sln)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH ${PROJECT_SUBPATH}
LICENSE_SUBPATH COPYING
PLATFORM ${MSBUILD_PLATFORM}
USE_VCPKG_INTEGRATION
)
# 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_includes ORIGINAL_PATH RELATIVE_PATHS)
foreach(RELATIVE_PATH ${RELATIVE_PATHS})
file(
GLOB
HEADER_FILES
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.h
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.hpp
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.inl
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.cpp
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.idl
${ORIGINAL_PATH}/${RELATIVE_PATH}/*.pidl)
file(INSTALL ${HEADER_FILES}
DESTINATION ${CURRENT_PACKAGES_DIR}/include/${RELATIVE_PATH})
endforeach()
endfunction()
# Install headers in subdirectory
set(ACE_INCLUDE_FOLDERS
"ace"
"ace/Compression"
"ace/Compression/rle"
"ace/ETCL"
"ace/QoS"
"ace/Monitor_Control"
"ace/os_include"
"ace/os_include/arpa"
"ace/os_include/net"
"ace/os_include/netinet"
"ace/os_include/sys")
install_includes(${ACE_ROOT} "${ACE_INCLUDE_FOLDERS}")
if("ssl" IN_LIST FEATURES)
install_includes(${ACE_ROOT} "ace/SSL")
endif()
if("tao" IN_LIST FEATURES)
set(ACEXML_INCLUDE_FOLDERS "ACEXML/apps/svcconf" "ACEXML/common"
"ACEXML/parser/parser")
install_includes(${ACE_ROOT} "${ACEXML_INCLUDE_FOLDERS}")
set(ACE_PROTOCOLS_INCLUDE_FOLDERS "ace/HTBP" "ace/INet" "ace/RMCast"
"ace/TMCast")
install_includes(${ACE_ROOT}/protocols "${ACE_PROTOCOLS_INCLUDE_FOLDERS}")
install_includes(${ACE_ROOT} "Kokyu")
set(TAO_ORBSVCS_INCLUDE_FOLDERS
"orbsvcs"
"orbsvcs/AV"
"orbsvcs/Concurrency"
"orbsvcs/CosEvent"
"orbsvcs/Event"
"orbsvcs/FaultTolerance"
"orbsvcs/FtRtEvent/ClientORB"
"orbsvcs/FtRtEvent/EventChannel"
"orbsvcs/FtRtEvent/Utils"
"orbsvcs/HTIOP"
"orbsvcs/IFRService"
"orbsvcs/LifeCycle"
"orbsvcs/LoadBalancing"
"orbsvcs/Log"
"orbsvcs/Naming"
"orbsvcs/Naming/FaultTolerant"
"orbsvcs/Notify"
"orbsvcs/Notify/Any"
"orbsvcs/Notify/MonitorControl"
"orbsvcs/Notify/MonitorControlExt"
"orbsvcs/Notify/Sequence"
"orbsvcs/Notify/Structured"
"orbsvcs/PortableGroup"
"orbsvcs/Property"
"orbsvcs/Sched"
"orbsvcs/Security"
"orbsvcs/Time"
"orbsvcs/Trader")
if("ssl" IN_LIST FEATURES)
list(APPEND TAO_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/SSLIOP")
endif()
install_includes(${TAO_ROOT}/orbsvcs "${TAO_ORBSVCS_INCLUDE_FOLDERS}")
set(TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/FT_ReplicationManager"
"orbsvcs/Notify_Service")
install_includes(${TAO_ROOT} "${TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS}")
set(TAO_INCLUDE_FOLDERS
"tao"
"tao/AnyTypeCode"
"tao/BiDir_GIOP"
"tao/CSD_Framework"
"tao/CSD_ThreadPool"
"tao/CodecFactory"
"tao/Codeset"
"tao/Compression"
"tao/Compression/rle"
"tao/DiffServPolicy"
"tao/DynamicAny"
"tao/DynamicInterface"
"tao/Dynamic_TP"
"tao/ETCL"
"tao/EndpointPolicy"
"tao/IFR_Client"
"tao/IORInterceptor"
"tao/IORManipulation"
"tao/IORTable"
"tao/ImR_Client"
"tao/Messaging"
"tao/Monitor"
"tao/ObjRefTemplate"
"tao/PI"
"tao/PI_Server"
"tao/PortableServer"
"tao/RTCORBA"
"tao/RTPortableServer"
"tao/RTScheduling"
"tao/SmartProxies"
"tao/Strategies"
"tao/TransportCurrent"
"tao/TypeCodeFactory"
"tao/Utils"
"tao/Valuetype"
"tao/ZIOP")
if("zlib" IN_LIST FEATURES)
list(APPEND TAO_INCLUDE_FOLDERS "tao/Compression/zlib")
endif()
install_includes(${TAO_ROOT} "${TAO_INCLUDE_FOLDERS}")
endif()
# Remove dlls without any export
if("tao" IN_LIST FEATURES)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE
${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.dll
${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.pdb
${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd.dll
${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd_dll.pdb)
endif()
endif()
elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
FIND_PROGRAM(MAKE make)
IF (NOT MAKE)
MESSAGE(FATAL_ERROR "MAKE not found")
ENDIF ()
if("ssl" IN_LIST FEATURES)
list(APPEND _ace_makefile_macros "ssl=1")
endif()
set(ENV{INSTALL_PREFIX} ${CURRENT_PACKAGES_DIR})
# Set `PWD` environment variable since ACE's `install` make target calculates install dir using this env.
set(_prev_env $ENV{PWD})
get_filename_component(WORKING_DIR ${WORKSPACE} DIRECTORY)
set(ENV{PWD} ${WORKING_DIR})
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_build_process(
COMMAND make ${_ace_makefile_macros} "debug=1" "optimize=0" "-j${VCPKG_CONCURRENCY}"
WORKING_DIRECTORY ${WORKING_DIR}
LOGNAME make-${TARGET_TRIPLET}-dbg
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg")
vcpkg_execute_build_process(
COMMAND make ${_ace_makefile_macros} install
WORKING_DIRECTORY ${WORKING_DIR}
LOGNAME install-${TARGET_TRIPLET}-dbg
)
file(COPY ${CURRENT_PACKAGES_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
file(GLOB _pkg_components ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc)
foreach(_pkg_comp ${_pkg_components})
file(READ ${_pkg_comp} _content)
string(REPLACE "libdir=${CURRENT_PACKAGES_DIR}/lib" "libdir=${CURRENT_PACKAGES_DIR}/debug/lib" _content ${_content})
file(WRITE ${_pkg_comp} ${_content})
endforeach()
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done")
vcpkg_execute_build_process(
COMMAND make ${_ace_makefile_macros} realclean
WORKING_DIRECTORY ${WORKING_DIR}
LOGNAME realclean-${TARGET_TRIPLET}-dbg
)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_build_process(
COMMAND make ${_ace_makefile_macros} "-j${VCPKG_CONCURRENCY}"
WORKING_DIRECTORY ${WORKING_DIR}
LOGNAME make-${TARGET_TRIPLET}-rel
)
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
message(STATUS "Packaging ${TARGET_TRIPLET}-rel")
vcpkg_execute_build_process(
COMMAND make ${_ace_makefile_macros} install
WORKING_DIRECTORY ${WORKING_DIR}
LOGNAME install-${TARGET_TRIPLET}-rel
)
if("tao" IN_LIST FEATURES)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT})
endif()
message(STATUS "Packaging ${TARGET_TRIPLET}-rel done")
# Restore `PWD` environment variable
set($ENV{PWD} _prev_env)
# Handle copyright
file(INSTALL ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
endif()

View File

@ -0,0 +1,5 @@
Source: activemq-cpp
Version: 3.9.5-3
Build-Depends: apr
Description: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.
Supports: !(uwp|linux|osx)

View File

@ -0,0 +1,76 @@
diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj
index a43f072..54b4822 100644
--- a/vs2010-build/activemq-cpp.vcxproj
+++ b/vs2010-build/activemq-cpp.vcxproj
@@ -2576,7 +2576,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2602,7 +2602,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2628,7 +2628,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2656,7 +2656,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2684,7 +2684,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2710,7 +2710,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2736,7 +2736,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
@@ -2764,7 +2764,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>

View File

@ -0,0 +1,36 @@
diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj
index 54b4822..6b35511 100644
--- a/vs2010-build/activemq-cpp.vcxproj
+++ b/vs2010-build/activemq-cpp.vcxproj
@@ -2578,6 +2578,7 @@
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
@@ -2687,6 +2688,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
@@ -2794,6 +2796,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
@@ -2906,6 +2909,7 @@
<AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>

View File

@ -0,0 +1,99 @@
vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx")
set(VERSION 3.9.5)
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
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
FunctionLevelLinkingOn.diff
fix-crt-linkage.patch
)
set(ACTIVEMQCPP_MSVC_PROJ ${SOURCE_PATH}/vs2010-build/activemq-cpp.vcxproj)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ACTIVEMQCPP_SHARED_LIB)
if (ACTIVEMQCPP_SHARED_LIB)
set(RELEASE_CONF "ReleaseDLL")
set(DEBUG_CONF "DebugDLL")
set(ACTIVEMQCPP_LIB_PREFFIX )
set(ACTIVEMQCPP_LIB_SUFFIX d)
vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";apr-1.lib" ";libapr-1.lib")
else()
set(RELEASE_CONF "Release")
set(DEBUG_CONF "Debug")
set(ACTIVEMQCPP_LIB_PREFFIX lib)
set(ACTIVEMQCPP_LIB_SUFFIX )
vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";libapr-1.lib" ";apr-1.lib")
endif()
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
set(BUILD_ARCH "Win32")
set(OUTPUT_DIR "Win32")
elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
set(BUILD_ARCH "x64")
set(OUTPUT_DIR "Win64")
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
vcpkg_build_msbuild(
PROJECT_PATH ${ACTIVEMQCPP_MSVC_PROJ}
RELEASE_CONFIGURATION ${RELEASE_CONF}
DEBUG_CONFIGURATION ${DEBUG_CONF}
PLATFORM ${BUILD_ARCH}
USE_VCPKG_INTEGRATION
)
vcpkg_copy_pdbs()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
if (ACTIVEMQCPP_SHARED_LIB)
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
endif()
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
if (ACTIVEMQCPP_SHARED_LIB)
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(COPY
${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
endif()
endif()
file(COPY ${SOURCE_PATH}/src/main/activemq DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
file(COPY ${SOURCE_PATH}/src/main/cms DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
file(COPY ${SOURCE_PATH}/src/main/decaf DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

3
vcpkg/ports/ade/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: ade
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.

View File

@ -0,0 +1,31 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/ade
REF v0.1.1f
SHA512 fbdec8f3d5811a573abb81f1ceb6fb8d40274439013f749645db5430c6d9cdc52227c25203f1a68177b263d648bb65197ea7c2bea7871264a06585e59892631c
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d
)
vcpkg_install_cmake()
file(COPY ${CURRENT_PACKAGES_DIR}/debug/share/ade/adeTargets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ade/)
file(READ ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake ADE_TARGET_DEBUG)
string(REPLACE "/lib/"
"/debug/lib/" ADE_TARGET_DEBUG "${ADE_TARGET_DEBUG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake "${ADE_TARGET_DEBUG}")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ade RENAME copyright)

View File

@ -0,0 +1,3 @@
Source: aixlog
Version: 1.2.4
Description: Header-only C++ logging library

View File

@ -0,0 +1,16 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO badaix/aixlog
REF 9e89f702b71320c49fee1d27cc2d1bffe330dcc6 # v1.2.4
SHA512 77dbe9631bdabb5c7178a51ecd064be0e3baa76ffdae05d012ac55f6d3837c9c3fb0fd2a1993535756869fc944c89c89ca7093dddb1f1ac0fff5343328536d83
)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
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)

View File

@ -0,0 +1,5 @@
Source: akali
Version: 1.41
Port-Version: 1
Description: C++ Common Library.
Homepage: https://github.com/winsoft666/akali

View File

@ -0,0 +1,42 @@
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO winsoft666/akali
REF aa0ee3b82cef325ca582fce30bf3bf177ed81e9b
SHA512 0d523191219b19bcf2becb2c9e78b32b50fbbd5a052dd5330e315a6310c0d5c322639434f710a37c6d98e23510506d294b52978f8487227d4461d29d4a6bb502
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AKALI_STATIC)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
DISABLE_PARALLEL_CONFIGURE
PREFER_NINJA
OPTIONS
-DAKALI_STATIC:BOOL=${AKALI_STATIC}
-DBUILD_TESTS:BOOL=OFF
)
vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/akali)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/akali)
elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/akali)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/akali)
endif()
file(READ ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h AKALI_EXPORT_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "#ifdef AKALI_STATIC" "#if 1" AKALI_EXPORT_H "${AKALI_EXPORT_H}")
else()
string(REPLACE "#ifdef AKALI_STATIC" "#if 0" AKALI_EXPORT_H "${AKALI_EXPORT_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h "${AKALI_EXPORT_H}")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
vcpkg_copy_pdbs()

View File

@ -0,0 +1,48 @@
cmake_minimum_required (VERSION 3.9)
project (alac_decoder)
set(HEADERS
decomp.h
demux.h
stream.h
wavwriter.h
)
set (SRCS
decomp.c
alac.c
demux.c
stream.c
wavwriter.c
)
if(MSVC)
add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32)
else()
add_compile_options(-Wno-error=implicit-function-declaration)
endif()
include_directories(.)
add_library(libalac_decoder ${SRCS})
add_executable(alac_decoder main.c)
target_link_libraries(alac_decoder libalac_decoder)
install(
TARGETS libalac_decoder
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_TOOLS)
install (
TARGETS alac_decoder
RUNTIME DESTINATION tools/alac-decoder
)
endif()
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES ${HEADERS} DESTINATION include/alac_decoder)
endif()

View File

@ -0,0 +1,5 @@
Source: alac-decoder
Version: 0.2
Port-Version: 4
Homepage: https://distfiles.macports.org/alac_decoder
Description: ALAC C implementation of a decoder, written from reverse engineering the file format

View File

@ -0,0 +1,11 @@
#include "decomp.h"
#include <stdint.h>
int set_endian()
{
uint32_t integer = 0x000000aa;
unsigned char *p = (unsigned char*)&integer;
if (p[0] == 0xaa) return 0;
else return 1;
}

View File

@ -0,0 +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;

View File

@ -0,0 +1,34 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
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_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_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
-DDISABLE_INSTALL_TOOLS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,193 @@
diff --git a/alac.c b/alac.c
index 469000d..c6fe479 100644
--- a/alac.c
+++ b/alac.c
@@ -33,11 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
#include "decomp.h"
@@ -54,7 +50,7 @@
struct {signed int x:24;} se_struct_24;
#define SignExtend24(val) (se_struct_24.x = val)
-extern int host_bigendian;
+#define host_bigendian set_endian()
struct alac_file
{
diff --git a/decomp.h b/decomp.h
index 23dbc52..679a320 100644
--- a/decomp.h
+++ b/decomp.h
@@ -8,6 +8,7 @@ void decode_frame(alac_file *alac,
unsigned char *inbuffer,
void *outbuffer, int *outputsize);
void alac_set_info(alac_file *alac, char *inputbuffer);
+int set_endian();
#endif /* __ALAC__DECOMP_H */
diff --git a/demux.c b/demux.c
index ae77a9d..9e858a9 100644
--- a/demux.c
+++ b/demux.c
@@ -33,11 +33,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
#include "stream.h"
#include "demux.h"
diff --git a/demux.h b/demux.h
index 8447bf8..8874ba4 100644
--- a/demux.h
+++ b/demux.h
@@ -1,11 +1,8 @@
#ifndef DEMUX_H
#define DEMUX_H
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+
+#include <stdint.h>
#include "stream.h"
diff --git a/main.c b/main.c
index 7449ca1..dd58699 100644
--- a/main.c
+++ b/main.c
@@ -37,11 +37,7 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
#include "demux.h"
#include "decomp.h"
@@ -267,19 +263,7 @@ static void setup_environment(int argc, char **argv)
}
}
-/* this could quite easily be done at compile time,
- * however I don't want to have to bother with all the
- * various possible #define's for endianness, worrying about
- * different compilers etc. and I'm too lazy to use autoconf.
- */
-void set_endian()
-{
- uint32_t integer = 0x000000aa;
- unsigned char *p = (unsigned char*)&integer;
- if (p[0] == 0xaa) host_bigendian = 0;
- else host_bigendian = 1;
-}
int main(int argc, char **argv)
{
@@ -288,7 +272,7 @@ int main(int argc, char **argv)
memset(&demux_res, 0, sizeof(demux_res));
- set_endian();
+ host_bigendian = set_endian();
setup_environment(argc, argv);
diff --git a/stream.c b/stream.c
index 565db54..56727a0 100644
--- a/stream.c
+++ b/stream.c
@@ -33,13 +33,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
#include "stream.h"
+#include "decomp.h"
#define _Swap32(v) do { \
v = (((v) & 0x000000FF) << 0x18) | \
@@ -51,7 +48,7 @@
v = (((v) & 0x00FF) << 0x08) | \
(((v) & 0xFF00) >> 0x08); } while (0)
-extern int host_bigendian;
+#define host_bigendian set_endian()
struct stream_tTAG {
FILE *f;
diff --git a/stream.h b/stream.h
index 18d6aa0..ff6325e 100644
--- a/stream.h
+++ b/stream.h
@@ -3,11 +3,8 @@
/* stream.h */
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
+
typedef struct stream_tTAG stream_t;
diff --git a/wavwriter.c b/wavwriter.c
index fd19502..ce941c7 100644
--- a/wavwriter.c
+++ b/wavwriter.c
@@ -32,11 +32,8 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef _WIN32
- #include "stdint_win.h"
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
+
#ifndef MAKEFOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \
@@ -56,7 +53,7 @@
v = (((v) & 0x00FF) << 0x08) | \
(((v) & 0xFF00) >> 0x08); } while (0)
-extern int host_bigendian;
+#define host_bigendian set_endian()
static void write_uint32(FILE *f, uint32_t v, int bigendian)
{

View File

@ -0,0 +1,61 @@
cmake_minimum_required (VERSION 3.9)
project (alac)
set(HEADERS
codec/EndianPortable.h
codec/aglib.h
codec/ALACAudioTypes.h
codec/ALACBitUtilities.h
codec/ALACDecoder.h
codec/ALACEncoder.h
codec/dplib.h
codec/matrixlib.h
)
set (SRCS
codec/EndianPortable.c
codec/ALACBitUtilities.c
codec/ALACDecoder.cpp
codec/ALACEncoder.cpp
codec/ag_dec.c
codec/ag_enc.c
codec/dp_dec.c
codec/dp_enc.c
codec/matrix_dec.c
codec/matrix_enc.c
)
set(EXE_SRCS
convert-utility/main.cpp
convert-utility/CAFFileALAC.cpp
)
if(MSVC)
add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32)
endif()
include_directories(. codec convert-utility)
add_library(libalac ${SRCS})
add_executable(alacconvert ${EXE_SRCS})
target_link_libraries(alacconvert libalac)
install(
TARGETS libalac
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_TOOLS)
install (
TARGETS alacconvert
RUNTIME DESTINATION tools/alac
)
endif()
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES ${HEADERS} DESTINATION include/alac)
endif()

5
vcpkg/ports/alac/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: alac
Version: 2017-11-03-c38887c5-1
Homepage: https://github.com/macosforge/alac
Description: The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices.
Supports: !uwp

View File

@ -0,0 +1,28 @@
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO macosforge/alac
REF c38887c5c5e64a4b31108733bd79ca9b2496d987
SHA512 8da18df25807e76f9187f7bf30585aace303d55444f0a614ab00d98d11caca3fdc5c6f5b9fd11e5f4c92a2ab1e86fef73deeeada57e9d49951fea8b80ba383cc
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
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)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac RENAME copyright)

View File

@ -0,0 +1,7 @@
Source: alembic
Version: 1.7.13
Port-Version: 1
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/
Supports: windows & !arm & !uwp & !static

View File

@ -0,0 +1,50 @@
diff --git a/cmake/AlembicIlmBase.cmake b/cmake/AlembicIlmBase.cmake
index cd00d70..0e50512 100644
--- a/cmake/AlembicIlmBase.cmake
+++ b/cmake/AlembicIlmBase.cmake
@@ -33,11 +33,17 @@
##
##-*****************************************************************************
-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} ${OPENEXR_IMATH_LIBRARY})
+ set(ALEMBIC_ILMBASE_ILMTHREAD_LIB ${OPENEXR_ILMTHREAD_LIBRARY})
+ set(ALEMBIC_ILMBASE_IMATH_LIB ${OPENEXR_IMATH_LIBRARY})
SET(ALEMBIC_ILMBASE_LIBS
${ALEMBIC_ILMBASE_IMATH_LIB}
${ALEMBIC_ILMBASE_ILMTHREAD_LIB}
@@ -45,9 +59,9 @@ IF (ILMBASE_FOUND)
${ALEMBIC_ILMBASE_HALF_LIB}
)
- if (${ALEMBIC_ILMBASE_IEXMATH_LIB})
+ if (ALEMBIC_ILMBASE_IEXMATH_LIB)
SET(ALEMBIC_ILMBASE_LIBS ${ALEMBIC_ILMBASE_LIBS} ${ALEMBIC_ILMBASE_IEXMATH_LIB})
- endif (${ALEMBIC_ILMBASE_IEXMATH_LIB})
+ endif (ALEMBIC_ILMBASE_IEXMATH_LIB)
ELSE()
SET(ALEMBIC_ILMBASE_FOUND 0 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise")
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,8 @@
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} )
# SET( ALEMBIC_OPENEXR_DEFINITIONS ${OPENEXR_DEFINITIONS} )
SET( ALEMBIC_OPENEXR_FOUND 1 CACHE STRING "Set to 1 if OpenEXR is found, 0 otherwise" )

View File

@ -0,0 +1,72 @@
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux")
vcpkg_buildpath_length_warning(37)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alembic/alembic
REF cfe114639ef7ad084d61e71ab86a17e708d838ae #v1.7.13
SHA512 38b797c1179e759870f10afc4a2182bc3e874eacecc9627c879d3a5cf35e49c83cae80600678427e5c22d6576d0e6280ce3cf0a2ac505f1df74ec4a8bdb083b5
HEAD_REF master
PATCHES
fix-find-openexr-ilmbase.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindIlmBase.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindOpenEXR.cmake)
if(NOT VCPKG_TARGET_IS_WINDOWS)
# In debug mode with g++, alembic defines -Werror
# so we need to disable some warnings to avoid build errors
list(APPEND GXX_DEBUG_FLAGS
-DCMAKE_CXX_FLAGS_DEBUG=-Wno-deprecated
-DCMAKE_CXX_FLAGS_DEBUG=-Wno-error=implicit-fallthrough
)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DUSE_HDF5=ON
OPTIONS_DEBUG
${GXX_DEBUG_FLAGS}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Alembic)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXE})
file(REMOVE ${DEBUG_EXE})
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll)
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake DEBUG_CONFIG)
string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll"
"\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake "${DEBUG_CONFIG}")
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake RELEASE_CONFIG)
string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll"
"\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake "${RELEASE_CONFIG}")
else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,5 @@
Source: aliyun-oss-c-sdk
Version: 3.9.1
Description: Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.
Build-Depends: curl, apr-util
Supports: !uwp

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0abcb93..75195a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,5 +150,5 @@ INSTALL(FILES
oss_c_sdk/oss_xml.h
DESTINATION include/oss_c_sdk)
-add_subdirectory(oss_c_sdk_sample)
-add_subdirectory(oss_c_sdk_test)
+#add_subdirectory(oss_c_sdk_sample)
+#add_subdirectory(oss_c_sdk_test)

View File

@ -0,0 +1,26 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO aliyun/aliyun-oss-c-sdk
REF 703ea9a0dee0ddf4eacc7f9782ba970adccc58e8 # 3.9.1
SHA512 01f33d73031039d64433823c6b7b540071d18560ee0df762ef58b30898bde520c8cfb8bcf631a62cbd709d8c996b9dfc8c31c2286ceb9d1925161c39dbbe97fc
HEAD_REF master
PATCHES
patch.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)

View File

@ -0,0 +1,5 @@
Source: allegro5
Version: 5.2.6.0
Homepage: https://github.com/liballeg/allegro5
Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.
Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72348fe..c6fbecb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1010,14 +1010,9 @@ else()
set(PKG_CONFIG_FILES allegro ${ADDON_PKG_CONFIG_FILES})
endif(WANT_MONOLITH)
-# Install pkg-config files on Unix, and when cross-compiling on Unix.
+# Install pkg-config files
-if(UNIX AND NOT WANT_FRAMEWORKS AND NOT IPHONE)
- set(INSTALL_PKG_CONFIG_FILES true)
-endif()
-if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_UNIX)
- set(INSTALL_PKG_CONFIG_FILES true)
-endif()
+set(INSTALL_PKG_CONFIG_FILES true)
if(INSTALL_PKG_CONFIG_FILES)
append_lib_type_suffix(lib_type)
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 782196f..de29535 100644
--- a/cmake/Common.cmake
+++ b/cmake/Common.cmake
@@ -223,7 +223,7 @@ function(install_our_library target filename)
# PUBLIC_HEADER DESTINATION "include"
)
if(MSVC AND BUILD_SHARED_LIBS)
- install(FILES ${CMAKE_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/${filename}.pdb
+ install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb
DESTINATION lib
CONFIGURATIONS Debug RelWithDebInfo
)

View File

@ -0,0 +1,76 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO liballeg/allegro5
REF 5.2.6.0
SHA512 d590c1a00d1b314c6946e0f6ad3e3a8b6e6309bada2ec38857186f817147ac99dae8a1c4412abe701af88da5dca3dd8f989a1da66630192643d3c08c0146b603
HEAD_REF master
PATCHES
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
OPTIONS
-DWANT_DOCS=OFF
-DALLEGRO_SDL=OFF
-DWANT_DEMO=OFF
-DSHARED=${VCPKG_BUILD_SHARED_LIBS}
-DWANT_EXAMPLES=OFF
-DWANT_CURL_EXAMPLE=OFF
-DWANT_TESTS=OFF
-DWANT_AUDIO=ON
-DWANT_COLOR=ON
-DWANT_D3D=ON
-DWANT_D3D9EX=OFF # Not available on vcpkg
-DWANT_DSOUND=ON
-DWANT_FLAC=ON
-DWANT_FONT=ON
-DWANT_GLES2=ON
-DWANT_GLES3=ON
-DWANT_IMAGE=ON
-DWANT_IMAGE_JPG=ON
-DWANT_IMAGE_PNG=ON
-DWANT_MEMFILE=ON
-DWANT_MODAUDIO=OFF # Not available on vcpkg right now
-DWANT_NATIVE_DIALOG=ON
-DWANT_NATIVE_IMAGE_LOADER=ON
-DWANT_OGG_VIDEO=ON
-DWANT_OPENAL=ON
-DWANT_OPENGL=ON
-DWANT_OPENSL=OFF # Not yet available on vcpkg
-DWANT_OPUS=ON
-DWANT_PHYSFS=ON
-DWANT_POPUP_EXAMPLES=OFF
-DWANT_PRIMITIVES=ON
-DWANT_RELEASE_LOGGING=OFF
-DWANT_SHADERS_D3D=ON
-DWANT_SHADERS_GL=ON
-DWANT_TREMOR=OFF # Not yet available on vcpkg
-DWANT_TTF=ON
-DWANT_VIDEO=ON
-DWANT_VORBIS=ON
-DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL
-DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON
OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF
)
vcpkg_install_cmake()
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)

View File

@ -0,0 +1,4 @@
Source: ampl-mp
Version: 2019-03-21-1
Description: An open-source library for mathematical programming
Supports: !uwp

View File

@ -0,0 +1,11 @@
--- a/src/asl/CMakeLists.txt 2019-02-08 16:42:50.793071700 -0600
+++ b/src/asl/CMakeLists.txt 2019-02-08 16:44:04.960894500 -0600
@@ -266,7 +266,7 @@ endif ()
target_link_libraries(asl ${CMAKE_DL_LIBS})
-find_package(MATLAB)
+set(MATLAB_FOUND)
if (MATLAB_FOUND)
set(matlab_asl asl)
if (MSVC)

View File

@ -0,0 +1,44 @@
--- a/CMakeLists.txt 2019-02-09 04:38:25.756325900 -0600
+++ b/CMakeLists.txt 2019-02-09 04:39:55.299417600 -0600
@@ -289,6 +289,8 @@ add_prefix(MP_SOURCES src/
add_mp_library(mp ${MP_HEADERS} ${MP_SOURCES} ${MP_EXPR_INFO_FILE}
COMPILE_DEFINITIONS MP_DATE=${MP_DATE} MP_SYSINFO="${MP_SYSINFO}"
INCLUDE_DIRECTORIES src OBJECT_LIBRARIES format)
+set_property(TARGET mp PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:include>)
set_target_properties(mp PROPERTIES
VERSION ${MP_VERSION} SOVERSION ${MP_VERSION_MAJOR})
@@ -385,5 +387,10 @@ if(BUILD_TESTING)
endif()
install(DIRECTORY include/mp DESTINATION include)
-install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS mp EXPORT unofficial-mp-targets
+ DESTINATION lib RUNTIME DESTINATION bin)
install(FILES LICENSE.rst DESTINATION share/mp)
+install(EXPORT unofficial-mp-targets
+ FILE unofficial-mp-config.cmake
+ NAMESPACE unofficial::mp::
+ DESTINATION share/unofficial-mp)
--- a/src/asl/CMakeLists.txt 2019-02-09 04:38:27.196322600 -0600
+++ b/src/asl/CMakeLists.txt 2019-02-09 04:39:32.119889500 -0600
@@ -235,6 +235,10 @@ add_mp_library(asl-extra OBJECT ${ASL_SO
add_mp_library(asl STATIC OBJECT_LIBRARIES asl-core asl-extra
LIBRARIES mp INCLUDE_DIRECTORIES ${ASL_INCLUDE_DIRS})
+set_property(TARGET asl PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${PROJECT_SOURCE_DIR}/src/asl/solvers>
+ $<INSTALL_INTERFACE:include>)
if (NOT WIN32)
target_link_libraries(asl m)
@@ -353,4 +357,6 @@ endif ()
install(FILES ${ASL_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/arith.h
solvers/opcode.hd solvers/r_opn.hd
DESTINATION include/asl)
-install(TARGETS asl tableproxy DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS tableproxy DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS asl EXPORT unofficial-mp-targets
+ DESTINATION lib RUNTIME DESTINATION bin)

View File

@ -0,0 +1,47 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Cross-compiling is not supported")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ampl/mp
REF 67875b71ef68511277ec2dc8224f613487cefce9
SHA512 fad2496c10b843ddad7c4dba1eea1b4cd22e90be12dec2ad598fbd1ed5e1c492d92c5130490c7045ea608bc9ea2af191661c39b3bee3bc5159663f306ce50950
HEAD_REF master
PATCHES
disable-matlab-mex.patch
workaround-msvc-optimizer-ice.patch
install-targets.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD=asl
-DBUILD_TESTING=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH share/unofficial-mp
TARGET_PATH share/unofficial-mp
)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/bin
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/share/mp)
configure_file(${SOURCE_PATH}/LICENSE.rst
${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
vcpkg_copy_pdbs()
vcpkg_test_cmake(PACKAGE_NAME unofficial-mp)

View File

@ -0,0 +1,28 @@
diff --git a/src/asl/solvers/avltree.c b/src/asl/solvers/avltree.c
index 7a9adaba..4dd97054 100644
--- a/src/asl/solvers/avltree.c
+++ b/src/asl/solvers/avltree.c
@@ -54,6 +54,9 @@ AVL_Tree {
void (*Free)(void*);
};
+#if defined(_MSC_VER) && _MSC_VER < 1917
+#pragma optimize("", off)
+#endif
AVL_Tree*
AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*))
{
diff --git a/src/asl/solvers/sphes.c b/src/asl/solvers/sphes.c
index 326d997f..ae8952ed 100644
--- a/src/asl/solvers/sphes.c
+++ b/src/asl/solvers/sphes.c
@@ -452,6 +452,9 @@ compar(const void *a, const void *b)
#undef del_mblk
#define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c))
+#if defined(_MSC_VER) && _MSC_VER < 1917
+#pragma optimize("", off)
+#endif
static void
new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef)
{

View File

@ -0,0 +1,6 @@
Source: amqpcpp
Version: 4.1.7
Homepage: https://github.com/CopernicaMarketingSoftware/AMQP-CPP
Description: AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker
Build-Depends: openssl (linux)
Supports: !uwp

View File

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 645bb32..3ef5c4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,6 +89,11 @@ else()
add_library(${PROJECT_NAME} STATIC ${src_MAIN} ${src_LINUX_TCP})
endif()
+if(AMQP-CPP_LINUX_TCP)
+ find_path(OPENSSL_INCLUDE_DIR openssl/ssl.h)
+ include_directories(${OPENSSL_INCLUDE_DIR})
+endif()
+
# install rules
# ------------------------------------------------------------------------------------------------------

View File

@ -0,0 +1,34 @@
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CopernicaMarketingSoftware/AMQP-CPP
REF e7f76bc75d7855012450763a638092925d52f417 #v4.1.7
SHA512 ce105622d09014b51876911e95c4523b786d670bbd0bafa47874c6d52dca63f610dbb52561107bd1941c1fda79a4e200331779a79f9394c1ea437e0e1a4695bf
HEAD_REF master
PATCHES
find-openssl.patch
)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(LINUX_TCP ON)
else()
set(LINUX_TCP OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DAMQP-CPP_BUILD_SHARED=OFF
-DAMQP-CPP_LINUX_TCP=${LINUX_TCP}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

View File

@ -0,0 +1,10 @@
--- a/CMakeLists.txt Tue Oct 13 13:47:40 2015
+++ b/CMakeLists.txt Tue Dec 06 11:13:23 2016
@@ -161,6 +161,7 @@
# Library files
install(
TARGETS ${ANAX_LIBRARY_NAME}
+ RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

4
vcpkg/ports/anax/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: anax
Version: 2.1.0-6
Description: An open source C++ entity system.
Homepage: https://github.com/miguelmartin75/anax

View File

@ -0,0 +1,29 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO miguelmartin75/anax
REF v2.1.0
SHA512 b573733b5f9634bf8cfc5b0715074f9a8ee29ecb48dc981d9371254a1f6ff8afbbb9ba6aa0877d53e518e5486ecc398a6d331fb9b5dbfd17d8707679216e11a3
HEAD_REF master
PATCHES
Add-bin-output.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/anax)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/anax/LICENSE ${CURRENT_PACKAGES_DIR}/share/anax/copyright)
vcpkg_copy_pdbs()

View File

@ -0,0 +1,6 @@
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

View File

@ -0,0 +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.

View File

@ -0,0 +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})

View File

@ -0,0 +1,31 @@
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)

View File

@ -0,0 +1,30 @@
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
index 7d3f078d6..fac057dd6 100644
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
@@ -213,16 +213,20 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind
static float GetLogicalDpi()
{
- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
+ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformationStatics> displayInformationStatics;
+ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> displayInformation;
if (SUCCEEDED(GetActivationFactory(
- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(),
- displayProperties.GetAddressOf())))
+ HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(),
+ displayInformationStatics.GetAddressOf())))
{
float dpi = 96.0f;
- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
+ if (SUCCEEDED(displayInformationStatics->GetForCurrentView(&displayInformation)))
{
- return dpi;
+ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi)))
+ {
+ return dpi;
+ }
}
}

View File

@ -0,0 +1,28 @@
diff --git a/src/gpu_info_util/SystemInfo_win.cpp b/src/gpu_info_util/SystemInfo_win.cpp
index f4bb137f2..86495013b 100644
--- a/src/gpu_info_util/SystemInfo_win.cpp
+++ b/src/gpu_info_util/SystemInfo_win.cpp
@@ -6,11 +6,6 @@
// SystemInfo_win.cpp: implementation of the Windows-specific parts of SystemInfo.h
-#include "gpu_info_util/SystemInfo_internal.h"
-
-#include "common/debug.h"
-#include "common/string_utils.h"
-
// Windows.h needs to be included first
#include <windows.h>
@@ -19,6 +14,11 @@
#include <array>
#include <sstream>
+#include "gpu_info_util/SystemInfo_internal.h"
+
+#include "common/debug.h"
+#include "common/string_utils.h"
+
namespace angle
{

View File

@ -0,0 +1,476 @@
cmake_minimum_required(VERSION 3.8)
project(angle CXX C)
if(WIN32 AND NOT WINDOWS_STORE)
set(WINDOWS_DESKTOP 1)
else()
set(WINDOWS_DESKTOP 0)
endif()
if(UNIX AND NOT APPLE)
set(LINUX 1)
else()
set(LINUX 0)
endif()
if(MSVC)
add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive /bigobj)
else()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if (APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework IOSurface -framework QuartzCore -framework CoreGraphics")
endif()
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
set(CMAKE_STATIC_LIBRARY_PREFIX "")
if (WINDOWS_STORE)
set(WINRT_DEFINES -DANGLE_ENABLE_WINDOWS_STORE)
else()
set(WINRT_DEFINES)
endif()
add_definitions(
-D_CRT_SECURE_NO_DEPRECATE
-D_SCL_SECURE_NO_WARNINGS
-DGL_SILENCE_DEPRECATION
-D_HAS_EXCEPTIONS=0
-DNOMINMAX
-DANGLE_STANDALONE_BUILD
-DANGLE_ENABLE_DEBUG_ANNOTATIONS
${WINRT_DEFINES}
)
configure_file(commit.h include/id/commit.h COPYONLY)
#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
include_directories("$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
##########
# angle::common
if(WINDOWS_DESKTOP)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_winuwp")
elseif(WINDOWS_STORE)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_win32")
elseif(LINUX)
set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac")
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")
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES})
target_include_directories(angle_common PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/common/third_party/base>")
add_library(angle::common ALIAS angle_common)
##########
# angle::image_util
file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp")
add_library(angle_image_util OBJECT ${ANGLE_IMAGE_UTIL_SOURCES})
target_link_libraries(angle_image_util PRIVATE angle::common)
add_library(angle::image_util ALIAS angle_image_util)
##########
# angle::translator
file(GLOB TRANSLATOR_SOURCES
"src/compiler/translator/glslang.l"
"src/compiler/translator/glslang.y"
"src/compiler/translator/*.h"
"src/compiler/translator/*.cpp"
"src/compiler/translator/tree_ops/*.h"
"src/compiler/translator/tree_ops/*.cpp"
"src/compiler/translator/tree_util/*.h"
"src/compiler/translator/tree_util/*.cpp"
"src/third_party/compiler/ArrayBoundsClamper.cpp"
)
list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest")
add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES})
target_compile_definitions(angle_translator PUBLIC
-DANGLE_ENABLE_ESSL
-DANGLE_ENABLE_GLSL
-DANGLE_ENABLE_HLSL
)
target_link_libraries(angle_translator PRIVATE angle::common)
add_library(angle::translator ALIAS angle_translator)
##########
# angle::preprocessor
file(GLOB PREPROCESSOR_SOURCES
"src/compiler/preprocessor/*.h"
"src/compiler/preprocessor/*.cpp"
)
add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES})
target_link_libraries(angle_preprocessor PRIVATE angle::common)
add_library(angle::preprocessor ALIAS angle_preprocessor)
##########
# libANGLE
## OpenGL Renderer
if(WINDOWS_DESKTOP OR LINUX OR APPLE)
if(WINDOWS_DESKTOP)
set(ANGLE_RENDERER_OPENGL_PLATFORM
"src/libANGLE/renderer/gl/wgl/*.cpp"
"src/libANGLE/renderer/gl/wgl/*.inl"
"src/libANGLE/renderer/gl/wgl/*.h"
)
elseif(APPLE)
set(ANGLE_RENDERER_OPENGL_PLATFORM
"src/libANGLE/renderer/gl/cgl/*.mm"
"src/libANGLE/renderer/gl/cgl/*.cpp"
"src/libANGLE/renderer/gl/cgl/*.inl"
"src/libANGLE/renderer/gl/cgl/*.h"
"gpu_info_util/SystemInfo_macos.mm"
)
elseif(LINUX)
set(ANGLE_RENDERER_OPENGL_PLATFORM
"src/libANGLE/renderer/gl/glx/*.cpp"
"src/libANGLE/renderer/gl/glx/*.inl"
"src/libANGLE/renderer/gl/glx/*.h"
"src/libANGLE/renderer/gl/egl/*.cpp"
"src/libANGLE/renderer/gl/egl/*.inl"
"src/libANGLE/renderer/gl/egl/*.h"
)
endif()
file(GLOB LIBANGLE_GL_SOURCES
"src/libANGLE/renderer/gl/*.cpp"
"src/libANGLE/renderer/gl/*.inl"
"src/libANGLE/renderer/gl/*.h"
${ANGLE_RENDERER_OPENGL_PLATFORM}
)
list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest")
add_library(angle_renderer_opengl INTERFACE)
target_sources(angle_renderer_opengl INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_GL_SOURCES}>")
target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL)
add_library(angle::renderer::opengl ALIAS angle_renderer_opengl)
endif()
# D3D Renderers
if(WIN32)
## All D3D Sources
file(GLOB_RECURSE LIBANGLE_D3D_SOURCES
"src/libANGLE/renderer/d3d/*.cpp"
"src/libANGLE/renderer/d3d/*.inl"
"src/libANGLE/renderer/d3d/*.h"
)
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest")
## WinRT D3D Renderer
if(WINDOWS_STORE)
set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES})
list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt")
add_library(angle_renderer_winrt INTERFACE)
target_sources(angle_renderer_winrt INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_WINRT_SOURCES}>")
add_library(angle::renderer::winrt ALIAS angle_renderer_winrt)
endif()
## Win32/d3d9 D3D Renderer
if(WINDOWS_DESKTOP)
set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES})
list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32|converged")
find_library(D3D9_LIB NAMES d3d9)
add_library(angle_renderer_win32 INTERFACE)
target_sources(angle_renderer_win32 INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_DESKTOP_SOURCES}>")
target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9)
target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB})
add_library(angle::renderer::win32 ALIAS angle_renderer_win32)
endif()
## D3D11 Base renderer
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32|converged")
find_library(DXGUID_LIB NAMES dxguid)
find_library(D3D11_LIB NAMES d3d11)
add_library(angle_renderer_d3d INTERFACE)
target_sources(angle_renderer_d3d INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_SOURCES}>")
target_compile_definitions(angle_renderer_d3d INTERFACE
-DANGLE_ENABLE_D3D11
"-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }"
)
target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid)
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 OBJECT ${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_macos.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)
endif()
file(GLOB LIBANGLE_SOURCES
"src/common/third_party/murmurhash/MurmurHash3.cpp"
"src/common/event_tracer.cpp"
"src/libANGLE/*.cpp"
"src/libANGLE/*.inl"
"src/libANGLE/*.h"
"src/libANGLE/renderer/*.cpp"
"src/libANGLE/renderer/*.inl"
"src/libANGLE/renderer/*.h"
"src/libANGLE/renderer/null/*.cpp"
"src/libANGLE/renderer/null/*.inl"
"src/libANGLE/renderer/null/*.h"
${LIBANGLE_SOURCES_PLATFORM}
)
list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest|glslang_wrapper|capture|FrameCapture\.cpp")
if(LINUX OR APPLE)
set(LIBANGLE_RENDERER_PLATFORM
angle::renderer::opengl
)
elseif(WINDOWS_STORE)
set(LIBANGLE_RENDERER_PLATFORM
angle::renderer::d3d
angle::renderer::winrt
)
elseif(WINDOWS_DESKTOP)
set(LIBANGLE_RENDERER_PLATFORM
angle::renderer::d3d
angle::renderer::win32
angle::renderer::opengl
gdi32
)
else()
set(LIBANGLE_RENDERER_PLATFORM )
endif()
if(LINUX)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
set(LIBANGLE_RENDERER_COMPILEDEF
-DANGLE_USE_X11
)
else()
set(LIBANGLE_RENDERER_COMPILEDEF )
endif()
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}
)
target_include_directories(libANGLE PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/khronos>")
target_compile_definitions(libANGLE
PRIVATE -DANGLE_ENABLE_NULL
PUBLIC
-DLIBANGLE_IMPLEMENTATION
${LIBANGLE_RENDERER_COMPILEDEF}
-DANGLE_EXPORT=
-DANGLE_UTIL_EXPORT=
-DEGLAPI=
-DGL_APICALL=
-DGL_API=
)
add_library(angle::libANGLE ALIAS libANGLE)
if(BUILD_SHARED_LIBS)
target_compile_definitions(libANGLE
PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION
)
endif()
##########
# libGLESv2
# 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_3_2_autogen.cpp"
"src/libGLESv2/entry_points_gles_3_2_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
PRIVATE -DLIBGLESV2_IMPLEMENTATION
PUBLIC
"-DGL_GLES_PROTOTYPES=1"
"-DGL_GLEXT_PROTOTYPES"
"-DEGL_EGL_PROTOTYPES=1"
"-DEGL_EGLEXT_PROTOTYPES"
)
if(BUILD_SHARED_LIBS)
else()
if(WIN32)
target_compile_definitions(libGLESv2 PRIVATE
"-DGL_API="
"-DGL_APICALL="
"-DEGLAPI="
)
else()
target_compile_definitions(libGLESv2 PRIVATE
"-DGL_API=__attribute__((visibility(\"default\")))"
"-DGL_APICALL=__attribute__((visibility(\"default\")))"
"-DEGLAPI=__attribute__((visibility(\"default\")))"
)
endif()
endif()
target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
##########
# libEGL
add_library(libEGL
"src/libEGL/libEGL.def"
"src/libEGL/libEGL.cpp"
"src/libEGL/libEGL.rc"
"src/libEGL/resource.h"
)
target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
target_compile_definitions(libEGL
PRIVATE -DLIBGLESV2_IMPLEMENTATION
PUBLIC
"-DGL_GLES_PROTOTYPES=1"
"-DGL_GLEXT_PROTOTYPES"
"-DEGL_EGL_PROTOTYPES=1"
"-DEGL_EGLEXT_PROTOTYPES"
)
add_library(GL_VISIBILITY INTERFACE)
if(WIN32)
target_compile_definitions(GL_VISIBILITY INTERFACE
"-DGL_API="
"-DGL_APICALL=")
else()
target_compile_definitions(GL_VISIBILITY INTERFACE
"-DGL_API=__attribute__((visibility(\"default\")))"
"-DGL_APICALL=__attribute__((visibility(\"default\")))")
endif()
target_link_libraries(libEGL PRIVATE GL_VISIBILITY)
target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY)
if(WIN32)
target_compile_definitions(libEGL PRIVATE
"-DEGLAPI="
)
else()
target_compile_definitions(libEGL PRIVATE
"-DEGLAPI=__attribute__((visibility(\"default\")))"
)
endif()
if(NOT BUILD_SHARED_LIBS)
add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=")
endif()
SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "")
install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(WINDOWS_DESKTOP)
install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
elseif(WINDOWS_STORE)
install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
else()
install(TARGETS angle_renderer_opengl EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
endif()
install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle)
if(NOT DISABLE_INSTALL_HEADERS)
install(
DIRECTORY include/
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.inc"
PATTERN "GLSLANG" EXCLUDE
PATTERN "EGL" EXCLUDE
PATTERN "KHR" EXCLUDE
PATTERN "export.h" EXCLUDE
)
endif()

View File

@ -0,0 +1,6 @@
Source: angle
Version: 2020-05-15-1
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.
Build-Depends: egl-registry, opengl-registry

View File

@ -0,0 +1,3 @@
#define ANGLE_COMMIT_HASH "invalid-hash"
#define ANGLE_COMMIT_HASH_SIZE 12
#define ANGLE_COMMIT_DATE "invalid-date"

View File

@ -0,0 +1,76 @@
if (VCPKG_TARGET_IS_LINUX)
message(WARNING "Building with a gcc version less than 6.1 is not supported.")
message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n libmesa-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libmesa-dev libxi-dev libxext-dev.")
endif()
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/angle
REF d949154da428bb3e924e28a8eadfe2327631c8bb # chromium/4148
SHA512 3ef1c94fccfca592057652e0ad305e3025184675e2323a714428ec934048496fbd242b5e1298bb5e3b3058b53d54f6889e446cbd81af7bea2cc6d5e13c7356bd
# On update check headers against opengl-registry
PATCHES
001-fix-uwp.patch
002-fix-builder-error.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}/src/common)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
OPTIONS
-D${ANGLE_CPU_BITNESS}=1
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
# File conflict with opengl-registry! Make sure headers are similar on Update!
# angle defines some additional entrypoints.
# opengl-registry probably needs an upstream update to account for those
# Due to that all angle headers get moved to include/angle.
# If you want to use those instead of the onces provided by opengl-registry make sure
# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include
file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include")
file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle")
set(_double_files
include/GLES/egl.h
include/GLES/gl.h
include/GLES/glext.h
include/GLES/glplatform.h
include/GLES2/gl2.h
include/GLES2/gl2ext.h
include/GLES2/gl2platform.h
include/GLES3/gl3.h
include/GLES3/gl31.h
include/GLES3/gl32.h
include/GLES3/gl3platform.h)
foreach(_file ${_double_files})
if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
endif()
endforeach()

View File

@ -0,0 +1,5 @@
Source: antlr4
Version: 4.7.1-3
Homepage: https://www.antlr.org
Description: ANother Tool for Language Recognition
Build-Depends: libuuid (!uwp&!windows&!osx)

View File

@ -0,0 +1,22 @@
diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h
--- c/runtime/src/support/guid.h 2017-07-01 09:51:22.000000000 +0800
+++ d/runtime/src/support/guid.h 2018-09-05 10:16:23.847717700 +0800
@@ -38,7 +38,7 @@
// 16 byte value that can be passed around by value. It also supports
// conversion to string (via the stream operator <<) and conversion from a
// string via constructor.
-class Guid
+class ANTLR4CPP_PUBLIC Guid
{
public:
@@ -90,7 +90,7 @@
// function would no longer be cross-platform if we parameterized the android
// version. Instead, construction of the GuidGenerator may be different on
// each platform, but the use of newGuid is uniform.
-class GuidGenerator
+class ANTLR4CPP_PUBLIC GuidGenerator
{
public:
#ifdef GUID_ANDROID

View File

@ -0,0 +1,28 @@
diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
--- a/runtime/CMakeLists.txt 2017-11-29 09:51:54.000000000 +0800
+++ b/runtime/CMakeLists.txt 2018-08-30 19:06:03.718401800 +0800
@@ -25,7 +25,7 @@
add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
add_library(antlr4_static STATIC ${libantlrcpp_SRC})
-set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here.
+# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here.
message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}")
# make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted.
@@ -63,10 +63,10 @@
set(extra_share_compile_flags "-DANTLR4CPP_EXPORTS")
set(extra_static_compile_flags "-DANTLR4CPP_STATIC")
endif(WIN32)
-if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>")
- target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>")
-endif()
+# if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+# target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>")
+# target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>")
+# endif()
set(static_lib_suffix "")
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

View File

@ -0,0 +1,93 @@
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
include(vcpkg_common_functions)
set(VERSION 4.7.1)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip"
FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip"
SHA512 24d53278db56b199e6787242f22339f74e07d2cd3ed56f851ad905b110c2ba3cb001e1e2fcbc8624f0e93e00ba1fe1b23630dd1a736558c694655aeb1c3129da
)
# license not exist in antlr folder.
vcpkg_download_distfile(LICENSE
URLS https://raw.githubusercontent.com/antlr/antlr4/${VERSION}/LICENSE.txt
FILENAME "antlr4-copyright-${VERSION}"
SHA512 1e8414de5fdc211e3188a8ec3276c6b3c55235f5edaf48522045ae18fa79fd9049719cb8924d25145016f223ac9a178defada1eeb983ccff598a08b0c0f67a3b
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
REF ${VERSION}
PATCHES fixed_build.patch
uuid_discovery_fix.patch
export_guid.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/dist
OPTIONS_RELEASE -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/dist
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/include
)
if (NOT VCPKG_CMAKE_SYSTEM_NAME)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib
${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib
)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/bin/antlr4-runtime.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/debug/bin/antlr4-runtime.dll)
else()
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib
${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll
${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib
${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll
)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib)
endif()
else()
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.a
${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.a
)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so
${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so.${VERSION}
${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so
${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so.${VERSION}
)
else()
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.dylib
${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.${VERSION}.dylib
${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.dylib
${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.${VERSION}.dylib
)
endif()
endif()
file(GLOB HDRS LIST_DIRECTORIES true ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime/*)
file(COPY ${HDRS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime)
vcpkg_copy_pdbs()
file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright)
message(STATUS "Installing done")

View File

@ -0,0 +1,53 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4940c0..978b6ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,8 +38,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- find_package(PkgConfig REQUIRED)
- pkg_check_modules(UUID REQUIRED uuid)
+ find_path(UUID_INCLUDE_DIR uuid/uuid.h)
+ find_library(UUID_LIBRARY NAMES uuid)
+ include_directories(${UUID_INCLUDE_DIR})
+ link_libraries(${UUID_LIBRARY})
endif()
if(APPLE)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
@@ -115,7 +117,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
elseif ( MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800 )
- # Visual Studio 2012+ supports c++11 features
+ # Visual Studio 2012+ supports c++11 features
else ()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif ()
@@ -129,10 +131,10 @@ endif(WITH_DEMO)
if( EXISTS LICENSE.txt)
install(FILES LICENSE.txt
DESTINATION "share/doc/libantlr4")
-elseif(EXISTS ../../LICENSE.txt)
+elseif(EXISTS ../../LICENSE.txt)
install(FILES ../../LICENSE.txt
DESTINATION "share/doc/libantlr4")
endif()
-install(FILES README.md VERSION
+install(FILES README.md VERSION
DESTINATION "share/doc/libantlr4")
diff --git a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp
index b6105d7..5baadb0 100644
--- a/runtime/src/support/guid.cpp
+++ b/runtime/src/support/guid.cpp
@@ -21,7 +21,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-
+#include "antlr4-common.h"
#include "guid.h"
#ifdef GUID_LIBUUID

View File

@ -0,0 +1,3 @@
Source: any-lite
Version: 0.2.0
Description: A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library

View File

@ -0,0 +1,31 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinmoene/any-lite
REF v0.2.0
SHA512 703900d7bac96d41f903b6cabba4bce15ef3cf7ef0a6a66de76230498ededff110e43d68d4a3fd6996869b2edd001f69bd53039a214d06b774ce99518f384a68
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DANY_LITE_OPT_BUILD_TESTS=OFF
-DANY_LITE_OPT_BUILD_EXAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/${PORT}
)
file( REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
file( INSTALL
${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)

View File

@ -0,0 +1,4 @@
Source: anyrpc
Version: 2020-01-13-1
Homepage: https://github.com/sgieseking/anyrpc
Description: A multiprotocol remote procedure call system for C++.

View File

@ -0,0 +1,26 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sgieseking/anyrpc
REF b288617d0ae1d6e227bcda7d3db7db5329fa2322
SHA512 d50ef96ad13f06991e65e9912225b64c1f244bf89b67e4afcddbb18e08a885ec773aea88e1334d6deb73bb3824e916695b3b187b9023368aec3ba21a53dd2830
HEAD_REF master
)
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()

View File

@ -0,0 +1,6 @@
Source: apr-util
Version: 1.6.1
Port-Version: 3
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

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
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()

View File

@ -0,0 +1,83 @@
vcpkg_download_distfile(ARCHIVE
URLS "http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2"
FILENAME "apr-util-1.6.1.tar.bz2"
SHA512 40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d
)
if(VCPKG_TARGET_IS_WINDOWS)
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)
set(APU_DECLARE_EXPORT ON)
set(APU_DECLARE_STATIC OFF)
else()
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)
string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}")
else()
string(REPLACE "defined(APU_DECLARE_STATIC)" "1" APU_H "${APU_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}")
else(VCPKG_TARGET_IS_WINDOWS)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)
# To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure".
# The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C".
# For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content):
# set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu)
# set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake)
# set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET})
# set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache)
if(CONFIGURE_PARAMETER_1)
message(STATUS "Configuring apr-util with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}")
else()
message(STATUS "Configuring apr-util")
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
NO_DEBUG
OPTIONS
"--prefix=${CURRENT_INSTALLED_DIR}"
"--with-apr=${CURRENT_INSTALLED_DIR}/tools/apr"
"--with-openssl=${CURRENT_INSTALLED_DIR}"
"-with-expat=${CURRENT_INSTALLED_DIR}"
"${CONFIGURE_PARAMETER_1}"
"${CONFIGURE_PARAMETER_2}"
"${CONFIGURE_PARAMETER_3}"
)
vcpkg_install_make()
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,124 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ae90b1..71a50b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,16 +21,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
FIND_PACKAGE(OpenSSL)
-FIND_PACKAGE(expat)
-
OPTION(APU_HAVE_CRYPTO "Crypto support" OFF)
OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
OPTION(APR_HAS_LDAP "LDAP support" ON)
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF)
OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF)
-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files")
-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with")
+find_path(APR_INCLUDE_DIR apr.h)
+find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h")
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.")
@@ -61,13 +59,13 @@ IF(APR_HAS_LDAP)
SET(apr_has_ldap_10 1)
ENDIF()
-IF(NOT EXPAT_FOUND)
+find_package(expat)
+set(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
+set(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES})
+IF(NOT XMLLIB_LIBRARIES)
MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!")
ENDIF()
-SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
-SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES})
-
SET(LDAP_LIBRARIES)
IF(APR_HAS_LDAP)
SET(LDAP_LIBRARIES wldap32)
@@ -229,17 +227,21 @@ SET(dbd_drivers)
# Note: The WINNT definition on some targets is used only by libaprutil.rc.
# libaprutil-1 is shared, aprutil-1 is static
+if(BUILD_SHARED_LIBS)
ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc)
SET(install_targets ${install_targets} libaprutil-1)
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb)
TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
-SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT")
+SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT")
+else(BUILD_SHARED_LIBS)
ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED})
SET(install_targets ${install_targets} aprutil-1)
TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC")
+endif(BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
IF(APU_HAVE_CRYPTO)
IF(NOT OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build")
@@ -249,7 +251,7 @@ IF(APU_HAVE_CRYPTO)
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb)
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}")
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT")
- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl")
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl")
TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES})
ENDIF()
@@ -260,8 +262,8 @@ IF(APU_HAVE_ODBC)
SET(dbd_drivers ${dbd_drivers} odbc)
TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32)
SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver)
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT")
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc")
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_IMPORT;APR_DECLARE_IMPORT;APU_DSO_MODULE_BUILD;WINNT")
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_dbd_odbc")
ENDIF()
IF(APR_HAS_LDAP)
@@ -271,11 +273,12 @@ IF(APR_HAS_LDAP)
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb)
TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES})
SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT")
- SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap")
+ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_ldap")
SET(apr_ldap_libraries apr_ldap-1)
ELSE()
SET(apr_ldap_libraries)
ENDIF()
+endif(BUILD_SHARED_LIBS)
IF(APR_BUILD_TESTAPR)
ENABLE_TESTING()
@@ -289,7 +292,7 @@ IF(APR_BUILD_TESTAPR)
${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml
${PROJECT_BINARY_DIR}/data/billion-laughs.xml)
- IF(TEST_STATIC_LIBS)
+ IF(NOT BUILD_SHARED_LIBS)
SET(whichapr aprutil-1)
SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC")
ELSE()
@@ -325,13 +328,9 @@ INSTALL(TARGETS ${install_targets}
ARCHIVE DESTINATION lib
)
-IF(INSTALL_PDB)
- INSTALL(FILES ${install_bin_pdb}
- DESTINATION bin
- CONFIGURATIONS RelWithDebInfo Debug)
-ENDIF()
-
-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include)
+if(NOT DISABLE_INSTALL_HEADERS)
+ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include)
+endif()
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
MESSAGE(STATUS "")

9
vcpkg/ports/apr/CONTROL Normal file
View File

@ -0,0 +1,9 @@
Source: apr
Version: 1.7.0
Port-Version: 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.
Supports: !uwp
Feature: private-headers
Description: Install non-standard files required for building Apache httpd

View File

@ -0,0 +1,91 @@
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
set(VERSION 1.7.0)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2"
FILENAME "apr-${VERSION}.tar.bz2"
SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
private-headers INSTALL_PRIVATE_H
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DINSTALL_PDB=OFF
-DMIN_WINDOWS_VER=Windows7
-DAPR_HAVE_IPV6=ON
-DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H}
${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
# There is no way to suppress installation of the headers in debug builds.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Both dynamic and static are built, so keep only the one needed
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/apr-1.lib
${CURRENT_PACKAGES_DIR}/lib/aprapp-1.lib
${CURRENT_PACKAGES_DIR}/debug/lib/apr-1.lib
${CURRENT_PACKAGES_DIR}/debug/lib/aprapp-1.lib)
else()
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libapr-1.lib
${CURRENT_PACKAGES_DIR}/lib/libaprapp-1.lib
${CURRENT_PACKAGES_DIR}/debug/lib/libapr-1.lib
${CURRENT_PACKAGES_DIR}/debug/lib/libaprapp-1.lib)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_pdbs()
else()
# To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure".
# The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C".
# For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content):
# set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu)
# set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake)
# set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET})
# set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache)
if(CONFIGURE_PARAMETER_1)
message(STATUS "Configuring apr with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}")
else()
message(STATUS "Configuring apr")
endif()
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
NO_DEBUG
OPTIONS
"--prefix=${CURRENT_INSTALLED_DIR}"
"${CONFIGURE_PARAMETER_1}"
"${CONFIGURE_PARAMETER_2}"
"${CONFIGURE_PARAMETER_3}"
)
vcpkg_install_make()
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc
"-lapr-\${APR_MAJOR_VERSION}" "-lapr-1"
)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/lib/pkgconfig/apr-1.pc
"-lapr-\${APR_MAJOR_VERSION}" "-lapr-1"
)
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread rt dl uuid crypt)
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,87 @@
cmake_minimum_required(VERSION 2.8.12)
project(arb C)
set (DEPS mpir mpfr pthreads flint2 gettimeofday)
set (mpir_lib gmp mpir)
set (mpfr_lib mpfr)
set (pthreads_lib pthreads pthread pthreadVC2 pthreadVC3)
set (flint2_lib ${LIBRARY_TYPE}_flint flint)
set (gettimeofday_lib gettimeofday)
set (mpir_header gmp.h)
set (mpfr_header mpfr.h)
set (pthreads_header pthread.h)
set (flint2_header flint/flint.h)
set (gettimeofday_header gettimeofday.h)
foreach (LIB ${DEPS})
string (TOUPPER ${LIB} LIB_UPPER)
find_library(${LIB_UPPER}_LIBRARY NAMES ${${LIB}_lib})
if (NOT ${LIB_UPPER}_LIBRARY)
message(FATAL_ERROR "${LIB} library not found.")
endif()
add_library(${LIB} UNKNOWN IMPORTED)
set_property(TARGET ${LIB} PROPERTY IMPORTED_LOCATION ${${LIB_UPPER}_LIBRARY})
message("${LIB} found in ${${LIB_UPPER}_LIBRARY}")
endforeach ()
foreach (LIB ${DEPS})
string(TOUPPER ${LIB} HEADER_PKG)
set (HEADER ${${LIB}_header})
find_path(${HEADER_PKG}_INCLUDE_DIR NAMES ${HEADER})
if (NOT ${HEADER_PKG}_INCLUDE_DIR)
message(FATAL_ERROR "${HEADER} header not found.")
endif()
message("${HEADER} found in ${${HEADER_PKG}_INCLUDE_DIR}")
set (DEP_INCLUDE_DIRS ${DEP_INCLUDE_DIRS} ${${HEADER_PKG}_INCLUDE_DIR})
endforeach ()
file(GLOB TEMP "*.h")
foreach (TEMP_H ${TEMP})
get_filename_component(FOLDER ${TEMP_H} NAME_WE)
set(FOLDERS ${FOLDERS} ${FOLDER})
endforeach()
foreach (FOLDER ${FOLDERS})
file(GLOB TEMP "${FOLDER}/*.c")
set(SRC ${SRC} ${TEMP})
endforeach ()
include_directories(BEFORE ${arb_SOURCE_DIR})
include_directories(BEFORE ${DEP_INCLUDE_DIRS})
add_library(arb ${SRC})
target_compile_definitions(arb PRIVATE HAVE_TLS=1 FLINT_REENTRANT=0)
target_compile_definitions(arb PRIVATE PTW32_STATIC_LIB)
MESSAGE( STATUS "Building static libraries" )
target_compile_definitions(arb PRIVATE "ARB_BUILD_DLL")
target_link_libraries(arb ${DEPS})
install(TARGETS arb
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
foreach (FOLDER ${FOLDERS})
set(HEADERS ${HEADERS} ${FOLDER}.h)
endforeach ()
install(FILES ${HEADERS} DESTINATION include)
if (BUILD_TESTS)
enable_testing()
foreach (FOLDER ${FOLDERS})
file(GLOB TEMP "${FOLDER}/test/*.c")
foreach (TEST_SOURCE ${TEMP})
get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE)
add_executable(${FOLDER}-${TEST_NAME} ${TEST_SOURCE})
target_link_libraries(${FOLDER}-${TEST_NAME} arb)
add_test(${FOLDER}-${TEST_NAME} ${FOLDER}-${TEST_NAME})
endforeach ()
endforeach ()
endif ()

5
vcpkg/ports/arb/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: arb
Version: 2.17.0
Homepage: https://github.com/fredrik-johansson/arb
Description: a C library for arbitrary-precision interval arithmetic
Build-Depends: flint

Some files were not shown because too many files have changed in this diff Show More