diff --git a/analyzers/heaptrack/CMakeLists.txt b/analyzers/heaptrack/CMakeLists.txt index 95bdbd133f..02bd9981e4 100644 --- a/analyzers/heaptrack/CMakeLists.txt +++ b/analyzers/heaptrack/CMakeLists.txt @@ -1,40 +1,55 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevheaptrack\") +find_package(heaptrack QUIET) +set_package_properties(heaptrack PROPERTIES + DESCRIPTION "A heap memory profiler for Linux" + URL "https://cgit.kde.org/heaptrack.git" + PURPOSE "Required for the heaptrack plugin" + TYPE RUNTIME +) +find_package(heaptrack_gui QUIET) +set_package_properties(heaptrack_gui PROPERTIES + DESCRIPTION "Analyzer gui for heaptrack, a heap memory profiler for Linux" + URL "https://cgit.kde.org/heaptrack.git" + PURPOSE "Required for the heaptrack plugin" + TYPE RUNTIME +) + set(kdevheaptrack_SRCS debug.cpp job.cpp plugin.cpp utils.cpp visualizer.cpp config/globalconfigpage.cpp ) ki18n_wrap_ui(kdevheaptrack_SRCS config/globalconfigpage.ui ) qt5_add_resources(kdevheaptrack_SRCS kdevheaptrack.qrc ) kconfig_add_kcfg_files(kdevheaptrack_CONFIG_SRCS config/globalsettings.kcfgc ) add_library(kdevheaptrack_config STATIC ${kdevheaptrack_CONFIG_SRCS} ) target_link_libraries(kdevheaptrack_config KDev::Shell ) kdevplatform_add_plugin(kdevheaptrack JSON kdevheaptrack.json SOURCES ${kdevheaptrack_SRCS} ) target_link_libraries(kdevheaptrack kdevheaptrack_config KDev::Project ) if(KF5SysGuard_FOUND) target_link_libraries(kdevheaptrack kdevdebuggercommon KF5::ProcessUi ) endif() diff --git a/cmake/modules/Findheaptrack.cmake b/cmake/modules/Findheaptrack.cmake new file mode 100644 index 0000000000..c882f04d33 --- /dev/null +++ b/cmake/modules/Findheaptrack.cmake @@ -0,0 +1,22 @@ +# Find the heaptrack executable +# +# Defines the following variables +# heaptrack_EXECUTABLE - path of the heaptrack executable + +#============================================================================= +# Copyright 2017 Friedrich W. H. Kossebau +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +find_program(heaptrack_EXECUTABLE NAMES heaptrack) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(heaptrack DEFAULT_MSG heaptrack_EXECUTABLE) + +mark_as_advanced(heaptrack_EXECUTABLE) diff --git a/cmake/modules/Findheaptrack_gui.cmake b/cmake/modules/Findheaptrack_gui.cmake new file mode 100644 index 0000000000..32f55ba454 --- /dev/null +++ b/cmake/modules/Findheaptrack_gui.cmake @@ -0,0 +1,22 @@ +# Find the heaptrack_gui executable +# +# Defines the following variables +# heaptrack_gui_EXECUTABLE - path of the heaptrack_gui executable + +#============================================================================= +# Copyright 2017 Friedrich W. H. Kossebau +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +find_program(heaptrack_gui_EXECUTABLE NAMES heaptrack_gui) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(heaptrack_gui DEFAULT_MSG heaptrack_gui_EXECUTABLE) + +mark_as_advanced(heaptrack_gui_EXECUTABLE)