From 7fd9e992bbe30cb9f2767807967226c25cc77285 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Tue, 29 Jun 2021 10:17:03 +0800 Subject: cmake: fix ODR violation `perfdata.h` is included from downstream code, but HAVE_ZSTD is not propagated downstream. this leads to gcc complaining about ODR violations Change-Id: Ib6995d9be4102f4e3262d84b25d0c8129e165ec1 Reviewed-by: Milian Wolff --- app/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index b324907..6efe84b 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -25,9 +25,9 @@ add_qtc_library(perfparser_lib STATIC ) if (Zstd_FOUND) - target_include_directories(perfparser_lib PRIVATE ${Zstd_INCLUDE_DIR}) - target_link_libraries(perfparser_lib PRIVATE ${Zstd_LIBRARY}) - target_compile_definitions(perfparser_lib PRIVATE HAVE_ZSTD=1) + target_include_directories(perfparser_lib PUBLIC ${Zstd_INCLUDE_DIR}) + target_link_libraries(perfparser_lib PUBLIC ${Zstd_LIBRARY}) + target_compile_definitions(perfparser_lib PUBLIC HAVE_ZSTD=1) endif() add_qtc_executable(perfparser -- cgit v1.2.3