-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
47 lines (34 loc) · 1.12 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
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.5)
project(cutefish-daemon LANGUAGES CXX)
set(TARGET cutefish-daemon)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Widgets DBus REQUIRED)
find_package(QApt REQUIRED)
qt5_add_dbus_adaptor(DBUS_SOURCES
src/com.cutefish.AppManager.xml
src/appmanager.h AppManager)
set(PROJECT_SOURCES
src/main.cpp
src/application.cpp
src/appmanager.cpp
)
set_source_files_properties(${DBUS_SOURCES} PROPERTIES SKIP_AUTOGEN ON)
add_executable(cutefish-daemon
${PROJECT_SOURCES}
${DBUS_SOURCES}
)
target_link_libraries(cutefish-daemon PRIVATE
Qt5::Widgets
Qt5::Core
Qt5::DBus
QApt::Main
)
# install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${TARGET} DESTINATION "/usr/bin/")
install(FILES src/com.cutefish.Daemon.conf DESTINATION "/etc/dbus-1/system.d/")
install(FILES src/com.cutefish.Daemon.service DESTINATION "/usr/share/dbus-1/system-services/")