aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMuhammad <muhammad23012009@hotmail.com>2023-05-12 17:49:30 +0500
committerMuhammad <muhammad23012009@hotmail.com>2023-06-05 23:01:18 +0500
commitdd3dccb5b3ece993ea648f76ff0cc9aa08527061 (patch)
tree1af9ef4b73a3657774bc161a05a5d3bb1a11ca4a /src/CMakeLists.txt
parent08039f0bfcd35efca2a075bbf49fe3e45d89d5bf (diff)
downloadayatana-indicator-power-dd3dccb5b3ece993ea648f76ff0cc9aa08527061.tar.gz
ayatana-indicator-power-dd3dccb5b3ece993ea648f76ff0cc9aa08527061.tar.bz2
ayatana-indicator-power-dd3dccb5b3ece993ea648f76ff0cc9aa08527061.zip
src: add support for getting flashlight paths through deviceinfo
Signed-off-by: Muhammad <muhammad23012009@hotmail.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df2fd5d..f765f23 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,14 @@
+if (ENABLE_DEVICEINFO)
+ set(FLASHLIGHT_DEVICEINFO
+ deviceinfo-flashlight.c)
+ add_definitions(-DENABLE_LIBDEVICEINFO)
+endif ()
+
# handwritten sources
set(SERVICE_MANUAL_SOURCES
brightness.c
datafiles.c
+ ${FLASHLIGHT_DEVICEINFO}
device-provider-mock.c
device-provider-upower.c
device-provider.c
@@ -45,5 +52,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})
+target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${DEVICEINFO_LIBRARIES})
install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")