-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
38 lines (27 loc) · 1.05 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.6)
project(polkit-dumb-agent LANGUAGES CXX C)
find_package(Qt5 COMPONENTS Widgets DBus REQUIRED)
find_package(KF5Su REQUIRED)
# systemd for responder dbus
find_package(PkgConfig REQUIRED)
pkg_check_modules(systemd REQUIRED IMPORTED_TARGET libsystemd)
include(GNUInstallDirs)
set(LIBEXEC_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/polkit-dumb-agent/")
add_definitions(-DLIBEXEC_DIR=\"${LIBEXEC_PATH}\")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(polkit-dumb-agent agent.cpp)
target_link_libraries(polkit-dumb-agent PRIVATE
Qt5::DBus
Qt5::Widgets
KF5::Su
)
add_executable(polkit-dumb-agent-responder sendreply.c)
target_link_libraries(polkit-dumb-agent-responder PRIVATE PkgConfig::systemd)
install(TARGETS polkit-dumb-agent DESTINATION bin)
install(TARGETS polkit-dumb-agent-responder
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/polkit-dumb-agent/"
)
install(FILES polkit-dumb-agent.desktop DESTINATION /etc/xdg/autostart/)