cmake: Set MACOSX_RPATH to OFF

In newer versions of CMake, the variable is ON by default.
This generates imports like @rpath/libusb.dylib which the
packaging script doesn’t understand.
We don’t really need @rpath, so we can just disable it
at the global scope instead of fixing the script.
This commit is contained in:
Florent Castelli 2017-01-17 04:23:56 +01:00
parent 7e52f867c1
commit 5955c86ec5
1 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,9 @@ if (APPLE)
set(CMAKE_C_COMPILER "clang")
endif()
endif()
# This doesn't play with with the packaging script that doesn't understand @rpath
set(CMAKE_MACOSX_RPATH OFF)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
# Libraries to link