TDE utility programs
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.
 
 
 
 
 
 

185 lines
6.8 KiB

  1. #################################################
  2. #
  3. # (C) 2012 Golubev Alexander
  4. # fatzer2 (AT) gmail.com
  5. #
  6. # Improvements and feedback are welcome
  7. #
  8. # This file is released under GPL >= 2
  9. #
  10. #################################################
  11. cmake_minimum_required( VERSION 2.8 )
  12. ##### general package setup #####################
  13. project( tdeutils )
  14. set( PACKAGE tdeutils )
  15. set( VERSION R14.1.0 )
  16. ##### include essential cmake modules ###########
  17. include( FindPkgConfig )
  18. include( CheckIncludeFile )
  19. include( CheckIncludeFiles )
  20. include( CheckLibraryExists )
  21. include( CheckSymbolExists )
  22. include( CheckFunctionExists )
  23. include( CheckCSourceCompiles )
  24. include( CheckCXXSourceCompiles )
  25. include( CheckTypeSize )
  26. ##### include our cmake modules #################
  27. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  28. include( TDEMacros )
  29. ##### setup install paths #######################
  30. include( TDESetupPaths )
  31. tde_setup_paths( )
  32. ##### optional stuff ############################
  33. option( WITH_DPMS "Enable Display Power Management Signaling support" OFF )
  34. option( WITH_XSCREENSAVER "Enable xscreensaver support" OFF )
  35. option( WITH_ASUS "Enable asus laptop support" OFF )
  36. option( WITH_POWERBOOK "Enable powerbook laptop support" OFF )
  37. option( WITH_POWERBOOK2 "Enable powerbook2 laptop support" OFF )
  38. option( WITH_VAIO "Enable vaio laptop support" OFF )
  39. option( WITH_THINKPAD "Enable thinkpad laptop support" OFF )
  40. option( WITH_I8K "Enable dell laptop support" OFF )
  41. option( WITH_SNMP "Enable SNMP support" OFF )
  42. option( WITH_SENSORS "Enable lm_sensors support" OFF )
  43. option( WITH_XMMS "Enable xmms support" OFF )
  44. option( WITH_TDENEWSTUFF "Enable tdenewstuff support" OFF )
  45. # option( WITH_NV "Enable nv support" OFF )
  46. ##### options comments ##########################
  47. # WITH_DPMS affects klaptopdaemon
  48. # WITH_DPMS description enables the klaptopdaemon to take into account
  49. # the state of DPMS X extention to determine is
  50. # there any user activity.
  51. # WITH_DPMS requires libXext to build
  52. # WITH_XSCREENSAVER affects klaptopdaemon
  53. # WITH_XSCREENSAVER description this makes klaptopdaemon not to register user
  54. # events when screensaver is disabled.
  55. # WITH_ASUS affects kmilo
  56. # WITH_POWERBOOK affects kmilo
  57. # WITH_POWERBOOK requires pbbuttonsd
  58. # WITH_POWERBOOK2 affects kmilo
  59. # WITH_POWERBOOK2 requires pbbuttonsd
  60. # WITH_VAIO affects kmilo
  61. # WITH_THINKPAD affects kmilo
  62. # WITH_I8K affects kmilo ksim
  63. # WITH_SNMP affects ksim
  64. # WITH_SENSORS affects ksim
  65. # WITH_XMMS affects superkaramba
  66. # WITH_XMMS description enables supercaramba applets to gain
  67. # information about now playing track etc.
  68. # WITH_TDENEWSTUFF affects superkaramba
  69. # WITH_TDENEWSTUFF description enables support for downloadable content
  70. # from OpenDesktop.org.
  71. # FIXME: test if WITH_TDENEWSTUFF works in trinity or not
  72. # NOTE: In addition to affects DPMS and XScreenSaver backend options for
  73. # klaptopdaemon there is some XIdle code but it wasn't compleatly
  74. # implemented and disabled permanently.
  75. # NOTE: WITH_<laptop> options controls what kamilo modules will be build
  76. # NOTE: WITH_{SENSORS,SNMP,I8K} options for ksim determin which ksim modules
  77. # will be build.
  78. # NOTE: WITH_XMMS doesn't requires xmms2 palayer to be compiled.
  79. ##### user requested modules ####################
  80. option( BUILD_ALL "Build all" OFF )
  81. option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
  82. option( BUILD_ARK "Build ark" ${BUILD_ALL} )
  83. option( BUILD_CHARSELECTAPPLET "Build charselectapplet" ${BUILD_ALL} )
  84. option( BUILD_KCALC "Build kcalc" ${BUILD_ALL} )
  85. option( BUILD_KCHARSELECT "Build kcharselect" ${BUILD_ALL} )
  86. option( BUILD_TDELIRC "Build tdelirc" ${BUILD_ALL} )
  87. option( BUILD_TDESSH "Build tdessh" ${BUILD_ALL} )
  88. option( BUILD_KDF "Build kdf" ${BUILD_ALL} )
  89. option( BUILD_KEDIT "Build kedit" ${BUILD_ALL} )
  90. option( BUILD_KFLOPPY "Build kfloppy" ${BUILD_ALL} )
  91. option( BUILD_KGPG "Build kgpg" ${BUILD_ALL} )
  92. option( BUILD_KHEXEDIT "Build khexedit" ${BUILD_ALL} )
  93. option( BUILD_KJOTS "Build kjots" ${BUILD_ALL} )
  94. option( BUILD_KLAPTOPDAEMON "Build klaptopdaemon" ${BUILD_ALL} )
  95. option( BUILD_KMILO "Build kmilo" ${BUILD_ALL} )
  96. option( BUILD_KREGEXPEDITOR "Build kregexpeditor" ${BUILD_ALL} )
  97. option( BUILD_KSIM "Build ksim" ${BUILD_ALL} )
  98. option( BUILD_KTIMER "Build ktimer" ${BUILD_ALL} )
  99. option( BUILD_TDEWALLET "Build tdewallet" ${BUILD_ALL} )
  100. option( BUILD_SUPERKARAMBA "Build superkaramba" ${BUILD_ALL} )
  101. option( BUILD_TDEFILEREPLACE "Build tdefilereplace" ${BUILD_ALL} )
  102. ##### add apidox targets ############
  103. add_custom_target(apidox
  104. COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html"
  105. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  106. add_custom_target(install-apidox
  107. COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
  108. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  109. ##### configure checks ##########################
  110. include( ConfigureChecks.cmake )
  111. ###### global compiler settings #################
  112. add_definitions(
  113. -DHAVE_CONFIG_H
  114. )
  115. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  116. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  117. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  118. ##### tdeutils directories ######################
  119. tde_conditional_add_subdirectory( BUILD_ARK ark )
  120. tde_conditional_add_subdirectory( BUILD_DOC doc )
  121. tde_conditional_add_subdirectory( BUILD_CHARSELECTAPPLET charselectapplet )
  122. tde_conditional_add_subdirectory( BUILD_KCALC kcalc )
  123. tde_conditional_add_subdirectory( BUILD_KCHARSELECT kcharselect )
  124. tde_conditional_add_subdirectory( BUILD_TDELIRC tdelirc )
  125. tde_conditional_add_subdirectory( BUILD_TDESSH tdessh )
  126. tde_conditional_add_subdirectory( BUILD_KDF kdf )
  127. tde_conditional_add_subdirectory( BUILD_KEDIT kedit )
  128. tde_conditional_add_subdirectory( BUILD_KFLOPPY kfloppy )
  129. tde_conditional_add_subdirectory( BUILD_KGPG kgpg )
  130. tde_conditional_add_subdirectory( BUILD_KHEXEDIT khexedit )
  131. tde_conditional_add_subdirectory( BUILD_KJOTS kjots )
  132. tde_conditional_add_subdirectory( BUILD_KLAPTOPDAEMON klaptopdaemon )
  133. tde_conditional_add_subdirectory( BUILD_KMILO kmilo )
  134. tde_conditional_add_subdirectory( BUILD_KREGEXPEDITOR kregexpeditor )
  135. tde_conditional_add_subdirectory( BUILD_KSIM ksim )
  136. tde_conditional_add_subdirectory( BUILD_KTIMER ktimer )
  137. tde_conditional_add_subdirectory( BUILD_TDEWALLET tdewallet )
  138. tde_conditional_add_subdirectory( BUILD_SUPERKARAMBA superkaramba )
  139. tde_conditional_add_subdirectory( BUILD_TDEFILEREPLACE tdefilereplace )
  140. ##### write configure files #####################
  141. configure_file( config.h.cmake config.h @ONLY )