mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-20 16:06:00 -07:00
Initial commit
This commit is contained in:
commit
ccca198c1b
158 changed files with 10389 additions and 0 deletions
286
.gitignore
vendored
Normal file
286
.gitignore
vendored
Normal file
|
@ -0,0 +1,286 @@
|
|||
############################################################
|
||||
# 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
|
||||
|
||||
# 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/
|
||||
|
||||
# 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/
|
||||
buildtrees/
|
||||
downloads/
|
||||
installed/
|
||||
packages/
|
||||
scripts/buildsystems/tmp/
|
||||
*.exe
|
||||
*.zip
|
||||
|
||||
############################################################
|
||||
# vcpkg - End
|
||||
############################################################
|
20
CHANGELOG.md
Normal file
20
CHANGELOG.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
vcpkg (0.0.30)
|
||||
--------------
|
||||
* DLLs are now accompanied with their corresponding PDBs.
|
||||
* Rework removal commands. `vcpkg remove <pkg>` now uninstalls the package. `vcpkg remove --purge <pkg>` now uninstalls and also deletes the package.
|
||||
* Rename option --arch to --triplet.
|
||||
* Extensively rework directory tree layout to make it more intuitive.
|
||||
* Improve post-build verification checks.
|
||||
* Improve post-build verification messages; they are now more compact, more consistent and contain more suggestions on how to resolve the issues found.
|
||||
* Fix `vcpkg integrate project` in cases where the path contained non-alphanumeric chars.
|
||||
* Improve handling of paths. In general, commands with whitespace and non-ascii characters should be handled better now.
|
||||
* Add colorized output for `vcpkg clean` and `vcpkg purge`.
|
||||
* Add colorized output for many more errors.
|
||||
* Improved `vcpkg update` to identify installed libraries that are out of sync with their portfiles.
|
||||
* Added list of example port files to EXAMPLES.md
|
||||
* Rename common CMake utilities to use prefix `vcpkg_`.
|
||||
* [libpng] Fixed x86-uwp and x64-uwp builds.
|
||||
* [libjpeg-turbo] Fixed x86-uwp and x64-uwp builds via suppressing static CRT linkage.
|
||||
* [rapidjson] New library.
|
||||
|
||||
-- vcpkg team <vcpkg@microsoft.com> WED, 18 Sep 2016 20:50:00 -0700
|
25
LICENSE.txt
Normal file
25
LICENSE.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
Port Tree
|
||||
|
||||
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.
|
39
README.md
Normal file
39
README.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Vcpkg
|
||||
|
||||
## Overview
|
||||
Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success.
|
||||
|
||||
For short description of available commands, run `vcpkg help`.
|
||||
|
||||
## Quick Start
|
||||
If there is no `vcpkg.exe` (such as after a `git clone`), run
|
||||
```
|
||||
C:\src\vcpkg> powershell -exec bypass scripts\bootstrap.ps1
|
||||
```
|
||||
Then, to hook up user-wide integration, run (note: requires admin on first use)
|
||||
```
|
||||
C:\src\vcpkg> .\vcpkg integrate install
|
||||
```
|
||||
Finally, install any packages with
|
||||
```
|
||||
C:\src\vcpkg> .\vcpkg install sdl2 curl
|
||||
```
|
||||
|
||||
## Examples
|
||||
See the [`docs\EXAMPLES.md`](docs/EXAMPLES.md) document for specific walkthroughs, including using a package and adding a new package.
|
||||
|
||||
See a 4 mm [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw).
|
||||
|
||||
## Contributing
|
||||
Vcpkg is built with your contributions. Here are some ways you can contribute:
|
||||
|
||||
* [Submit Issues](https://github.com/Microsoft/vcpkg/issues) in vcpkg or existing packages
|
||||
* [Submit Fixes and New Packages](https://github.com/Microsoft/vcpkg/pulls)
|
||||
|
||||
Please refer to our [Contribution guidelines](docs/CONTRIBUTING.md) for more details.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## License
|
||||
|
||||
Code licensed under the [MIT License](LICENSE.txt).
|
33
docs/CONTRIBUTING.md
Normal file
33
docs/CONTRIBUTING.md
Normal 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.
|
269
docs/EXAMPLES.md
Normal file
269
docs/EXAMPLES.md
Normal file
|
@ -0,0 +1,269 @@
|
|||
# Vcpkg
|
||||
|
||||
## Overview
|
||||
Vcpkg helps you get C and C++ libraries on Windows.
|
||||
|
||||
For short description of available commands, run `vcpkg help`.
|
||||
|
||||
## Table of Contents
|
||||
- <a href="#example-1">Example 1: Using the C++ REST SDK</a>
|
||||
- <a href="#example-1-1">Step 1: Build</a>
|
||||
- <a href="#example-1-2">Step 2: Use</a>
|
||||
- <a href="#example-1-2-a">Option A: VS Project (User-wide integration)</a>
|
||||
- <a href="#example-1-2-b">Option B: CMake (Toolchain file)</a>
|
||||
- <a href="#example-1-2-c">Option C: Other buildsystems</a>
|
||||
- <a href="#example-1-2-d">Option D: VS Project (Individual Project integration)</a>
|
||||
- <a href="#example-2">Example 2: Package a remote project (zlib)</a>
|
||||
|
||||
<a name="example-1"></a>
|
||||
## Example 1: C++ REST SDK
|
||||
<a name="example-1-1"></a>
|
||||
### Step 1: Build
|
||||
|
||||
First, we need to know what name C++ REST SDK goes by in the ports tree. To do that, we'll run the `search` command and inspect the output:
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg search
|
||||
boost 1.60 Peer-reviewed portable C++ source libraries
|
||||
cpprestsdk 2.8 C++11 JSON, REST, and OAuth library The C++ RES...
|
||||
curl 7.48.0 A library for transferring data with URLs
|
||||
expat 2.1.1 XML parser library written in C
|
||||
freetype 2.6.3 A library to render fonts.
|
||||
glew 1.13.0 The OpenGL Extension Wrangler Library (GLEW) is a...
|
||||
glfw3 3.1.2 GLFW is a free, Open Source, multi-platform libra...
|
||||
libjpeg-turbo 1.4.90-1 libjpeg-turbo is a JPEG image codec that uses SIM...
|
||||
libpng 1.6.24-1 libpng is a library implementing an interface for...
|
||||
libuv 1.9.1 libuv is a multi-platform support library with a ...
|
||||
libwebsockets 2.0.0 Libwebsockets is a lightweight pure C library bui...
|
||||
mpg123 1.23.3 mpg123 is a real time MPEG 1.0/2.0/2.5 audio play...
|
||||
openal-soft 1.17.2 OpenAL Soft is an LGPL-licensed, cross-platform, ...
|
||||
opencv 3.1.0 computer vision library
|
||||
opengl 10.0.10240.0 Open Graphics Library (OpenGL)[3][4][5] is a cros...
|
||||
openssl 1.0.2h OpenSSL is an open source project that provides a...
|
||||
range-v3 0.0.0-1 Range library for C++11/14/17.
|
||||
rapidjson 1.0.2-1 A fast JSON parser/generator for C++ with both SA...
|
||||
sdl2 2.0.4 Simple DirectMedia Layer is a cross-platform deve...
|
||||
sqlite3 3120200 SQLite is a software library that implements a se...
|
||||
tiff 4.0.6 A library that supports the manipulation of TIFF ...
|
||||
tinyxml2 3.0.0 A simple, small, efficient, C++ XML parser
|
||||
zlib 1.2.8 A compression library
|
||||
```
|
||||
Looking at the list, we can see that the port is named "cpprestsdk".
|
||||
|
||||
Installing is then as simple as using the `install` command. Since we haven't built this library before, we'll first see an error message indicating that the control file failed to load, then the port will automatically begin building (and install when completed).
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg install cpprestsdk
|
||||
-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows
|
||||
-- DOWNLOADS=D:/src/vcpkg/downloads
|
||||
-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/cpprestsdk_x86-windows
|
||||
-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/cpprestsdk
|
||||
-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/cpprestsdk/.
|
||||
-- Cloning done
|
||||
-- Adding worktree and patching done
|
||||
-- Configuring x86-windows-rel
|
||||
-- Configuring x86-windows-rel done
|
||||
-- Configuring x86-windows-dbg
|
||||
-- Configuring x86-windows-dbg done
|
||||
-- Build x86-windows-rel
|
||||
-- Build x86-windows-rel done
|
||||
-- Build x86-windows-dbg
|
||||
-- Build x86-windows-dbg done
|
||||
-- Package x86-windows-rel
|
||||
-- Package x86-windows-rel done
|
||||
-- Package x86-windows-dbg
|
||||
-- Package x86-windows-dbg done
|
||||
Package cpprestsdk:x86-windows is installed
|
||||
```
|
||||
In addition to installing, `vcpkg` caches a pristine copy of the built library inside the `packages\` directory (in this case, `packages\cpprestsdk_x86-windows`). This allows you to quickly uninstall and reinstall the library in the future using the `remove` and `install` commands.
|
||||
|
||||
We can check that cpprestsdk was successfully installed for x86 windows desktop by running the `list` command.
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg list
|
||||
cpprestsdk:x86-windows 2.8 A modern C++11 library to connect with web servic...
|
||||
```
|
||||
|
||||
To install for other architectures and platforms such as Universal Windows Platform or x64 Desktop, you can suffix the package name with `:<target>`.
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg install cpprestsdk:x86-uwp zlib:x64-windows
|
||||
```
|
||||
|
||||
See `vcpkg help arch` for all supported targets.
|
||||
|
||||
<a name="example-1-2"></a>
|
||||
### Step 2: Use
|
||||
<a name="example-1-2-a"></a>
|
||||
#### Option A: VS Project (User-wide integration)
|
||||
|
||||
The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will require administrator access the first time it is used on a given machine. After the first use, administrator access is no longer required and the integration is on a per-user basis.
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg integrate install
|
||||
Applied user-wide integration for this vcpkg root.
|
||||
|
||||
All C++ projects can now #include any installed libraries.
|
||||
Linking will be handled automatically.
|
||||
Installing new libraries will make them instantly available.
|
||||
```
|
||||
*Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.*
|
||||
|
||||
To remove the integration for your user, you can use `vcpkg integrate remove`.
|
||||
|
||||
<a name="example-1-2-b"></a>
|
||||
#### Option B: CMake (Toolchain File)
|
||||
|
||||
The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`.
|
||||
|
||||
Let's first make a simple CMake project with a main file.
|
||||
```cmake
|
||||
# CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(test)
|
||||
|
||||
find_library(CPPREST_LIBRARY cpprest_2_8)
|
||||
find_path(CPPREST_INCLUDE_DIR cpprest/version.h)
|
||||
|
||||
include_directories(${CPPREST_INCLUDE_DIR})
|
||||
link_libraries(${CPPREST_LIBRARY})
|
||||
add_executable(main main.cpp)
|
||||
```
|
||||
```cpp
|
||||
// main.cpp
|
||||
#include <cpprest/json.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
auto v = web::json::value::parse(U("[1,2,3,4]"));
|
||||
printf("Success\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
Then, we build our project in the normal CMake way:
|
||||
```
|
||||
PS D:\src\cmake-test> mkdir build
|
||||
PS D:\src\cmake-test> cd build
|
||||
PS D:\src\cmake-test\build> cmake .. "-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake"
|
||||
// omitted CMake output here //
|
||||
-- Build files have been written to: D:/src/cmake-test/build
|
||||
PS D:\src\cmake-test\build> cmake --build .
|
||||
// omitted MSBuild output here //
|
||||
Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)
|
||||
|
||||
Time Elapsed 00:00:02.38
|
||||
PS D:\src\cmake-test\build> .\Debug\main.exe
|
||||
Success
|
||||
```
|
||||
|
||||
<a name="example-1-2-c"></a>
|
||||
#### Option C: Other buildsystems
|
||||
|
||||
Libraries are installed into the `installed\` subfolder, partitioned by architecture (e.g. x86-windows):
|
||||
* The header files are installed to `installed\x86-windows\include`
|
||||
* Release `.lib` files are installed to `installed\x86-windows\lib`
|
||||
* Release `.dll` files are installed to `installed\x86-windows\bin`
|
||||
* Debug `.lib` files are installed to `installed\x86-windows\debug\lib`
|
||||
* Debug `.dll` files are installed to `installed\x86-windows\debug\bin`
|
||||
|
||||
See your build system specific documentation for how to use prebuilt binaries.
|
||||
|
||||
Generally, to run any produced executables you will also need to either copy the needed `dll` files to the same folder as your `exe` or *prepend* the correct `bin` directory to your path.
|
||||
|
||||
Example for setting the path for debug mode in powershell:
|
||||
```
|
||||
PS D:\src\vcpkg> $env:path = "D:\src\vcpkg\installed\x86-windows\debug\bin;" + $env:path
|
||||
```
|
||||
<a name="example-1-2-d"></a>
|
||||
#### Option D: VS Project (Individual Project integration)
|
||||
|
||||
We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects.
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg integrate project
|
||||
Created nupkg: D:\src\vcpkg\scripts\buildsystems\vcpkg.D.src.vcpkg.1.0.0.nupkg
|
||||
|
||||
With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste:
|
||||
Install-Package vcpkg.D.src.vcpkg -Source "D:/src/vcpkg/scripts/buildsystems"
|
||||
```
|
||||
*Note: The generated NuGet package does not contain the actual libraries. It instead acts like a shortcut (or symlink) to the vcpkg install and will "automatically" update with any changes (install/remove) to the libraries. You do not need to regenerate or update the NuGet package.*
|
||||
|
||||
<a name="example-2"></a>
|
||||
## Example 2: Package a remote project (zlib)
|
||||
|
||||
### Bootstrap with `create`
|
||||
First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors.
|
||||
|
||||
*Looking at zlib's website, the URL http://zlib.net/zlib128.zip looks appropriate.*
|
||||
|
||||
Second, determine a suitable package name. This should be ASCII, lowercase, and recognizable to someone who knows the library's "human name". If the library is already packaged in another package manager, prefer that name.
|
||||
|
||||
*Since zlib is already packaged as zlib, we will use the name zlib2 for this example.*
|
||||
|
||||
Finally, if the server's name for the archive is not very descriptive (such as downloading a zipped commit or branch from GitHub), choose a nice archive name of the form `<packagename>-<version>.zip`.
|
||||
|
||||
*`zlib128.zip` is a fine name, so no change needed.*
|
||||
|
||||
All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\<packagename>`.
|
||||
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib128.zip zlib128.zip
|
||||
-- Generated portfile: D:/src/vcpkg/ports/zlib2/portfile.cmake
|
||||
```
|
||||
|
||||
### Create the CONTROL file
|
||||
In addition to the generated `ports\<package>\portfile.cmake`, We also need a `ports\<package>\CONTROL` file. This file is a simply formatted set of fields describing the package's metadata.
|
||||
|
||||
*For zlib2, we'll create the file `ports\zlib2\CONTROL` with the following contents:*
|
||||
```
|
||||
Source: zlib2
|
||||
Version: 1.2.8
|
||||
Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library
|
||||
```
|
||||
|
||||
### Tweak the generated portfile
|
||||
The generated `portfile.cmake` will need some editing to correctly package most libraries in the wild, however we can start by trying out the build.
|
||||
|
||||
```
|
||||
PS D:\src\vcpkg> .\vcpkg build zlib2
|
||||
-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows
|
||||
-- DOWNLOADS=D:/src/vcpkg/downloads
|
||||
-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/zlib2_x86-windows
|
||||
-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/zlib2
|
||||
-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2
|
||||
-- Using cached D:/src/vcpkg/downloads/zlib128.zip
|
||||
-- Extracting source D:/src/vcpkg/downloads/zlib128.zip
|
||||
-- Extracting done
|
||||
-- Configuring x86-windows-rel
|
||||
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:13 (message):
|
||||
Command failed: C:/Program Files
|
||||
(x86)/CMake/bin/cmake.exe;D:/src/vcpkg/buildtrees/zlib2/src/zlib128;-G;Ninja;-DCMAKE_VERBOSE_MAKEFILE=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=D:/src/vcpkg/triplets/x86-windows.cmake;-DCMAKE_PREFIX_PATH=D:/src/vcpkg/installed/x86-windows;-
|
||||
DCMAKE_INSTALL_PREFIX=D:/src/vcpkg/packages/zlib2_x86-windows
|
||||
|
||||
|
||||
Working Directory: D:/src/vcpkg/buildtrees/zlib2/x86-windows-rel
|
||||
|
||||
See logs for more information:
|
||||
|
||||
D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-out.log
|
||||
D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-err.log
|
||||
|
||||
Call Stack (most recent call first):
|
||||
scripts/cmake/vcpkg_configure_cmake.cmake:15 (vcpkg_execute_required_process)
|
||||
ports/zlib2/portfile.cmake:8 (vcpkg_configure_cmake)
|
||||
scripts/ports.cmake:105 (include)
|
||||
scripts/ports.cmake:184 (build)
|
||||
```
|
||||
|
||||
At this point, it is a matter of reading the error messages and log files while steadily improving the quality of the portfile. Zlib required providing a discrete copy of the LICENSE to copy into the package, suppressing the build and installation of executables and headers, and removing the static libraries after they were installed.
|
||||
|
||||
### Suggested example portfiles
|
||||
In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake.
|
||||
|
||||
- Header only libraries
|
||||
- rapidjson
|
||||
- range-v3
|
||||
- MSBuild-based
|
||||
- mpg123
|
||||
- glew
|
||||
- Non-CMake, custom buildsystem
|
||||
- openssl
|
||||
- boost
|
206
docs/EXAMPLE_fix_libpng.md
Normal file
206
docs/EXAMPLE_fix_libpng.md
Normal file
|
@ -0,0 +1,206 @@
|
|||
Fixing libpng:x86-uwp
|
||||
=====================
|
||||
|
||||
First, try building:
|
||||
|
||||
```
|
||||
PS D:\src\cpp-packages> vcpkg install libpng:x86-uwp
|
||||
-- SYSROOT=D:/src/cpp-packages/sysroot/x86-uwp
|
||||
-- DISTDIR=D:/src/cpp-packages/distdir
|
||||
-- CURRENT_SOFTWARE_DIR=D:/src/cpp-packages/software/libpng_x86-uwp
|
||||
-- CURRENT_WORKSRC_DIR=D:/src/cpp-packages/worksrc/libpng
|
||||
-- CURRENT_PORT_DIR=D:/src/cpp-packages/ports/libpng/.
|
||||
-- Using cached D:/src/cpp-packages/distdir/libpng-1.6.24.tar.xz
|
||||
-- Extracting done
|
||||
-- Configuring x86-uwp-rel
|
||||
-- Configuring x86-uwp-rel done
|
||||
-- Configuring x86-uwp-dbg
|
||||
-- Configuring x86-uwp-dbg done
|
||||
-- Build x86-uwp-rel
|
||||
CMake Error at scripts/cmake/execute_required_process.cmake:14 (message):
|
||||
Command failed: C:/Program
|
||||
Files/CMake/bin/cmake.exe;--build;.;--config;Release
|
||||
|
||||
Working Directory: D:/src/cpp-packages/worksrc/libpng/x86-uwp-rel
|
||||
|
||||
See logs for more information:
|
||||
|
||||
D:\src\cpp-packages\worksrc\libpng\build-x86-uwp-rel-out.log
|
||||
D:\src\cpp-packages\worksrc\libpng\build-x86-uwp-rel-err.log
|
||||
|
||||
Call Stack (most recent call first):
|
||||
scripts/cmake/build_standard_cmake.cmake:3 (execute_required_process)
|
||||
ports/libpng/portfile.cmake:22 (build_standard_cmake)
|
||||
scripts/ports.cmake:84 (include)
|
||||
|
||||
|
||||
Error: build command failed
|
||||
```
|
||||
|
||||
Next, looking at the above logs (build-...-out.log and build-...-err.log).
|
||||
|
||||
```
|
||||
// build-x86-uwp-rel-out.log
|
||||
...
|
||||
"D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) ->
|
||||
"D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) ->
|
||||
(ClCompile target) ->
|
||||
D:\src\cpp-packages\worksrc\libpng\src\libpng-1.6.24\pngerror.c(775): warning C4013: 'ExitProcess' undefined; assuming extern returning int [D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\png.vcxproj]
|
||||
|
||||
|
||||
"D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) ->
|
||||
"D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) ->
|
||||
(Link target) ->
|
||||
pngerror.obj : error LNK2019: unresolved external symbol _ExitProcess referenced in function _png_longjmp [D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\png.vcxproj]
|
||||
D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\Release\libpng16.dll : fatal error LNK1120: 1 unresolved externals [D:\src\cpp-packages\worksrc\libpng\x86-uwp-rel\png.vcxproj]
|
||||
|
||||
1 Warning(s)
|
||||
2 Error(s)
|
||||
|
||||
Time Elapsed 00:00:04.19
|
||||
```
|
||||
Taking a look at [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx) shows that `ExitProcess` is only available for desktop apps. Additionally, it's useful to see the surrounding context:
|
||||
|
||||
```c
|
||||
/* worksrc\libpng\src\libpng-1.6.24\pngerror.c:769 */
|
||||
/* If control reaches this point, png_longjmp() must not return. The only
|
||||
* choice is to terminate the whole process (or maybe the thread); to do
|
||||
* this the ANSI-C abort() function is used unless a different method is
|
||||
* implemented by overriding the default configuration setting for
|
||||
* PNG_ABORT().
|
||||
*/
|
||||
PNG_ABORT();
|
||||
```
|
||||
|
||||
A recursive search for `PNG_ABORT` reveals the definition:
|
||||
```
|
||||
PS D:\src\cpp-packages\worksrc\libpng\src\libpng-1.6.24> findstr /snipl "PNG_ABORT" *
|
||||
CHANGES:701: Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros
|
||||
libpng-manual.txt:432:errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||
libpng-manual.txt:434:You can #define PNG_ABORT() to a function that does something
|
||||
libpng-manual.txt:2753:errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||
libpng-manual.txt:2755:You can #define PNG_ABORT() to a function that does something
|
||||
libpng-manual.txt:4226:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
|
||||
libpng.3:942:errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||
libpng.3:944:You can #define PNG_ABORT() to a function that does something
|
||||
libpng.3:3263:errors will result in a call to PNG_ABORT() which defaults to abort().
|
||||
libpng.3:3265:You can #define PNG_ABORT() to a function that does something
|
||||
libpng.3:4736:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
|
||||
png.h:994: * will use it; otherwise it will call PNG_ABORT(). This function was
|
||||
pngerror.c:773: * PNG_ABORT().
|
||||
pngerror.c:775: PNG_ABORT();
|
||||
pngpriv.h:459:#ifndef PNG_ABORT
|
||||
pngpriv.h:461:# define PNG_ABORT() ExitProcess(0)
|
||||
pngpriv.h:463:# define PNG_ABORT() abort()
|
||||
```
|
||||
|
||||
This already gives us some great clues, but the full definition tells the complete story.
|
||||
|
||||
```c
|
||||
/* worksrc\libpng\src\libpng-1.6.24\pngpriv.h:459 */
|
||||
#ifndef PNG_ABORT
|
||||
# ifdef _WINDOWS_
|
||||
# define PNG_ABORT() ExitProcess(0)
|
||||
# else
|
||||
# define PNG_ABORT() abort()
|
||||
# endif
|
||||
#endif
|
||||
```
|
||||
|
||||
`abort()` is a standard CRT call and certainly available in UWP, so we just need to convince libpng to be more platform agnostic. The easiest and most reliable way to achive is to patch the code; while in this particular case we could pass in a compiler flag to override `PNG_ABORT` because this is a private header, in general it is more reliable to avoid adding more required compiler switches when possible (especially when it isn't already exposed as a CMake option).
|
||||
|
||||
I recommend using git to create the patch file, since you'll already have it installed.
|
||||
```
|
||||
PS D:\src\cpp-packages\worksrc\libpng\src\libpng-1.6.24> git init .
|
||||
Initialized empty Git repository in D:/src/cpp-packages/worksrc/libpng/src/libpng-1.6.24/.git/
|
||||
|
||||
PS D:\src\cpp-packages\worksrc\libpng\src\libpng-1.6.24> git add .
|
||||
warning: LF will be replaced by CRLF in ANNOUNCE.
|
||||
The file will have its original line endings in your working directory.
|
||||
...
|
||||
|
||||
PS D:\src\cpp-packages\worksrc\libpng\src\libpng-1.6.24> git commit -m "temp"
|
||||
[master (root-commit) 68f253f] temp
|
||||
422 files changed, 167717 insertions(+)
|
||||
...
|
||||
```
|
||||
|
||||
Now we can modify `pngpriv.h` to use `abort()` everywhere.
|
||||
```c
|
||||
/* worksrc\libpng\src\libpng-1.6.24\pngpriv.h:459 */
|
||||
#ifndef PNG_ABORT
|
||||
# define PNG_ABORT() abort()
|
||||
#endif
|
||||
```
|
||||
|
||||
The output of `git diff` is already in patch format, so we just need to save the patch into the `ports/libpng` directory.
|
||||
```
|
||||
PS worksrc\libpng\src\libpng-1.6.24> git diff | out-file -enc ascii ..\..\..\..\ports\libpng\use-abort-on-all-platforms.patch
|
||||
```
|
||||
|
||||
Finally, we need to apply the patch after extracting the source.
|
||||
```cmake
|
||||
# ports\libpng\portfile.cmake
|
||||
...
|
||||
extract_source_archive(${ARCHIVE})
|
||||
|
||||
find_program(GIT git)
|
||||
execute_required_process(
|
||||
COMMAND ${GIT} init
|
||||
WORKING_DIRECTORY ${CURRENT_WORKSRC_DIR}/src/libpng-1.6.24
|
||||
LOGNAME git-init
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${GIT} apply "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" --ignore-whitespace --whitespace=nowarn
|
||||
WORKING_DIRECTORY ${CURRENT_WORKSRC_DIR}/src/libpng-1.6.24
|
||||
)
|
||||
|
||||
configure_standard_cmake(
|
||||
...
|
||||
```
|
||||
|
||||
To be completely sure this works from the top, we need to clear out all the caches.
|
||||
|
||||
```
|
||||
PS D:\src\cpp-packages> vcpkg remove libpng:x86-uwp
|
||||
Package libpng:x86-uwp was successfully removed
|
||||
PS D:\src\cpp-packages> vcpkg purge libpng:x86-uwp
|
||||
Cleaned up D:\src\cpp-packages\software\libpng_x86-uwp
|
||||
PS D:\src\cpp-packages> vcpkg clean libpng
|
||||
Cleaned up D:\src\cpp-packages\worksrc\libpng
|
||||
```
|
||||
|
||||
Now we try a fresh, from scratch install.
|
||||
```
|
||||
PS D:\src\cpp-packages> vcpkg install libpng:x86-uwp
|
||||
-- SYSROOT=D:/src/cpp-packages/sysroot/x86-uwp
|
||||
-- DISTDIR=D:/src/cpp-packages/distdir
|
||||
-- CURRENT_SOFTWARE_DIR=D:/src/cpp-packages/software/libpng_x86-uwp
|
||||
-- CURRENT_WORKSRC_DIR=D:/src/cpp-packages/worksrc/libpng
|
||||
-- CURRENT_PORT_DIR=D:/src/cpp-packages/ports/libpng/.
|
||||
-- Using cached D:/src/cpp-packages/distdir/libpng-1.6.24.tar.xz
|
||||
-- Extracting source D:/src/cpp-packages/distdir/libpng-1.6.24.tar.xz
|
||||
-- Extracting done
|
||||
-- Configuring x86-uwp-rel
|
||||
-- Configuring x86-uwp-rel done
|
||||
-- Configuring x86-uwp-dbg
|
||||
-- Configuring x86-uwp-dbg done
|
||||
-- Build x86-uwp-rel
|
||||
-- Build x86-uwp-rel done
|
||||
-- Build x86-uwp-dbg
|
||||
-- Build x86-uwp-dbg done
|
||||
-- Package x86-uwp-rel
|
||||
-- Package x86-uwp-rel done
|
||||
-- Package x86-uwp-dbg
|
||||
-- Package x86-uwp-dbg done
|
||||
Package libpng:x86-uwp is installed
|
||||
```
|
||||
|
||||
Finally, to fully commit and publish the changes, we need to bump the internal release number and add the patch file to source control.
|
||||
|
||||
```
|
||||
# ports\libpng\CONTROL
|
||||
Source: libpng
|
||||
Version: 1.6.24-1
|
||||
Build-Depends: zlib
|
||||
```
|
90
docs/FAQ.md
Normal file
90
docs/FAQ.md
Normal file
|
@ -0,0 +1,90 @@
|
|||
# Frequently Asked Questions: Vcpkg
|
||||
|
||||
Vcpkg is a tool to acquire C++ open source library and rebuild them on Windows.
|
||||
|
||||
## Can I contribute a new library?
|
||||
Yes! Start out by reading our [contribution guidelines](CONTRIBUTING.md).
|
||||
|
||||
## Can Vcpkg create pre-built binary packages? What is the binary format used by Vcpkg?
|
||||
In the preview release, we do not have a supported way to distribute individual binary packages. This avoids the issue of trying to use a specific pre-built package against differently built dependencies. As such, we have also not specified a stable format for the built library packages.
|
||||
|
||||
We instead recommend copying the entire system as a whole (which ensures that every package and its dependencies stay in sync with each other).
|
||||
|
||||
## How will the libs will be updated locally?
|
||||
The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command.
|
||||
|
||||
## Can I build a private library with this tool?
|
||||
Yes. Follow [Example #2](EXAMPLES.md#example-2) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code.
|
||||
|
||||
## Can I use a prebuilt private library with this tool?
|
||||
Yes. The `portfile.cmake` for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the `${CURRENT_PACKAGES_DIR}`, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files.
|
||||
|
||||
To see an example of this, look at the [`opengl`](../ports/opengl/portfile.cmake) package which simply copies files out of the Windows SDK.
|
||||
|
||||
## Which platforms I can target with Vcpkg?
|
||||
We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list.
|
||||
|
||||
## Does `vcpkg.exe` run on Linux/OSX?
|
||||
No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in an [issue](https://github.com/microsoft/vcpkg/issues).
|
||||
|
||||
## How do I use different versions of a library on one machine?
|
||||
Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). This is because a package in Vcpkg corresponds to the `X-dev` or `X-devel` packages in other system package managers.
|
||||
|
||||
To use different versions of a library (for different projects), we recommend making separate instances of Vcpkg and using the [per-project integration mechanisms](EXAMPLES.md#example-1-2-d). The versions of each library are specified by the files in `ports\`, so they are easily manipulated using standard VCS techniques. This makes it very easy to roll back the entire set of libraries to a consistent set of older versions which all work with each other. If you need to then pin a specific library forward, that is as easy as checking out the appropriate version of `ports\package\`.
|
||||
|
||||
If your application is very sensitive to the versions of libraries, we recommend checking in the specific set of portfiles you need into your source control along with your project sources and using the `--vcpkg-root` option to redirect the working directory of `vcpkg.exe`.
|
||||
|
||||
## How does Vcpkg protect my Privacy?
|
||||
See the [Privacy document](PRIVACY.md) for all information regarding privacy.
|
||||
|
||||
## Can I use my own CMake toolchain file with Vcpkg's toolchain file?
|
||||
Yes. If you already have a CMake toolchain file, you will need to include our toolchain file at the end of yours. This should be as simple as an `include(<vcpkg_root>\scripts\buildsystems\vcpkg.cmake)` directive. Alternatively, you could copy the contents of our `scripts\buildsystems\vcpkg.cmake` into the end of your existing toolchain file.
|
||||
|
||||
## Can I use my own/specific flags for rebuilding libs?
|
||||
Yes. In the current preview, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you'd like.
|
||||
|
||||
By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used.
|
||||
|
||||
## How is CMake used internally by Vcpkg?
|
||||
Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows (does not require system-wide installation) and reasonably legible for unfamiliar users.
|
||||
|
||||
## How does my list of libraries get updated?
|
||||
The list of libraries is enumerated from the `ports\` directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company (see [Example #2](EXAMPLES.md#example-2)).
|
||||
|
||||
We recommend cloning directly from [GitHub](https://github.com/microsoft/vcpkg) and using `git pull` to update the list of portfiles. Once you've updated your portfiles, `vcpkg update` will indicate any installed libraries that are now out of date.
|
||||
|
||||
## Will it support also downloading compiled binaries from a public or private server?
|
||||
We do plan to eventually support downloading precompiled binaries, similar to other systems package managers.
|
||||
|
||||
In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host.
|
||||
|
||||
## What Visual C++ toolsets are supported?
|
||||
We plan to only support Visual Studio 2015 and above.
|
||||
|
||||
## Can I acquire my package's sources by Git url+tag?
|
||||
Yes, however we prefer compressed archives of the specific release/commit since the internal downloads and build trees are meant to be read only. Github provides archives for every commit, tag, and branch, so it's always possible to perform this substitution for repositories hosted there.
|
||||
|
||||
See `ports\cpprestsdk\portfile.cmake` and `ports\opencv\portfile.cmake` for examples of using git directly.
|
||||
|
||||
## Why not NuGet?
|
||||
NuGet is a package manager for .NET libraries with a strong dependency on MSBuild. It does not meet the specific needs of Native C++ customers in at least three ways.
|
||||
|
||||
- **Compilation Flavors**. With so many possible combinations of compilation options, the task of providing a truly complete set of options is intrinsicly impossible. Furthermore, the download size for reasonably complete binary packages becomes enormous. This makes it a requirement to split the results into multiple packages, but then searching becomes very difficult.
|
||||
|
||||
- **Binary vs Source**. Very closely tied to the first point, NuGet is designed from the ground up to provide relatively small, prebuilt binaries. Due to the nature of native code, developers need to have access to the source code to ensure ABI compatibility, performance, integrity, and debuggability.
|
||||
|
||||
- **Per-dll vs Per-application**. NuGet is highly project centric. This works well in managed languages with naturally stable ABIs, because base libraries can continue to evolve without breaking those higher up. However, in native languages where the ABI is much more fragile, the only robust strategy is to explicitly build each library against the exact dependencies that will be included in the final application. This is difficult to ensure in NuGet and leads to a highly disconnected and independently versioned ecosystem.
|
||||
|
||||
## Why not Conan?
|
||||
Conan.io is a publicly-federated, project-centric, cross-platform, C++ package manager written in python. Our primary differences are:
|
||||
|
||||
- **Public federation vs private federation**. Conan relies on individuals publishing independent copies of each package. We believe this approach encourages a large number of packages that are all broken in different ways. We believe it is a waste of user's time to pick through the list of 20+ public packages for Boost 1.56 to determine the handful that will work for their particular situation. In contrast, we believe there should be a single, collaboratively maintained version which works for the vast majority of cases and allow users to hack freely on their private versions. We believe this will result in a set of high quality packages that are heavily tested with each other and form a fantastic base for any private modifications you need.
|
||||
|
||||
- **Per-dll vs Per-application**. When dependencies are independently versioned on a library level, it encourages every build environment to be a completely unique, unable to take advantage of or contribute to a solid, well tested ecosystem. In contrast, by versioning all libraries together as a platform (similar to a system package manager), we hope to congregate testing and effort on very common sets of library versions to maximize the quality and stability of the ecosystem. This also completely designs out the ability for a library to ask for versions that conflict with the application's choices (I want openssl Z and boost X but X only works with openssl Y).
|
||||
|
||||
- **Cross-platform vs single-platform**. While being hosted on many platforms is an excellent north star, we believe the level of system integration and stability provided by apt-get, yum, and homebrew is well worth needing to exchange `apt-get install libboost-all-dev` with `brew install boost` in automated scripts. We chose to make our system as easy as possible to integrate into a world with these very successful system managers -- one more line for `vcpkg install boost` -- instead of attempting to replace them where they are already so successful and well-loved.
|
||||
|
||||
- **C++/CMake vs python**. While Python is an excellent language loved by many, we believe that transparency and familiarity are the most important factors when choosing a tool as important to your workflow as a package manager. Consequently, we chose to make the implementation languages be as universally accepted as possible: C++ should be used in a C++ package manager for C++ programmers. You should not be required to learn another language just to understand your package manager.
|
||||
|
||||
## Why not Chocolatey?
|
||||
Chocolatey is an excellent system for distributing desktop utilities. However, it is not designed to acquire redistributable developer assets and help you with debugging. Vcpkg, in comparison, is designed to get you the libraries you need to build your application and help you deliver through any platform you'd like (including Chocolatey!).
|
48
docs/PRIVACY.md
Normal file
48
docs/PRIVACY.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
|
||||
# Privacy document for vcpkg
|
||||
|
||||
|
||||
## Do you collect telemetry data? What is it used for?
|
||||
|
||||
We do collect telemetry data from usage of "vcpkg.exe". We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries.
|
||||
We use this information to understand the usage the issue and what we can do to improve the tool.
|
||||
|
||||
|
||||
## What telemetry is collected?
|
||||
|
||||
We collect the command line used, the time of invocation, and how long the command took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. For this preview, we do not offer a mechanism to disable this data collection since it is critical for improving the product. In the full release, you will be able to opt-out with a simple configuration. For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy.
|
||||
|
||||
Here is an example of an event for the command line "vcpkg install zlib":
|
||||
```
|
||||
[{
|
||||
"ver": 1,
|
||||
"name": "Microsoft.ApplicationInsights.Event",
|
||||
"time": "2016-09-01T00:19:10.949Z",
|
||||
"sampleRate": 100.000000,
|
||||
"seq": "0:0",
|
||||
"iKey": "aaaaaaaa-4393-4dd9-ab8e-97e8fe6d7603",
|
||||
"flags": 0.000000,
|
||||
"tags": {
|
||||
"ai.device.os": "Windows",
|
||||
"ai.device.osVersion": "10.0.14912",
|
||||
"ai.session.id": "aaaaaaaa-7c69-4b83-7d82-8a4198d7e88d",
|
||||
"ai.user.id": "aaaaaaaa-c9ab-4bf5-0847-a3455f539754",
|
||||
"ai.user.accountAcquisitionDate": "2016-08-20T00:38:09.860Z"
|
||||
},
|
||||
"data": {
|
||||
"baseType": "EventData",
|
||||
"baseData": {
|
||||
"ver": 2,
|
||||
"name": "commandline_test7",
|
||||
"properties": { "version":"0.0.30-9b4e44a693459c0a618f370681f837de6dd95a30","cmdline":"install zlib","command":"install","installplan":"zlib:x86-windows" },
|
||||
"measurements": { "elapsed_us":68064.355736 }
|
||||
}
|
||||
}
|
||||
}]
|
||||
```
|
||||
In the source code (included in every release), you can search for calls to the functions "TrackProperty" and "TrackMetric" to see every specific data point we collect.
|
||||
|
||||
|
||||
## Is the data stored on my system?
|
||||
|
||||
We store each event document in your temporary files directory. These will be cleaned out whenever you clear your temporary files.
|
3
docs/ROADMAP.md
Normal file
3
docs/ROADMAP.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Roadmap
|
||||
|
||||
|
3
ports/boost/CONTROL
Normal file
3
ports/boost/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: boost
|
||||
Version: 1.60
|
||||
Description: Peer-reviewed portable C++ source libraries
|
93
ports/boost/portfile.cmake
Normal file
93
ports/boost/portfile.cmake
Normal file
|
@ -0,0 +1,93 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.bz2"
|
||||
FILENAME "boost_1_60_0.tar.bz2"
|
||||
MD5 65a840e1a0b13a558ff19eeb2c4f0cbe
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe)
|
||||
message(STATUS "Bootstrapping")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/bootstrap.bat"
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
|
||||
LOGNAME bootstrap
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Bootstrapping done")
|
||||
|
||||
set(B2_OPTIONS
|
||||
--toolset=msvc
|
||||
-j$ENV{NUMBER_OF_PROCESSORS}
|
||||
-q
|
||||
--without-python
|
||||
threading=multi
|
||||
link=shared
|
||||
runtime-link=shared
|
||||
--debug-configuration
|
||||
)
|
||||
if(TRIPLET_SYSTEM_ARCH MATCHES "x64")
|
||||
list(APPEND B2_OPTIONS address-model=64)
|
||||
endif()
|
||||
if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
|
||||
list(APPEND B2_OPTIONS windows-api=store)
|
||||
set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe"
|
||||
--stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage
|
||||
--build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
${B2_OPTIONS}
|
||||
variant=release
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/b2.exe"
|
||||
--stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage
|
||||
--build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
${B2_OPTIONS}
|
||||
variant=debug
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0
|
||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
message(STATUS "Packaging headers")
|
||||
file(
|
||||
COPY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/boost
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
PATTERN "config/user.hpp" EXCLUDE
|
||||
)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/boost/config/user.hpp
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/boost/config/
|
||||
)
|
||||
file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp
|
||||
"\n#define BOOST_ALL_DYN_LINK\n"
|
||||
)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/boost_1_60_0/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright)
|
||||
message(STATUS "Packaging headers done")
|
||||
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET}-rel")
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
FILES_MATCHING PATTERN "*.lib")
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
FILES_MATCHING PATTERN "*.dll")
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg")
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
FILES_MATCHING PATTERN "*.lib")
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
FILES_MATCHING PATTERN "*.dll")
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
vcpkg_copy_pdbs()
|
10
ports/boost/user-config.jam
Normal file
10
ports/boost/user-config.jam
Normal file
|
@ -0,0 +1,10 @@
|
|||
using msvc : 14.0 : :
|
||||
<compileflags>"\"/AIC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\store\\references\""
|
||||
<linkflags>/appcontainer
|
||||
<linkflags>/nodefaultlibs
|
||||
<linkflags>WindowsApp.lib
|
||||
<variant>release:<linkflags>vcruntime.lib
|
||||
<variant>debug:<linkflags>vcruntimed.lib
|
||||
<variant>release:<linkflags>ucrt.lib
|
||||
<variant>debug:<linkflags>ucrtd.lib
|
||||
;
|
47
ports/cocos2d/portfile.cmake
Normal file
47
ports/cocos2d/portfile.cmake
Normal file
|
@ -0,0 +1,47 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "https://github.com/cocos2d/cocos2d-x/archive/cocos2d-x-3.10.tar.gz"
|
||||
FILENAME "cocos2d-x-3.10.tar.gz"
|
||||
MD5 7c67068675ad28374448e844b0e463ff
|
||||
)
|
||||
vcpkg_download_distfile(DEPS_ARCHIVE_FILE
|
||||
URL "https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-79.zip"
|
||||
FILENAME "cocos2d-x-v3-deps-79.zip"
|
||||
MD5 5d88ff867205080b9ee8da532437e891
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10/external/unzip)
|
||||
message(STATUS "Extracting dependencies ${DEPS_ARCHIVE_FILE}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/deps)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${DEPS_ARCHIVE_FILE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/deps
|
||||
LOGNAME extract-deps
|
||||
)
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10/external)
|
||||
file(RENAME ${CURRENT_BUILDTREES_DIR}/deps/cocos2d-x-3rd-party-libs-bin-3-deps-79 ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10/external)
|
||||
endif()
|
||||
message(STATUS "Extracting dependencies done")
|
||||
|
||||
file(REMOVE ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10/cmake/Modules/FindGLFW3.cmake)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10
|
||||
OPTIONS
|
||||
-DUSE_CHIPMUNK=OFF
|
||||
-DUSE_BOX2D=OFF
|
||||
-DUSE_BULLET=OFF
|
||||
-DUSE_RECAST=OFF
|
||||
-DUSE_WEBP=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DUSE_PREBUILT_LIBS=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/cocos2d-x-cocos2d-x-3.10/licenses/LICENSE_cocos2d-x.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cocos2d-x RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
From cc9d3ca4d1d16134a1976b89b58b11372a2798d5 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Wed, 4 May 2016 21:37:23 -0700
|
||||
Subject: [PATCH] Use find_package on Windows. Enable 'install' target for all
|
||||
systems.
|
||||
|
||||
---
|
||||
Release/CMakeLists.txt | 48 ++++++++++++++--------------------------------
|
||||
Release/src/CMakeLists.txt | 13 +++++++------
|
||||
2 files changed, 21 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
|
||||
index cbe840b..3045948 100644
|
||||
--- a/Release/CMakeLists.txt
|
||||
+++ b/Release/CMakeLists.txt
|
||||
@@ -89,15 +89,6 @@ elseif(UNIX) # This includes OSX
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
|
||||
option(BUILD_SAMPLES "Build samples." ON)
|
||||
- option(CASA_INSTALL_HEADERS "Install header files." ON)
|
||||
- if(CASA_INSTALL_HEADERS)
|
||||
- file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat)
|
||||
- install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
|
||||
- file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
|
||||
- install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
|
||||
- file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat)
|
||||
- install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
|
||||
- endif()
|
||||
elseif(WIN32)
|
||||
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
|
||||
option(BUILD_SAMPLES "Build samples." ON)
|
||||
@@ -114,36 +105,25 @@ elseif(WIN32)
|
||||
endif()
|
||||
add_definitions(${Casablanca_DEFINITIONS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -DWIN32)
|
||||
|
||||
- if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
|
||||
- set(NUGET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../packages")
|
||||
- set(PACKAGE_PATHS)
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost.1.58.0.0/")
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_system-vc140.1.58.0-vs140rc/")
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_date_time-vc140.1.58.0-vs140rc/")
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_regex-vc140.1.58.0-vs140rc/")
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/")
|
||||
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/zlib.v140.windesktop.msvcstl.static.rt-dyn.1.2.8.8/")
|
||||
-
|
||||
- if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
|
||||
- find_library(Boost_SYSTEM_LIBRARY libboost_system-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
|
||||
- find_library(Boost_DATE_TIME_LIBRARY libboost_date_time-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
|
||||
- find_library(Boost_REGEX_LIBRARY libboost_regex-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
|
||||
- set(Boost_LIBRARIES ${Boost_REGEX_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
|
||||
-
|
||||
- find_library(OpenSSL_libeay_LIBRARY libeay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
|
||||
- find_library(OpenSSL_ssleay_LIBRARY ssleay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
|
||||
- find_library(ZLIB_LIBRARY zlibstaticd.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
|
||||
- set(OPENSSL_LIBRARIES ${OpenSSL_ssleay_LIBRARY} ${OpenSSL_libeay_LIBRARY} ${ZLIB_LIBRARY})
|
||||
-
|
||||
- set(OPENSSL_INCLUDE_DIR "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/build/native/include")
|
||||
- endif()
|
||||
-
|
||||
- set(Boost_INCLUDE_DIR "${NUGET_PATH}/boost.1.58.0.0/lib/native/include")
|
||||
+ if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE)
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
+ find_package(OpenSSL REQUIRED)
|
||||
+ find_package(Boost REQUIRED COMPONENTS regex system date_time)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "-- Unsupported Build Platform.")
|
||||
endif()
|
||||
|
||||
+option(CASA_INSTALL_HEADERS "Install header files." ON)
|
||||
+if(CASA_INSTALL_HEADERS)
|
||||
+ file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat)
|
||||
+ install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
|
||||
+ file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
|
||||
+ install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
|
||||
+ file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat)
|
||||
+ install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
|
||||
+endif()
|
||||
+
|
||||
# Compiler (not platform) specific settings
|
||||
if(ANDROID)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
|
||||
diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
|
||||
index cf086ed..3e5fffa 100644
|
||||
--- a/Release/src/CMakeLists.txt
|
||||
+++ b/Release/src/CMakeLists.txt
|
||||
@@ -144,10 +144,11 @@ elseif(ANDROID)
|
||||
else()
|
||||
set_target_properties(cpprest PROPERTIES
|
||||
SOVERSION ${CPPREST_VERSION_MAJOR}.${CPPREST_VERSION_MINOR})
|
||||
-
|
||||
- install(
|
||||
- TARGETS cpprest
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
- )
|
||||
endif()
|
||||
+
|
||||
+install(
|
||||
+ TARGETS cpprest
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ )
|
||||
--
|
||||
2.8.1.windows.1
|
||||
|
4
ports/cpprestsdk/CONTROL
Normal file
4
ports/cpprestsdk/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: cpprestsdk
|
||||
Version: 2.8
|
||||
Description: C++11 JSON, REST, and OAuth library
|
||||
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
|
50
ports/cpprestsdk/portfile.cmake
Normal file
50
ports/cpprestsdk/portfile.cmake
Normal file
|
@ -0,0 +1,50 @@
|
|||
include(vcpkg_common_functions)
|
||||
find_program(GIT git)
|
||||
|
||||
set(GIT_URL "https://github.com/Microsoft/cpprestsdk")
|
||||
set(GIT_REF "3542f07")
|
||||
|
||||
if(NOT EXISTS "${DOWNLOADS}/cpprestsdk.git")
|
||||
message(STATUS "Cloning")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/cpprestsdk.git
|
||||
WORKING_DIRECTORY ${DOWNLOADS}
|
||||
LOGNAME clone
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Cloning done")
|
||||
|
||||
if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
||||
message(STATUS "Adding worktree and patching")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
|
||||
WORKING_DIRECTORY ${DOWNLOADS}/cpprestsdk.git
|
||||
LOGNAME worktree
|
||||
)
|
||||
message(STATUS "Patching")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Use-find_package-on-Windows.-Enable-install-target-f.patch --ignore-whitespace --whitespace=fix
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME patch
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Adding worktree and patching done")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Release
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_SAMPLES=OFF
|
||||
-DCPPREST_EXCLUDE_WEBSOCKETS=ON
|
||||
OPTIONS_DEBUG
|
||||
-DCASA_INSTALL_HEADERS=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpprestsdk)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpprestsdk/license.txt ${CURRENT_PACKAGES_DIR}/share/cpprestsdk/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
3
ports/curl/CONTROL
Normal file
3
ports/curl/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: curl
|
||||
Version: 7.48.0
|
||||
Description: A library for transferring data with URLs
|
24
ports/curl/portfile.cmake
Normal file
24
ports/curl/portfile.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "https://curl.haxx.se/download/curl-7.48.0.tar.bz2"
|
||||
FILENAME "curl-7.48.0.tar.bz2"
|
||||
MD5 d42e0fc34a5cace5739631cc040974fe
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-7.48.0
|
||||
OPTIONS
|
||||
-DBUILD_CURL_TESTS=OFF
|
||||
-DBUILD_CURL_EXE=OFF
|
||||
-DENABLE_MANUAL=OFF
|
||||
OPTIONS_DEBUG
|
||||
-DENABLE_DEBUG=ON
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/curl-7.48.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
vcpkg_copy_pdbs()
|
3
ports/expat/CONTROL
Normal file
3
ports/expat/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: expat
|
||||
Version: 2.1.1
|
||||
Description: XML parser library written in C
|
22
ports/expat/portfile.cmake
Normal file
22
ports/expat/portfile.cmake
Normal file
|
@ -0,0 +1,22 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2"
|
||||
FILENAME "expat-2.1.1.tar.bz2"
|
||||
MD5 7380a64a8e3a9d66a9887b01d0d7ea81
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/expat-2.1.1
|
||||
OPTIONS
|
||||
-DBUILD_examples=OFF
|
||||
-DBUILD_tests=OFF
|
||||
-DBUILD_tools=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/expat-2.1.1/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
|
@ -0,0 +1,25 @@
|
|||
From 7286c233834117404f400e3cfd5500610ca56d9a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Sat, 7 May 2016 02:10:45 -0700
|
||||
Subject: [PATCH] Support Windows DLLs via CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f02ee51..774737d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -115,7 +115,7 @@ project(freetype)
|
||||
|
||||
|
||||
if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
|
||||
- message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
|
||||
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif ()
|
||||
|
||||
# Disallow in-source builds
|
||||
--
|
||||
2.8.1.windows.1
|
||||
|
3
ports/freetype/CONTROL
Normal file
3
ports/freetype/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: freetype
|
||||
Version: 2.6.3
|
||||
Description: A library to render fonts.
|
41
ports/freetype/portfile.cmake
Normal file
41
ports/freetype/portfile.cmake
Normal file
|
@ -0,0 +1,41 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2"
|
||||
FILENAME "freetype-2.6.3.tar.bz2"
|
||||
MD5 0037b25a8c090bc8a1218e867b32beb1
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Support-Windows-DLLs-via-CMAKE_WINDOWS_EXPORT_ALL_SY.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3
|
||||
OPTIONS
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype2)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/freetype ${CURRENT_PACKAGES_DIR}/share/freetype)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/freetype/freetype-config-debug.cmake ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3/docs/LICENSE.TXT
|
||||
${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3/docs/FTL.TXT
|
||||
${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3/docs/GPLv2.TXT
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype
|
||||
)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
3
ports/glew/CONTROL
Normal file
3
ports/glew/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: glew
|
||||
Version: 1.13.0
|
||||
Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.
|
53
ports/glew/portfile.cmake
Normal file
53
ports/glew/portfile.cmake
Normal file
|
@ -0,0 +1,53 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://downloads.sourceforge.net/project/glew/glew/1.13.0/glew-1.13.0.tgz"
|
||||
FILENAME "glew-1.13.0.tgz"
|
||||
MD5 7cbada3166d2aadfc4169c4283701066
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj)
|
||||
message(STATUS "Upgrading projects")
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared.vcxproj PROJ)
|
||||
string(REPLACE
|
||||
"<PlatformToolset>v120</PlatformToolset>"
|
||||
"<PlatformToolset>v140</PlatformToolset>"
|
||||
PROJ ${PROJ})
|
||||
string(REPLACE
|
||||
"opengl32.lib%"
|
||||
"opengl32.lib\;%"
|
||||
PROJ ${PROJ})
|
||||
file(WRITE ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj ${PROJ})
|
||||
endif()
|
||||
message(STATUS "Upgrading projects done")
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj
|
||||
)
|
||||
|
||||
message(STATUS "Installing")
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Debug/Win32/glew32d.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Debug/Win32/glew32d.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Release/Win32/glew32.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Release/Win32/glew32.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/lib/Debug/Win32/glew32d.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/lib/Release/Win32/glew32.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/include/GL
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
message(STATUS "Installing done")
|
3
ports/glfw3/CONTROL
Normal file
3
ports/glfw3/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: glfw3
|
||||
Version: 3.1.2
|
||||
Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.
|
58
ports/glfw3/portfile.cmake
Normal file
58
ports/glfw3/portfile.cmake
Normal file
|
@ -0,0 +1,58 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
|
||||
FILENAME "glfw-3.1.2.zip"
|
||||
MD5 8023327bfe979b3fe735e449e2f54842
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/patch.stamp)
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/src/glfw-3.1.2/src/glfw3Config.cmake.in CONFIG)
|
||||
string(REPLACE "\"@GLFW_LIB_NAME@\"" "NAMES @GLFW_LIB_NAME@ @GLFW_LIB_NAME@dll"
|
||||
CONFIG ${CONFIG}
|
||||
)
|
||||
string(REPLACE "@PACKAGE_CMAKE_INSTALL_PREFIX@" "@PACKAGE_CMAKE_INSTALL_PREFIX@/../.."
|
||||
CONFIG ${CONFIG}
|
||||
)
|
||||
file(WRITE ${CURRENT_BUILDTREES_DIR}/src/glfw-3.1.2/src/glfw3Config.cmake.in ${CONFIG})
|
||||
file(APPEND ${CURRENT_BUILDTREES_DIR}/src/glfw-3.1.2/src/glfw3Config.cmake.in "set(GLFW3_LIBRARIES \${GLFW3_LIBRARY})\n")
|
||||
file(WRITE ${CURRENT_BUILDTREES_DIR}/patch.stamp)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glfw-3.1.2
|
||||
OPTIONS
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DGLFW_BUILD_EXAMPLES=OFF
|
||||
-DGLFW_BUILD_TESTS=OFF
|
||||
-DGLFW_BUILD_DOCS=OFF
|
||||
-DPACKAGE_CMAKE_INSTALL_PREFIX=\${CMAKE_CURRENT_LIST_DIR}/../..
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
${CURRENT_PACKAGES_DIR}/share
|
||||
)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/glfw ${CURRENT_PACKAGES_DIR}/share/glfw3)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/glfw/glfwTargets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glfw3/glfwTargets-debug.cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/glfw3.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.lib)
|
||||
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/glfw-3.1.2/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glfw3)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/glfw3/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/glfw3/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
3
ports/libjpeg-turbo/CONTROL
Normal file
3
ports/libjpeg-turbo/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: libjpeg-turbo
|
||||
Version: 1.4.90-1
|
||||
Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.
|
201
ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch
Normal file
201
ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch
Normal file
|
@ -0,0 +1,201 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bfb7661..5373cd7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -55,6 +55,9 @@ option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE)
|
||||
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_SIMD=0 WITH_TURBOJPEG=0 WITH_ARITH_ENC=0 WITH_ARITH_DEC=0)" FALSE)
|
||||
option(ENABLE_STATIC "Build static libraries" TRUE)
|
||||
option(ENABLE_SHARED "Build shared libraries" TRUE)
|
||||
+option(ENABLE_EXECUTABLES "Build executables" TRUE)
|
||||
+option(INSTALL_DOCS "Install doc files" TRUE)
|
||||
+option(INSTALL_HEADERS "Install header files" TRUE)
|
||||
|
||||
if(WITH_12BIT)
|
||||
set(WITH_SIMD FALSE)
|
||||
@@ -264,14 +267,16 @@ if(WITH_TURBOJPEG)
|
||||
target_link_libraries(turbojpeg jpeg-static)
|
||||
set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
- add_executable(tjunittest tjunittest.c tjutil.c)
|
||||
- target_link_libraries(tjunittest turbojpeg)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest tjunittest.c tjutil.c)
|
||||
+ target_link_libraries(tjunittest turbojpeg)
|
||||
|
||||
- add_executable(tjbench tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c wrbmp.c
|
||||
- wrppm.c)
|
||||
- target_link_libraries(tjbench turbojpeg jpeg-static)
|
||||
- set_property(TARGET tjbench PROPERTY COMPILE_FLAGS
|
||||
- "-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
+ add_executable(tjbench tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c wrbmp.c
|
||||
+ wrppm.c)
|
||||
+ target_link_libraries(tjbench turbojpeg jpeg-static)
|
||||
+ set_property(TARGET tjbench PROPERTY COMPILE_FLAGS
|
||||
+ "-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
@@ -284,14 +289,16 @@ if(WITH_TURBOJPEG)
|
||||
add_dependencies(turbojpeg-static simd)
|
||||
endif()
|
||||
|
||||
- add_executable(tjunittest-static tjunittest.c tjutil.c)
|
||||
- target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest-static tjunittest.c tjutil.c)
|
||||
+ target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
|
||||
- add_executable(tjbench-static tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c
|
||||
- wrbmp.c wrppm.c)
|
||||
- target_link_libraries(tjbench-static turbojpeg-static jpeg-static)
|
||||
- set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
|
||||
- "-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
+ add_executable(tjbench-static tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c
|
||||
+ wrbmp.c wrppm.c)
|
||||
+ target_link_libraries(tjbench-static turbojpeg-static jpeg-static)
|
||||
+ set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
|
||||
+ "-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -303,7 +310,7 @@ else()
|
||||
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
|
||||
endif()
|
||||
|
||||
-if(ENABLE_STATIC)
|
||||
+if(ENABLE_STATIC AND ENABLE_EXECUTABLES)
|
||||
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||
${CJPEG_BMP_SOURCES})
|
||||
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
@@ -319,10 +326,11 @@ if(ENABLE_STATIC)
|
||||
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
||||
endif()
|
||||
|
||||
-add_executable(rdjpgcom rdjpgcom.c)
|
||||
-
|
||||
-add_executable(wrjpgcom wrjpgcom.c)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(rdjpgcom rdjpgcom.c)
|
||||
|
||||
+ add_executable(wrjpgcom wrjpgcom.c)
|
||||
+endif()
|
||||
|
||||
#
|
||||
# Tests
|
||||
@@ -880,24 +888,30 @@ add_custom_target(installer
|
||||
|
||||
if(WITH_TURBOJPEG)
|
||||
if(ENABLE_SHARED)
|
||||
- install(TARGETS turbojpeg tjbench
|
||||
+ install(TARGETS turbojpeg
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS tjbench
|
||||
+ RUNTIME DESTINATION bin)
|
||||
+ endif()
|
||||
endif()
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
|
||||
DESTINATION bin RENAME tjbench.exe)
|
||||
endif()
|
||||
endif()
|
||||
- install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
|
||||
+ if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
|
||||
DESTINATION bin RENAME cjpeg.exe)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
|
||||
@@ -907,14 +921,20 @@ if(ENABLE_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
|
||||
+endif()
|
||||
|
||||
-install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README.md
|
||||
- ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
||||
- ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
||||
- ${CMAKE_SOURCE_DIR}/wizard.txt
|
||||
- DESTINATION doc)
|
||||
+if(INSTALL_DOCS)
|
||||
+ install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README.md
|
||||
+ ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
||||
+ ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
||||
+ ${CMAKE_SOURCE_DIR}/wizard.txt
|
||||
+ DESTINATION doc)
|
||||
+endif()
|
||||
|
||||
-install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
||||
- ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
||||
- DESTINATION include)
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
||||
+ ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
||||
+ DESTINATION include)
|
||||
+endif()
|
||||
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
|
||||
index d423cce..9da7c6e 100644
|
||||
--- a/sharedlib/CMakeLists.txt
|
||||
+++ b/sharedlib/CMakeLists.txt
|
||||
@@ -50,24 +50,31 @@ else()
|
||||
set(DJPEG_BMP_SOURCES ../wrbmp.c ../wrtarga.c)
|
||||
endif()
|
||||
|
||||
-add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
- ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(cjpeg jpeg)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
+ ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(cjpeg jpeg)
|
||||
|
||||
-add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
- ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(djpeg jpeg)
|
||||
+ add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
+ ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(djpeg jpeg)
|
||||
|
||||
-add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
-target_link_libraries(jpegtran jpeg)
|
||||
-set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
||||
+ add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
+ target_link_libraries(jpegtran jpeg)
|
||||
+ set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
||||
|
||||
-add_executable(jcstest ../jcstest.c)
|
||||
-target_link_libraries(jcstest jpeg)
|
||||
+ add_executable(jcstest ../jcstest.c)
|
||||
+ target_link_libraries(jcstest jpeg)
|
||||
|
||||
-install(TARGETS jpeg cjpeg djpeg jpegtran
|
||||
+ install(TARGETS cjpeg djpeg jpegtran
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin)
|
||||
+endif()
|
||||
+
|
||||
+install(TARGETS jpeg
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
38
ports/libjpeg-turbo/portfile.cmake
Normal file
38
ports/libjpeg-turbo/portfile.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libjpeg-turbo-1.4.90)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.4.90.zip"
|
||||
FILENAME "libjpeg-turbo-1.4.90.zip"
|
||||
MD5 dcd49a7100e41870faae988f608471af
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch"
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(NASM)
|
||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
||||
set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DENABLE_STATIC=OFF
|
||||
-DWITH_CRT_DLL=ON
|
||||
-DENABLE_EXECUTABLES=OFF
|
||||
-DINSTALL_DOCS=OFF
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY
|
||||
${SOURCE_PATH}/LICENSE.md
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo
|
||||
)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright)
|
||||
vcpkg_copy_pdbs()
|
4
ports/libpng/CONTROL
Normal file
4
ports/libpng/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: libpng
|
||||
Version: 1.6.24-1
|
||||
Build-Depends: zlib
|
||||
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.
|
47
ports/libpng/portfile.cmake
Normal file
47
ports/libpng/portfile.cmake
Normal file
|
@ -0,0 +1,47 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://download.sourceforge.net/libpng/libpng-1.6.24.tar.xz"
|
||||
FILENAME "libpng-1.6.24.tar.xz"
|
||||
MD5 ffcdbd549814787fa8010c372e35ff25
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
find_program(GIT git)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} init
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24
|
||||
LOGNAME git-init
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${GIT} apply "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" --ignore-whitespace --whitespace=nowarn
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24
|
||||
OPTIONS
|
||||
-DPNG_STATIC=OFF
|
||||
-DPNG_TESTS=OFF
|
||||
-DSKIP_INSTALL_PROGRAMS=ON
|
||||
-DSKIP_INSTALL_EXECUTABLES=ON
|
||||
-DSKIP_INSTALL_FILES=ON
|
||||
OPTIONS_DEBUG
|
||||
-DSKIP_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/share/libpng)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng/libpng16-debug.cmake ${CURRENT_PACKAGES_DIR}/share/libpng/libpng16-debug.cmake)
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/libpng
|
||||
)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
17
ports/libpng/use-abort-on-all-platforms.patch
Normal file
17
ports/libpng/use-abort-on-all-platforms.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff --git a/pngpriv.h b/pngpriv.h
|
||||
index fe3355d..5a049b5 100644
|
||||
--- a/pngpriv.h
|
||||
+++ b/pngpriv.h
|
||||
@@ -457,11 +457,7 @@
|
||||
|
||||
/* Memory model/platform independent fns */
|
||||
#ifndef PNG_ABORT
|
||||
-# ifdef _WINDOWS_
|
||||
-# define PNG_ABORT() ExitProcess(0)
|
||||
-# else
|
||||
-# define PNG_ABORT() abort()
|
||||
-# endif
|
||||
+# define PNG_ABORT() abort()
|
||||
#endif
|
||||
|
||||
/* These macros may need to be architecture dependent. */
|
3
ports/libuv/CONTROL
Normal file
3
ports/libuv/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: libuv
|
||||
Version: 1.9.1
|
||||
Description: libuv is a multi-platform support library with a focus on asynchronous I/O.
|
105
ports/libuv/portfile.cmake
Normal file
105
ports/libuv/portfile.cmake
Normal file
|
@ -0,0 +1,105 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/libuv/libuv/archive/v1.9.1.zip"
|
||||
FILENAME "libuv-v1.9.1.zip"
|
||||
MD5 4d1e74197920455203954cd8b75f0a2f
|
||||
)
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src)
|
||||
message(STATUS "Extracting source ${ARCHIVE}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src
|
||||
LOGNAME extract-${TARGET_TRIPLET}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(PYTHON2
|
||||
NAMES python2 python
|
||||
PATHS C:/python27 ENV PYTHON
|
||||
)
|
||||
if(NOT PYTHON2 MATCHES "NOTFOUND")
|
||||
execute_process(
|
||||
COMMAND ${PYTHON2} --version
|
||||
OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
|
||||
ERROR_VARIABLE PYTHON_VER_CHECK_ERR
|
||||
)
|
||||
set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
|
||||
debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
|
||||
if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
|
||||
set(PYTHON2 PYTHON2-NOTFOUND)
|
||||
find_program(PYTHON2
|
||||
NAMES python2 python
|
||||
PATHS C:/python27 ENV PYTHON
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PYTHON2 MATCHES "NOTFOUND")
|
||||
message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n"
|
||||
"Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
|
||||
"There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
|
||||
" https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(ENV{GYP_MSVS_VERSION} 2015)
|
||||
set(ENV{PYTHON} ${PYTHON2})
|
||||
|
||||
if(TRIPLET_SYSTEM_ARCH MATCHES "x86|x64")
|
||||
message(STATUS "Building Release")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND cmd /c vcbuild.bat release ${TRIPLET_SYSTEM_ARCH} shared
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1
|
||||
LOGNAME ${TARGET_TRIPLET}-build-rel
|
||||
)
|
||||
message(STATUS "Building Debug")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND cmd /c vcbuild.bat debug ${TRIPLET_SYSTEM_ARCH} shared
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1
|
||||
LOGNAME ${TARGET_TRIPLET}-build-dbg
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported platform")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CURRENT_PACKAGES_DIR}/include
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
${CURRENT_PACKAGES_DIR}/share/libuv
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/tree.h
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/uv.h
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/uv-version.h
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/uv-errno.h
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/uv-threadpool.h
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/include/uv-win.h
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/Debug/libuv.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/Debug/libuv.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/Release/libuv.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/Release/libuv.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/libuv-1.9.1/LICENSE
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuv)
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/share/libuv/LICENSE
|
||||
${CURRENT_PACKAGES_DIR}/share/libuv/copyright)
|
||||
vcpkg_copy_pdbs()
|
4
ports/libwebsockets/CONTROL
Normal file
4
ports/libwebsockets/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: libwebsockets
|
||||
Version: 2.0.0
|
||||
Build-Depends: zlib, openssl
|
||||
Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.
|
35
ports/libwebsockets/portfile.cmake
Normal file
35
ports/libwebsockets/portfile.cmake
Normal file
|
@ -0,0 +1,35 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/warmcat/libwebsockets/archive/v2.0.0.zip"
|
||||
FILENAME "libwebsockets-v2.0.0.zip"
|
||||
MD5 1947a1887dda5b5f9624048f4b6b1507
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebsockets-2.0.0
|
||||
OPTIONS
|
||||
-DLWS_WITH_STATIC=OFF
|
||||
-DLWS_USE_BUNDLED_ZLIB=OFF
|
||||
-DLWS_WITHOUT_TESTAPPS=ON
|
||||
-DLWS_IPV6=ON
|
||||
-DLWS_HTTP2=ON
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/cmake/LibwebsocketsTargets-debug.cmake
|
||||
${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake
|
||||
)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
|
||||
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/libwebsockets-2.0.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright)
|
||||
vcpkg_copy_pdbs()
|
|
@ -0,0 +1,244 @@
|
|||
From aa43d3193302cd545ae2a45079b12af62bf13b38 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Sat, 7 May 2016 00:47:10 -0700
|
||||
Subject: [PATCH] Modify 2010/libmpg123.vcxproj to use VS 2015, along with
|
||||
reverting #undef MPG123_EXPORT
|
||||
|
||||
---
|
||||
ports/MSVC++/2010/libmpg123/libmpg123.vcxproj | 54 +++++++++++++++++++--------
|
||||
src/libmpg123/mpg123.h.in | 2 -
|
||||
2 files changed, 38 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
|
||||
index afa7de2..84c8d25 100644
|
||||
--- a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
|
||||
+++ b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
|
||||
@@ -47,6 +47,10 @@
|
||||
<RootNamespace>libmpg123</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
+ <PropertyGroup>
|
||||
+ <UseOfMfc>false</UseOfMfc>
|
||||
+ <PlatformToolset>v140</PlatformToolset>
|
||||
+ </PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_x86_Dll_Minimal|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
@@ -154,7 +158,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@@ -178,7 +182,7 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@@ -200,7 +204,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic_Dll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;ACCURATE_ROUNDING;IEEE_FLOAT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@@ -231,7 +235,7 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@@ -258,7 +262,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@@ -278,6 +282,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
|
||||
@@ -337,7 +344,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Lib>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Debug\$(ProjectName).lib</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
@@ -349,7 +356,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@@ -371,6 +378,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
|
||||
@@ -430,7 +440,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Lib>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Release\$(ProjectName).lib</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
@@ -438,7 +448,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@@ -460,6 +470,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
|
||||
@@ -519,7 +532,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -540,7 +553,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@@ -563,6 +576,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
|
||||
@@ -622,7 +638,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -638,7 +654,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll_Minimal|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@@ -660,6 +676,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
|
||||
|
||||
@@ -719,7 +738,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -740,7 +759,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@@ -763,6 +782,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
|
||||
|
||||
+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
|
||||
+
|
||||
cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
|
||||
|
||||
@@ -822,7 +844,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
diff --git a/src/libmpg123/mpg123.h.in b/src/libmpg123/mpg123.h.in
|
||||
index a25d4d1..d95e41d 100644
|
||||
--- a/src/libmpg123/mpg123.h.in
|
||||
+++ b/src/libmpg123/mpg123.h.in
|
||||
@@ -1404,6 +1404,4 @@ MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh
|
||||
}
|
||||
#endif
|
||||
|
||||
-#undef MPG123_EXPORT
|
||||
-
|
||||
#endif
|
||||
--
|
||||
2.8.1.windows.1
|
||||
|
3
ports/mpg123/CONTROL
Normal file
3
ports/mpg123/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: mpg123
|
||||
Version: 1.23.3
|
||||
Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).
|
54
ports/mpg123/portfile.cmake
Normal file
54
ports/mpg123/portfile.cmake
Normal file
|
@ -0,0 +1,54 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
|
||||
FILENAME "mpg123-1.23.3.tar.bz2"
|
||||
MD5 84e838650c4c593f4e66d1256e0468db
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_find_acquire_program(YASM)
|
||||
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
|
||||
set(ENV{PATH} "${YASM_EXE_PATH};$ENV{PATH}")
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
|
||||
)
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
|
||||
RELEASE_CONFIGURATION Release_x86_Dll
|
||||
DEBUG_CONFIGURATION Debug_x86_Dll
|
||||
)
|
||||
|
||||
message(STATUS "Installing")
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Debug/libmpg123.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Debug/libmpg123.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Release/libmpg123.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Release/libmpg123.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Debug/libmpg123.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/2010/libmpg123/Release/libmpg123.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/ports/MSVC++/mpg123.h
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
file(INSTALL
|
||||
${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/src/libmpg123/mpg123.h.in
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
message(STATUS "Installing done")
|
3
ports/openal-soft/CONTROL
Normal file
3
ports/openal-soft/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: openal-soft
|
||||
Version: 1.17.2
|
||||
Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
|
27
ports/openal-soft/portfile.cmake
Normal file
27
ports/openal-soft/portfile.cmake
Normal file
|
@ -0,0 +1,27 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://openal-soft.org/openal-releases/openal-soft-1.17.2.tar.bz2"
|
||||
FILENAME "openal-soft-1.17.2.tar.bz2"
|
||||
MD5 1764e0d8fec499589b47ebc724e0913d
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openal-soft-1.17.2
|
||||
OPTIONS
|
||||
-DALSOFT_UTILS=OFF
|
||||
-DALSOFT_NO_CONFIG_UTIL=ON
|
||||
-DALSOFT_EXAMPLES=OFF
|
||||
-DALSOFT_TESTS=OFF
|
||||
-DALSOFT_CONFIG=OFF
|
||||
-DALSOFT_HRTF_DEFS=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/openal-soft-1.17.2/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/openal-soft)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openal-soft/COPYING ${CURRENT_PACKAGES_DIR}/share/openal-soft/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
From e396a74da8e7c9c06f3145de65647d7d48524a07 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Thu, 5 May 2016 04:16:18 -0700
|
||||
Subject: [PATCH] OpenCV should follow FHS-like conventions
|
||||
|
||||
---
|
||||
CMakeLists.txt | 11 +++++++----
|
||||
cmake/OpenCVGenConfig.cmake | 11 +++++------
|
||||
cmake/OpenCVGenHeaders.cmake | 8 ++++++--
|
||||
cmake/OpenCVModule.cmake | 4 +++-
|
||||
data/CMakeLists.txt | 6 ++++--
|
||||
include/CMakeLists.txt | 6 ++++--
|
||||
6 files changed, 29 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3ee50ff..8e3f57d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -250,6 +250,8 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF )
|
||||
OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID )
|
||||
OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) )
|
||||
OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF)
|
||||
+OCV_OPTION(INSTALL_HEADERS "Install header files" ON)
|
||||
+OCV_OPTION(INSTALL_OTHER "Install other files" ON)
|
||||
|
||||
# OpenCV build options
|
||||
# ===================================================
|
||||
@@ -315,7 +317,9 @@ else()
|
||||
endif()
|
||||
|
||||
if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
||||
- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH)
|
||||
+ if(DEFINED OpenCV_DISABLE_ARCH_PATH)
|
||||
+ set(OpenCV_INSTALL_BINARIES_PREFIX "")
|
||||
+ elseif(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH)
|
||||
set(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
|
||||
else()
|
||||
message(STATUS "Can't detect runtime and/or arch")
|
||||
@@ -379,7 +383,7 @@ else()
|
||||
set(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}")
|
||||
set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
|
||||
set(OPENCV_JAR_INSTALL_PATH java)
|
||||
- set(OPENCV_OTHER_INSTALL_PATH etc)
|
||||
+ set(OPENCV_OTHER_INSTALL_PATH share/opencv)
|
||||
else()
|
||||
set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX})
|
||||
set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH})
|
||||
@@ -736,8 +740,7 @@ endif()
|
||||
# for UNIX it does not make sense as LICENSE and readme will be part of the package automatically
|
||||
if(ANDROID OR NOT UNIX)
|
||||
install(FILES ${OPENCV_LICENSE_FILE}
|
||||
- PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs)
|
||||
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/opencv RENAME copyright CONFIGURATIONS Release COMPONENT libs)
|
||||
if(OPENCV_README_FILE)
|
||||
install(FILES ${OPENCV_README_FILE}
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
|
||||
diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake
|
||||
index dbfd7ca..94fc4a9 100644
|
||||
--- a/cmake/OpenCVGenConfig.cmake
|
||||
+++ b/cmake/OpenCVGenConfig.cmake
|
||||
@@ -139,14 +139,13 @@ if(WIN32)
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" @ONLY)
|
||||
if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
- install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib" COMPONENT dev)
|
||||
- install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
|
||||
+ install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "cmake" COMPONENT dev)
|
||||
+ install(EXPORT OpenCVModules DESTINATION "cmake" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
|
||||
else()
|
||||
- install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" COMPONENT dev)
|
||||
- install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
|
||||
+ install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "cmake" COMPONENT dev)
|
||||
+ install(EXPORT OpenCVModules DESTINATION "cmake" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
|
||||
endif()
|
||||
- install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT dev)
|
||||
- install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/" COMPONENT dev)
|
||||
+ install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "cmake" COMPONENT dev)
|
||||
else ()
|
||||
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib/cmake/opencv-${OPENCV_VERSION}" COMPONENT dev)
|
||||
install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib/cmake/opencv-${OPENCV_VERSION}" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
|
||||
diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake
|
||||
index 2988979..810871b 100644
|
||||
--- a/cmake/OpenCVGenHeaders.cmake
|
||||
+++ b/cmake/OpenCVGenHeaders.cmake
|
||||
@@ -1,7 +1,9 @@
|
||||
# platform-specific config file
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h")
|
||||
-install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
|
||||
+endif()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# opencv_modules.hpp based on actual modules list
|
||||
@@ -25,4 +27,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
|
||||
#endforeach()
|
||||
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
|
||||
-install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
|
||||
+endif()
|
||||
diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake
|
||||
index 3385385..530e53f 100644
|
||||
--- a/cmake/OpenCVModule.cmake
|
||||
+++ b/cmake/OpenCVModule.cmake
|
||||
@@ -879,7 +879,9 @@ macro(_ocv_create_module)
|
||||
foreach(hdr ${OPENCV_MODULE_${m}_HEADERS})
|
||||
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
|
||||
if(NOT hdr2 MATCHES "opencv2/${m}/private.*" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" )
|
||||
- install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
|
||||
+ if(INSTALL_HEADERS)
|
||||
+ install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
|
||||
+ endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
|
||||
index 1f0d720..86b9d89 100644
|
||||
--- a/data/CMakeLists.txt
|
||||
+++ b/data/CMakeLists.txt
|
||||
@@ -1,8 +1,10 @@
|
||||
file(GLOB HAAR_CASCADES haarcascades/*.xml)
|
||||
file(GLOB LBP_CASCADES lbpcascades/*.xml)
|
||||
|
||||
-install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs)
|
||||
-install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs)
|
||||
+if(INSTALL_OTHER)
|
||||
+ install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs)
|
||||
+ install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs)
|
||||
+endif()
|
||||
|
||||
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH)
|
||||
install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests")
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index b4e48e6..58dccc7 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -1,7 +1,9 @@
|
||||
file(GLOB old_hdrs "opencv/*.h*")
|
||||
-install(FILES ${old_hdrs}
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES ${old_hdrs}
|
||||
DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv
|
||||
COMPONENT dev)
|
||||
-install(FILES "opencv2/opencv.hpp"
|
||||
+ install(FILES "opencv2/opencv.hpp"
|
||||
DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2
|
||||
COMPONENT dev)
|
||||
+endif()
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.8.1.windows.1
|
||||
|
4
ports/opencv/CONTROL
Normal file
4
ports/opencv/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: opencv
|
||||
Version: 3.1.0
|
||||
Build-Depends: zlib, libpng, libjpeg-turbo
|
||||
Description: computer vision library
|
62
ports/opencv/portfile.cmake
Normal file
62
ports/opencv/portfile.cmake
Normal file
|
@ -0,0 +1,62 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
find_program(GIT git)
|
||||
|
||||
set(GIT_URL "https://github.com/Itseez/opencv")
|
||||
set(GIT_REF "92387b1ef8fad15196dd5f7fb4931444a68bc93a")
|
||||
|
||||
if(NOT EXISTS "${DOWNLOADS}/opencv.git")
|
||||
message(STATUS "Cloning")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/opencv.git
|
||||
WORKING_DIRECTORY ${DOWNLOADS}
|
||||
LOGNAME clone
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Cloning done")
|
||||
|
||||
if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
||||
message(STATUS "Adding worktree and patching")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
|
||||
WORKING_DIRECTORY ${DOWNLOADS}/opencv.git
|
||||
LOGNAME worktree
|
||||
)
|
||||
message(STATUS "Patching")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} am ${CMAKE_CURRENT_LIST_DIR}/0001-OpenCV-should-follow-FHS-like-conventions.patch --ignore-whitespace --whitespace=fix
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME patch
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Adding worktree and patching done")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
|
||||
OPTIONS
|
||||
-DBUILD_ZLIB=OFF
|
||||
-DINSTALL_CREATE_DISTRIB=ON
|
||||
-DBUILD_opencv_python2=OFF
|
||||
-DBUILD_opencv_python3=OFF
|
||||
-DBUILD_opencv_apps=OFF
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_PERF_TESTS=OFF
|
||||
-DOpenCV_DISABLE_ARCH_PATH=ON
|
||||
-DWITH_FFMPEG=OFF
|
||||
OPTIONS_DEBUG
|
||||
-DINSTALL_HEADERS=OFF
|
||||
-DINSTALL_OTHER=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/OpenCVConfig-version.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig-version.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/OpenCVConfig.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/OpenCVModules.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/OpenCVModules-release.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-release.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/OpenCVModules-debug.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
|
||||
vcpkg_copy_pdbs()
|
3
ports/opengl/CONTROL
Normal file
3
ports/opengl/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: opengl
|
||||
Version: 10.0.10240.0
|
||||
Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics.
|
26
ports/opengl/portfile.cmake
Normal file
26
ports/opengl/portfile.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
set(OPENGLPATH "C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.10240.0\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
|
||||
set(LICENSEPATH "C:\\Program Files (x86)\\Windows Kits\\10\\Licenses\\10.0.10240.0\\sdk_license.rtf")
|
||||
set(HEADERSPATH "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.10240.0\\um")
|
||||
|
||||
if (NOT EXISTS "${OPENGLPATH}")
|
||||
message(FATAL_ERROR "Cannot find Windows 10.0.10240.0 SDK. File does not exist: ${OPENGLPATH}")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CURRENT_PACKAGES_DIR}/include/gl
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
${CURRENT_PACKAGES_DIR}/share/opengl
|
||||
)
|
||||
|
||||
file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl)
|
||||
file(COPY
|
||||
"${HEADERSPATH}\\gl\\GL.h"
|
||||
"${HEADERSPATH}\\gl\\GLU.h"
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See the accompanying sdk_license.rtf")
|
||||
vcpkg_copy_pdbs()
|
68
ports/openssl/CMakeLists.txt
Normal file
68
ports/openssl/CMakeLists.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(openssl NONE)
|
||||
|
||||
include(vcpkg_execute_required_process)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_program(PERL perl)
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
message(STATUS "Extracting source ${OPENSSL_SOURCE_ARCHIVE}")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${OPENSSL_SOURCE_ARCHIVE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
LOGNAME extract-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
||||
set(CONFIGURE_COMMAND ${PERL} Configure
|
||||
no-idea
|
||||
no-mdc2
|
||||
no-rc5
|
||||
no-asm
|
||||
zlib-dynamic
|
||||
--with-zlib-include=${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(TARGET_TRIPLET MATCHES "x86-windows")
|
||||
set(OPENSSL_ARCH VC-WIN32)
|
||||
set(OPENSSL_DO "ms\\do_ms.bat")
|
||||
elseif(TARGET_TRIPLET MATCHES "x64")
|
||||
set(OPENSSL_ARCH VC-WIN64A)
|
||||
set(OPENSSL_DO "ms\\do_win64a.bat")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported target triplet: ${TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
set(OPENSSLDIR ${CURRENT_PACKAGES_DIR}/debug)
|
||||
list(GET ZLIB_LIBRARIES -1 ZLIB_DEBUG_LIBRARY)
|
||||
list(APPEND CONFIGURE_COMMAND
|
||||
debug-${OPENSSL_ARCH}
|
||||
--openssldir=${OPENSSLDIR}
|
||||
--with-zlib-lib=${ZLIB_DEBUG_LIBRARY}
|
||||
)
|
||||
else()
|
||||
set(OPENSSLDIR ${CURRENT_PACKAGES_DIR})
|
||||
list(APPEND CONFIGURE_COMMAND
|
||||
${OPENSSL_ARCH}
|
||||
--openssldir=${OPENSSLDIR}
|
||||
--with-zlib-lib=${ZLIB_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CONFIGURE_COMMAND}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION}
|
||||
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${OPENSSL_DO}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION}
|
||||
LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${OPENSSLDIR}/bin/ssleay32.dll ${OPENSSLDIR}/bin/libeay32.dll
|
||||
COMMAND ${NMAKE} -f ms\\ntdll.mak install
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION}
|
||||
)
|
||||
add_custom_target(openssl ALL DEPENDS ${OPENSSLDIR}/bin/ssleay32.dll ${OPENSSLDIR}/bin/libeay32.dll)
|
4
ports/openssl/CONTROL
Normal file
4
ports/openssl/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: openssl
|
||||
Version: 1.0.2h
|
||||
Build-Depends: zlib
|
||||
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
|
127
ports/openssl/LICENSE
Normal file
127
ports/openssl/LICENSE
Normal file
|
@ -0,0 +1,127 @@
|
|||
|
||||
LICENSE ISSUES
|
||||
==============
|
||||
|
||||
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
|
||||
the OpenSSL License and the original SSLeay license apply to the toolkit.
|
||||
See below for the actual license texts. Actually both licenses are BSD-style
|
||||
Open Source licenses. In case of any license issues related to OpenSSL
|
||||
please contact openssl-core@openssl.org.
|
||||
|
||||
OpenSSL License
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2011 The OpenSSL Project. 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. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED 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 OpenSSL PROJECT OR
|
||||
* ITS 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.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
Original SSLeay License
|
||||
-----------------------
|
||||
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* 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 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
46
ports/openssl/portfile.cmake
Normal file
46
ports/openssl/portfile.cmake
Normal file
|
@ -0,0 +1,46 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
||||
set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
|
||||
|
||||
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
|
||||
URL "https://www.openssl.org/source/openssl-1.0.2h.tar.gz"
|
||||
FILENAME "openssl-1.0.2h.tar.gz"
|
||||
MD5 9392e65072ce4b614c1392eefc1f23d0
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${CURRENT_BUILDTREES_DIR}/src/openssl-1.0.2h)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-1.0.2h
|
||||
GENERATOR "NMake Makefiles"
|
||||
OPTIONS
|
||||
-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}
|
||||
-DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR}
|
||||
-DCURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR}
|
||||
-DOPENSSL_SOURCE_ARCHIVE=${OPENSSL_SOURCE_ARCHIVE}
|
||||
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
|
||||
-DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH}
|
||||
-DVERSION=1.0.2h
|
||||
-DTARGET_TRIPLET=${TARGET_TRIPLET}
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe
|
||||
${CURRENT_PACKAGES_DIR}/bin/openssl.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/openssl.cnf
|
||||
${CURRENT_PACKAGES_DIR}/openssl.cnf
|
||||
)
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/engines)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/engines ${CURRENT_PACKAGES_DIR}/bin/engines)
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/engines)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/engines ${CURRENT_PACKAGES_DIR}/debug/bin/engines)
|
||||
endif()
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
3
ports/range-v3/CONTROL
Normal file
3
ports/range-v3/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: range-v3
|
||||
Version: 0.0.0-1
|
||||
Description: Range library for C++11/14/17.
|
12
ports/range-v3/portfile.cmake
Normal file
12
ports/range-v3/portfile.cmake
Normal file
|
@ -0,0 +1,12 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/Microsoft/Range-V3-VS2015/archive/ede9ad367fd5ec764fecb039c874614bd908e6b6.zip"
|
||||
FILENAME "range-v3-ede9ad367fd5ec764fecb039c874614bd908e6b6.zip"
|
||||
MD5 a33fcf63489d5c6d8fa92ef8746648ab
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/Range-V3-VS2015-ede9ad367fd5ec764fecb039c874614bd908e6b6/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/Range-V3-VS2015-ede9ad367fd5ec764fecb039c874614bd908e6b6/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp")
|
||||
vcpkg_copy_pdbs()
|
3
ports/rapidjson/CONTROL
Normal file
3
ports/rapidjson/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: rapidjson
|
||||
Version: 1.0.2-1
|
||||
Description: A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/>
|
15
ports/rapidjson/portfile.cmake
Normal file
15
ports/rapidjson/portfile.cmake
Normal file
|
@ -0,0 +1,15 @@
|
|||
include(winports_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/miloyip/rapidjson/archive/879def80f2e466cdf4c86dc7e53ea2dd4cafaea0.zip"
|
||||
FILENAME "rapidjson-879def80f2e466cdf4c86dc7e53ea2dd4cafaea0.zip"
|
||||
MD5 5394c3bc23177b000e1992fb989edc53
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
# Put the licence file where vcpkg expects it
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/rapidjson-879def80f2e466cdf4c86dc7e53ea2dd4cafaea0/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright)
|
||||
|
||||
# Copy the rapidjson header files
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/rapidjson-879def80f2e466cdf4c86dc7e53ea2dd4cafaea0/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h")
|
||||
vcpkg_copy_pdbs()
|
3
ports/sdl2/CONTROL
Normal file
3
ports/sdl2/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: sdl2
|
||||
Version: 2.0.4
|
||||
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
|
43
ports/sdl2/portfile.cmake
Normal file
43
ports/sdl2/portfile.cmake
Normal file
|
@ -0,0 +1,43 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://libsdl.org/release/SDL2-2.0.4.tar.gz"
|
||||
FILENAME "SDL2-2.0.4.tar.gz"
|
||||
MD5 44fc4a023349933e7f5d7a582f7b886e
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.dll
|
||||
${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/include DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2)
|
||||
else()
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4
|
||||
OPTIONS
|
||||
-DSDL_STATIC=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
16
ports/sqlite3/CMakeLists.txt
Normal file
16
ports/sqlite3/CMakeLists.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(sqlite3 C)
|
||||
|
||||
include_directories(${SOURCE})
|
||||
add_library(sqlite3 SHARED ${SOURCE}/sqlite3.c)
|
||||
target_compile_definitions(sqlite3 PRIVATE $<$<CONFIG:Debug>:-DSQLITE_DEBUG> "-DSQLITE_API=__declspec(dllexport)")
|
||||
if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
|
||||
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1)
|
||||
endif()
|
||||
|
||||
install(TARGETS sqlite3
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
install(FILES ${SOURCE}/sqlite3.h ${SOURCE}/sqlite3ext.h DESTINATION include CONFIGURATIONS Release)
|
3
ports/sqlite3/CONTROL
Normal file
3
ports/sqlite3/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: sqlite3
|
||||
Version: 3120200
|
||||
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
19
ports/sqlite3/portfile.cmake
Normal file
19
ports/sqlite3/portfile.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://www.sqlite.org/2016/sqlite-amalgamation-3120200.zip"
|
||||
FILENAME "sqlite-amalgamation-3120200.zip"
|
||||
MD5 e3b10b952f075252169ac613068ccc97
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
|
||||
OPTIONS
|
||||
-DSOURCE=${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-3120200
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
|
||||
vcpkg_copy_pdbs()
|
63
ports/tcl/portfile.cmake
Normal file
63
ports/tcl/portfile.cmake
Normal file
|
@ -0,0 +1,63 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://prdownloads.sourceforge.net/tcl/tcl8.6.5-src.tar.gz"
|
||||
FILENAME "tcl8.6.5-src.tar.gz"
|
||||
MD5 0e6426a4ca9401825fbc6ecf3d89a326
|
||||
)
|
||||
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/x86-windows-rel)
|
||||
message(STATUS "Extracting source ${ARCHIVE} for Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel
|
||||
LOGNAME extract-x86-windows-rel
|
||||
)
|
||||
endif()
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg)
|
||||
message(STATUS "Extracting source ${ARCHIVE} for Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg
|
||||
LOGNAME extract-x86-windows-dbg
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Extracting done")
|
||||
|
||||
message(STATUS "Building x86-windows-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc release
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tcl8.6.5/win
|
||||
LOGNAME build-x86-windows-rel
|
||||
)
|
||||
message(STATUS "Building x86-windows-rel done")
|
||||
|
||||
message(STATUS "Building x86-windows-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc release OPTS=symbols
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg/tcl8.6.5/win
|
||||
LOGNAME build-x86-windows-rel
|
||||
)
|
||||
message(STATUS "Building x86-windows-dbg done")
|
||||
|
||||
message(STATUS "Installing x86-windows-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR} SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\share\\tcltk\\tcl8.6
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tcl8.6.5/win
|
||||
LOGNAME install-x86-windows-rel
|
||||
)
|
||||
message(STATUS "Installing x86-windows-rel done")
|
||||
|
||||
message(STATUS "Installing x86-windows-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR}\\debug OPTS=symbols SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\debug\\share\\tcltk\\tcl8.6
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg/tcl8.6.5/win
|
||||
LOGNAME install-x86-windows-dbg
|
||||
)
|
||||
message(STATUS "Installing x86-windows-dbg done")
|
||||
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tcl8.6.5/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/tcl RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
3
ports/tiff/CONTROL
Normal file
3
ports/tiff/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: tiff
|
||||
Version: 4.0.6
|
||||
Description: A library that supports the manipulation of TIFF image files
|
36
ports/tiff/portfile.cmake
Normal file
36
ports/tiff/portfile.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.6.tar.gz"
|
||||
FILENAME "tiff-4.0.6.tar.gz"
|
||||
MD5 d1d2e940dea0b5ad435f21f03d96dd72
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiff-4.0.6
|
||||
OPTIONS -Dcxx=OFF
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/share
|
||||
)
|
||||
file(COPY
|
||||
${CURRENT_BUILDTREES_DIR}/src/tiff-4.0.6/COPYRIGHT
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff
|
||||
)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/share/tiff/COPYRIGHT
|
||||
${CURRENT_PACKAGES_DIR}/share/tiff/c2
|
||||
)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/share/tiff/c2
|
||||
${CURRENT_PACKAGES_DIR}/share/tiff/copyright
|
||||
)
|
||||
file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
file(REMOVE ${EXES})
|
||||
vcpkg_copy_pdbs()
|
3
ports/tinyxml2/CONTROL
Normal file
3
ports/tinyxml2/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: tinyxml2
|
||||
Version: 3.0.0
|
||||
Description: A simple, small, efficient, C++ XML parser
|
22
ports/tinyxml2/portfile.cmake
Normal file
22
ports/tinyxml2/portfile.cmake
Normal file
|
@ -0,0 +1,22 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/leethomason/tinyxml2/archive/3.0.0.zip"
|
||||
FILENAME "tinyxml2-3.0.0.zip"
|
||||
MD5 851ffc79097239cdc03a952094ddf437
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml2-3.0.0
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/tinyxml2-3.0.0/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright)
|
||||
vcpkg_copy_pdbs()
|
63
ports/tk/portfile.cmake
Normal file
63
ports/tk/portfile.cmake
Normal file
|
@ -0,0 +1,63 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://prdownloads.sourceforge.net/tcl/tk8.6.5-src.tar.gz"
|
||||
FILENAME "tk8.6.5-src.tar.gz"
|
||||
MD5 11dbbd425c3e0201f20d6a51482ce6c4
|
||||
)
|
||||
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/x86-windows-rel)
|
||||
message(STATUS "Extracting source ${ARCHIVE} for Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel
|
||||
LOGNAME extract-x86-windows-rel
|
||||
)
|
||||
endif()
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg)
|
||||
message(STATUS "Extracting source ${ARCHIVE} for Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg
|
||||
LOGNAME extract-x86-windows-dbg
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Extracting done")
|
||||
|
||||
message(STATUS "Building x86-windows-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc release TCLDIR=${CURRENT_BUILDTREES_DIR}\\x86-windows-rel\\tcl8.6.5
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tk8.6.5/win
|
||||
LOGNAME build-x86-windows-rel
|
||||
)
|
||||
message(STATUS "Building x86-windows-rel done")
|
||||
|
||||
message(STATUS "Building x86-windows-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc release OPTS=symbols TCLDIR=${CURRENT_BUILDTREES_DIR}\\x86-windows-dbg\\tcl8.6.5
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg/tk8.6.5/win
|
||||
LOGNAME build-x86-windows-dbg
|
||||
)
|
||||
message(STATUS "Building x86-windows-dbg done")
|
||||
|
||||
message(STATUS "Installing x86-windows-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR} SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\share\\tcltk\\tk8.6
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tk8.6.5/win
|
||||
LOGNAME install-x86-windows-rel
|
||||
)
|
||||
message(STATUS "Installing x86-windows-rel done")
|
||||
|
||||
message(STATUS "Installing x86-windows-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR}\\debug OPTS=symbols SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\debug\\share\\tcltk\\tk8.6
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/x86-windows-dbg/tk8.6.5/win
|
||||
LOGNAME install-x86-windows-dbg
|
||||
)
|
||||
message(STATUS "Installing x86-windows-dbg done")
|
||||
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/x86-windows-rel/tk8.6.5/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/tk RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
3
ports/zlib/CONTROL
Normal file
3
ports/zlib/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: zlib
|
||||
Version: 1.2.8
|
||||
Description: A compression library
|
20
ports/zlib/LICENSE
Normal file
20
ports/zlib/LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
|||
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||
|
||||
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:
|
||||
|
||||
1. 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.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
22
ports/zlib/portfile.cmake
Normal file
22
ports/zlib/portfile.cmake
Normal file
|
@ -0,0 +1,22 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://zlib.net/zlib128.zip"
|
||||
FILENAME "zlib128.zip"
|
||||
MD5 126f8676442ffbd97884eb4d6f32afb4
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/zlib-1.2.8
|
||||
OPTIONS
|
||||
-DSKIP_INSTALL_FILES=ON
|
||||
OPTIONS_DEBUG
|
||||
-DSKIP_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib)
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
31
scripts/bootstrap.ps1
Normal file
31
scripts/bootstrap.ps1
Normal file
|
@ -0,0 +1,31 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$disableMetrics = "0"
|
||||
)
|
||||
|
||||
$vcpkgRoot = (get-item $PSScriptRoot).parent.FullName
|
||||
|
||||
$gitHash = git rev-parse HEAD
|
||||
Write-Verbose("Git hash is " + $gitHash)
|
||||
$gitStartOfHash = $gitHash.substring(0,6)
|
||||
$vcpkgSourcesPath = "$vcpkgRoot\toolsrc"
|
||||
Write-Verbose("vcpkg Path " + $vcpkgSourcesPath)
|
||||
|
||||
if (!(Test-Path $vcpkgSourcesPath))
|
||||
{
|
||||
New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null
|
||||
}
|
||||
|
||||
try{
|
||||
pushd $vcpkgSourcesPath
|
||||
cmd /c "$env:VS140COMNTOOLS..\..\VC\vcvarsall.bat" x86 "&" msbuild "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /m
|
||||
|
||||
Write-Verbose("Placing vcpkg.exe in the correct location")
|
||||
|
||||
Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRoot\vcpkg.exe | Out-Null
|
||||
Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRoot\scripts\vcpkgmetricsuploader.exe | Out-Null
|
||||
}
|
||||
finally{
|
||||
popd
|
||||
}
|
27
scripts/buildsystems/msbuild/applocal.ps1
Normal file
27
scripts/buildsystems/msbuild/applocal.ps1
Normal file
|
@ -0,0 +1,27 @@
|
|||
[cmdletbinding()]
|
||||
param([string]$targetBinary, [string]$installedDir, [string]$tlogFile)
|
||||
|
||||
function resolve($targetBinary) {
|
||||
$targetBinaryPath = Resolve-Path $targetBinary
|
||||
$targetBinaryDir = Split-Path $targetBinaryPath -parent
|
||||
|
||||
$a = $(link /dump /imports $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" })
|
||||
$a | % {
|
||||
if (Test-Path "$installedDir\$_") {
|
||||
if (Test-Path "$targetBinaryDir\$_") {
|
||||
Write-Verbose "$_ is already present"
|
||||
}
|
||||
else {
|
||||
Copy-Item $installedDir\$_ $targetBinaryDir
|
||||
Write-Verbose "Copying $installedDir\$_ -> $_"
|
||||
}
|
||||
"$targetBinaryDir\$_"
|
||||
if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$_" }
|
||||
resolve("$targetBinaryDir\$_")
|
||||
} else {
|
||||
Write-Verbose "$installedDir\$_ not found"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resolve($targetBinary)
|
58
scripts/buildsystems/msbuild/vcpkg.targets
Normal file
58
scripts/buildsystems/msbuild/vcpkg.targets
Normal file
|
@ -0,0 +1,58 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32||'">
|
||||
<VCPkgEnabled Condition="'$(VCPkgEnabled)' == ''">true</VCPkgEnabled>
|
||||
<VCPkgTriplet Condition="'$(VCPkgTriplet)' == ''">x86-windows</VCPkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32|Windows Store|10.0'">
|
||||
<VCPkgEnabled Condition="'$(VCPkgEnabled)' == ''">true</VCPkgEnabled>
|
||||
<VCPkgTriplet Condition="'$(VCPkgTriplet)' == ''">x86-uwp</VCPkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64||'">
|
||||
<VCPkgEnabled Condition="'$(VCPkgEnabled)' == ''">true</VCPkgEnabled>
|
||||
<VCPkgTriplet Condition="'$(VCPkgTriplet)' == ''">x64-windows</VCPkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64|Windows Store|10.0'">
|
||||
<VCPkgEnabled Condition="'$(VCPkgEnabled)' == ''">true</VCPkgEnabled>
|
||||
<VCPkgTriplet Condition="'$(VCPkgTriplet)' == ''">x64-uwp</VCPkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'arm|Windows Store|10.0'">
|
||||
<VCPkgEnabled Condition="'$(VCPkgEnabled)' == ''">true</VCPkgEnabled>
|
||||
<VCPkgTriplet Condition="'$(VCPkgTriplet)' == ''">arm-uwp</VCPkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VCPkgEnabled)' == 'true'">
|
||||
<VCPkgConfiguration Condition="'$(VCPkgConfiguration)' == ''">$(Configuration)</VCPkgConfiguration>
|
||||
<!-- Expected to ..\..\..\ over scripts\buildsystems\msbuild -->
|
||||
<VCPkgRoot Condition="'$(VCPkgRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\installed\$(VCPkgTriplet)\</VCPkgRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(VCPkgEnabled)' == 'true'">
|
||||
<Link>
|
||||
<AdditionalDependencies Condition="'$(VCPkgConfiguration)' == 'Debug'">$(VCPkgRoot)debug\lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(VCPkgConfiguration)' == 'Release'">$(VCPkgRoot)lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(VCPkgRoot)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup" Condition="'$(VCPkgEnabled)' == 'true' and '$(OutputType)' == 'exe'">
|
||||
<WriteLinesToFile
|
||||
File="$(TLogLocation)$(ProjectName).write.1u.tlog"
|
||||
Lines="^$(OutputPath)$(TargetName).$(OutputType);" Encoding="Unicode"/>
|
||||
<Exec Condition="'$(VCPkgConfiguration)' == 'Debug'"
|
||||
Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VCPkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
|
||||
ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
|
||||
</Exec>
|
||||
<Exec Condition="'$(VCPkgConfiguration)' == 'Release'"
|
||||
Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VCPkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
|
||||
ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
|
||||
</Exec>
|
||||
</Target>
|
||||
</Project>
|
52
scripts/buildsystems/vcpkg.cmake
Normal file
52
scripts/buildsystems/vcpkg.cmake
Normal file
|
@ -0,0 +1,52 @@
|
|||
if(NOT VCPKG_TOOLCHAIN)
|
||||
if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
else()
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
else()
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WINDOWS_STORE OR WINDOWS_PHONE)
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT uwp)
|
||||
else()
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT windows)
|
||||
endif()
|
||||
|
||||
set(_VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT})
|
||||
|
||||
set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${CMAKE_CURRENT_LIST_DIR}/../installed/${_VCPKG_TARGET_TRIPLET}/debug
|
||||
)
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${CMAKE_CURRENT_LIST_DIR}/../installed/${_VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_LIST_DIR}/../installed/${_VCPKG_TARGET_TRIPLET}/include)
|
||||
|
||||
option(OVERRIDE_ADD_EXECUTABLE "Automatically copy dependencies into the output directory for executables." ON)
|
||||
if(OVERRIDE_ADD_EXECUTABLE)
|
||||
function(add_executable name)
|
||||
_add_executable(${ARGV})
|
||||
add_custom_command(TARGET ${name} POST_BUILD
|
||||
COMMAND powershell -executionpolicy remotesigned -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
|
||||
-targetBinary $<TARGET_FILE:${name}>
|
||||
-installedDir "${_VCPKG_TOOLCHAIN_DIR}/../installed/${_VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
|
||||
-OutVariable out
|
||||
)
|
||||
endfunction()
|
||||
endif()
|
||||
set(VCPKG_TOOLCHAIN ON)
|
||||
endif()
|
19
scripts/cmake/vcpkg_apply_patches.cmake
Normal file
19
scripts/cmake/vcpkg_apply_patches.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
function(vcpkg_apply_patches)
|
||||
cmake_parse_arguments(_ap "" "SOURCE_PATH" "PATCHES" ${ARGN})
|
||||
|
||||
find_program(GIT git)
|
||||
set(PATCHNUM 0)
|
||||
foreach(PATCH ${_ap_PATCHES})
|
||||
message(STATUS "Applying patch ${PATCH}")
|
||||
set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM})
|
||||
execute_process(
|
||||
COMMAND ${GIT} --work-tree=. apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose
|
||||
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log
|
||||
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log
|
||||
WORKING_DIRECTORY ${_ap_SOURCE_PATH}
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
message(STATUS "Applying patch ${PATCH} done")
|
||||
math(EXPR PATCHNUM "${PATCHNUM}+1")
|
||||
endforeach()
|
||||
endfunction()
|
17
scripts/cmake/vcpkg_build_cmake.cmake
Normal file
17
scripts/cmake/vcpkg_build_cmake.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
function(vcpkg_build_cmake)
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
||||
endfunction()
|
32
scripts/cmake/vcpkg_build_msbuild.cmake
Normal file
32
scripts/cmake/vcpkg_build_msbuild.cmake
Normal file
|
@ -0,0 +1,32 @@
|
|||
function(vcpkg_build_msbuild)
|
||||
cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
|
||||
|
||||
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)
|
||||
set(_csc_RELEASE_CONFIGURATION Release)
|
||||
endif()
|
||||
if(NOT DEFINED _csc_DEBUG_CONFIGURATION)
|
||||
set(_csc_DEBUG_CONFIGURATION Debug)
|
||||
endif()
|
||||
|
||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
|
||||
/p:Configuration=${_csc_RELEASE_CONFIGURATION}
|
||||
/p:Platform=${TRIPLET_SYSTEM_ARCH}
|
||||
/p:VCPkgLocalAppDataDisabled=true
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
|
||||
/p:Configuration=${_csc_DEBUG_CONFIGURATION}
|
||||
/p:Platform=${TRIPLET_SYSTEM_ARCH}
|
||||
/p:VCPkgLocalAppDataDisabled=true
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
endfunction()
|
10
scripts/cmake/vcpkg_common_functions.cmake
Normal file
10
scripts/cmake/vcpkg_common_functions.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
include(vcpkg_download_distfile)
|
||||
include(vcpkg_extract_source_archive)
|
||||
include(vcpkg_execute_required_process)
|
||||
include(vcpkg_find_acquire_program)
|
||||
include(vcpkg_build_cmake)
|
||||
include(vcpkg_build_msbuild)
|
||||
include(vcpkg_install_cmake)
|
||||
include(vcpkg_configure_cmake)
|
||||
include(vcpkg_apply_patches)
|
||||
include(vcpkg_copy_pdbs)
|
54
scripts/cmake/vcpkg_configure_cmake.cmake
Normal file
54
scripts/cmake/vcpkg_configure_cmake.cmake
Normal file
|
@ -0,0 +1,54 @@
|
|||
find_program(vcpkg_configure_cmake_NINJA ninja)
|
||||
function(vcpkg_configure_cmake)
|
||||
cmake_parse_arguments(_csc "" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
|
||||
|
||||
if(_csc_GENERATOR)
|
||||
set(GENERATOR ${_csc_GENERATOR})
|
||||
elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
set(GENERATOR "Visual Studio 14 2015")
|
||||
elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x64")
|
||||
set(GENERATOR "Visual Studio 14 2015 Win64")
|
||||
elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "arm")
|
||||
set(GENERATOR "Visual Studio 14 2015 ARM")
|
||||
# elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND")
|
||||
# set(GENERATOR "Ninja")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
set(GENERATOR "Visual Studio 14 2015")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64")
|
||||
set(GENERATOR "Visual Studio 14 2015 Win64")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm")
|
||||
set(GENERATOR "Visual Studio 14 2015 ARM")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
|
||||
-G ${GENERATOR}
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DCMAKE_PREFIX_PATH=${CURRENT_INSTALLED_DIR}
|
||||
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME config-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
|
||||
-G ${GENERATOR}
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DCMAKE_PREFIX_PATH=${CURRENT_INSTALLED_DIR}/debug\\\\\\\;${CURRENT_INSTALLED_DIR}
|
||||
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME config-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
|
||||
endfunction()
|
38
scripts/cmake/vcpkg_copy_pdbs.cmake
Normal file
38
scripts/cmake/vcpkg_copy_pdbs.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
function(vcpkg_copy_pdbs)
|
||||
function(merge_filelist OUTVAR INVAR)
|
||||
set(MSG "")
|
||||
foreach(VAR ${${INVAR}})
|
||||
set(MSG "${MSG} ${VAR}\n")
|
||||
endforeach()
|
||||
set(${OUTVAR} ${MSG} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
file(GLOB_RECURSE DLLS ${CURRENT_PACKAGES_DIR}/bin/*.dll ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll)
|
||||
|
||||
set(DLLS_WITHOUT_MATCHING_PDBS)
|
||||
|
||||
foreach(DLL ${DLLS})
|
||||
execute_process(COMMAND dumpbin /PDBPATH ${DLL}
|
||||
COMMAND findstr PDB
|
||||
OUTPUT_VARIABLE PDB_LINE
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
|
||||
if(NOT error_code AND PDB_LINE MATCHES "PDB file found at")
|
||||
string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes
|
||||
string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes
|
||||
get_filename_component(DLL_DIR ${DLL} DIRECTORY)
|
||||
file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR})
|
||||
else()
|
||||
list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH)
|
||||
if(UNMATCHED_DLLS_LENGTH GREATER 0)
|
||||
merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS)
|
||||
message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}")
|
||||
endif()
|
||||
|
||||
endfunction()
|
20
scripts/cmake/vcpkg_download_distfile.cmake
Normal file
20
scripts/cmake/vcpkg_download_distfile.cmake
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Usage: vcpkg_download_distfile(<VAR> URL <http://...> FILENAME <output.zip> MD5 <5981de...>)
|
||||
function(vcpkg_download_distfile VAR)
|
||||
set(oneValueArgs URL FILENAME MD5)
|
||||
cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
if(EXISTS ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
|
||||
message(STATUS "Using cached ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}")
|
||||
file(MD5 ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} FILE_HASH)
|
||||
if(NOT FILE_HASH MATCHES ${vcpkg_download_distfile_MD5})
|
||||
message(FATAL_ERROR
|
||||
"File does not have expected hash: ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}\n"
|
||||
" ${FILE_HASH} <> ${vcpkg_download_distfile_MD5}\n"
|
||||
"Please delete the file and try again if this file should be downloaded again.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Downloading ${vcpkg_download_distfile_URL}")
|
||||
file(DOWNLOAD ${vcpkg_download_distfile_URL} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} EXPECTED_HASH MD5=${vcpkg_download_distfile_MD5})
|
||||
endif()
|
||||
set(${VAR} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} PARENT_SCOPE)
|
||||
endfunction()
|
21
scripts/cmake/vcpkg_execute_required_process.cmake
Normal file
21
scripts/cmake/vcpkg_execute_required_process.cmake
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Usage: vcpkg_execute_required_process(COMMAND <cmd> [<args>...] WORKING_DIRECTORY </path/to/dir> LOGNAME <my_log_name>)
|
||||
function(vcpkg_execute_required_process)
|
||||
cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN})
|
||||
#debug_message("vcpkg_execute_required_process(${vcpkg_execute_required_process_COMMAND})")
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_execute_required_process_COMMAND}
|
||||
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log
|
||||
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log
|
||||
RESULT_VARIABLE error_code
|
||||
WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY})
|
||||
#debug_message("error_code=${error_code}")
|
||||
file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR
|
||||
"Command failed: ${vcpkg_execute_required_process_COMMAND}\n"
|
||||
"Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n"
|
||||
"See logs for more information:\n"
|
||||
" ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-out.log\n"
|
||||
" ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-err.log\n")
|
||||
endif()
|
||||
endfunction()
|
14
scripts/cmake/vcpkg_extract_source_archive.cmake
Normal file
14
scripts/cmake/vcpkg_extract_source_archive.cmake
Normal file
|
@ -0,0 +1,14 @@
|
|||
include(vcpkg_execute_required_process)
|
||||
|
||||
function(vcpkg_extract_source_archive ARCHIVE)
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src)
|
||||
message(STATUS "Extracting source ${ARCHIVE}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME extract
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Extracting done")
|
||||
endfunction()
|
51
scripts/cmake/vcpkg_find_acquire_program.cmake
Normal file
51
scripts/cmake/vcpkg_find_acquire_program.cmake
Normal file
|
@ -0,0 +1,51 @@
|
|||
function(vcpkg_find_acquire_program VAR)
|
||||
if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND")
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(NOEXTRACT)
|
||||
|
||||
if(VAR MATCHES "PERL")
|
||||
set(PROGNAME perl)
|
||||
set(PATHS ${DOWNLOADS}/tools/perl/perl/bin)
|
||||
set(URL "http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit-portable.zip")
|
||||
set(ARCHIVE "strawberry-perl-5.20.2.1-64bit-portable.zip")
|
||||
set(HASH 5fca4b3cfa7c9cc95e0c4fd8652eba80)
|
||||
elseif(VAR MATCHES "NASM")
|
||||
set(PROGNAME nasm)
|
||||
set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.11.08)
|
||||
set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/win32/nasm-2.11.08-win32.zip")
|
||||
set(ARCHIVE "nasm-2.11.08-win32.zip")
|
||||
set(HASH 46a31e22be69637f7a9ccba12874133f)
|
||||
elseif(VAR MATCHES "YASM")
|
||||
set(PROGNAME yasm)
|
||||
set(PATHS ${DOWNLOADS}/tools/yasm)
|
||||
set(URL "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe")
|
||||
set(ARCHIVE "yasm.exe")
|
||||
set(NOEXTRACT ON)
|
||||
set(HASH 51e967dceddd1f84e67bff255df977b3)
|
||||
else()
|
||||
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
|
||||
endif()
|
||||
|
||||
find_program(${VAR} ${PROGNAME} PATHS ${PATHS})
|
||||
if(${VAR} MATCHES "-NOTFOUND")
|
||||
file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}
|
||||
EXPECTED_MD5 ${HASH}
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME})
|
||||
if(DEFINED NOEXTRACT)
|
||||
file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME})
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE}
|
||||
WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(${VAR} ${PROGNAME} PATHS ${PATHS})
|
||||
endif()
|
||||
|
||||
set(${VAR} ${${VAR}} PARENT_SCOPE)
|
||||
endfunction()
|
17
scripts/cmake/vcpkg_install_cmake.cmake
Normal file
17
scripts/cmake/vcpkg_install_cmake.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
function(vcpkg_install_cmake)
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build . --config Release --target install
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME package-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME package-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg done")
|
||||
endfunction()
|
84
scripts/doVcpkgRelease.ps1
Normal file
84
scripts/doVcpkgRelease.ps1
Normal file
|
@ -0,0 +1,84 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
|
||||
)
|
||||
|
||||
$version = git show HEAD:toolsrc/VERSION.txt
|
||||
#Remove the quotes from the string
|
||||
$version = $version.Substring(1, $version.length - 2)
|
||||
$versionRegex = '^\d+\.\d+\.\d+$'
|
||||
if (!($version -match $versionRegex))
|
||||
{
|
||||
throw [System.ArgumentException] ("Expected version in the form d.d.d but was " + $version)
|
||||
}
|
||||
|
||||
Write-Verbose("New version is " + $version)
|
||||
$gitTagString = "v$version"
|
||||
|
||||
# Intentionally doesn't have ^ (=starts with) to match remote tags as well
|
||||
$matchingTags = git tag | Where-Object {$_ -match "$gitTagString$"}
|
||||
if ($matchingTags.Length -gt 0)
|
||||
{
|
||||
throw [System.ArgumentException] ("Git tag matches existing tags: " + $matchingTags)
|
||||
}
|
||||
|
||||
$gitHash = git rev-parse HEAD
|
||||
Write-Verbose("Git hash is " + $gitHash)
|
||||
|
||||
$vcpkgPath = (get-item $PSScriptRoot).parent.FullName
|
||||
$gitStartOfHash = $gitHash.substring(0,6)
|
||||
$versionWithStartOfHash = "$version-$gitStartOfHash"
|
||||
$buildPath = "$vcpkgPath\build-$versionWithStartOfHash"
|
||||
$releasePath = "$vcpkgPath\release-$versionWithStartOfHash"
|
||||
Write-Verbose("Build Path " + $buildPath)
|
||||
Write-Verbose("Release Path " + $releasePath)
|
||||
|
||||
# 0 is metrics disabled, 1 is metrics enabled
|
||||
for ($disableMetrics = 0; $disableMetrics -le 1; $disableMetrics++)
|
||||
{
|
||||
|
||||
if (!(Test-Path $buildPath))
|
||||
{
|
||||
New-Item -ItemType directory -Path $buildPath -force | Out-Null
|
||||
}
|
||||
|
||||
if (!(Test-Path $releasePath))
|
||||
{
|
||||
New-Item -ItemType directory -Path $releasePath -force | Out-Null
|
||||
}
|
||||
|
||||
# Partial checkout for building vcpkg
|
||||
$dotGitDir = "$vcpkgPath\.git"
|
||||
$workTreeForBuildOnly = "$buildPath"
|
||||
$checkoutThisDirForBuildOnly1 = ".\scripts" # Must be relative to the root of the repository
|
||||
$checkoutThisDirForBuildOnly2 = ".\toolsrc" # Must be relative to the root of the repository
|
||||
Write-Verbose("Creating partial temporary checkout: $buildPath")
|
||||
git --git-dir="$dotGitDir" --work-tree="$workTreeForBuildOnly" checkout $gitHash -f -q -- $checkoutThisDirForBuildOnly1
|
||||
git --git-dir="$dotGitDir" --work-tree="$workTreeForBuildOnly" checkout $gitHash -f -q -- $checkoutThisDirForBuildOnly2
|
||||
|
||||
& "$buildPath\scripts\bootstrap.ps1" -disableMetrics $disableMetrics
|
||||
|
||||
# Full checkout which will be a zip along with the executables from the previous step
|
||||
$workTree = "$releasePath"
|
||||
$checkoutThisDir = ".\" # Must be relative to the root of the repository
|
||||
Write-Verbose("Creating temporary checkout: $releasePath")
|
||||
git --git-dir=$dotGitDir --work-tree=$workTree checkout $gitHash -f -q -- $checkoutThisDir
|
||||
|
||||
Copy-Item $buildPath\vcpkg.exe $releasePath\vcpkg.exe | Out-Null
|
||||
Copy-Item $buildPath\scripts\vcpkgmetricsuploader.exe $releasePath\scripts\vcpkgmetricsuploader.exe | Out-Null
|
||||
|
||||
Write-Verbose("Archiving")
|
||||
$outputArchive = "$vcpkgPath\vcpkg-$versionWithStartOfHash.zip"
|
||||
if ($disableMetrics -ne 0)
|
||||
{
|
||||
$outputArchive = "$vcpkgPath\vcpkg-$versionWithStartOfHash-external.zip"
|
||||
}
|
||||
Compress-Archive -Path "$releasePath\*" -CompressionLevel Optimal -DestinationPath $outputArchive -Force | Out-Null
|
||||
|
||||
Write-Verbose("Removing temporary checkouts: $releasePath")
|
||||
Remove-Item -recurse $buildPath | Out-Null
|
||||
Remove-Item -recurse $releasePath | Out-Null
|
||||
|
||||
Write-Verbose("Redistributable archive is: $outputArchive")
|
||||
}
|
||||
git tag $gitTagString
|
212
scripts/fetchDependency.ps1
Normal file
212
scripts/fetchDependency.ps1
Normal file
|
@ -0,0 +1,212 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$Dependency
|
||||
)
|
||||
|
||||
Import-Module BitsTransfer
|
||||
|
||||
$scriptsdir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
$vcpkgroot = Split-path $scriptsdir -Parent
|
||||
$downloadsdir = "$vcpkgroot\downloads"
|
||||
|
||||
function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
|
||||
{
|
||||
function hasGreaterOrEqualVersion([Parameter(Mandatory=$true)]$requiredVersion, [Parameter(Mandatory=$true)]$availableVersion)
|
||||
{
|
||||
if ($availableVersion[0] -gt $requiredVersion[0]) {return $true}
|
||||
if ($availableVersion[0] -lt $requiredVersion[0]) {return $false}
|
||||
|
||||
if ($availableVersion[1] -gt $requiredVersion[1]) {return $true}
|
||||
if ($availableVersion[1] -lt $requiredVersion[1]) {return $false}
|
||||
|
||||
return ($availableVersion[2] -ge $requiredVersion[2])
|
||||
}
|
||||
|
||||
function promptForDownload([string]$title, [string]$message, [string]$yesDescription, [string]$noDescription)
|
||||
{
|
||||
if ((Test-Path "$downloadsdir\AlwaysAllowEverything") -Or (Test-Path "$downloadsdir\AlwaysAllowDownloads"))
|
||||
{
|
||||
return $true
|
||||
}
|
||||
|
||||
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", $yesDescription
|
||||
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", $noDescription
|
||||
$AlwaysAllowDownloads = New-Object System.Management.Automation.Host.ChoiceDescription "&Always Allow Downloads", ($yesDescription + "(Future download prompts will not be displayed)")
|
||||
|
||||
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $AlwaysAllowDownloads)
|
||||
$result = $host.ui.PromptForChoice($title, $message, $options, 0)
|
||||
|
||||
switch ($result)
|
||||
{
|
||||
0 {return $true}
|
||||
1 {return $false}
|
||||
2 {
|
||||
New-Item "$downloadsdir\AlwaysAllowDownloads" -type file -force | Out-Null
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
throw "Unexpected result"
|
||||
}
|
||||
|
||||
|
||||
function performDownload( [Parameter(Mandatory=$true)][string]$Dependency,
|
||||
[Parameter(Mandatory=$true)][string]$url,
|
||||
[Parameter(Mandatory=$true)][string]$downloaddir,
|
||||
[Parameter(Mandatory=$true)][string]$downloadPath,
|
||||
[Parameter(Mandatory=$true)][string]$downloadVersion,
|
||||
[Parameter(Mandatory=$true)][string]$requiredVersion)
|
||||
{
|
||||
if (Test-Path $downloadPath)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
$title = "Download " + $Dependency
|
||||
$message = ("No suitable version of " + $Dependency + " was found (requires $requiredVersion or higher). Download portable version?")
|
||||
$yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally."
|
||||
$noDescription = "Does not download " + $Dependency + "."
|
||||
|
||||
$userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription
|
||||
if (!$userAllowedDownload)
|
||||
{
|
||||
throw [System.IO.FileNotFoundException] ("Could not detect suitable version of " + $Dependency + " and download not allowed")
|
||||
}
|
||||
|
||||
if (!(Test-Path $downloaddir))
|
||||
{
|
||||
New-Item -ItemType directory -Path $downloaddir | Out-Null
|
||||
}
|
||||
|
||||
if ($Dependency -ne "git") # git fails with BITS
|
||||
{
|
||||
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction SilentlyContinue
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(Test-Path $downloadPath))
|
||||
{
|
||||
Write-Host("Downloading $Dependency...")
|
||||
(New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Enums (without resorting to C#) are only available on powershell 5+.
|
||||
$ExtractionType_NO_EXTRACTION_REQUIRED = 0
|
||||
$ExtractionType_ZIP = 1
|
||||
$ExtractionType_SELF_EXTRACTING_7Z = 2
|
||||
|
||||
|
||||
# Using this to wait for the execution to finish
|
||||
function Invoke-Command()
|
||||
{
|
||||
param ( [string]$program = $(throw "Please specify a program" ),
|
||||
[string]$argumentString = "",
|
||||
[switch]$waitForExit )
|
||||
|
||||
$psi = new-object "Diagnostics.ProcessStartInfo"
|
||||
$psi.FileName = $program
|
||||
$psi.Arguments = $argumentString
|
||||
$proc = [Diagnostics.Process]::Start($psi)
|
||||
if ( $waitForExit )
|
||||
{
|
||||
$proc.WaitForExit();
|
||||
}
|
||||
}
|
||||
|
||||
function Expand-ZIPFile($file, $destination)
|
||||
{
|
||||
Write-Host($file)
|
||||
Write-Host($destination)
|
||||
$shell = new-object -com shell.application
|
||||
$zip = $shell.NameSpace($file)
|
||||
foreach($item in $zip.items())
|
||||
{
|
||||
# Piping to Out-Null is used to block until finished
|
||||
$shell.Namespace($destination).copyhere($item) | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
if($Dependency -eq "cmake")
|
||||
{
|
||||
$requiredVersion = "3.5.0"
|
||||
$downloadVersion = "3.5.2"
|
||||
$url = "https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.zip"
|
||||
$downloadName = "cmake-3.5.2-win32-x86.zip"
|
||||
$expectedDownloadedFileHash = "671073aee66b3480a564d0736792e40570a11e861bb34819bb7ae7858bbdfb80"
|
||||
$executableFromDownload = "$downloadsdir\cmake-3.5.2-win32-x86\bin\cmake.exe"
|
||||
$extractionType = $ExtractionType_ZIP
|
||||
}
|
||||
elseif($Dependency -eq "nuget")
|
||||
{
|
||||
$requiredVersion = "1.0.0"
|
||||
$downloadVersion = "3.4.3"
|
||||
$url = "https://dist.nuget.org/win-x86-commandline/v3.4.3/nuget.exe"
|
||||
$downloadName = "nuget.exe"
|
||||
$expectedDownloadedFileHash = "3B1EA72943968D7AF6BACDB4F2F3A048A25AFD14564EF1D8B1C041FDB09EBB0A"
|
||||
$executableFromDownload = "$downloadsdir\nuget.exe"
|
||||
$extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
|
||||
}
|
||||
elseif($Dependency -eq "git")
|
||||
{
|
||||
$requiredVersion = "2.0.0"
|
||||
$downloadVersion = "2.8.3"
|
||||
$url = "https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/PortableGit-2.8.3-32-bit.7z.exe" # We choose the 32-bit version
|
||||
$downloadName = "PortableGit-2.8.3-32-bit.7z.exe"
|
||||
$expectedDownloadedFileHash = "DE52D070219E9C4EC1DB179F2ADBF4B760686C3180608F0382A1F8C7031E72AD"
|
||||
# There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH.
|
||||
# Therefore, choosing the cmd dir here as well.
|
||||
$executableFromDownload = "$downloadsdir\PortableGit\cmd\git.exe"
|
||||
$extractionType = $ExtractionType_SELF_EXTRACTING_7Z
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Unknown program requested"
|
||||
}
|
||||
|
||||
$downloadPath = "$downloadsdir\$downloadName"
|
||||
performDownload $Dependency $url $downloadsdir $downloadPath $downloadVersion $requiredVersion
|
||||
|
||||
#calculating the hash
|
||||
$hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256")
|
||||
$fileAsByteArray = [io.File]::ReadAllBytes($downloadPath)
|
||||
$hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray)
|
||||
$downloadedFileHash = -Join ($hashByteArray | ForEach {"{0:x2}" -f $_})
|
||||
|
||||
if ($expectedDownloadedFileHash -ne $downloadedFileHash)
|
||||
{
|
||||
throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency)
|
||||
}
|
||||
|
||||
if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED)
|
||||
{
|
||||
# do nothing
|
||||
}
|
||||
elseif($extractionType -eq $ExtractionType_ZIP)
|
||||
{
|
||||
if (-not (Test-Path $executableFromDownload)) # consider renaming the extraction folder to make sure the extraction finished
|
||||
{
|
||||
# Expand-Archive $downloadPath -dest "$downloadsdir" -Force # Requires powershell 5+
|
||||
Expand-ZIPFile -File $downloadPath -Destination $downloadsdir
|
||||
}
|
||||
}
|
||||
elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z)
|
||||
{
|
||||
if (-not (Test-Path $executableFromDownload))
|
||||
{
|
||||
Invoke-Command $downloadPath "-y" -waitForExit:$true
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Invalid extraction type"
|
||||
}
|
||||
|
||||
if (-not (Test-Path $executableFromDownload))
|
||||
{
|
||||
throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency)
|
||||
}
|
||||
}
|
||||
|
||||
SelectProgram $Dependency
|
85
scripts/ports.cmake
Normal file
85
scripts/ports.cmake
Normal file
|
@ -0,0 +1,85 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
get_filename_component(VCPKG_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
|
||||
|
||||
string(REGEX REPLACE "([^-]*)-([^-]*)" "\\1" TRIPLET_SYSTEM_ARCH ${TARGET_TRIPLET})
|
||||
string(REGEX REPLACE "([^-]*)-([^-]*)" "\\2" TRIPLET_SYSTEM_NAME ${TARGET_TRIPLET})
|
||||
|
||||
if(NOT EXISTS ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake)
|
||||
message(FATAL_ERROR "Unsupported target triplet. Toolchain file does not exist: ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake")
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${VCPKG_ROOT_DIR}/scripts/cmake)
|
||||
set(CURRENT_INSTALLED_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET} CACHE PATH "Location to install final packages")
|
||||
set(DOWNLOADS ${VCPKG_ROOT_DIR}/downloads CACHE PATH "Location to download sources and tools")
|
||||
set(PACKAGES_DIR ${VCPKG_ROOT_DIR}/packages CACHE PATH "Location to store package images")
|
||||
set(BUILDTREES_DIR ${VCPKG_ROOT_DIR}/buildtrees CACHE PATH "Location to perform actual extract+config+build")
|
||||
|
||||
if(PORT)
|
||||
set(CURRENT_BUILDTREES_DIR ${BUILDTREES_DIR}/${PORT})
|
||||
set(CURRENT_PACKAGES_DIR ${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET})
|
||||
endif()
|
||||
|
||||
macro(debug_message)
|
||||
if(DEFINED PORT_DEBUG AND PORT_DEBUG)
|
||||
message(STATUS "[DEBUG] ${ARGN}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(CMD MATCHES "^SCAFFOLD$")
|
||||
if(EXISTS ports/${PORT}/portfile.cmake)
|
||||
message(FATAL_ERROR "Portfile already exists: '${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake'")
|
||||
endif()
|
||||
if(NOT FILENAME)
|
||||
get_filename_component(FILENAME "${URL}" NAME)
|
||||
endif()
|
||||
string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME ${FILENAME})
|
||||
if(EXISTS ${DOWNLOADS}/${FILENAME})
|
||||
message(STATUS "Using pre-downloaded: ${DOWNLOADS}/${FILENAME}")
|
||||
message(STATUS "If this is not desired, delete the file and ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake")
|
||||
else()
|
||||
include(vcpkg_download_distfile)
|
||||
file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code)
|
||||
if(NOT error_code MATCHES "0;")
|
||||
message(FATAL_ERROR "Error downloading file: ${error_code}")
|
||||
endif()
|
||||
endif()
|
||||
file(MD5 ${DOWNLOADS}/${FILENAME} MD5)
|
||||
|
||||
file(MAKE_DIRECTORY ports/${PORT})
|
||||
configure_file(scripts/templates/portfile.in.cmake ports/${PORT}/portfile.cmake @ONLY)
|
||||
|
||||
message(STATUS "Generated portfile: ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake")
|
||||
elseif(CMD MATCHES "^BUILD$")
|
||||
if(NOT DEFINED CURRENT_PORT_DIR)
|
||||
message(FATAL_ERROR "CURRENT_PORT_DIR was not defined")
|
||||
endif()
|
||||
set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR)
|
||||
if(NOT EXISTS ${CURRENT_PORT_DIR})
|
||||
message(FATAL_ERROR "Cannot find port: ${PORT}\n Directory does not exist: ${CURRENT_PORT_DIR}")
|
||||
endif()
|
||||
if(NOT EXISTS ${CURRENT_PORT_DIR}/portfile.cmake)
|
||||
message(FATAL_ERROR "Port is missing portfile: ${CURRENT_PORT_DIR}/portfile.cmake")
|
||||
endif()
|
||||
if(NOT EXISTS ${CURRENT_PORT_DIR}/CONTROL)
|
||||
message(FATAL_ERROR "Port is missing control file: ${CURRENT_PORT_DIR}/CONTROL")
|
||||
endif()
|
||||
|
||||
message(STATUS "CURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}")
|
||||
message(STATUS "DOWNLOADS=${DOWNLOADS}")
|
||||
|
||||
message(STATUS "CURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR}")
|
||||
message(STATUS "CURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR}")
|
||||
message(STATUS "CURRENT_PORT_DIR=${CURRENT_PORT_DIR}")
|
||||
|
||||
unset(PACKAGES_DIR)
|
||||
unset(BUILDTREES_DIR)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR})
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR})
|
||||
message(FATAL_ERROR "Unable to remove directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
include(${CURRENT_PORT_DIR}/portfile.cmake)
|
||||
endif()
|
21
scripts/templates/portfile.in.cmake
Normal file
21
scripts/templates/portfile.in.cmake
Normal file
|
@ -0,0 +1,21 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "@URL@"
|
||||
FILENAME "@FILENAME@"
|
||||
MD5 @MD5@
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/@ROOT_NAME@
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Handle copyright
|
||||
#file(COPY ${CURRENT_BUILDTREES_DIR}/src/@ROOT_NAME@/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@)
|
||||
#file(RENAME ${CURRENT_PACKAGES_DIR}/share/@PORT@/LICENSE ${CURRENT_PACKAGES_DIR}/share/@PORT@/copyright)
|
1
toolsrc/VERSION.txt
Normal file
1
toolsrc/VERSION.txt
Normal file
|
@ -0,0 +1 @@
|
|||
"0.0.30"
|
30
toolsrc/include/BinaryParagraph.h
Normal file
30
toolsrc/include/BinaryParagraph.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include "SourceParagraph.h"
|
||||
#include "triplet.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct BinaryParagraph
|
||||
{
|
||||
BinaryParagraph();
|
||||
explicit BinaryParagraph(const std::unordered_map<std::string, std::string>& fields);
|
||||
BinaryParagraph(const SourceParagraph& spgh, const triplet& target_triplet);
|
||||
|
||||
std::string displayname() const;
|
||||
|
||||
std::string fullstem() const;
|
||||
|
||||
std::string dir() const;
|
||||
|
||||
std::string name;
|
||||
std::string version;
|
||||
std::string description;
|
||||
std::string maintainer;
|
||||
triplet target_triplet;
|
||||
std::vector<std::string> depends;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const BinaryParagraph& pgh);
|
||||
}
|
20
toolsrc/include/SourceParagraph.h
Normal file
20
toolsrc/include/SourceParagraph.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct SourceParagraph
|
||||
{
|
||||
SourceParagraph();
|
||||
|
||||
explicit SourceParagraph(const std::unordered_map<std::string, std::string>& fields);
|
||||
|
||||
std::string name;
|
||||
std::string version;
|
||||
std::string description;
|
||||
std::string maintainer;
|
||||
std::vector<std::string> depends;
|
||||
};
|
||||
}
|
41
toolsrc/include/StatusParagraph.h
Normal file
41
toolsrc/include/StatusParagraph.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include "BinaryParagraph.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
enum class install_state_t
|
||||
{
|
||||
error,
|
||||
not_installed,
|
||||
half_installed,
|
||||
installed,
|
||||
};
|
||||
|
||||
enum class want_t
|
||||
{
|
||||
error,
|
||||
unknown,
|
||||
install,
|
||||
hold,
|
||||
deinstall,
|
||||
purge
|
||||
};
|
||||
|
||||
struct StatusParagraph
|
||||
{
|
||||
StatusParagraph();
|
||||
explicit StatusParagraph(const std::unordered_map<std::string, std::string>& fields);
|
||||
|
||||
BinaryParagraph package;
|
||||
want_t want;
|
||||
install_state_t state;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const StatusParagraph& pgh);
|
||||
|
||||
std::string to_string(install_state_t f);
|
||||
|
||||
std::string to_string(want_t f);
|
||||
}
|
49
toolsrc/include/StatusParagraphs.h
Normal file
49
toolsrc/include/StatusParagraphs.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma once
|
||||
#include "StatusParagraph.h"
|
||||
#include <memory>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct StatusParagraphs
|
||||
{
|
||||
StatusParagraphs();
|
||||
explicit StatusParagraphs(std::vector<std::unique_ptr<StatusParagraph>>&& ps);
|
||||
|
||||
using container = std::vector<std::unique_ptr<StatusParagraph>>;
|
||||
using iterator = container::reverse_iterator;
|
||||
using const_iterator = container::const_reverse_iterator;
|
||||
|
||||
const_iterator find(const std::string& name, const triplet& target_triplet) const;
|
||||
iterator find(const std::string& name, const triplet& target_triplet);
|
||||
iterator find_installed(const std::string& name, const triplet& target_triplet);
|
||||
|
||||
iterator insert(std::unique_ptr<StatusParagraph>);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, const StatusParagraphs&);
|
||||
|
||||
auto end()
|
||||
{
|
||||
return paragraphs.rend();
|
||||
}
|
||||
|
||||
auto end() const
|
||||
{
|
||||
return paragraphs.rend();
|
||||
}
|
||||
|
||||
auto begin()
|
||||
{
|
||||
return paragraphs.rbegin();
|
||||
}
|
||||
|
||||
auto begin() const
|
||||
{
|
||||
return paragraphs.rbegin();
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<StatusParagraph>> paragraphs;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream&, const StatusParagraphs&);
|
||||
}
|
81
toolsrc/include/expected.h
Normal file
81
toolsrc/include/expected.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
#pragma once
|
||||
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
template <class T>
|
||||
class expected
|
||||
{
|
||||
public:
|
||||
// Constructors are intentionally implicit
|
||||
expected(const std::error_code& ec) : m_error_code(ec), m_t()
|
||||
{
|
||||
}
|
||||
|
||||
expected(std::errc ec) : expected(std::make_error_code(ec))
|
||||
{
|
||||
}
|
||||
|
||||
expected(const T& t) : m_error_code(), m_t(t)
|
||||
{
|
||||
}
|
||||
|
||||
expected(T&& t) : m_error_code(), m_t(std::move(t))
|
||||
{
|
||||
}
|
||||
|
||||
expected() : expected(std::error_code(), T())
|
||||
{
|
||||
}
|
||||
|
||||
expected(const expected&) = default;
|
||||
expected(expected&&) = default;
|
||||
expected& operator=(const expected&) = default;
|
||||
expected& operator=(expected&&) = default;
|
||||
|
||||
std::error_code error_code() const
|
||||
{
|
||||
return this->m_error_code;
|
||||
}
|
||||
|
||||
T&& get_or_throw() &&
|
||||
{
|
||||
throw_if_error();
|
||||
return std::move(this->m_t);
|
||||
}
|
||||
|
||||
const T& get_or_throw() const &
|
||||
{
|
||||
throw_if_error();
|
||||
return this->m_t;
|
||||
}
|
||||
|
||||
const T* get() const
|
||||
{
|
||||
if (m_error_code)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return &this->m_t;
|
||||
}
|
||||
|
||||
T* get()
|
||||
{
|
||||
if (m_error_code)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return &this->m_t;
|
||||
}
|
||||
|
||||
private:
|
||||
void throw_if_error() const
|
||||
{
|
||||
Checks::check_throw(!this->m_error_code, this->m_error_code.message().c_str());
|
||||
}
|
||||
|
||||
std::error_code m_error_code;
|
||||
T m_t;
|
||||
};
|
||||
}
|
19
toolsrc/include/metrics.h
Normal file
19
toolsrc/include/metrics.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
void SetSendMetrics(bool should_send_metrics);
|
||||
void SetPrintMetrics(bool should_print_metrics);
|
||||
void SetUserInformation(const std::string& user_id, const std::string& first_use_time);
|
||||
void InitUserInformation(std::string& user_id, std::string& first_use_time);
|
||||
|
||||
void TrackMetric(const std::string& name, double value);
|
||||
void TrackProperty(const std::string& name, const std::string& value);
|
||||
void TrackProperty(const std::string& name, const std::wstring& value);
|
||||
bool GetCompiledMetricsEnabled();
|
||||
|
||||
void Upload(const std::string& payload);
|
||||
void Flush();
|
||||
}
|
11
toolsrc/include/opt_bool.h
Normal file
11
toolsrc/include/opt_bool.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
enum class opt_bool
|
||||
{
|
||||
unspecified,
|
||||
enabled,
|
||||
disabled
|
||||
};
|
||||
}
|
50
toolsrc/include/package_spec.h
Normal file
50
toolsrc/include/package_spec.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
#include "package_spec_parse_result.h"
|
||||
#include "triplet.h"
|
||||
#include "expected.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct package_spec
|
||||
{
|
||||
std::string name;
|
||||
triplet target_triplet;
|
||||
|
||||
std::string dir() const;
|
||||
};
|
||||
|
||||
expected<package_spec> parse(const std::string& spec, const triplet& default_target_triplet);
|
||||
|
||||
std::string to_string(const package_spec& spec);
|
||||
|
||||
std::string to_printf_arg(const package_spec& spec);
|
||||
|
||||
bool operator==(const package_spec& left, const package_spec& right);
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const package_spec& spec);
|
||||
} //namespace vcpkg
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<vcpkg::package_spec>
|
||||
{
|
||||
size_t operator()(const vcpkg::package_spec& value) const
|
||||
{
|
||||
size_t hash = 17;
|
||||
hash = hash * 31 + std::hash<std::string>()(value.name);
|
||||
hash = hash * 31 + std::hash<vcpkg::triplet>()(value.target_triplet);
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct equal_to<vcpkg::package_spec>
|
||||
{
|
||||
bool operator()(const vcpkg::package_spec& left, const vcpkg::package_spec& right) const
|
||||
{
|
||||
return left == right;
|
||||
}
|
||||
};
|
||||
} // namespace std
|
34
toolsrc/include/package_spec_parse_result.h
Normal file
34
toolsrc/include/package_spec_parse_result.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
#include <system_error>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
enum class package_spec_parse_result
|
||||
{
|
||||
success = 0,
|
||||
too_many_colons
|
||||
};
|
||||
|
||||
struct package_spec_parse_result_category_impl final : std::error_category
|
||||
{
|
||||
virtual const char* name() const noexcept override;
|
||||
|
||||
virtual std::string message(int ev) const noexcept override;
|
||||
};
|
||||
|
||||
const std::error_category& package_spec_parse_result_category();
|
||||
|
||||
std::error_code make_error_code(package_spec_parse_result e);
|
||||
|
||||
package_spec_parse_result to_package_spec_parse_result(int i);
|
||||
|
||||
package_spec_parse_result to_package_spec_parse_result(std::error_code ec);
|
||||
}
|
||||
|
||||
// Enable implicit conversion to std::error_code
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct is_error_code_enum<vcpkg::package_spec_parse_result> : ::std::true_type
|
||||
{};
|
||||
}
|
8
toolsrc/include/post_build_lint.h
Normal file
8
toolsrc/include/post_build_lint.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
#include "package_spec.h"
|
||||
#include "vcpkg_paths.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
void perform_all_checks(const package_spec& spec, const vcpkg_paths& paths);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue