vcpkg/scripts/cmake
alcroito c5f01e1dee
Add initial iOS support (#6275)
* 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
2020-04-15 13:06:55 -07:00
..
execute_process.cmake Use macro instead of function to override execute_process() (#7980) 2019-08-29 19:40:43 -07:00
vcpkg_acquire_msys.cmake [vcpkg-tools] Multiple mirror URLs to download MSYS2, update (#10346) 2020-03-10 13:08:43 -07:00
vcpkg_add_to_path.cmake use it in vcpkg_add_to_path. 2019-08-08 14:22:53 +02:00
vcpkg_apply_patches.cmake [vcpkg] Better vcpkg_apply_patches error message (#10127) 2020-02-27 14:22:16 -08:00
vcpkg_build_cmake.cmake use vcpkg add to path in build scripts 2019-08-12 10:04:50 +02:00
vcpkg_build_make.cmake [vcpkg] Fix build type in vcpkg_build_make.cmake (#9602) 2020-01-13 16:34:54 -08:00
vcpkg_build_msbuild.cmake Fix bug in .vcpkg-root detection that breaks --overlay-triplets (#7954) 2019-09-12 23:52:52 -07:00
vcpkg_build_nmake.cmake [libxslt] Fix writing to locations outside vcpkg in Windows builds (#9242) 2019-12-07 05:50:24 -08:00
vcpkg_build_qmake.cmake fixed leaking variable in vcpkg_build_qmake 2019-09-20 12:57:29 +02:00
vcpkg_buildpath_length_warning.cmake [Qt] Update to 5.12.4 (#7667) 2019-09-12 10:07:21 -07:00
vcpkg_check_features.cmake [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check (#7558) 2019-08-13 20:13:55 -07:00
vcpkg_check_linkage.cmake breakpad: Enable building the libbreakpad_client library (#4008) 2018-08-08 06:02:30 -07:00
vcpkg_clean_msbuild.cmake xalan-c: Install headers correctly (#4565) 2018-10-25 12:34:45 -07:00
vcpkg_common_definitions.cmake MinGW: Fix vcpkg common definitions (#9807) 2020-01-23 12:17:40 -08:00
vcpkg_common_functions.cmake [vcpkg_install_qmake] Add vcpkg_install_qmake (#9412) 2019-12-23 06:10:12 -08:00
vcpkg_configure_cmake.cmake Add initial iOS support (#6275) 2020-04-15 13:06:55 -07:00
vcpkg_configure_make.cmake Fix separate make and install execution error issue. (#8540) 2019-10-21 22:49:23 -07:00
vcpkg_configure_meson.cmake [vcpkg] Make configure meson sane and work for all targets. (#10395) 2020-04-06 14:43:16 -07:00
vcpkg_configure_qmake.cmake [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (#9260) 2020-01-06 12:36:51 -08:00
vcpkg_copy_pdbs.cmake Added parameter to vcpkg_copy_pdbs.cmake (#3688) 2018-06-16 18:42:25 +02:00
vcpkg_copy_tool_dependencies.cmake Fix bug in .vcpkg-root detection that breaks --overlay-triplets (#7954) 2019-09-12 23:52:52 -07:00
vcpkg_download_distfile.cmake [vcpkg_download_distfile.cmake] Fix Examples (#8669) 2019-10-21 15:25:25 -07:00
vcpkg_execute_build_process.cmake [vcpkg] Use spaces instead of semicolons in the output (#7080) 2019-07-01 13:30:24 -07:00
vcpkg_execute_required_process_repeat.cmake [vcpkg] Use spaces instead of semicolons in the output (#7080) 2019-07-01 13:30:24 -07:00
vcpkg_execute_required_process.cmake Download Mode (#7950) 2019-08-28 13:49:29 -07:00
vcpkg_extract_source_archive_ex.cmake [vcpkg] fatal_error when patch fails to apply (#8087) 2019-10-07 10:35:13 -07:00
vcpkg_extract_source_archive.cmake Download Mode (#7950) 2019-08-28 13:49:29 -07:00
vcpkg_fail_port_install.cmake [vcpkg-docs] Add documentation for vcpkg_configure_meson(), vcpkg_install_meson(), vcpkg_fixup_cmake_targts(), and vcpkg_prettify_command() (#7606) 2020-02-12 15:58:43 -08:00
vcpkg_find_acquire_program.cmake fix vcpkg_find_acquire_program for script (#10621) 2020-04-09 17:01:48 -07:00
vcpkg_fixup_cmake_targets.cmake [vcpkg-docs] Add documentation for vcpkg_configure_meson(), vcpkg_install_meson(), vcpkg_fixup_cmake_targts(), and vcpkg_prettify_command() (#7606) 2020-02-12 15:58:43 -08:00
vcpkg_from_bitbucket.cmake [GraphicsMagick] bug-fix: image files won't load (#4215) 2018-09-04 16:20:46 -07:00
vcpkg_from_git.cmake vcpkg_from_git: Add support for git over ssh (#9446) 2020-04-01 07:35:38 -07:00
vcpkg_from_github.cmake Merge pull request #5719 from donny-dont/github-url 2019-11-22 15:13:08 -08:00
vcpkg_from_gitlab.cmake Download Mode (#7950) 2019-08-28 13:49:29 -07:00
vcpkg_get_program_files_32_bit.cmake Improve functions that detect ProgramFiles in CMake 2017-02-24 15:02:10 -08:00
vcpkg_get_program_files_platform_bitness.cmake Improve functions that detect ProgramFiles in CMake 2017-02-24 15:02:10 -08:00
vcpkg_get_windows_sdk.cmake [vcpkg_get_windows_sdk] Don't call powershell. Deduce from env 2018-05-19 19:23:32 -07:00
vcpkg_install_cmake.cmake [vcpkg_build_cmake] Refactor _build_ and _install_ into a single cmake script. 2017-10-05 17:49:28 -07:00
vcpkg_install_make.cmake Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake (#8267) 2019-10-05 07:51:07 -07:00
vcpkg_install_meson.cmake [vcpkg-docs] Add documentation for vcpkg_configure_meson(), vcpkg_install_meson(), vcpkg_fixup_cmake_targts(), and vcpkg_prettify_command() (#7606) 2020-02-12 15:58:43 -08:00
vcpkg_install_msbuild.cmake [libusb] upgrade and support arm64 (#8976) 2019-11-19 11:02:13 -08:00
vcpkg_install_nmake.cmake [libxslt]Using vcpkg_install_nmake in Windows, support unix. (#8589) 2019-10-29 23:23:36 -07:00
vcpkg_install_qmake.cmake [vcpkg_install_qmake] Add vcpkg_install_qmake (#9412) 2019-12-23 06:10:12 -08:00
vcpkg_prettify_command.cmake [vcpkg-docs] Add documentation for vcpkg_configure_meson(), vcpkg_install_meson(), vcpkg_fixup_cmake_targts(), and vcpkg_prettify_command() (#7606) 2020-02-12 15:58:43 -08:00
vcpkg_replace_string.cmake use install target in Makefiles; make all portfile uniform 2017-11-06 00:24:29 +11:00
vcpkg_test_cmake.cmake Download Mode (#7950) 2019-08-28 13:49:29 -07:00