From 9b78a42855cb778c9ad99cab017fbb9143afd923 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 14 Jul 2021 17:17:17 -0700 Subject: [PATCH] CMake: Fixup qtui's includes. Add ${MINIZIP_INCLUDE_DIRS} to qtui's includes instead of every target's. Make more includes SYSTEM PRIVATE. --- CMakeLists.txt | 8 +------- ui/qt/CMakeLists.txt | 15 +++++---------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a101da1210..0a74bf8391 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1281,13 +1281,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") find_package(SETCAP) endif() -# Include minizip include directories -if(MINIZIP_FOUND) - include_directories(SYSTEM ${MINIZIP_INCLUDE_DIRS}) -else() - set(MINIZIP_LIBRARY "") -endif() - # Windows version updates ws_find_package(WinSparkle ENABLE_WINSPARKLE HAVE_SOFTWARE_UPDATE) @@ -2854,6 +2847,7 @@ if(BUILD_dumpcap AND PCAP_FOUND) add_executable(dumpcap ${dumpcap_FILES}) set_extra_executable_properties(dumpcap "Executables") target_link_libraries(dumpcap ${dumpcap_LIBS}) + target_include_directories(dumpcap SYSTEM PRIVATE ${ZLIB_INCLUDE_DIRS}) install(TARGETS dumpcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS ${DUMPCAP_SETUID} diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index 06d7af30f3..35c902c1d9 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -704,19 +704,14 @@ add_library(qtui OBJECT wireshark-tap-register.c ) -target_include_directories(qtui - SYSTEM PUBLIC - ${QT_INCLUDE_DIRS} - ${WINSPARKLE_INCLUDE_DIRS} - ${SPEEXDSP_INCLUDE_DIRS} -) - target_include_directories(qtui SYSTEM PRIVATE - # Can't use imported target, linking object libraries for usage requirements - # requires CMake 3.12 - ${PCAP_INCLUDE_DIRS} ${GCRYPT_INCLUDE_DIRS} + ${MINIZIP_INCLUDE_DIRS} + ${PCAP_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${SPEEXDSP_INCLUDE_DIRS} + ${WINSPARKLE_INCLUDE_DIRS} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}