2023-04-19 07:38:48 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-12-05 09:20:43 +08:00
|
|
|
index a3837943..2c34d7fb 100644
|
2023-04-19 07:38:48 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-12-05 09:20:43 +08:00
|
|
|
@@ -446,11 +446,25 @@ if(WARNINGS_AS_ERRORS)
|
|
|
|
endif()
|
2023-04-19 07:38:48 +08:00
|
|
|
endif()
|
|
|
|
|
2023-12-05 09:20:43 +08:00
|
|
|
+if(DATACHANNEL_STATIC_LINKAGE)
|
|
|
|
+set_target_properties(datachannel PROPERTIES EXCLUDE_FROM_ALL 1)
|
|
|
|
+set_target_properties(datachannel-static PROPERTIES EXCLUDE_FROM_ALL 0)
|
|
|
|
+
|
2023-04-19 07:38:48 +08:00
|
|
|
+install(TARGETS datachannel-static EXPORT LibDataChannelTargets
|
2023-12-05 09:20:43 +08:00
|
|
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2023-04-19 07:38:48 +08:00
|
|
|
+)
|
2023-12-05 09:20:43 +08:00
|
|
|
+else()
|
|
|
|
+set_target_properties(datachannel PROPERTIES EXCLUDE_FROM_ALL 0)
|
|
|
|
+set_target_properties(datachannel-static PROPERTIES EXCLUDE_FROM_ALL 1)
|
|
|
|
+
|
|
|
|
install(TARGETS datachannel EXPORT LibDataChannelTargets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
2023-04-19 07:38:48 +08:00
|
|
|
+endif()
|
|
|
|
|
|
|
|
install(FILES ${LIBDATACHANNEL_HEADERS}
|
2023-12-05 09:20:43 +08:00
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rtc
|