diff --git a/CMakeLists.txt b/CMakeLists.txt index b5a956578..c8154c256 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -241,6 +241,7 @@ endif() include(CheckCXXCompilerFlag) check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND ) check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND ) +check_cxx_compiler_flag( "-stdlib=libc++" LIBCPP_FOUND ) if(CXX11_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") elseif(CXX0X_FOUND) @@ -249,6 +250,9 @@ else() message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a different compiler") endif() +if(LIBCPP_FOUND AND APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") +endif() macro_optional_find_package(Echonest 2.2.0) macro_log_feature(ECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 2.2.0 is needed for dynamic playlists and the infosystem")