diff --git a/CMakeLists.txt b/CMakeLists.txt index 0bc87a9c..fbe5b70c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,8 @@ else() set(CMAKE_CXX_FLAGS "-O3 -std=c++17") endif (MSVC) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - include_directories("/usr/include") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") endif() add_executable(sdrpp "src/main.cpp" "win32/resources.rc") diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ffa73842..7a63d490 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -10,8 +10,8 @@ else() endif (MSVC) add_definitions(-DSDRPP_IS_CORE) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - include_directories("/usr/include") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") endif() # Set the install prefix