summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-05 20:37:39 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-05 20:37:39 +0800
commitbe75d0eba7ff0a29573139aee593debba81cc65d (patch)
tree2545f54e724b38702be6876e3b0ee4948bf64d25 /indra/cmake
parent6814c077701786f9d69e9f5c0f78ed496a3122cf (diff)
parent6369047dcb74323b248de59bc8187db0d315548a (diff)
Merge branch 'main' into webrtc-voice
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/UnixInstall.cmake88
1 files changed, 60 insertions, 28 deletions
diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake
index a748237c5b..59620b60b4 100644
--- a/indra/cmake/UnixInstall.cmake
+++ b/indra/cmake/UnixInstall.cmake
@@ -6,32 +6,64 @@ set(INSTALL OFF CACHE BOOL
"Generate install target.")
if (INSTALL)
- set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH
- "Top-level installation directory.")
-
- if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
- set(_LIB lib/${ARCH}-linux-gnu)
- elseif (EXISTS /lib64)
- set(_LIB lib64)
- else ()
- set(_LIB lib)
- endif ()
-
- set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH
- "Installation directory for read-only shared files.")
-
- set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH
- "Installation directory for read-only shared files.")
-
- set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin
- CACHE PATH
- "Installation directory for binaries.")
-
- set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME}
- CACHE PATH
- "Installation directory for read-only data files.")
-
- set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME}
- CACHE PATH
- "Installation directory for non-manual executables.")
+
+ if (DARWIN)
+
+ set(INSTALL_PREFIX
+ ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents
+ CACHE PATH
+ "Top-level installation directory.")
+
+ set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/Resources
+ CACHE PATH
+ "Installation directory for read-only shared files.")
+
+ set(INSTALL_SHARE_DIR ${INSTALL_LIBRARY_DIR} CACHE PATH
+ "Installation directory for read-only shared files.")
+
+ set(APP_BINARY_DIR ${INSTALL_PREFIX}/MacOS
+ CACHE PATH
+ "Installation directory for binaries.")
+
+ set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}
+ CACHE PATH
+ "Installation directory for read-only data files.")
+
+ set(APP_LIBEXEC_DIR ${INSTALL_LIBRARY_DIR}
+ CACHE PATH
+ "Installation directory for non-manual executables.")
+
+ else (DARWIN)
+
+ set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH
+ "Top-level installation directory.")
+
+ if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
+ set(_LIB lib/${ARCH}-linux-gnu)
+ elseif (EXISTS /lib64)
+ set(_LIB lib64)
+ else ()
+ set(_LIB lib)
+ endif ()
+
+ set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH
+ "Installation directory for read-only shared files.")
+
+ set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH
+ "Installation directory for read-only shared files.")
+
+ set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin
+ CACHE PATH
+ "Installation directory for binaries.")
+
+ set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME}
+ CACHE PATH
+ "Installation directory for read-only data files.")
+
+ set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME}
+ CACHE PATH
+ "Installation directory for non-manual executables.")
+
+ endif (DARWIN)
+
endif (INSTALL)