Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Add installed deps to export set #1287

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading