diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 36aa89ee8..5a9c93924 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -31,10 +31,7 @@ function(sfml_set_stdlib target) if(SFML_OS_MACOSX) if(${CMAKE_GENERATOR} MATCHES "Xcode") sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++") - elseif(SFML_COMPILER_CLANG) - target_compile_options(${target} PRIVATE "-stdlib=libc++") - target_link_libraries(${target} PRIVATE "-stdlib=libc++") - else() + elseif(NOT SFML_COMPILER_CLANG) message(FATAL_ERROR "Clang is the only supported compiler on macOS") endif() endif()