Don't murder the default PATH and CMAKE_SYSTEM_PREFIX_PATH on OS X. Just prioritize /usr.
Changing PATH basically screws everything up, and while the attempt to avoid MacPorts copies of system libraries was well-intentioned, it made the OS X buildbot unable to pick up ffmpeg and libusb. It's sufficient to put /usr first to make sure we use the system copies of duplicated libraries.
This commit is contained in:
parent
cb0af4057e
commit
efb2f361aa
|
@ -11,6 +11,9 @@ option(ENABLE_QT "Enable Qt (use the experimental Qt interface)" OFF)
|
||||||
option(ENABLE_PCH "Use PCH to speed up compilation" ON)
|
option(ENABLE_PCH "Use PCH to speed up compilation" ON)
|
||||||
option(ENABLE_LTO "Enables Link Time Optimization" OFF)
|
option(ENABLE_LTO "Enables Link Time Optimization" OFF)
|
||||||
option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF)
|
option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF)
|
||||||
|
if(APPLE)
|
||||||
|
option(OSX_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
|
option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
|
||||||
|
|
||||||
|
@ -219,10 +222,18 @@ if(ENABLE_LTO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# Ignore MacPorts and Fink and any other locally installed packages that
|
if(NOT OSX_USE_DEFAULT_SEARCH_PATH)
|
||||||
# might prevent building a distributable binary.
|
# Hack up the path to prioritize the path to built-in OS libraries to
|
||||||
set(CMAKE_SYSTEM_PREFIX_PATH /usr)
|
# increase the chance of not depending on a bunch of copies of them
|
||||||
set(ENV{PATH} /usr/bin:/bin:/usr/sbin:/sbin)
|
# installed by MacPorts, Fink, Homebrew, etc, and ending up copying
|
||||||
|
# them into the bundle. Since we optionally depend on libraries which
|
||||||
|
# are not part of OS X (ffmpeg, libusb, etc.), however, don't remove
|
||||||
|
# the default path entirely as was done in a previous version of this
|
||||||
|
# file. This is still kinda evil, since it defeats the user's path
|
||||||
|
# settings...
|
||||||
|
# See http://www.cmake.org/cmake/help/v3.0/command/find_program.html
|
||||||
|
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Some of our code contains Objective C constructs.
|
# Some of our code contains Objective C constructs.
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
|
||||||
|
|
Loading…
Reference in New Issue