Skip to content

Commit

Permalink
Add in-build alias matching exported targts
Browse files Browse the repository at this point in the history
Allows users to use namespaced CMake targets, regardless of
using a subdirectory or the CMake config package.
  • Loading branch information
dg0yt committed Jan 5, 2025
1 parent 69d9e29 commit fa0a917
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 1 addition & 0 deletions src/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ 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")
Expand Down

0 comments on commit fa0a917

Please sign in to comment.