forked from ubports/hfd-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (35 loc) · 1.08 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
cmake_minimum_required(VERSION 3.0)
project(hfd-service)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(FindPkgConfig)
include(GNUInstallDirs)
pkg_check_modules(UDEV REQUIRED libudev)
option(ENABLE_LIBHYBRIS "Enable libhybris support" ON)
if (ENABLE_LIBHYBRIS)
pkg_check_modules(ANDROID_HEADERS android-headers)
pkg_check_modules(ANDROID_HARDWARE libhardware)
if(ANDROID_HEADERS_FOUND AND ANDROID_HARDWARE_FOUND)
message(STATUS "Bulding with libhybris support")
set(HAVE_LIBHYBRIS true)
else()
message(WARNING "Bulding without libhybris support, missing required dependencies!")
endif()
else()
message(STATUS "Bulding without libhybris support")
endif()
find_package(Qt5Core REQUIRED)
find_package(Qt5DBus REQUIRED)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
add_subdirectory(src)
add_subdirectory(tools)
add_subdirectory(qt)
# Dbus file
install(FILES data/hfd-service.conf
DESTINATION /etc/init
)
# Dbus policy
install(FILES data/com.lomiri.hfd.conf
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
)