summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt')
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt
new file mode 100644
index 000000000..eeb1ef20b
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt
@@ -0,0 +1,52 @@
+#################################################
+#
+# (C) 2020 Emanoil Kotsev
+# deloptes (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 3
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${DBUS_TQT_INCLUDE_DIRS}
+)
+
+set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces )
+set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
+
+set( HardwareControl_HDRS brightnessInterface.h brightnessProxy.h cpugovernorInterface.h cpugovernorProxy.h dbusbaseNode.h hardwarecontrolNode.h inputeventsInterface.h inputeventsProxy.h introspectableInterface.h powerInterface.h powerProxy.h propertiesInterface.h propertiesProxy.h )
+set( HardwareControl_SRCS brightnessInterface.cpp brightnessProxy.cpp cpugovernorInterface.cpp cpugovernorProxy.cpp dbusbaseNode.cpp hardwarecontrolNode.cpp inputeventsInterface.cpp inputeventsProxy.cpp introspectableInterface.cpp powerInterface.cpp powerProxy.cpp propertiesInterface.cpp propertiesProxy.cpp)
+
+function( make_moc fileinput )
+ add_custom_command( OUTPUT ${fileinput}.moc
+ COMMAND ${TMOC_EXECUTABLE} ${fileinput}.h -o ${fileinput}.moc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.h
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.cpp APPEND
+ PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.moc )
+endfunction( )
+
+##### HardwareControl #########################
+add_custom_command(
+ OUTPUT ${HardwareControl_HDRS} ${HardwareControl_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.trinitydesktop.hardwarecontrol.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.trinitydesktop.hardwarecontrol.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+make_moc ( brightnessProxy )
+make_moc ( cpugovernorProxy )
+make_moc ( inputeventsProxy)
+make_moc ( powerProxy )
+make_moc ( propertiesProxy )
+
+tde_add_library( hwcontrolinterfaces STATIC_PIC
+ SOURCES ${HardwareControl_SRCS}
+ LINK ${DBUS_TQT_LIBRARIES}
+)
+