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

simplify export include dir cmake code #4575

Merged
merged 1 commit into from
Oct 14, 2024
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
14 changes: 0 additions & 14 deletions src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,6 @@ elseif (CX_PLATFORM STREQUAL "darwin")
endif()

include(GNUInstallDirs)
set(include_dest ${CMAKE_INSTALL_INCLUDEDIR})

if(BUILD_SHARED_LIBS)
target_include_directories(msquic PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
$<INSTALL_INTERFACE:${include_dest}>)
else()
target_include_directories(msquic_static INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
$<INSTALL_INTERFACE:${include_dest}>)
target_include_directories(msquic INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
$<INSTALL_INTERFACE:${include_dest}>)
endif()

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

Expand Down
4 changes: 3 additions & 1 deletion src/inc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ target_compile_options(inc INTERFACE ${QUIC_C_FLAGS})
target_compile_options(inc INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${QUIC_CXX_FLAGS}>)

target_compile_definitions(inc INTERFACE ${QUIC_COMMON_DEFINES})
target_include_directories(inc INTERFACE ${QUIC_INCLUDE_DIR})
target_include_directories(inc INTERFACE
$<BUILD_INTERFACE:${QUIC_INCLUDE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

target_compile_features(inc INTERFACE cxx_std_17)
target_compile_features(inc INTERFACE c_std_11)
Expand Down
Loading