summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/CMakeLists.txt
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-09 22:19:22 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:34:00 -0800
commit8fa09570ec91a656e55f88de882fc81fe39f35fa (patch)
treefd0337882cdb49e5dad238decb039203a5695f92 /indra/llwebrtc/CMakeLists.txt
parenta80f6070a2c80ad2798da240254da8d8a4f5f993 (diff)
Updates to build on mac.
Diffstat (limited to 'indra/llwebrtc/CMakeLists.txt')
-rw-r--r--indra/llwebrtc/CMakeLists.txt34
1 files changed, 20 insertions, 14 deletions
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index 881a3af607..fde4b87a3e 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -13,11 +13,6 @@ include(WebRTC)
project(llwebrtc)
-message(STATUS "C Compiler executable: ${CMAKE_C_COMPILER}")
-message(STATUS "CXX Compiler executable: ${CMAKE_CXX_COMPILER}")
-message(STATUS "Linker executable: ${CMAKE_LINKER}")
-message(STATUS "SharedLib: ${SHARED_LIB_STAGING_DIR}")
-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
@@ -34,10 +29,11 @@ set(llwebrtc_HEADER_FILES
list(APPEND llwebrtc_SOURCE_FILES ${llwebrtc_HEADER_FILES})
add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
-
+
set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
-target_link_libraries(llwebrtc PRIVATE ll::webrtc
+if (WINDOWS)
+ target_link_libraries(llwebrtc PRIVATE ll::webrtc
secur32
winmm
dmoguids
@@ -45,13 +41,23 @@ target_link_libraries(llwebrtc PRIVATE ll::webrtc
msdmo
strmiids
iphlpapi)
-target_include_directories( llwebrtc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
-
-set_property(TARGET llwebrtc PROPERTY
- MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
-
-install(TARGETS llwebrtc RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/sharedlibs/RelWithDebInfo")
-
+elseif (DARWIN)
+ target_link_libraries(llwebrtc PRIVATE ll::webrtc)
+elseif (LINUX)
+ target_link_libraries(llwebrtc PRIVATE ll::webrtc)
+endif (WINDOWS)
+
+target_include_directories( llwebrtc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+
+if (WINDOWS)
+ set_property(TARGET llwebrtc PROPERTY
+ MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
+endif (WINDOWS)
+
+ADD_CUSTOM_COMMAND(TARGET llwebrtc POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $<TARGET_FILE:llwebrtc>
+ ${SHARED_LIB_STAGING_DIR})
# Add tests
if (LL_TESTS)
endif (LL_TESTS)