Skip to content

Commit 591e8ab

Browse files
author
Alexander Damian
committed
Changed include_directories to taget_include_directories and removed Boost path since it's automatically pulled in via Boost::headers
1 parent ee30fab commit 591e8ab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ set(FIND_RDKAFKA_FILE "${PROJECT_SOURCE_DIR}/cmake/FindRdKafka.cmake")
3535
set(NAMESPACE "${PROJECT_NAME}::")
3636
set(TARGET_EXPORT_NAME ${PROJECT_NAME}Targets)
3737

38-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include/cppkafka)
39-
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
40-
4138
add_library(${TARGET_NAME} ${CPPKAFKA_LIBRARY_TYPE} ${SOURCES})
39+
target_include_directories(${TARGET_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include/cppkafka>)
4240
set_target_properties(${TARGET_NAME} PROPERTIES VERSION ${CPPKAFKA_VERSION}
4341
SOVERSION ${CPPKAFKA_VERSION})
4442
# In CMake >= 3.15 Boost::boost == Boost::headers

0 commit comments

Comments
 (0)