summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten ter Huurne <maarten@treewalker.org>2011-12-05 05:42:02 +0100
committerMaarten ter Huurne <maarten@treewalker.org>2011-12-05 05:44:35 +0100
commit24dcb7922c8b659844c4e531121219782dff3532 (patch)
treec2503948b9b33fd5541899ea340a9f815c6616e0
parent54ea98b0a9a9c30fbe7ec05539d1795ed6385979 (diff)
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.
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e84217892..3611a7cf56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")