Original DBUS bindings for TQt
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

90 lignes
2.4 KiB

  1. #################################################
  2. #
  3. # (C) 2010-2011 Serghei Amelian
  4. # serghei (DOT) amelian (AT) gmail.com
  5. #
  6. # Improvements and feedback are welcome
  7. #
  8. # This file is released under GPL >= 2
  9. #
  10. #################################################
  11. project( dbus-tqt-1 )
  12. set( VERSION R14.1.0 )
  13. ##### cmake setup ###############################
  14. cmake_minimum_required( VERSION 2.8 )
  15. include( FindPkgConfig )
  16. include( CheckCXXSourceCompiles )
  17. include( CheckSymbolExists )
  18. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  19. include( TDEMacros )
  20. include( ConfigureChecks.cmake )
  21. ##### install paths setup #######################
  22. tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
  23. tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
  24. tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" )
  25. tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
  26. ##### install headers ###########################
  27. install( FILES
  28. dbus-qt.h message.h connection.h server.h
  29. DESTINATION ${INCLUDE_INSTALL_DIR}/dbus-1.0/dbus )
  30. ##### write pkgconfig file ######################
  31. string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
  32. string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
  33. string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
  34. foreach( _lib ${PROJECT_NAME} ${DBUS_LIBRARIES} )
  35. set( PC_LIBRARIES "${PC_LIBRARIES} -l${_lib}" )
  36. endforeach( )
  37. configure_file( dbus-tqt.pc.cmake dbus-tqt.pc @ONLY )
  38. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus-tqt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
  39. ##### build setup ###############################
  40. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" )
  41. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  42. add_definitions(
  43. -DTQT_THREAD_SUPPORT
  44. ${TQT_CFLAGS_OTHER}
  45. )
  46. include_directories(
  47. ${CMAKE_CURRENT_BINARY_DIR}
  48. ${CMAKE_CURRENT_SOURCE_DIR}
  49. ${TQT_INCLUDE_DIRS}
  50. ${DBUS_INCLUDE_DIRS}
  51. )
  52. link_directories(
  53. ${TQT_LIBRARY_DIRS}
  54. )
  55. ##### dbus-tqt-1 (shared) #########################
  56. tde_add_library( dbus-tqt-1 SHARED AUTOMOC
  57. SOURCES
  58. dbus-qthread.cpp message.cpp connection.cpp
  59. integrator.cpp server.cpp
  60. VERSION 0.0.0
  61. LINK ${TQT_LIBRARIES} ${DBUS_LIBRARIES}
  62. DESTINATION ${LIB_INSTALL_DIR}
  63. )