aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorTheKit <thekit@disroot.org>2026-07-28 13:15:00 +0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2026-10-12 22:19:59 +0200
commit7b3161b8ac511cf0dcc18aded00171f8cc07ae9a (patch)
treea725573453e0f4bc85916d73688150844a60e3b2 /src/CMakeLists.txt
parentce800c1e2012bf0d6cced36ec6ea8e1b9e9ddf38 (diff)
downloadayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.tar.gz
ayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.tar.bz2
ayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.zip
flashlight: add a camera HAL backend
Some flash drivers expose a sysfs node that only toggles the LED and leaves the duty and the flash safety timeout unset, so the LED goes out by itself. Drive the torch through the AIDL camera provider instead, which programs all three. Select it with "FlashlightBackend: camera-hal" in the device yaml. Needs libgbinder, so it is behind the ENABLE_LIBGBINDER build option.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 60f80e6..d23190e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,11 +4,17 @@ if (ENABLE_DEVICEINFO)
add_definitions(-DENABLE_LIBDEVICEINFO)
endif ()
+if (ENABLE_LIBGBINDER)
+ set(FLASHLIGHT_BINDER
+ flashlight-binder.c)
+endif ()
+
# handwritten sources
set(SERVICE_MANUAL_SOURCES
brightness.c
datafiles.c
${FLASHLIGHT_DEVICEINFO}
+ ${FLASHLIGHT_BINDER}
device-provider-mock.c
device-provider-upower.c
device-provider.c
@@ -53,5 +59,5 @@ link_directories(${SERVICE_DEPS_LIBRARY_DIRS})
# the executable: lib + main()
add_executable (${SERVICE_EXEC} main.c)
-target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${DEVICEINFO_LIBRARIES})
+target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${DEVICEINFO_LIBRARIES} ${GBINDER_LIBRARIES})
install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")