1
by mfrey at canonical
Initial power daemon to handle power button events |
1 |
project(powerd) |
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
2 |
cmake_minimum_required(VERSION 2.8.9) |
3 |
||
4 |
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") |
|
34.2.1
by Matthew Fischer
Add a mode for debug builds and disable the debug flags by default |
5 |
|
6 |
if (NOT CMAKE_BUILD_TYPE) |
|
7 |
message(STATUS "No build type selected, default to Release") |
|
8 |
set(CMAKE_BUILD_TYPE "Release") |
|
9 |
endif() |
|
10 |
||
59.2.1
by Seth Forshee
Enable -Wall |
11 |
set(CMAKE_C_FLAGS "-Wall") |
12 |
set(CMAKE_CXX_FLAGS "-Wall") |
|
59.2.11
by Seth Forshee
Fix duplicate flags |
13 |
set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -g") |
14 |
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -g") |
|
15 |
set(CMAKE_C_FLAGS_RELEASE "-O3") |
|
16 |
set(CMAKE_CXX_FLAGS_RELEASE "-O3") |
|
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
17 |
|
18 |
set(GDBUS_NAME powerd-dbus) |
|
9.1.1
by Matthew Fischer
initial code that talks on dbus |
19 |
|
104.1.1
by Seth Forshee
libsuspend: Make earlysuspend enter/exit with kernel early suspend processing |
20 |
find_package(Threads REQUIRED) |
21 |
||
1
by mfrey at canonical
Initial power daemon to handle power button events |
22 |
find_package(PkgConfig) |
103.1.1
by Ricardo Salveti de Araujo
Using pkg-config files from hybris, and depending on latest version |
23 |
pkg_check_modules(ANDROID_HEADERS android-headers) |
1
by mfrey at canonical
Initial power daemon to handle power button events |
24 |
pkg_check_modules(GLIB glib-2.0) |
9.1.1
by Matthew Fischer
initial code that talks on dbus |
25 |
pkg_check_modules(GIO gio-2.0) |
26 |
pkg_check_modules(GIO-UNIX gio-unix-2.0) |
|
62.2.1
by Seth Forshee
Add basic support for power source monitoring |
27 |
pkg_check_modules(UPOWER_GLIB upower-glib) |
18.2.1
by Matthew Fischer
initial UUID work, check-in before merge with trunk, I still need to switch to a GHashTable |
28 |
pkg_check_modules(UUID uuid) |
1
by mfrey at canonical
Initial power daemon to handle power button events |
29 |
|
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
30 |
set(POWERD_GENERATED_SOURCES |
31 |
${GDBUS_NAME}.c |
|
32 |
)
|
|
33 |
set(POWERD_GENERATED_HEADERS |
|
34 |
${GDBUS_NAME}.h |
|
35 |
)
|
|
36 |
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/src/${POWERD_GENERATED_SOURCES} PROPERTIES GENERATED 1) |
|
37 |
||
76.2.21
by Seth Forshee
s/android_config/device_config/ |
38 |
set(POWERD_DEVICE_CONFIGS_PATH "${CMAKE_INSTALL_PREFIX}/share/powerd/device_configs") |
39 |
FILE(GLOB device_config_files "${CMAKE_CURRENT_SOURCE_DIR}/data/device_configs/*.xml") |
|
40 |
add_definitions(-DPOWERD_DEVICE_CONFIGS_PATH=\"${POWERD_DEVICE_CONFIGS_PATH}\") |
|
76.2.7
by Seth Forshee
Add support for parsing Android config.xml files |
41 |
|
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
42 |
set( |
43 |
SRCS
|
|
44 |
||
45 |
src/powerd.cpp
|
|
128.2.4
by Alberto Aguirre
More cleanup |
46 |
src/display.c
|
76.2.6
by Seth Forshee
First pass autobrightness implementation |
47 |
src/autobrightness.c
|
55.1.1
by Seth Forshee
Add new backlight support implementation |
48 |
src/backlight.c
|
76.2.21
by Seth Forshee
s/android_config/device_config/ |
49 |
src/device-config.c
|
38.1.1
by Seth Forshee
Add internal logging interfaces |
50 |
src/log.c
|
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
51 |
src/power-request.c
|
62.2.1
by Seth Forshee
Add basic support for power source monitoring |
52 |
src/power-source.c
|
72.2.5
by Seth Forshee
Add core code for client registration and acknowledgements |
53 |
src/powerd-client.c
|
54 |
src/powerd-object.c
|
|
24.1.1
by Ricardo Mendoza
* Provide initial sensors control |
55 |
src/powerd-sensors.cpp
|
76.2.3
by Seth Forshee
Add module for cubic spline interpolation |
56 |
src/spline.c
|
82.1.1
by Seth Forshee
Collect statistics for system and display requests |
57 |
src/stats.c
|
18.3.5
by Seth Forshee
Add utility for synchronously running a function on the main loop |
58 |
src/util.c
|
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
59 |
src/${GDBUS_NAME}.c |
60 |
)
|
|
61 |
||
1
by mfrey at canonical
Initial power daemon to handle power button events |
62 |
link_directories( |
63 |
${GLIB_LIBRARY_DIRS} |
|
9.1.1
by Matthew Fischer
initial code that talks on dbus |
64 |
${GIO_LIBRARY_DIRS} |
65 |
${GIO-UNIX_LIBRARY_DIRS} |
|
62.2.1
by Seth Forshee
Add basic support for power source monitoring |
66 |
${UPOWER_GLIB_LIBRARY_DIRS} |
18.2.1
by Matthew Fischer
initial UUID work, check-in before merge with trunk, I still need to switch to a GHashTable |
67 |
${UUID_LIBRARY_DIRS} |
1
by mfrey at canonical
Initial power daemon to handle power button events |
68 |
)
|
69 |
||
70 |
include_directories( |
|
103.1.1
by Ricardo Salveti de Araujo
Using pkg-config files from hybris, and depending on latest version |
71 |
${ANDROID_HEADERS_INCLUDE_DIRS} |
1
by mfrey at canonical
Initial power daemon to handle power button events |
72 |
${GLIB_INCLUDE_DIRS} |
9.1.1
by Matthew Fischer
initial code that talks on dbus |
73 |
${GIO_INCLUDE_DIRS} |
74 |
${GIO-UNIX_INCLUDE_DIRS} |
|
62.2.1
by Seth Forshee
Add basic support for power source monitoring |
75 |
${UPOWER_GLIB_INCLUDE_DIRS} |
18.2.1
by Matthew Fischer
initial UUID work, check-in before merge with trunk, I still need to switch to a GHashTable |
76 |
${UUID_INCLUDE_DIRS} |
9.2.1
by Seth Forshee
Add and integrate suspend library |
77 |
${PROJECT_SOURCE_DIR}/libsuspend |
9.1.17
by Matthew Fischer
applying seth's patch to allow for building outside the source dir, and include python as a build-dep since gdbus-codegen needs it: |
78 |
${CMAKE_CURRENT_BINARY_DIR}/src |
1
by mfrey at canonical
Initial power daemon to handle power button events |
79 |
)
|
80 |
||
9.2.1
by Seth Forshee
Add and integrate suspend library |
81 |
add_subdirectory(libsuspend) |
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
82 |
add_subdirectory(src) |
12.2.1
by Matthew Fischer
Making the test code into a general purpose CLI and adding it to the package |
83 |
add_subdirectory(cli) |
9.2.1
by Seth Forshee
Add and integrate suspend library |
84 |
|
1
by mfrey at canonical
Initial power daemon to handle power button events |
85 |
add_executable( |
86 |
powerd
|
|
87 |
||
88 |
${SRCS} |
|
89 |
)
|
|
90 |
||
9.1.16
by Matthew Fischer
Added the gdbus-codegen call to cmake |
91 |
add_dependencies( |
92 |
powerd
|
|
93 |
||
94 |
dbus_bindings
|
|
95 |
)
|
|
96 |
||
1
by mfrey at canonical
Initial power daemon to handle power button events |
97 |
target_link_libraries( |
98 |
powerd
|
|
9.2.1
by Seth Forshee
Add and integrate suspend library |
99 |
suspend
|
1
by mfrey at canonical
Initial power daemon to handle power button events |
100 |
|
104.1.1
by Seth Forshee
libsuspend: Make earlysuspend enter/exit with kernel early suspend processing |
101 |
${CMAKE_THREAD_LIBS_INIT} |
1
by mfrey at canonical
Initial power daemon to handle power button events |
102 |
${GLIB_LIBRARIES} |
9.1.1
by Matthew Fischer
initial code that talks on dbus |
103 |
${GIO_LIBRARIES} |
104 |
${GIO-UNIX_LIBRARIES} |
|
24.1.1
by Ricardo Mendoza
* Provide initial sensors control |
105 |
${PHABLET_LIBRARIES} |
106 |
"-lubuntu_application_api"
|
|
76.2.7
by Seth Forshee
Add support for parsing Android config.xml files |
107 |
"-landroid-properties"
|
99.1.1
by Ricardo Mendoza
Make use of the power HAL to deliver a expect-interaction hint to the relevant subsystems |
108 |
"-lhardware"
|
62.2.1
by Seth Forshee
Add basic support for power source monitoring |
109 |
${UPOWER_GLIB_LIBRARIES} |
18.2.1
by Matthew Fischer
initial UUID work, check-in before merge with trunk, I still need to switch to a GHashTable |
110 |
${UUID_LIBRARIES} |
1.1.2
by Ricardo Salveti de Araujo
CMakeLists.txt: adding install rules |
111 |
)
|
112 |
||
113 |
install( |
|
114 |
TARGETS powerd |
|
115 |
RUNTIME DESTINATION bin |
|
116 |
LIBRARY DESTINATION lib |
|
117 |
ARCHIVE DESTINATION lib/static |
|
118 |
)
|
|
76.2.7
by Seth Forshee
Add support for parsing Android config.xml files |
119 |
|
120 |
install( |
|
76.2.21
by Seth Forshee
s/android_config/device_config/ |
121 |
FILES ${device_config_files} |
122 |
DESTINATION ${POWERD_DEVICE_CONFIGS_PATH} |
|
76.2.7
by Seth Forshee
Add support for parsing Android config.xml files |
123 |
)
|