forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libdatachannel] Fix dependency not found (microsoft#35618)
- Loading branch information
1 parent
64e15f6
commit 8810558
Showing
9 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f604628..1610166 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -239,7 +239,7 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE) | ||
find_package(Threads REQUIRED) | ||
|
||
if(USE_SYSTEM_PLOG) | ||
- find_package(plog REQUIRED) | ||
+ find_package(plog CONFIG REQUIRED) | ||
else() | ||
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) | ||
add_subdirectory(deps/plog EXCLUDE_FROM_ALL) | ||
@@ -250,7 +250,7 @@ if(SCTP_DEBUG) | ||
endif() | ||
|
||
if(USE_SYSTEM_USRSCTP) | ||
- find_package(Usrsctp REQUIRED) | ||
+ find_package(unofficial-usrsctp CONFIG REQUIRED) | ||
else() | ||
option(sctp_build_shared_lib OFF) | ||
option(sctp_build_programs OFF) | ||
@@ -294,7 +294,7 @@ target_include_directories(datachannel PUBLIC | ||
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) | ||
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
target_link_libraries(datachannel PRIVATE Threads::Threads) | ||
-target_link_libraries(datachannel PRIVATE Usrsctp::Usrsctp plog::plog) | ||
+target_link_libraries(datachannel PRIVATE unofficial::usrsctp::usrsctp plog::plog) | ||
|
||
target_include_directories(datachannel-static PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
@@ -302,7 +302,7 @@ target_include_directories(datachannel-static PUBLIC | ||
target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) | ||
target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
target_link_libraries(datachannel-static PRIVATE Threads::Threads) | ||
-target_link_libraries(datachannel-static PRIVATE Usrsctp::Usrsctp plog::plog) | ||
+target_link_libraries(datachannel-static PRIVATE unofficial::usrsctp::usrsctp plog::plog) | ||
|
||
if(WIN32) | ||
target_link_libraries(datachannel PUBLIC ws2_32) # winsock2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt | ||
index aa99cf2..c60b393 100644 | ||
--- a/usrsctplib/CMakeLists.txt | ||
+++ b/usrsctplib/CMakeLists.txt | ||
@@ -174,7 +174,8 @@ list(APPEND usrsctp_sources | ||
|
||
add_library(usrsctp ${usrsctp_sources} ${usrsctp_headers}) | ||
|
||
-target_include_directories(usrsctp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
+target_include_directories(usrsctp PUBLIC $<INSTALL_INTERFACE:include> | ||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) | ||
|
||
if (WIN32) | ||
message(STATUS "link library: ws2_32") | ||
@@ -188,8 +189,12 @@ set_target_properties(usrsctp PROPERTIES SOVERSION ${SOVERSION_SHORT} VERSION ${ | ||
# INSTALL LIBRARY AND HEADER | ||
################################################# | ||
|
||
-install(TARGETS usrsctp DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+install(TARGETS usrsctp EXPORT unofficial-usrsctp-config | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+ RUNTIME DESTINATION bin) | ||
install(FILES usrsctp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
+install(EXPORT unofficial-usrsctp-config NAMESPACE unofficial::usrsctp:: DESTINATION share/unofficial-usrsctp) | ||
|
||
################################################# | ||
# GENERATE AND INSTALL PKG-CONFIG FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
{ | ||
"name": "usrsctp", | ||
"version": "0.9.5.0", | ||
"port-version": 2, | ||
"port-version": 3, | ||
"description": "A userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows.", | ||
"homepage": "https://github.com/sctplab/usrsctp", | ||
"license": "BSD-3-Clause", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters