Fix crash on mac OS < 13.

It's caused by the new optimized Xcode 15 linker when linking static libraries.
source: https://crystalidea.com/blog/qt-apps-crash-when-using-xcode-15

Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
Camila 2023-11-06 23:37:08 +01:00
parent 74a9717e3f
commit 3c51c9e1f8
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4

View file

@ -106,6 +106,9 @@ if(WIN32)
elseif(UNIX AND NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-ld_classic")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-ld_classic")
endif()
set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/theme CACHE STRING "" FORCE)