On OS X, compile only against standard system libs and Externals.

Libraries from MacPorts, Fink or manually installed stuff in /usr/local
will be ignored. This ensures the binary will work on other machines as well.
This commit is contained in:
Maarten ter Huurne 2011-12-05 05:42:02 +01:00
parent 54ea98b0a9
commit 24dcb7922c
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ if(UNIX AND NOT APPLE)
endif()
if (APPLE)
# Ignore MacPorts and Fink and any other locally installed packages that
# might prevent building a distributable binary.
set(CMAKE_SYSTEM_PREFIX_PATH /usr)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")