From 3c51c9e1f828ab4f192d0c4b8a44e4c45ef90208 Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 6 Nov 2023 23:37:08 +0100 Subject: [PATCH] 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 --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f9d815fc..6b9b9b3bd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)