aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-08-27 20:36:50 +0200
committerPřemysl Eric Janouch <p@janouch.name>2024-08-30 02:55:35 +0200
commit9e91058ed926841d3152f888b8b87633b8ccc4f8 (patch)
treea6dd007fa6ffe1338bd611babdb3fbb3ab8715b9 /CMakeLists.txt
parentfbc7454647d874cfc4603eea50c9576b12e3068e (diff)
downloaddesktop-tools-9e91058ed926841d3152f888b8b87633b8ccc4f8.tar.gz
desktop-tools-9e91058ed926841d3152f888b8b87633b8ccc4f8.tar.xz
desktop-tools-9e91058ed926841d3152f888b8b87633b8ccc4f8.zip
Add elksmart-comm for transceiving infrared codesHEADorigin/mastermaster
The receive functionality is quite unstable, however useful enough for something that is officially unsupported. The gadget is picky about cables, but it has ridiculous reach when it works.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1d4292..0aa0760 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,13 +19,15 @@ find_package (PkgConfig REQUIRED)
pkg_check_modules (x REQUIRED x11 xext xextproto)
pkg_check_modules (pulse REQUIRED libpulse)
pkg_check_modules (dbus REQUIRED dbus-1)
+pkg_check_modules (libusb libusb-1.0)
pkg_check_modules (gdm gdm glib-2.0 gio-2.0)
include_directories (
${x_INCLUDE_DIRS} ${pulse_INCLUDE_DIRS} ${dbus_INCLUDE_DIRS})
link_directories (
${x_LIBRARY_DIRS} ${pulse_LIBRARY_DIRS} ${dbus_LIBRARY_DIRS})
-option (WITH_GDM "Compile with GDM support" ${gdm_FOUND})
+option (WITH_USB "Compile with USB utilities" ${libusb_FOUND})
+option (WITH_GDM "Compile with GDM utilities" ${gdm_FOUND})
# Generate a configuration file
configure_file (${PROJECT_SOURCE_DIR}/config.h.in
@@ -57,10 +59,16 @@ target_link_libraries (wmstatus
${x_LIBRARIES} ${pulse_LIBRARIES} ${dbus_LIBRARIES})
add_threads (wmstatus)
+if (WITH_USB)
+ add_executable (elksmart-comm elksmart-comm.c)
+ target_include_directories (elksmart-comm PUBLIC ${libusb_INCLUDE_DIRS})
+ target_link_directories (elksmart-comm PUBLIC ${libusb_LIBRARY_DIRS})
+ target_link_libraries (elksmart-comm ${libusb_LIBRARIES})
+endif ()
if (WITH_GDM)
- include_directories (${gdm_INCLUDE_DIRS})
- link_directories (${gdm_LIBRARY_DIRS})
add_executable (gdm-switch-user gdm-switch-user.c)
+ target_include_directories (gdm-switch-user PUBLIC ${gdm_INCLUDE_DIRS})
+ target_link_directories (gdm-switch-user PUBLIC ${gdm_LIBRARY_DIRS})
target_link_libraries (gdm-switch-user ${gdm_LIBRARIES})
endif ()
@@ -95,7 +103,7 @@ endif ()
# These should be accessible by users, but need to touch system devices.
# Use the setuid bit, for simplicity.
-foreach (target brightness input-switch)
+foreach (target brightness input-switch elksmart-comm)
if (${target} IN_LIST targets)
list (REMOVE_ITEM targets ${target})
install (TARGETS ${target} DESTINATION ${CMAKE_INSTALL_BINDIR}