Correctly handle libyaml linking for log2journal. (#17276)

It somehow got missed when moving the libyaml bundling into the CMake
code.
This commit is contained in:
Austin S. Hemmelgarn 2024-03-28 07:05:19 -04:00 committed by GitHub
parent aa0694f591
commit 20682b5281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 8 deletions

View File

@ -2096,14 +2096,7 @@ if(PCRE2_FOUND)
target_compile_definitions(log2journal PUBLIC ${PCRE2_CFLAGS_OTHER})
target_link_libraries(log2journal PUBLIC "${PCRE2_LDFLAGS}")
if(ENABLE_BUNDLED_YAML)
target_include_directories(log2journal BEFORE PUBLIC "${CMAKE_SOURCE_DIR}/externaldeps/libyaml")
target_link_libraries(log2journal PUBLIC yaml)
else()
target_include_directories(log2journal BEFORE PUBLIC ${YAML_INCLUDE_DIRS})
target_compile_definitions(log2journal PUBLIC ${YAML_CFLAGS_OTHER})
target_link_libraries(log2journal PUBLIC ${YAML_LDFLAGS})
endif()
netdata_add_libyaml_to_target(log2journal)
install(TARGETS log2journal
COMPONENT log2journal