This PR also renames the VcpkgUserTriplet MSBuild variable to VcpkgTriplet to minimize user confusion compared to previous practice and documentation.
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Use IncludePath and LibraryPath propertiesThese tool agnostic properties allow to configure ClCompile and ResourceCompile without repeating the code.
This change includes my changes from #4454.
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
==== Changes Related to manifests ====
* Add the `manifests` feature flag
* This only says whether we look for a `vcpkg.json` in the cwd, not
whether we support parsing manifests (for ports, for example)
* Changes to the manifests RFC
* `"authors"` -> `"maintainers"`
* `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags`
* reserve `"core"` in addition to `"default"`, since that's already
reserved for features
* Add a small helper note about what identifiers must look like
* `<license-string>`: SPDX v3.8 -> v3.9
* `"feature"."description"` is allowed to be an array of strings as well
* `"version"` -> `"version-string"` for forward-compat with versions
RFC
* Add the `--feature-flags` option
* Add the ability to turn off feature flags via passing
`-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags`
* Add CMake toolchain support for manifests
* Requires either:
* a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}`
or `VCPKG_FEATURE_FLAGS`
* Passing the `VCPKG_ENABLE_MANIFESTS` option
* The toolchain will install your packages to
`${VCPKG_MANIFEST_DIR}/vcpkg_installed`.
* Add MSBuild `vcpkg integrate install` support for manifests
* Requires `VcpkgEnableManifest` to be true
* `vcpkg create` creates a port that has a `vcpkg.json` instead of a
`CONTROL`
* argparse, abseil, 3fd, and avisynthplus ports switched to manifest
from CONTROL
* Add support for `--x-manifest-root`, as well as code for finding it if
not passed
* Add support for parsing manifests!
* Add a filesystem lock!
==== Important Changes which are somewhat unrelated to manifests ====
* Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}`
* Add `PlatformExpression` type which takes the place of the old logic
expression
* Split the parsing of platform expressions from checking whether
they're true or not
* Eagerly parse PlatformExpressions as opposed to leaving them as
strings
* Add checking for feature flag consistency
* i.e., if `-binarycaching` is passed, you shouldn't be passing
`--binarysource`
* Add the `Json::Reader` type which, with the help of user-defined
visitors, converts JSON to your internal type
* VcpkgArgParser: place the switch names into a constant as opposed to
using magic constants
* In general update the parsing code so that this ^ works
* Add `Port-Version` fields to CONTROL files
* This replaces the existing practice of
`Version: <my-version>-<port-version>`
==== Smaller changes ====
* small drive-by cleanups to some CMake
* `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` ->
`${CURRENT_INSTALLED_DIR}`
* Remove `-analyze` when compiling with clang-cl, since that's not a
supported flag (vcpkg's build system)
* Add a message about which compiler is detected by vcpkg's build
system machinery
* Fix `Expected::then`
* Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a
`strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`)
* Add `Strings::strto` which converts strings to numeric types
* Support built-in arrays and `StringView` for `Strings::join`
* Add `operator<` and friends to `StringView`
* Add `substr` to `StringView`
* SourceParagraphParser gets some new errors
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* Add iOS community triplets and toolchain support
Added an iOS toolchain to enable building packages for iOS.
The toolchain is used when a triplet's VCPKG_CMAKE_SYSTEM_NAME is set
to iOS.
To configure which architecture should be built, as well as other
iOS specifics, the following triplet variables can be set:
- VCPKG_TARGET_ARCHITECTURE
- VCPKG_OSX_SYSROOT
- VCPKG_OSX_DEPLOYMENT_TARGET
- VCPKG_OSX_ARCHITECTURES
The following VCPKG_TARGET_ARCHITECTURE values are currently
supported:
- arm, arm64, x64, x86.
The following VCPKG_OSX_SYSROOT values are currently supported:
- iphoneos, iphonesimulator, or an absolute path to the device or
simulator Xcode SDK.
VCPKG_OSX_DEPLOYMENT_TARGET can be set to control the minimum iOS
delopyment target for the built libraries.
CMAKE_OSX_ARCHITECTURES is derived from VCPKG_TARGET_ARCHITECTURE,
so generally it should not be set. In case if someone needs to target
a more specific architecture (like armv7k or arm64e), it can
be set in the triplet via VCPKG_OSX_ARCHITECTURES.
Note that only certain combinations of the architecture and sysroot
will work: simulator SDKs only provide x86-based libraries, etc.
The toolchain also sets CMAKE_SYSTEM_PROCESSOR for certain
configurations, because certain packages (like libpng) depend on the
processor type.
Added 4 community iOS triplets that build static libraries:
- arm-ios, arm64-ios, x86-ios, x64-ios.
The non-arm triplets target the iOS simulator.
The triplets build static libraries because they are easiest to
integrate into an iOS project. Dynamic libraries or frameworks require
code signing on iOS, which complicates integration.
Added heuristics to try and automatically detect what iOS triplet to
use when building your own CMake project (so when a CMake project sets
CMAKE_TOOLCHAIN_FILE to buildsystems/vcpkg.cmake), if no explicit
triplet is provided (VCPKG_TARGET_TRIPLET is undefined).
The heuristic checks for the values of CMAKE_SYSTEM_NAME and
CMAKE_OSX_ARCHITECTURES. Note that for this to work,
CMAKE_OSX_ARCHITECTURES needs to be set before the first project()
call in your CMake project.
Added workaround so find_package finds vcpkg installed packages
when targeting iOS.
This is done by saving / restoring the value of CMAKE_FIND_ROOT_PATH
while also adding the vcpkg package root in the find_package override
macro.
The workaround can be removed once vcpkg upgrades to CMake 3.15.0
or higher where the issue is fixed.
Fixes: #6003
* Fix building libpng and pcre2 targetting iOS
Fixes: #6003
VCPKG_SUPPRESS_INSTALLED_LIBRARIES_WARNING - Silences warning about lacking installed libraries for the current triplet
VCPKG_OVERRIDE_FIND_PACKAGE_NAME - Enables cooperation with other tooling that may want to hook find_package
* Map MinSizeRel and RelWithDebInfo to Release by default
* switch to CMAKE_CONFIGURATION_TYPES
* changed mapping slightly
* add empty list element to the mapping
* more comments and an option to turn verbose messages on.
* removed line info.
It would require the file name to make sense out of it.
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES is used when CMake 3.6.0 or higher
is encountered. For older versions the previous behavior emulating this
functionality is used.
Boost 1.70 introduces "native" cmake config scripts which are
accidentally used when installing a vcpkg package. This only occurs
when Boost 1.70 is installed in the system when the user uses
`vcpkg install`.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
* [hdf5] Use cmake wrapper to ensure consuming libraries link to szip in static build
* [hdf5] Move hdf5 cmake code from vcpkg.cmake to vcpkg-cmake-wrapper
* [hdf5] Do not force search in config mode
* [hdf5] balance needs of vtk and kealib
* some libraries export <PackageName>LibraryDepends.cmake
instead of <PackageName>Targets.cmake.
Those file also need the fix of #1044
should close#4753
* prefered the general solution #4622.
hopefully solved the issue within #4150
replaced the regex with something more readable
(also ident is lost)
should close:
#4753#4633#4150
and maybe more
* Hash vcpkg_fixup_cmake_targets.cmake
* [boost] Fix use of find_package(Boost) with cache variables
[socket-io-client] Fix install
* reversed change back to use regex replace
* [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files
* [tinyspline] Ignore warnings treated as errors
* [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches
* [libsodium] Fix apply patches
* [folly] Link correct libraries in debug and release
* [vtk] Remove unset of _IMPORT_PREFIX
* [tinyspline] Do not treat warnings as errors
* [smpeg2] Fix double* to int comparison
* [nvtt] Define value for HAVE_UNISTD_H in MacOS
* [libui] Fix MacOS X build
* [zlib] Fix download URL
* [qhull] Update to v7.2.1
* [podofo] Set value for HAVE_UNISTD_H in MacOS
* [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version
* [mongo-c-driver] Set _IMPORT_PREFIX
* [tmxparser] Bump CONTROL version
* [qhull,vxl] Bump CONTROL version
* make user wide integration not burn everything if LLVM is used as a toolset.
(e.g. cmake -G "VS" -TLLVM fails to even find compiler due to linker issues)
fixes#4359 but might have side effects for that toolset.
(e.g. not automatically adding dependencies)
* remove whitespaces
* [vcpkg-integrate] Conform to MSBuild conventions for comparisons
* Add libplist
* Add libusbmuxd
* Fix typos
* Add getopt
* Add libimobiledevice
* Fix typos
* Add libideviceactivation
* Add ideviceinstaller
* Include utilities
* Install usbmuxd
* Add readline
* Fix readline on 64-bit windows
* Add libirecovery
* libideviceactivation: include tools
* Bump versions to fix build issues
* Bump versions
* Add idevicerestore
* [getopt][getopt-win32] Rename to getopt-win32 and only install on Windows Desktop
* [readline][readline-win32] Rename to readline-win32 and only install for Windows Desktop
* [vcpkg_from_github][vcpkg_apply_patches] Make PATCHES relative to the current port directory
* [vcpkg_install_msbuild][vcpkg_check_linkage] Introduce vcpkg_install_msbuild() and vcpkg_check_linkage().
* [libimobiledevice et al] Use vcpkg_from_github() and vcpkg_install_msbuild()
* [readline] Fix static builds
* [magnum] Properly deploy magnum plugins
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Add tinygltfimporter feature
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum][magnum-plugins] Add features: trade and any*
Prepares upcoming move of those sublibraries and allows building --head
immediately.
For current release this only adds some unused cmake flags that will be
ignored.
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum] Add gl feature, cleanup dependencies, mark upcoming features
And sort features alphabetically.
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Prepare renaming of static flag for --head installs
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum] Add two missing feature dependencies
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum] Enable magnum[any*] features by default
Signed-off-by: Squareys <squareys@googlemail.com>
* Add preliminary support for arm-windows and arm64-windows triplets
Visual Studio 15.4 shipped with new VC tools targeting arm and arm64
for desktop. This change allows for recognition and usage of new
triplets supporting arm and arm64 Windows desktop and server targets.
* Remove unnecessary changes
* Part 2
* Part 3
* Make detection of Arm64 _VCPKG_TARGET_ARCHITECTURE precise
* Enforce usage of Visual Studio CMake generatorfor arm and temporarily arm64 targets
* Address code review feedback, clean libjpeg-turbo port.cmake
* [libjpeg-turbo][tiff] Reduce changes to existing libraries.
* [vcpkg-cmake] Simplify toolchain selection logic and improve comments
* Fix find Boost when can not be found Boost that installed with Vcpkg
Fix find Boost when can not be found Boost that installed with Vcpkg.
Re-find package Boost uisng user specified options.
* Fix regex of generators
Fix regex of generators.
Add ending position.
* Fix Save and Resore Boost_COMPILER
* [vcpkg-cmake-integration] Expand saved boost variables
Use list(APPEND) instead of set(). Fixes#2336.
Fix MPI issue introduced in cmake 3.10. Fixes#2317.
Add _VCPKG_ROOT_DIR to persisted variables to reduce disk access during cmake reconfigure.
Reset the settings to find the boost libraries that installed by vcpkg.
vcpkg will always rename to Boost libraries name that able to be find
with default settings of FindBoost.cmake.