Skip to content

Commit 2334449

Browse files
authored
Merge pull request #733 from aox-ak/cmake_fix_pkg_config
cmake: fix generation of pkg-config files
2 parents 9543be2 + e50b56e commit 2334449

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ set(LICENSE "Mozilla Public License Version 2.0")
137137
find_package(Threads REQUIRED)
138138
if(WITH_DLT_LOGSTORAGE_GZIP)
139139
find_package(ZLIB 1.2.9 REQUIRED)
140-
set(ZLIB_LIBRARY "ZLIB::ZLIB")
140+
set(ZLIB_LIBRARY "-lz")
141141
elseif(WITH_DLT_COREDUMPHANDLER OR WITH_DLT_FILETRANSFER)
142142
find_package(ZLIB REQUIRED)
143-
set(ZLIB_LIBRARY "ZLIB::ZLIB")
143+
set(ZLIB_LIBRARY "-lz")
144144
else()
145145
set(ZLIB_LIBRARY "")
146146
endif()

src/core_dump_handler/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if(WITH_DLT_COREDUMPHANDLER)
2929
endif(WITH_CITYHASH)
3030

3131
add_executable(dlt-cdh ${dlt_cdh_SRCS})
32-
target_link_libraries(dlt-cdh ${ZLIB_LIBRARY})
32+
target_link_libraries(dlt-cdh ZLIB::ZLIB)
3333
set_target_properties(dlt-cdh PROPERTIES LINKER_LANGUAGE C)
3434

3535
configure_file(${PROJECT_SOURCE_DIR}/src/core_dump_handler/50-coredump.conf.cmake ${PROJECT_BINARY_DIR}/core_dump_handler/50-coredump.conf)

src/daemon/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (WITH_SYSTEMD_SOCKET_ACTIVATION)
6767
target_link_libraries(dlt-daemon systemd)
6868
endif()
6969
if (WITH_DLT_LOGSTORAGE_GZIP)
70-
target_link_libraries(dlt-daemon ${ZLIB_LIBRARY})
70+
target_link_libraries(dlt-daemon ZLIB::ZLIB)
7171
endif()
7272

7373
install(TARGETS dlt-daemon

src/system/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if(WITH_SYSTEMD_JOURNAL)
3939
endif(WITH_SYSTEMD_JOURNAL)
4040

4141
if(WITH_DLT_FILETRANSFER)
42-
target_link_libraries(dlt-system ${ZLIB_LIBRARY})
42+
target_link_libraries(dlt-system ZLIB::ZLIB)
4343
endif(WITH_DLT_FILETRANSFER)
4444

4545
set_target_properties(dlt-system PROPERTIES LINKER_LANGUAGE C)

tests/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ endif()
130130
foreach(target IN LISTS TARGET_LIST)
131131
set(target_SRCS ${target})
132132
add_executable(${target} ${target_SRCS} ${systemd_SRCS})
133-
target_link_libraries(${target} ${DLT_DAEMON_LIBRARIES} ${ZLIB_LIBRARY})
133+
target_link_libraries(${target} ${DLT_DAEMON_LIBRARIES} ZLIB::ZLIB)
134134
if(WITH_DLT_INSTALLED_TESTS)
135135
install(TARGETS ${target} RUNTIME DESTINATION ${DLT_TEST_DIR})
136136
if(EXISTS ${PROJECT_SOURCE_DIR}/tests/${target}.sh)

0 commit comments

Comments
 (0)