2024-08-09 06:50:28 +02:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-08-22 11:54:39 +02:00
|
|
|
index b35e4b1..b052d02 100644
|
2024-08-09 06:50:28 +02:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-08-22 11:54:39 +02:00
|
|
|
@@ -48,7 +48,6 @@ endif()
|
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
-set(BUILD_SHARED_LIBS OFF) # to force usrsctp to be built static
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
|
|
|
@@ -457,11 +456,17 @@ if(WARNINGS_AS_ERRORS)
|
2024-08-09 06:50:28 +02:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(BUILD_SHARED_LIBS)
|
|
|
|
install(TARGETS datachannel EXPORT LibDataChannelTargets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
+else()
|
|
|
|
+ set_target_properties(datachannel PROPERTIES EXCLUDE_FROM_ALL 1)
|
|
|
|
+ set_target_properties(datachannel-static PROPERTIES EXCLUDE_FROM_ALL 0)
|
|
|
|
+ install(TARGETS datachannel-static EXPORT LibDataChannelTargets)
|
|
|
|
+endif()
|
|
|
|
|
|
|
|
install(FILES ${LIBDATACHANNEL_HEADERS}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rtc
|