Warning, /libraries/polkit-qt-1/examples/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001
0002 install(FILES org.qt.policykit.examples.policy DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/polkit-1/actions/)
0003
0004 add_executable(${POLKITQT-1_EXAMPLE})
0005
0006 target_sources(${POLKITQT-1_EXAMPLE} PRIVATE
0007 main.cpp
0008 PkExample.cpp
0009
0010 icons/icons.qrc
0011 )
0012
0013 target_link_libraries(${POLKITQT-1_EXAMPLE}
0014 Qt${QT_MAJOR_VERSION}::Core
0015 Qt${QT_MAJOR_VERSION}::DBus
0016 Qt${QT_MAJOR_VERSION}::Widgets
0017 ${POLKITQT-1_GUI_PCNAME}
0018 ${POLKITQT-1_CORE_PCNAME}
0019 )
0020
0021 #--------Helper Application
0022
0023 # This macro is defined in FindPolkitQt.cmake
0024 macro(dbus_add_activation_system_service _sources)
0025 foreach (_i ${_sources})
0026 get_filename_component(_service_file ${_i} ABSOLUTE)
0027 string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
0028 set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file})
0029 configure_file(${_service_file} ${_target})
0030 install(FILES ${_target} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/dbus-1/system-services )
0031 #install(FILES ${_target} DESTINATION ${_install_dir})
0032 endforeach (_i ${ARGN})
0033 endmacro(dbus_add_activation_system_service _sources)
0034
0035 add_executable(${POLKITQT-1_EXAMPLE_HELPER})
0036
0037 qt_add_dbus_adaptor(polkit_example_helper_dbus_SRCS
0038 org.qt.policykit.examples.xml
0039 PkExampleHelper.h
0040 PkExampleHelper
0041 )
0042
0043 target_sources(${POLKITQT-1_EXAMPLE_HELPER} PRIVATE
0044 PkExampleHelper.cpp
0045 mainHelper.cpp
0046 ${polkit_example_helper_dbus_SRCS}
0047 )
0048
0049 # see our helper is pretty small :D
0050 target_link_libraries(${POLKITQT-1_EXAMPLE_HELPER}
0051 Qt${QT_MAJOR_VERSION}::Core
0052 Qt${QT_MAJOR_VERSION}::Xml
0053 Qt${QT_MAJOR_VERSION}::DBus
0054 ${POLKITQT-1_GUI_PCNAME}
0055 )
0056
0057 install(TARGETS ${POLKITQT-1_EXAMPLE_HELPER} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
0058
0059 dbus_add_activation_system_service(org.qt.policykit.examples.service.in)
0060
0061 install(FILES org.qt.policykit.examples.conf DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d)
0062
0063 add_subdirectory(agent)