| 1 |
if (ECM_FOUND) |
| 2 |
include(ECMEnableSanitizers) |
| 3 |
endif() |
| 4 |
|
| 5 |
find_package(Boost 1.70.0 CONFIG REQUIRED COMPONENTS iostreams program_options filesystem) |
| 6 |
|
| 7 |
configure_file(analyze_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/analyze_config.h) |
| 8 |
|
| 9 |
include_directories( |
| 10 |
${Boost_INCLUDE_DIRS} |
| 11 |
${ZLIB_INCLUDE_DIRS} |
| 12 |
${PROJECT_SOURCE_DIR}/3rdparty/ |
| 13 |
${CMAKE_CURRENT_BINARY_DIR} |
| 14 |
) |
| 15 |
|
| 16 |
add_library(sharedprint STATIC |
| 17 |
accumulatedtracedata.cpp |
| 18 |
suppressions.cpp |
| 19 |
) |
| 20 |
|
| 21 |
target_link_libraries(sharedprint |
| 22 |
PUBLIC |
| 23 |
${Boost_LIBRARIES} |
| 24 |
${ZLIB_LIBRARIES} |
| 25 |
tsl::robin_map |
| 26 |
) |
| 27 |
|
| 28 |
if (ZSTD_FOUND AND NOT BOOST_IOSTREAMS_HAS_ZSTD) |
| 29 |
target_link_libraries(sharedprint LINK_PUBLIC |
| 30 |
boost-zstd |
| 31 |
) |
| 32 |
endif() |
| 33 |
|
| 34 |
add_subdirectory(print) |
| 35 |
|
| 36 |
if(HEAPTRACK_BUILD_GUI) |
| 37 |
find_package(Qt6 ${QT_MIN_VERSION} ${REQUIRED_IN_APPIMAGE} NO_MODULE OPTIONAL_COMPONENTS Widgets) |
| 38 |
set_package_properties(Qt6 PROPERTIES TYPE RECOMMENDED PURPOSE "Required for the heaptrack_gui executable.") |
| 39 |
find_package(ECM 1.0.0 ${REQUIRED_IN_APPIMAGE} NO_MODULE) |
| 40 |
set_package_properties(ECM PROPERTIES TYPE RECOMMENDED PURPOSE "KDE's extra-cmake-modules, required for the heaptrack_gui executable.") |
| 41 |
if(Qt6_FOUND AND ECM_FOUND) |
| 42 |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) |
| 43 |
find_package(KF6 ${REQUIRED_IN_APPIMAGE} COMPONENTS CoreAddons I18n ThreadWeaver ConfigWidgets KIO IconThemes) |
| 44 |
find_package(KChart6 ${REQUIRED_IN_APPIMAGE} "2.6.0") |
| 45 |
set_package_properties(KChart6 PROPERTIES TYPE RECOMMENDED PURPOSE "Required for the heaptrack_gui executable. Get it from the kdiagram module.") |
| 46 |
if(KF6I18n_FOUND) |
| 47 |
ki18n_install(../../po) |
| 48 |
endif() |
| 49 |
else() |
| 50 |
message(WARNING "Required Qt/KF dependencies for building heaptrack GUI not found") |
| 51 |
endif() |
| 52 |
endif() |
| 53 |
|
| 54 |
if(KChart6_FOUND) |
| 55 |
set(KChart_FOUND TRUE) |
| 56 |
endif() |
| 57 |
|
| 58 |
if (KF6_FOUND) |
| 59 |
add_subdirectory(gui) |
| 60 |
endif() |