From 7e2d3f9c2bd3f3b4ed5fec687ec3cd97447fa125 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 13 Nov 2023 11:51:17 +0800 Subject: [PATCH] Only set linker flags needed for macOS on Apple Signed-off-by: Claudio Cambra --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b9b9b3bdbada..bf3ff9a69ce2a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,7 +106,7 @@ 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() +elseif(APPLE) 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()