Browse Source

Merge pull request #972 from radfish/PR--cmake-stdlib-args-for-clang

cmake: add stdlib args for clang build on Linux
pull/975/head
orignal 7 years ago committed by GitHub
parent
commit
7b537a4e94
  1. 9
      build/CMakeLists.txt

9
build/CMakeLists.txt

@ -178,6 +178,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") @@ -178,6 +178,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# more tweaks
if (NOT (MSVC OR MSYS OR APPLE))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++" )
endif()
endif ()
if (WITH_HARDENING AND MSVC)
@ -457,6 +460,12 @@ if (WITH_BINARY) @@ -457,6 +460,12 @@ if (WITH_BINARY)
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")
" COMPONENT Runtime)
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (NOT (MSVC OR MSYS OR APPLE)) # for Clang build on Linux
target_link_libraries("${PROJECT_NAME}" stdc++)
endif()
endif()
endif ()
install(FILES ../LICENSE

Loading…
Cancel
Save