diff --git a/CMakeLists.txt b/CMakeLists.txt index 225ba1797..f57b17472 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,10 @@ set( LICENSE "Mozilla Public License Version 2.0" ) # Build, project and include settings find_package(Threads REQUIRED) if(WITH_DLT_SYSTEM) + set(ZLIB_LIBRARY "-lz") find_package(ZLIB REQUIRED) +else(WITH_DLT_SYSTEM) + set(ZLIB_LIBRARY "") endif(WITH_DLT_SYSTEM) find_package(PkgConfig) diff --git a/automotive-dlt.pc.in b/automotive-dlt.pc.in index d587ea127..d19a1e4d3 100644 --- a/automotive-dlt.pc.in +++ b/automotive-dlt.pc.in @@ -24,6 +24,6 @@ Name: DLT Description: Diagnostic Log and Trace Version: @DLT_VERSION@ Requires: -Libs: -L${libdir} -ldlt -lrt -lpthread -lz +Libs: -L${libdir} -ldlt -lrt -lpthread @ZLIB_LIBRARY@ Cflags: -I${includedir}/dlt -DDLT_@DLT_MAJOR_VERSION@_@DLT_MINOR_VERSION@