Skip to content

Commit

Permalink
simplify export include dir cmake code
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev committed Sep 28, 2024
1 parent 1e5d485 commit 0e0cec2
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 0e0cec2

Please sign in to comment.