Skip to content

Commit

Permalink
Merge pull request #496 from joejustesen/main
Browse files Browse the repository at this point in the history
Add BUILD_INTERFACE to target_include_directories
  • Loading branch information
kozlovic committed Dec 17, 2021
2 parents 661b89a + e2bccc4 commit 0d071f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ endif(NATS_BUILD_LIB_STATIC)
if(NATS_BUILD_LIB_SHARED)
set_property(TARGET nats PROPERTY DEBUG_POSTFIX d)
target_include_directories(nats PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)
install(TARGETS nats EXPORT cnats-targets DESTINATION ${NATS_LIBDIR})
install(EXPORT cnats-targets
Expand All @@ -69,6 +70,7 @@ endif(NATS_BUILD_LIB_SHARED)
if(NATS_BUILD_LIB_STATIC)
set_property(TARGET nats_static PROPERTY DEBUG_POSTFIX d)
target_include_directories(nats_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)
install(TARGETS nats_static EXPORT cnats-targets ARCHIVE DESTINATION ${NATS_LIBDIR})
install(EXPORT cnats-targets
Expand Down

0 comments on commit 0d071f1

Please sign in to comment.