mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
generate triplet file in compile.sh
This commit is contained in:
parent
f7b7c62376
commit
c6b477366e
2 changed files with 10 additions and 15 deletions
|
|
@ -11,7 +11,7 @@
|
|||
# --debug or --release sets the build type ie CMAKE_BUILD_TYPE
|
||||
# --ccache [<size>] uses ccache and shows stats, optionally provide size
|
||||
# --dir <dir> sets the name of the build dir, default is "build"
|
||||
# --target-macos-version <version> sets the min os version - only used for macOS
|
||||
# --target-macos-version <version> sets the min os version - only used for x86 (Intel) macOS builds
|
||||
# uses env: BUILDTYPE MAKE_INSTALL MAKE_PACKAGE PACKAGE_TYPE PACKAGE_SUFFIX MAKE_SERVER MAKE_TEST USE_CCACHE CCACHE_SIZE BUILD_DIR CMAKE_GENERATOR
|
||||
# (correspond to args: --debug/--release --install --package <package type> --suffix <suffix> --server --test --ccache <ccache_size> --dir <dir>)
|
||||
# exitcode: 1 for failure, 3 for invalid arguments
|
||||
|
|
@ -127,9 +127,16 @@ if [[ $PACKAGE_TYPE ]]; then
|
|||
flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE")
|
||||
fi
|
||||
if [[ $TARGET_MACOS_VERSION ]]; then
|
||||
flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=$TARGET_MACOS_VERSION")
|
||||
flags+=("-DVCPKG_TARGET_TRIPLET=x64-osx-13")
|
||||
mkdir -p ../cmake/triplets
|
||||
cp ../vcpkg/triplets/x64-osx.cmake ../cmake/triplets/x64-osx-${TARGET_MACOS_VERSION}.cmake
|
||||
echo "set(VCPKG_CMAKE_SYSTEM_VERSION ${TARGET_MACOS_VERSION})" >> ../cmake/triplets/x64-osx-${TARGET_MACOS_VERSION}.cmake
|
||||
echo "set(VCPKG_OSX_DEPLOYMENT_TARGET ${TARGET_MACOS_VERSION})" >> ../cmake/triplets/x64-osx-${TARGET_MACOS_VERSION}.cmake
|
||||
flags+=("-DVCPKG_OVERLAY_TRIPLETS=../cmake/triplets")
|
||||
flags+=("-DVCPKG_TARGET_TRIPLET=x64-osx-${TARGET_MACOS_VERSION}")
|
||||
flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=${TARGET_MACOS_VERSION}")
|
||||
echo "::group::Show generated triplet"
|
||||
cat ../cmake/triplets/x64-osx-${TARGET_MACOS_VERSION}.cmake
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Add cmake --build flags
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
# copied from vcpkg/triplets/x64-osx.cmake
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
|
||||
set(VCPKG_OSX_ARCHITECTURES x86_64)
|
||||
# end of copied code
|
||||
|
||||
# Set the minimum macOS version for all dependencies
|
||||
set(VCPKG_CMAKE_SYSTEM_VERSION 13.0)
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET 13.0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue