-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Namespaced msquic targets [skip actions]
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 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,16 @@ | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 1b2a33d..228bf5d 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -16,9 +16,9 @@ target_include_directories(msh3 PUBLIC | ||
$<BUILD_INTERFACE:${msh3_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
-target_link_libraries(msh3 PRIVATE msquic msquic_platform ls-qpack::ls-qpack) | ||
+target_link_libraries(msh3 PRIVATE msquic::msquic msquic::platform ls-qpack::ls-qpack) | ||
if (NOT BUILD_SHARED_LIBS) | ||
- target_link_libraries(msh3 PRIVATE base_link) | ||
+ target_link_libraries(msh3 PRIVATE msquic::base_link) | ||
endif() | ||
|
||
if(WIN32) |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ vcpkg_from_github( | |
HEAD_REF main | ||
PATCHES | ||
win32-crt.diff | ||
msquic-targets.diff | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
|
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,45 @@ | ||
diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt | ||
index e69cf51ac..f9fffce61 100644 | ||
--- a/src/bin/CMakeLists.txt | ||
+++ b/src/bin/CMakeLists.txt | ||
@@ -11,6 +11,7 @@ endif() | ||
|
||
if(BUILD_SHARED_LIBS) | ||
add_library(msquic SHARED ${SOURCES}) | ||
+ add_library(msquic::msquic ALIAS msquic) | ||
target_include_directories(msquic PUBLIC $<INSTALL_INTERFACE:include>) | ||
target_link_libraries(msquic PRIVATE core msquic_platform inc warnings logging base_link main_binary_link_args) | ||
set_target_properties(msquic PROPERTIES OUTPUT_NAME ${QUIC_LIBRARY_NAME}) | ||
diff --git a/src/bin/msquic-config.cmake.in b/src/bin/msquic-config.cmake.in | ||
index e61e63fea..f9d17c5e7 100644 | ||
--- a/src/bin/msquic-config.cmake.in | ||
+++ b/src/bin/msquic-config.cmake.in | ||
@@ -2,8 +2,10 @@ include(CMakeFindDependencyMacro) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/msquic.cmake") | ||
|
||
-foreach(_t IN ITEMS msquic msquic_platform) | ||
- if(TARGET msquic::${_t} AND NOT TARGET ${_t}) | ||
- add_library(${_t} ALIAS msquic::${_t}) | ||
- endif() | ||
-endforeach() | ||
+# Legacy names | ||
+if(NOT TARGET msquic) | ||
+ add_library(msquic ALIAS msquic::msquic) | ||
+endif() | ||
+if(NOT TARGET msquic_platform) | ||
+ add_library(msquic_platform ALIAS msquic::platform) | ||
+endif() | ||
diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt | ||
index 997906d0c..61c898a8a 100644 | ||
--- a/src/platform/CMakeLists.txt | ||
+++ b/src/platform/CMakeLists.txt | ||
@@ -60,6 +60,8 @@ else() | ||
endif() | ||
|
||
add_library(msquic_platform STATIC ${SOURCES}) | ||
+add_library(msquic::platform ALIAS msquic_platform) | ||
+set_target_properties(msquic_platform PROPERTIES EXPORT_NAME platform) | ||
|
||
if("${CX_PLATFORM}" STREQUAL "windows") | ||
target_link_libraries( |