1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Move Apple universal build CMake flag up

This commit is contained in:
Elias Steurer 2022-07-08 13:31:51 +02:00
parent 7773bdb148
commit b00ad322ab

View File

@ -19,6 +19,13 @@ elseif(APPLE)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm)
set(VCPKG_ARCH "arm64-osx")
endif()
# Universal builds are not available with vcpkg,
# but the prebuild Qt binaries are.
# https://github.com/microsoft/vcpkg/discussions/19454
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(VCPKG_TARGET_ARCHITECTURE x86_64 arm64)
message(STATUS "[PROJECT] CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}")
endif()
# This sets cmake to compile all dlls into the main directory
@ -131,14 +138,6 @@ if(${SCREENPLAY_INSTALLER})
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CreateIFWInstaller.cmake)
endif()
# Universal builds are not available with vcpkg
# https://github.com/microsoft/vcpkg/discussions/19454
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(VCPKG_TARGET_ARCHITECTURE x86_64 arm64)
message(STATUS "[PROJECT] CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}")
endif()
message(STATUS "[CPP DEFINE] RELEASE_VERSION = ${RELEASE_VERSION}")
message(STATUS "[CPP DEFINE] SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "[CPP DEFINE] BUILD_DATE = ${BUILD_DATE}")