1
0
Fork 0

Add DESKTOP_APP_MAC_ARCH for separate macOS builds.

This commit is contained in:
John Preston 2021-10-28 16:15:30 +04:00
parent 68251bb2f0
commit 410223b538
3 changed files with 12 additions and 1 deletions

View file

@ -53,3 +53,11 @@ function(init_target target_name) # init_target(my_target folder_name)
)
endif()
endfunction()
# This code is not supposed to run on build machine, only on target machine.
function(init_non_host_target target_name)
init_target(${target_name})
set_target_properties(${target_name} PROPERTIES
OSX_ARCHITECTURES "${DESKTOP_APP_MAC_ARCH}"
)
endfunction()

View file

@ -15,7 +15,9 @@ function(report_bad_special_target)
endfunction()
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "Minimum macOS deployment version" FORCE)
if (NOT DESKTOP_APP_QT6)
if (DESKTOP_APP_QT6)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Target macOS architectures" FORCE)
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Target macOS architectures" FORCE)
endif()

View file

@ -32,6 +32,7 @@ option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate
option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF)
option(DESKTOP_APP_NO_PDB "Disable PDB file generation. (Windows only)" OFF)
set(DESKTOP_APP_MAC_ARCH "x86_64;arm64" CACHE STRING "Target macOS arch. (macOS only)")
set(dont_bundle_fonts 0)
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)