Skip to content

Commit 8222490

Browse files
MrAnnobazsi
authored andcommitted
loggen: fix CMake build
Signed-off-by: László Várady <laszlo.varady@protonmail.com>
1 parent a4d2f8e commit 8222490

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/loggen/CMakeLists.txt

+5-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(LOGGEN_HELPER_SOURCE
99

1010
add_library(loggen_helper STATIC ${LOGGEN_HELPER_SOURCE})
1111

12-
include_directories(loggen_helper PUBLIC
12+
target_include_directories(loggen_helper PUBLIC
1313
${CORE_INCLUDE_DIRS}
1414
${CMAKE_CURRENT_SOURCE_DIR}
1515
${GLIB_INCLUDE_DIRS}
@@ -32,14 +32,13 @@ set_target_properties(loggen_helper
3232
install(TARGETS loggen_helper ARCHIVE DESTINATION ${LOGGEN_PLUGIN_INSTALL_DIR})
3333

3434
# ########### loggen_plugin common static lib for plugins #####
35-
set(LOGGEN_PLUGIN_SOURCE
35+
36+
add_library(loggen_plugin STATIC
3637
loggen_plugin.c
3738
loggen_plugin.h
38-
)
39-
40-
add_library(loggen_plugin STATIC ${LOGGEN_HELPER_SOURCE})
39+
)
4140

42-
include_directories(loggen_plugin PUBLIC loggen_helper)
41+
target_link_libraries(loggen_plugin PUBLIC loggen_helper)
4342

4443
set_target_properties(loggen_plugin
4544
PROPERTIES VERSION ${SYSLOG_NG_VERSION}

tests/loggen/tests/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
add_unit_test(CRITERION TARGET test_loggen_filereader DEPENDS loggen_helper)
2-
include_directories(test_loggen_filereader PUBLIC
2+
target_include_directories(test_loggen_filereader PUBLIC
33
${PROJECT_SOURCE_DIR}
44
)

0 commit comments

Comments
 (0)