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

More use of CMAKE_INSTALL_<...>DIR #4738

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})

set(QUIC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/inc)

include(GNUInstallDirs)

if (WIN32)
set(QUIC_WARNING_FLAGS /WX /W4 /sdl /wd4206 CACHE INTERNAL "")
set(QUIC_COMMON_FLAGS "")
Expand Down
15 changes: 10 additions & 5 deletions src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ elseif (CX_PLATFORM STREQUAL "darwin")
PROPERTIES LINK_FLAGS "-exported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/darwin/exports.txt\"")
endif()

include(GNUInstallDirs)

file(GLOB PUBLIC_HEADERS "../inc/*.h" "../inc/*.hpp")

if(QUIC_TLS STREQUAL "openssl" OR QUIC_TLS STREQUAL "openssl3")
Expand All @@ -264,11 +262,18 @@ if(WIN32)
endif()

if(BUILD_SHARED_LIBS)
install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS} EXPORT msquic DESTINATION lib)
install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS}
EXPORT msquic
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
else()
install(FILES ${QUIC_STATIC_LIBRARY} DESTINATION lib)
install(FILES "${QUIC_STATIC_LIBRARY}"
DESTINATION lib
)
endif()
install(FILES ${PUBLIC_HEADERS} DESTINATION include)
install(FILES ${PUBLIC_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake @ONLY)

Expand Down
7 changes: 6 additions & 1 deletion src/generated/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ if(QUIC_ENABLE_LOGGING)
target_link_libraries(msquic.lttng PRIVATE ${LTTNGUST_LIBRARIES})
set_target_properties(msquic.lttng PROPERTIES SOVERSION ${QUIC_FULL_VERSION} VERSION ${QUIC_FULL_VERSION})

install(TARGETS msquic.lttng DESTINATION lib)
install(TARGETS msquic.lttng
EXPORT msquic
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
endif()

else()
Expand Down
Loading