Skip to content

Commit cf1654e

Browse files
committed
Prevent clang from including /usr/local/include
Homebrew installs its headers and libraries in /usr/local. This means that e.g. OpenSSL headers will be included from Homebrew instead of those built by TeamTalk. Output from clang -v: _include "..." search starts here: _include <...> search starts here: /Volumes/BEAR-1/MacOS/TeamTalk5/Library/TeamTalkLib /Volumes/BEAR-1/MacOS/TeamTalk5/Library/TeamTalk_DLL /usr/local/include /Users/bdr/tt5dist/toolchain/macos/ace/include /Users/bdr/tt5dist/toolchain/macos/openssl/include /usr/local/include/openssl will therefore be included instead of /Users/bdr/tt5dist/toolchain/macos/openssl/include
1 parent c0f6e68 commit cf1654e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Library/TeamTalkLib/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
5656
message(WARNING "No architecture specified. Defaulting to ${CMAKE_OSX_ARCHITECTURES}")
5757
endif()
5858

59+
# Prevent clang from including /usr/local (where Homebrew installs
60+
# its header files and libraries)
61+
list (APPEND COMPILE_FLAGS -Xclang -nostdsysteminc)
62+
set (LINK_LIBS -Xclang -nostdsysteminc)
63+
5964
elseif (${CMAKE_SYSTEM_NAME} MATCHES "iOS")
6065

6166
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)

0 commit comments

Comments
 (0)