From 24dcb7922c8b659844c4e531121219782dff3532 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:42:02 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) 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")