mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Fix CMAKE_OSX_ARCHITECTURES
See https://stackoverflow.com/questions/65157483/macos-build-universal-binary-2-with-cmake#comment130596963_65811061
This commit is contained in:
parent
b66e293b55
commit
4635643acf
@ -4,6 +4,12 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
|
||||
include(GetProjectVersion)
|
||||
get_project_version(PROJECT_VERSION)
|
||||
|
||||
# This be set before project()
|
||||
if(APPLE)
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
||||
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/MacOS/qml")
|
||||
endif()
|
||||
|
||||
project(
|
||||
ScreenPlay
|
||||
VERSION ${PROJECT_VERSION}
|
||||
@ -20,6 +26,7 @@ elseif(APPLE)
|
||||
set(VCPKG_ARCH "64-osx-universal") # Our own triplet for universal binaries
|
||||
set(VCPKG_TARGET_ARCHITECTURE "arm64;x86_64")
|
||||
endif()
|
||||
|
||||
# This sets cmake to compile all dlls into the main directory
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
@ -36,11 +43,6 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0")
|
||||
# files in the same directory.
|
||||
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qml")
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
|
||||
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/MacOS/qml")
|
||||
endif()
|
||||
|
||||
# Adds the qml import path so QtCreator can find them
|
||||
list(APPEND QML_DIRS "${SCREENPLAY_QML_MODULES_PATH}")
|
||||
set(QML_IMPORT_PATH
|
||||
@ -68,7 +70,7 @@ endif()
|
||||
option(SCREENPLAY_OSX_BUNDLE "Enable distribution macOS bundle" OFF)
|
||||
option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary code." ON)
|
||||
option(SCREENPLAY_DEPLOY "Marks this version as an official deploy version. This version uses different import paths and other settings."
|
||||
OFF)
|
||||
OFF)
|
||||
option(SCREENPLAY_TESTS "Enables UI tests." ON)
|
||||
option(SCREENPLAY_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
|
||||
option(SCREENPLAY_GODOT "Compiles ScreenPlayGodotWallpaper." ON)
|
||||
|
@ -2,7 +2,6 @@
|
||||
# SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
class BuildConfig:
|
||||
root_path: str
|
||||
cmake_osx_architectures: str
|
||||
cmake_target_triplet: str
|
||||
package: bool
|
||||
osx_bundle: str
|
||||
|
Loading…
Reference in New Issue
Block a user