Sfoglia il codice sorgente

Correct a definition that is actually a linking argument in the case clang++ is being used.

For g++ the else part should still remove this definition, pending checks on other platforms.
Michel Lesoinne 10 anni fa
parent
commit
1d7e6745de
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      gameplay/CMakeLists.txt

+ 7 - 2
gameplay/CMakeLists.txt

@@ -564,8 +564,13 @@ add_definitions(${GTK2_CFLAGS_OTHER})
 add_definitions(-D__linux__)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
-add_definitions(-std=c++11)
-add_definitions(-lstdc++)
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    # using Clang
+    add_definitions(-std=c++11 -stdlib=libc++)
+else()
+    add_definitions(-std=c++11)
+    add_definitions(-lstdc++)
+endif()
 
 add_library(gameplay STATIC
     ${GAMEPLAY_SRC}