summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc/CMakeLists.txt')
-rw-r--r--indra/llwebrtc/CMakeLists.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index a18b716003..7700eeb7c6 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -28,7 +28,9 @@ list(APPEND llwebrtc_SOURCE_FILES ${llwebrtc_HEADER_FILES})
add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
+if (NOT USESYSTEMLIBS)
set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
+endif (NOT USESYSTEMLIBS)
if (WINDOWS)
cmake_policy(SET CMP0091 NEW)
@@ -56,7 +58,7 @@ elseif (DARWIN)
set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
endif (USE_BUGSPLAT)
-elseif (LINUX)
+elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD)
target_link_libraries(llwebrtc PRIVATE ll::webrtc)
endif (WINDOWS)
@@ -74,3 +76,16 @@ ADD_CUSTOM_COMMAND(TARGET llwebrtc POST_BUILD
# Add tests
if (LL_TESTS)
endif (LL_TESTS)
+
+if (INSTALL)
+ if (DARWIN)
+ set(_LIB ../Frameworks)
+ elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
+ set(_LIB lib/${ARCH}-linux-gnu)
+ elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch)
+ set(_LIB lib64)
+ else (DARWIN)
+ set(_LIB lib)
+ endif (DARWIN)
+ install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB})
+endif (INSTALL)