Skip to content

Commit

Permalink
Merge pull request #1287 from paullouisageneau/cmake-add-install-deps…
Browse files Browse the repository at this point in the history
…-export

CMake: Add installed deps to export set
  • Loading branch information
paullouisageneau authored Nov 17, 2024
2 parents 3c33ea0 + bc34f01 commit 5d3e79c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,7 @@ else()
add_library(Usrsctp::Usrsctp ALIAS usrsctp)

if(INSTALL_DEPS_LIBS)
# usrsctp lacks an export set
install(TARGETS usrsctp EXPORT UsrsctpTargets)
install(EXPORT UsrsctpTargets
FILE UsrsctpTargets.cmake
NAMESPACE Usrsctp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/usrsctp
EXCLUDE_FROM_ALL)
install(TARGETS usrsctp EXPORT LibDataChannelTargets)
# Fix directories
set_target_properties(usrsctp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "")
target_include_directories(usrsctp INTERFACE
Expand Down Expand Up @@ -381,7 +375,7 @@ else()
if(NOT TARGET srtp2)
add_subdirectory(deps/libsrtp EXCLUDE_FROM_ALL)
if(INSTALL_DEPS_LIBS)
install(TARGETS srtp2)
install(TARGETS srtp2 EXPORT LibDataChannelTargets)
endif()
endif()
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_SRTP=0)
Expand Down Expand Up @@ -461,7 +455,7 @@ else()
else()
add_subdirectory(deps/libjuice EXCLUDE_FROM_ALL)
if(INSTALL_DEPS_LIBS)
install(TARGETS juice)
install(TARGETS juice EXPORT LibDataChannelTargets)
endif()
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_JUICE=0)
target_compile_definitions(datachannel-static PRIVATE RTC_SYSTEM_JUICE=0)
Expand Down

0 comments on commit 5d3e79c

Please sign in to comment.