Commit Graph

71 Commits

Author SHA1 Message Date
WangWeiLin-MV
c1b381aafe
[vcpkg scripts] toolchain/linux: Change CMAKE_SYSTEM_PROCESSOR from x86 to i686 (#41519) 2024-10-29 02:31:26 -07:00
Maxim Ivanov
39580ae69a
xbox.cmake: remove incorrectly used SYSTEM path from link_directories (#41151) 2024-09-26 10:44:50 -04:00
WangWeiLin-MV
fec650a9a1
[vcpkg scripts] toolchain/osx: Fix CMAKE_HOST_SYSTEM_PROCESSOR condition with lower case arm64 (#40503) 2024-09-19 12:33:45 -07:00
Jaap Aarts
3f530d4827
Don't unset CMAKE_CROSSCOMPILING when cross-compiling to linux (#37734) 2024-07-11 18:47:43 -04:00
Chuck Walbourn
4de4372b5b
[toolchain] Fix try compile handling for Xbox (#39654) 2024-07-11 16:59:35 -04:00
Billy O'Neal
0dab813d5f
Patch Tuesday June 2024 (#39325) 2024-07-03 20:01:35 -07:00
Alexander Neumann
9c0956e573
[world rebuild|toolchain] Fix try compile handling (#24493)
while playing with qtbase on x64-uwp i found that it could not pass a
try_compile command since important variables are not correctly
forwarded. As such I concluded that the handling of try_compile in vcpkg
is completely wrong.
2024-06-19 14:38:36 -07:00
Vitalii Koshura
e9522a4a74
linux toolchain: add missing CMAKE_AS_FLAGS_INIT. (#39147)
This fixes: #39144.
2024-06-13 20:20:03 -07:00
fwcd
3f55ea9fce
[linux] Fix compiler in native ARM host builds (#38113)
#35084 introduced a regression for native ARM Linux builds where the
toolchain would mistakenly try to reference a cross-compiler (e.g.
`aarch64-linux-gnu-gcc`) despite building natively because vcpkg spells
the architecture differently from what the system reports (`arm64` vs.
`aarch64`).

This fixes the issue by checking whether the
`CMAKE_HOST_SYSTEM_PROCESSOR` matches the target (in CMake's spelling of
the architecture).

---------

Co-authored-by: Kai Pastor <dg0yt@darc.de>
2024-04-19 15:11:15 -04:00
Alonso Schaich
f9f2a6e867
Copy-Paste the CMAKE_SYSTEM_PROCESSOR definition code from osx to the BSDs (#37692)
Fixes #37691.
2024-03-25 15:11:08 -07:00
Vasyl Gello
aa628ceb5f
Fix CMake detection of cross-compilers on arm/arm64 build arch (#35084)
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2023-12-04 16:46:19 -08:00
ivysnow
500c6f2b85
Add CMAKE_MODULE_LINKER_FLAGS to toolchain scripts. (#32841) 2023-08-03 12:14:01 -07:00
Alexander Neumann
472d1465c1
Force CMAKE_MSVC_DEBUG_INFORMATION_FORMAT to empty (#32338) 2023-07-24 11:50:27 -07:00
Darryl Pogue
95b51560e7
[linux x86] Set -m32 in Linker flags too (#31811)
When cross-compiling for x86 Linux, the -m32 flag must also be passed to the linker otherwise it complains about trying to link code built for the wrong architecture.
2023-06-13 22:36:21 -07:00
Billy O'Neal
638b1588be
Update vcpkg-tool to 2023-06-07 + xbox triplets cleanup (#31723)
* Update vcpkg-tool to 2023-05-31 + xbox triplets cleanup

https://github.com/microsoft/vcpkg-tool/releases/tag/2023-05-30 +
https://github.com/microsoft/vcpkg-tool/releases/tag/2023-05-31 +
https://github.com/microsoft/vcpkg-tool/releases/tag/2023-06-07

Clean up xbox triplets following teaching vcpkg.exe about xbox more directly.

Also deletes the seemingly-no-longer-used vcpkg_get_dep_info.cmake and vcpkg_get_tags.cmake.

Also: [redis-plus-plus] Add DISABLE_PARALLEL_CONFIGURE due to source tree write.
2023-06-08 11:17:29 -07:00
Chuck Walbourn
d4d39d71b3
UWP toolchain switch to disable use of deprecated C++/CX extensions (#31427) 2023-05-15 15:18:00 -07:00
Chuck Walbourn
0f63ba5458
xbox toolchain update to ensure CHECK_INCLUDE_FILES macro works in all cases (#31426) 2023-05-15 13:41:35 -07:00
Chuck Walbourn
e288d7bddb
Toolchain update to remove /MP when using clang-cl custom triplets (#31428)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-05-15 13:39:23 -07:00
dan-shaw
5787cfa699
[vcpkg] Android CI support (#29406)
* initial

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2023-04-24 21:22:59 -07:00
Chuck Walbourn
7a4ca3fd46
UWP toolchain fix and update some supports expressions for uwp/xbox (#30096)
* UWP toolchain fix and update some ports supports expressions for uwp/xbox

* Update baseline

* More ports updated for !xbox

* Update baseline

* Update support expression for ms-gdkx

* Update baseline

* ms-gdkx port should fail on ado system

* Revert change to opengl-registry since its needed for angle on UWP

* Minor github actions cr

* Refresh baseline
2023-03-20 12:02:25 -07:00
Chuck Walbourn
c1d764a742
[community triplet] adds triplets for building for the Xbox platform (#29210)
* Try adding xbox triplets

* Update for Gaming Command Prompt usage

* Fix directxtk12 shaders for xbox

* Add toolchain for xbox

* Fix ports for feature builds

* Code review feedback

* More code review

* Code review

* WIN32_LEAN_AND_MEAN is too aggressive for many libs

* Normalize GDK variable paths

* Need to leave oldnames.lib as many libs use POSIX names

* More code review feedback

* Remove extra file

* Use of /DEFAULTLIB fixed 41 ports

* Code review feedback

* Added basic xbox supports expression

* Updates for xbox-aware ports

* Update for CMake fixes upstream

* Minor synatx fix

* Fix up merge issues

* Need directx-headers for linux

* Missed one port revision

* Removed VCPKG_TARGET_IS_XBOX from project scope after upstream fixes

* Update baseline

* License updates per github-actions bot

* Update baseline

* Update toolchain to support try_compile for GDK headers

* Update port numbers

* Update baseline

* Don't need directx-dxc for Xbox builds

* Update baseline

* Update hashes

* Code review

* Update baseline

* Refresh hashes for upstream fixes

* Update baseline

* Add ms-gdkx stub port

* Update baseline

* updated ms-gdkx with user-friendly output

* Update baseline

* Code review for the toolchain file

* Update directxkt12 hash

* Refresh baseline

* Update MSBuild integration to select proper triplet for GDK custom platforms

* Update CMake integration to select proper xbox triplet from XBOX_CONSOLE_TARGET

* vcpkg.targets update

* Code review feedback

* Update baseline

* Refresh baseline

* Code review for MSBuild

* Code review for xbox toolchain

* vcpkg.cmake codereview

---------

Co-authored-by: walbourn <chuckw_walbourn@yahoo.com>
2023-03-08 14:06:20 -08:00
Jack·Boos·Yu
bf1646e7b9
[vcpkg toolchain] Fix CMAKE_CROSSCOMPILING when building on UWP (#26866)
* [vcpkg toolchain] Fix CMAKE_CROSSCOMPILING when building on UWP

* [kfr] Set cpu arch to generic to avoid call try_run

* version

* [kfr] Re-fix cross configure issue

* version

* Revert changes about kfr, add kfr:x64-uwp to ci.baseline instead

* version

* Remove VCPKG_LINKER_FLAGS_RELEASE from debug builds, and apply other changes from windows.cmake for consistency.

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-01-25 12:18:55 -08:00
dan-shaw
5908d702d6
[vcpkg] Add new community triplet arm64ec (#27814) 2023-01-17 17:23:11 -08:00
Eric Kilmer
1ed3a8935a
[vcpkg] Fix cross compiling macOS (#26240)
This follows the pattern in the Windows toolchain with respect to
setting VCPKG_CMAKE_SYSTEM_VERSION and also how arm64 macOS can execute
x86_64 through Rosetta.
2022-08-10 11:22:01 -07:00
Daniel Schürmann
8ca9b2b84c
[wavpack] arm support (#21790)
* [osx] set CMAKE_SYSTEM_PROCESSOR from VCPKG_TARGET_ARCHITECTURE on osx

* [linux] Set CMAKE_ASM_COMPILER and CMAKE_ASM-ATT_COMPILER in case of crosscompile

* [wavpack] migrate to vcpkg_cmake_install

* [wavpack] enable arm builds

* [wavpack] Add  license field to vcpkg.json

* [OSX] don't default to 86_64
2022-04-29 11:42:37 -07:00
nicole mazzuca
9ccd693f1b
[toolchain windows] set CMAKE_SYSTEM_PROCESSOR (#24100)
* [toolchain windows] set CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR

In specific, I did this for the cpuinfo PR - I realized the reason
that cpuinfo doesn't support arm64 windows cross compilation is because
we don't set CMAKE_SYSTEM_PROCESSOR.

* correctly set CMAKE_CROSSCOMPILING

* start fixin libraries

* more changes:

- gainput: remove line
- glog: remove try_run when cross compiling
- windows.cmake: set CMAKE_SYSTEM_VERSION

* more patches

- mapnik: set BOOST_REGEX_HAS_ICU to avoid check_cxx_source_runs
- orc: set HAS_PRE_1970 and HAS_POST_2038 for same
- seal: change out check_cxx_source_runs for check_cxx_source_compiles

* more changes

* fix x86-windows

* fix qpid-proton, glog

* build corrade-rc

* fix x64-uwp ports

* forgot to _actually_ always build corrade-rc .,.

* Replay #22831

* Dedupe CMAKE_SYSTEM_NAME settings.

* Add quotes for corrade_rc_param

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* Update version DB.

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-04-29 11:40:30 -07:00
Alexander Neumann
05c93c5c5a
[Fix uwp toolchain|world rebuild] make ninja work for uwp (#22831) 2022-04-27 18:12:48 -07:00
Geoff Evans
75ad7f54db
[scripts/toolchains/android.cmake] Remove start-of-string regex check for overlay triplet name matching. (#20059)
This change allows for adding a prefix to android overlay ports, which many other systems support already. The android system relies on regex matching of the triplet name to deduce the ABI, so this change just allows for that string to be anywhere in the overlay triplet string.
2022-01-31 21:14:16 -08:00
Christophe Calmejane
be65fbbf75
Fixed android toolchain with newest NDK (#21465)
* Fixed android toolchain with newest NDK
ANDROID_NATIVE_API_LEVEL has been removed from NDK cmake toolchain so we now have to use ANDROID_PLATFORM

* Fix android toolchain: Maintain backward compatibility for older NDK
2021-12-06 20:15:20 -08:00
talregev
b8dbf43b08
[vcpkg] [Android]Compile armv6 with arm mode (#17962)
* Compile amrv6 with arm mode

* Update android.cmake
2021-06-07 11:33:48 -07:00
talregev
27fe7a50db
Compile for android including armv6. (#16847)
* compile for android including armv6.

* Update arm-android.cmake

* Update from comment in the PR
support ANDROID_NATIVE_API_LEVEL from env variable. (to be able to compile also 16 and not just 21 as default)

* Add ANDROID_ARM_NEON from env var

* Short version of update ANDROID_ARM_NEON.

* remove ANDROID_NATIVE_API_LEVEL now using vcpkg_CMAKE_SYSTEM_VERSION in triplet
Add cache to ANDROID_ARM_NEON
fix indents

* Update neon triplet

* Add arm-neon-android.cmake file.
2021-05-05 13:32:47 -07:00
Long Nguyen
08c867c52a
[mingw] Remove executable extension on non-Windows hosts (#15282) 2020-12-26 22:19:16 -08:00
Long Nguyen
0e05a1f629
[mingw] Use find_file to find compiler, fall back to unprefixed windres if the prefixed version doesn't exist (#15179) 2020-12-21 09:01:18 -08:00
Joakim L. Gilje
d9633d939c
[vcpkg] initial openbsd (community) support (#14549)
* initial openbsd support in vcpkg

* after clang-format

* hardcoded in the preferred compiler for openbsd in bootstrap scipt (thanks @tormfinn)

* Fetch a patched pkg-config because openbsd pkg-config lacks {fcfiledir}

* fixes from review feedback

* corrected hash for pkg-config.openbsd

* re-added missing endif()

* regenerate docs

* Update scripts/cmake/vcpkg_configure_meson.cmake

Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
2020-11-23 09:43:23 -08:00
Christophe Calmejane
ef77f3c99f
[vcpkg android] Fix for issue #11927 (#14625)
Allow selection of Android SDK platform version from triplet file.
2020-11-18 15:45:05 -08:00
Long Nguyen
6edef9f1f6
Add compiler executable name into toolchain file (#14269) 2020-10-30 12:43:59 -07:00
xyb
5e4d2fab86
[vcpkg] Support cross compile arm64-linux, arm-linux triplets on linux (#13374)
x86_64 host.
2020-10-30 12:15:40 -07:00
xyb
27a2418e91
[vcpkg] CMAKE_SYSTEM_PROCESSOR is missing if VCPKG_TARGET_ARCHITECTURE is arm or arm64. (#13465)
This change tries to fix issue #13395.

Root cause:
In script mode, cmake won't populate CMAKE_SYSTEM_PROCESSOR parameter automatically. That parameter is
required by libpng to configure build parameters. To fix this issue, we need explicitly set CMAKE_SYSTEM_PROCESSOR
value.

Verify:
On arm64-linux host, run `./vcpkg install tesseract:arm64-linux`.
2020-10-17 02:12:49 -07:00
Paul
6c7f2d95d8
11129: Add VCPKG_LINKER_FLAGS_<CONFIG>. (#11290)
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-09-03 11:00:35 -07:00
Christophe Calmejane
60bb798ceb
[vcpkg] Improving android support (#12634)
* Fix for Android compilation
See https://github.com/microsoft/vcpkg/issues/5809

* Allow for custom android triplets. Fallback to Xamarin installed NDK.

* Increased Port-Version for boost-modular-build-helper

* More restrictive matching pattern for android toolchain
2020-08-07 16:14:05 -07:00
Jamie Kydd
a17543d840
Fix android toolchain so it correctly adds -fPIC flag (#12097)
(cherry picked from commit 497fe8ab805bcafd2cb2abd538db8783f897f9ad)
2020-07-31 10:46:26 -07:00
alcroito
f1fbee87db
[vcpkg] Fix iOS toolchain detection when using the iOS community triplets (#12361)
* [vcpkg ios] Fix detection of iOS toolchain (#6003)

Added mapping of CMAKE_SYSTEM_NAME == iOS to the bundled iOS toolchain
file.

This fixes the "Unable to determine toolchain to use for
triplet arm64-ios with CMAKE_SYSTEM_NAME iOS" error.

* [vcpkg ios] Set the CMake system processor for the simulator arches (#6003)

So it's consistent for all architectures.
2020-07-13 14:13:44 -07:00
Alexander Neumann
c704058346
[vcpkg] Add nologo to windows toolchain (#11146)
* add nologo to windows toolchain

* bump control of one cmake port for ci testing

* [scripts] add nologo to _DEBUG flags

* revert version bump
2020-06-11 13:43:24 -07:00
huangqinjin
e886d48561
[android] Link C++ runtime according to VCPKG_CRT_LINKAGE (#11266)
https://developer.android.com/ndk/guides/cpp-support
2020-05-11 13:42:08 -07:00
zhbanito
b07e46b368
[vcpkg] Add Linux toolchain x86 support (#8588)
Add compile option for x86 triplet target architecture

Co-authored-by: wangli28 <wangli28@beyondsoft.com>
2020-05-07 14:11:32 -07:00
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
Jack·Boos·Yu
9b44e4768b
[vcpkg] Revert #9862 changes to fix crt check (#10562) 2020-03-26 02:19:01 -07:00
Alexander Neumann
da0a154852
use _INIT flags in windows toolchain just like in the other toolchains (#9862) 2020-03-25 13:46:37 -07:00
Marc Boucek
b2e928f19b
[vcpkg] set CMAKE_MSVC_RUNTIME_LIBRARY for cmake policy CMP0091 (#9452)
Co-authored-by: Marc Boucek <marc.boucek@native-instruments.de>
2020-03-13 11:23:11 -07:00
Cristian Adam
38b959022c Add support for building with MinGW (#9137)
* Add support for building with MinGW

Tested with MSYS2 MinGW 8.3.0, gcc-mcf.lhmouse MinGW 9.2.1,
and StephanTLavavej/mingw-distro!

* Add MinGW toolchain

From your MinGW configured shell you could just use vcpkg to
configure packages.

An x64-mingw triplet would look like:
```
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_ENV_PASSTHROUGH PATH)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)
```

* Add MinGW community tripplets

x64 tested with https://github.com/StephanTLavavej/mingw-distro
x86, arm64, arm tested with https://github.com/mstorsjo/llvm-mingw
2020-01-17 15:36:08 -08:00