From 9f0858db3034c7319d4ddf36da0f1681c4b4fb2a Mon Sep 17 00:00:00 2001 From: Steven WdV Date: Tue, 19 Mar 2024 11:39:22 +0100 Subject: [PATCH] Check C/C++ compilers separately for AppleClang ranlib Signed-off-by: Steven WdV --- library/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 33e8d238b5..eda377e708 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -221,8 +221,10 @@ endif(WIN32) if(CMAKE_C_COMPILER_ID MATCHES "AppleClang") set(CMAKE_C_ARCHIVE_CREATE " Scr ") - set(CMAKE_CXX_ARCHIVE_CREATE " Scr ") set(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") +endif() +if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + set(CMAKE_CXX_ARCHIVE_CREATE " Scr ") set(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") endif()