Skip to content

Commit

Permalink
simplify export include dir cmake code (#4575)
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev authored Oct 14, 2024
1 parent 05fce11 commit 6e23861
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
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

0 comments on commit 6e23861

Please sign in to comment.