You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.1 KiB
53 lines
2.1 KiB
3 years ago
|
#################################################
|
||
|
#
|
||
|
# (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}
|
||
|
)
|
||
|
|