aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-06-08 23:48:00 +0200
committerRobert Tari <robert@tari.in>2023-06-08 23:48:00 +0200
commit238d705cb7b04c53d7a510ba901682549b8a08c9 (patch)
tree1db2553ff556ce72097c1746c8eb25d09af534ab /src/CMakeLists.txt
parentc20a21fa5806efb82bdd83d2024b7658a35f2efa (diff)
parent0ed3e1762249d7c1ab954e7fa16543bb16d58f60 (diff)
downloadayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.tar.gz
ayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.tar.bz2
ayatana-indicator-power-238d705cb7b04c53d7a510ba901682549b8a08c9.zip
Merge branch 'muhammad23012009-main'
Attributes GH PR #78: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/78
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}")