From 4be918e50ff22ea669e2aa9a43d863519e3e15cb Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 31 Jan 2020 23:30:51 +0100 Subject: [PATCH] Add a forgotten condition with USE_LIBCPP --- cmake/SfizzConfig.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/SfizzConfig.cmake b/cmake/SfizzConfig.cmake index afa43821..db138080 100644 --- a/cmake/SfizzConfig.cmake +++ b/cmake/SfizzConfig.cmake @@ -43,10 +43,12 @@ endfunction(SFIZZ_LINK_LIBSNDFILE) # If we build with Clang use libc++ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT ANDROID) set(USE_LIBCPP ON CACHE BOOL "Use libc++ with clang") - add_compile_options(-stdlib=libc++) - # Presumably need the above for linking too, maybe other options missing as well - add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release - add_link_options(-lc++abi) # New command on CMake master, not in 3.12 release + if (USE_LIBCPP) + add_compile_options(-stdlib=libc++) + # Presumably need the above for linking too, maybe other options missing as well + add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release + add_link_options(-lc++abi) # New command on CMake master, not in 3.12 release + endif() endif() # Don't show build information when building a different project