summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-05-22 12:00:20 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-05-22 12:00:20 -0400
commit48534c1badcd2f63dee2ee0106a109b93604827c (patch)
tree784d543d4413e905e5b89299107bfe27c18ba03c /indra
parent199c688e211125ae1b404425d9a8bd3bc036ea50 (diff)
SL-821: Add macOS rpath to Mac viewer executable for BugsplatMac.
The BugsplatMac framework is stamped with @rpath/BugsplatMac.framework/etc., so that's the dependency stamped into our viewer executable. To support that lookup, direct CMake to add an appropriate RPATH to the executable.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7638a74bc1..954d5ce9ed 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1361,9 +1361,16 @@ if (DARWIN)
llappdelegate-objc.mm
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
+ # BugsplatMac is a module, imported with @import. That language feature
+ # demands these switches.
COMPILE_FLAGS "-fmodules -fcxx-modules"
)
+ # from https://stackoverflow.com/a/43551534
+ set(CMAKE_MACOSX_RPATH 1)
+ # From Contents/MacOS/SecondLife, look in Contents/Frameworks
+ set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
+
find_library(AGL_LIBRARY AGL)
find_library(APPKIT_LIBRARY AppKit)
find_library(COCOA_LIBRARY Cocoa)