################################################# # # (C) 2020 Emanoil Kotsev # deloptes (AT) gmail.com # # Improvements and feedback are welcome # # This file is released under GPL >= 2 # ################################################# include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${TQT_INCLUDE_DIRS} ${DBUS_TQT_INCLUDE_DIRS} ) set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces ) set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 ) set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h ) set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp) set( AgentManager_HDRS agentmanager1Interface.h agentmanager1Proxy.h healthmanager1Interface.h healthmanager1Proxy.h profilemanager1Interface.h profilemanager1Proxy.h ) set( AgentManager_SRCS agentmanager1Interface.cpp agentmanager1Proxy.cpp healthmanager1Interface.cpp healthmanager1Proxy.cpp profilemanager1Interface.cpp profilemanager1Proxy.cpp ) set( Agent_HDRS agent1Interface.h agent1Proxy.h dbusbaseNode.h tdebluezNode.h ) set( Agent_SRCS agent1Interface.cpp agent1Proxy.cpp dbusbaseNode.cpp tdebluezNode.cpp ) set( Adapter_HDRS adapter1Interface.h adapter1Proxy.h gattmanager1Interface.h gattmanager1Proxy.h media1Interface.h media1Proxy.h networkserver1Interface.h networkserver1Proxy.h propertiesInterface.h propertiesProxy.h) set( Adapter_SRCS adapter1Interface.cpp adapter1Proxy.cpp gattmanager1Interface.cpp gattmanager1Proxy.cpp media1Interface.cpp media1Proxy.cpp networkserver1Interface.cpp networkserver1Proxy.cpp propertiesInterface.cpp propertiesProxy.cpp ) set( Device_HDRS device1Interface.h device1Proxy.h mediacontrol1Interface.h mediacontrol1Proxy.h) set( Device_SRCS device1Interface.cpp device1Proxy.cpp mediacontrol1Interface.cpp mediacontrol1Proxy.cpp ) #function( install_header fileinput target ) # install( # FILES ${CMAKE_CURRENT_BUILD_DIR}/${fileinput} # DESTINATION ${target} # ) #endfunction( ) ##### ObjectManager ######################### add_custom_command( OUTPUT ${ObjectManager_HDRS} ${ObjectManager_SRCS} COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.freedesktop.DBus.ObjectManager.xml 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/org.freedesktop.DBus.ObjectManager.xml WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) ##### AgentManager ######################### add_custom_command( OUTPUT ${AgentManager_HDRS} ${AgentManager_SRCS} COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.manager.xml 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/org.bluez.manager.xml WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) ##### Agent ######################### add_custom_command( OUTPUT ${Agent_HDRS} ${Agent_SRCS} COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.tdebluez.agent.xml 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/org.tdebluez.agent.xml WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) ##### Adapter ######################### add_custom_command( OUTPUT ${Adapter_HDRS} ${Adapter_SRCS} COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.adapter.xml 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/org.bluez.adapter.xml WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) ##### Device ######################### add_custom_command( OUTPUT ${Device_HDRS} ${Device_SRCS} COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.bluez.device.xml 2>/dev/null DEPENDS ${INTROSPECTIONPATH}/org.bluez.device.xml WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) tde_add_library( bluezinterfaces STATIC_PIC AUTOMOC SOURCES ${ObjectManager_SRCS} ${AgentManager_SRCS} ${Agent_SRCS} ${Adapter_SRCS} ${Device_SRCS} LINK ${DBUS_TQT_LIBRARIES} ) ##### install headers ################################### #file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR} #      ${CMAKE_CURRENT_BINARY_DIR}/* ) #unset( _exclude_dirs ) #foreach( _dir IN LISTS _bin_dirs ) #  if(IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} ) #    list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE ) #  endif() #endforeach() # #install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex # USE_SOURCE_PERMISSIONS # FILES_MATCHING PATTERN PATTERN "*.h" # ${_exclude_dirs} #) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${INCLUDE_INSTALL_DIR}/tdebluez USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE)