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.
75 lines
2.2 KiB
75 lines
2.2 KiB
#################################################
|
|
#
|
|
# (C) 2020 Emanoil Kotsev
|
|
# deloptes (AT) gmail.com
|
|
#
|
|
# Improvements and feedback are welcome
|
|
#
|
|
# This file is released under GPL >= 3
|
|
#
|
|
#################################################
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
|
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
#-Wl,--whole-archive
|
|
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
|
|
##### configure checks ##########################
|
|
if( NOT DBUS_SYS_DIR )
|
|
set( DBUS_SYS_DIR ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
|
|
endif( )
|
|
|
|
|
|
if( WITH_GCC_VISIBILITY )
|
|
if( NOT UNIX )
|
|
tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
|
|
endif( NOT UNIX )
|
|
set( __KDE_HAVE_GCC_VISIBILITY 1 )
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
|
|
endif( )
|
|
|
|
add_definitions(
|
|
# -DQT_THREAD_SUPPORT
|
|
${TQT_CFLAGS_OTHER}
|
|
)
|
|
|
|
add_subdirectory( interfaces )
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMAKE_BINARY_DIR}/interfaces
|
|
${TDE_INCLUDE_DIR}
|
|
${TQT_INCLUDE_DIRS}
|
|
${DBUS_TQT_INCLUDE_DIRS}
|
|
)
|
|
|
|
link_directories(
|
|
${TQT_LIBRARY_DIRS}
|
|
${TDE_LIB_DIR}
|
|
)
|
|
|
|
##### tde_dbus_hardwarecontrol ##################
|
|
tde_add_executable( tde_dbus_hardwarecontrol AUTOMOC
|
|
SOURCES HardwareControl.cpp main.cpp hardwarecontrolService.cpp
|
|
BrightnessService.cpp CPUGovernorService.cpp DeviceServiceBase.cpp
|
|
InputEventsService.cpp PowerService.cpp PropertiesService.cpp
|
|
LINK ${DBUS_TQT_LIBRARIES} hwcontrolinterfaces-static tdecore-shared
|
|
DESTINATION ${BIN_INSTALL_DIR}
|
|
)
|
|
|
|
|
|
##### other data ################################
|
|
|
|
configure_file( org.trinitydesktop.hardwarecontrol.service.cmake org.trinitydesktop.hardwarecontrol.service @ONLY )
|
|
|
|
install( FILES
|
|
org.trinitydesktop.hardwarecontrol.conf
|
|
DESTINATION ${DBUS_SYSTEM_CONF_DIRECTORY} )
|
|
|
|
install( FILES
|
|
${CMAKE_CURRENT_BINARY_DIR}/org.trinitydesktop.hardwarecontrol.service
|
|
DESTINATION ${DBUS_SERVICE_DIRECTORY} )
|