Stop configuration when GCC is detected on macOS

This commit is contained in:
Chris Thrasher 2021-12-21 22:59:23 -06:00 committed by Vittorio Romeo
parent 5ba6580568
commit ff4fc05b18

View File

@ -23,9 +23,11 @@ function(sfml_set_stdlib target)
if (SFML_OS_MACOSX) if (SFML_OS_MACOSX)
if (${CMAKE_GENERATOR} MATCHES "Xcode") if (${CMAKE_GENERATOR} MATCHES "Xcode")
sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++") sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++")
else() elseif(SFML_COMPILER_CLANG)
target_compile_options(${target} PRIVATE "-stdlib=libc++") target_compile_options(${target} PRIVATE "-stdlib=libc++")
target_link_libraries(${target} PRIVATE "-stdlib=libc++") target_link_libraries(${target} PRIVATE "-stdlib=libc++")
else()
message(FATAL_ERROR "Clang is the only supported compiler on macOS")
endif() endif()
endif() endif()
endfunction() endfunction()