Warning, /system/kpmcore/src/util/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2008,2012 Volker Lanz <vl@fidra.de>
0002 # SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk>
0003 # SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
0004 # SPDX-FileCopyrightText: 2015-2020 Andrius Štikonas <andrius@stikonas.eu>
0005 # SPDX-FileCopyrightText: 2018 Huzaifa Faruqui <huzaifafaruqui@gmail.com>
0006 # SPDX-FileCopyrightText: 2019 Albert Astals Cid <aacid@kde.org>
0007 # SPDX-FileCopyrightText: 2019 Antonio Rojas <arojas@archlinux.org>
0008 # SPDX-FileCopyrightText: 2020 David Edmundson <kde@davidedmundson.co.uk>
0009 
0010 # SPDX-License-Identifier: GPL-3.0-or-later
0011 
0012 set(helper_interface_xml org.kde.kpmcore.helperinterface.xml)
0013 
0014 file(READ "util/trustedprefixes" TRUSTED_PREFIXES)
0015 string(REGEX REPLACE ";" "\\\\;" TRUSTED_PREFIXES "${TRUSTED_PREFIXES}")
0016 string(REGEX REPLACE "\n" ";" TRUSTED_PREFIXES "${TRUSTED_PREFIXES}")
0017 foreach(TRUSTED_PREFIX ${TRUSTED_PREFIXES})
0018     list(APPEND TRUSTED_PREFIXES_LIST "    QStringLiteral(\"${TRUSTED_PREFIX}\")")
0019 endforeach()
0020 string(REPLACE ";    QStringLiteral(" ",\n    QStringLiteral(" TRUSTED_PREFIXES_LIST "${TRUSTED_PREFIXES_LIST}")
0021 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS util/trustedprefixes)
0022 configure_file(util/externalcommand_trustedprefixes.h.in util/externalcommand_trustedprefixes.h)
0023 
0024 qt_generate_dbus_interface(
0025     util/externalcommand.h
0026     ${application_interface_xml}
0027     OPTIONS -a
0028 )
0029 
0030 qt_generate_dbus_interface(
0031     util/externalcommandhelper.h
0032     ${helper_interface_xml}
0033     OPTIONS -a
0034 )
0035 
0036 qt_add_dbus_interface(HelperInterface_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${helper_interface_xml} externalcommandhelper_interface)
0037 
0038 set(UTIL_SRC
0039     ${HelperInterface_SRCS}
0040     util/capacity.cpp
0041     util/externalcommand.cpp
0042     util/globallog.cpp
0043     util/helpers.cpp
0044     util/htmlreport.cpp
0045     util/report.cpp
0046 )
0047 
0048 set(UTIL_LIB_HDRS
0049     util/capacity.h
0050     util/externalcommand.h
0051     util/globallog.h
0052     util/helpers.h
0053     util/htmlreport.h
0054     util/report.h
0055 )
0056 
0057 add_executable(kpmcore_externalcommand
0058     util/externalcommandhelper.cpp
0059 )
0060 
0061 target_link_libraries(kpmcore_externalcommand
0062     Qt6::Core
0063     Qt6::DBus
0064     KF6::I18n
0065     PolkitQt6-1::Core
0066 )
0067 
0068 install(TARGETS kpmcore_externalcommand DESTINATION ${KDE_INSTALL_LIBEXECDIR})
0069 install( FILES util/org.kde.kpmcore.helperinterface.conf DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d )
0070 
0071 install( FILES util/org.kde.kpmcore.externalcommand.policy DESTINATION ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
0072 ecm_install_configured_files(
0073     INPUT util/org.kde.kpmcore.helperinterface.service.in
0074     DESTINATION ${KDE_INSTALL_DBUSDIR}/system-services
0075 )