Allow building on FreeBSD.

pull/4/head
whitequark 2015-12-26 00:06:59 +08:00
parent 922a6260d7
commit 7c3c20161b
1 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}")
endif()
# dependencies
CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)