TDE personal information management applications
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.
 
 
 
 
 
 

246 lines
9.9 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. cmake_minimum_required( VERSION 2.8 )
  12. ##### general package setup #####################
  13. project( tdepim )
  14. set( PACKAGE tdepim )
  15. set( VERSION R14.1.0 )
  16. ##### include essential cmake modules ###########
  17. include( FindPkgConfig )
  18. include( CheckIncludeFile )
  19. include( CheckTypeSize )
  20. include( CheckCSourceCompiles )
  21. include( CheckCXXSourceCompiles )
  22. include( CheckLibraryExists )
  23. include( CheckSymbolExists )
  24. enable_testing( )
  25. ##### include our cmake modules #################
  26. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  27. include( TDEMacros )
  28. ##### setup install paths #######################
  29. include( TDESetupPaths )
  30. tde_setup_paths( )
  31. ##### add apidox targets ############
  32. add_custom_target(apidox
  33. COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html"
  34. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  35. add_custom_target(install-apidox
  36. COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
  37. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  38. ##### optional stuff ############################
  39. option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
  40. option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
  41. option( WITH_SASL "Enable cyrus-sasl support" ${WITH_ALL_OPTIONS} )
  42. option( WITH_NEWDISTRLISTS "Enable the new distribution lists" ON )
  43. option( WITH_GNOKII "Enable gnokii support" ${WITH_ALL_OPTIONS} )
  44. option( WITH_EXCHANGE "Enable Microsoft Exchange 2000 support" ${WITH_ALL_OPTIONS} )
  45. option( WITH_EGROUPWARE "Enable egroupware support" ${WITH_ALL_OPTIONS} )
  46. option( WITH_KOLAB "Enable kolab support" ${WITH_ALL_OPTIONS} )
  47. option( WITH_SLOX "Enable slox support" ${WITH_ALL_OPTIONS} )
  48. option( WITH_GROUPWISE "Enable groupwise support" ${WITH_ALL_OPTIONS} )
  49. option( WITH_FEATUREPLAN "Enable featureplan support" ${WITH_ALL_OPTIONS} )
  50. option( WITH_GROUPDAV "Enable groupdav support" ${WITH_ALL_OPTIONS} )
  51. option( WITH_BIRTHDAYS "Enable birthdays support" ${WITH_ALL_OPTIONS} )
  52. option( WITH_NEWEXCHANGE "Enable newexchange support" ${WITH_ALL_OPTIONS} )
  53. option( WITH_SCALIX "Enable scalix support" ${WITH_ALL_OPTIONS} )
  54. option( WITH_CALDAV "Enable caldav support" ${WITH_ALL_OPTIONS} )
  55. option( WITH_CARDDAV "Enable carddav support" ${WITH_ALL_OPTIONS} )
  56. option( WITH_INDEXLIB "Enable indexlib support (in kmail)" ${WITH_ALL_OPTIONS} )
  57. option( WITH_XSCREENSAVER "Enable xscreensaver support (idle detection in karm)" ${WITH_ALL_OPTIONS} )
  58. if( NOT WITH_ARTS )
  59. set( WITHOUT_ARTS 1 )
  60. endif( )
  61. if( WITH_NEWDISTRLISTS )
  62. set( TDEPIM_NEW_DISTRLISTS 1 )
  63. endif( )
  64. ##### options comments ##########################
  65. # WITH_ARTS affects kalarm
  66. # WITH_ARTS description without arts kalarm won't play sounds
  67. # with messages.
  68. # WITH_SASL affects tdeioslave(sieve imap4)
  69. # WITH_SASL description sieve tdeioslave won't build without sasl and
  70. # imap4 tdeioslave will lose the ability of SASL
  71. # authentification
  72. # WITH_SASL requires libgsasl
  73. # WITH_NEWDISTRLISTS affects kabc kadressbook
  74. # WITH_NEWDISTRLISTS description if set use new version of the KAB
  75. # Distribution Mail List Plugin otherwise use
  76. # the old one.
  77. #
  78. # WITH_GNOKII affects kphonebook kmobile
  79. # WITH_GNOKII description in kphonebook gnoki adds some
  80. # phone-synchronization features
  81. # WITH_EXCHANGE affects tderesources korganizer
  82. # WITH_EGROUPWARE affects tderesources wizards
  83. # WITH_KOLAB affects tderesources wizards
  84. # WITH_SLOX affects tderesources wizards
  85. # WITH_GROUPWISE affects tderesources wizards
  86. # WITH_FEATUREPLAN affects tderesources
  87. # WITH_GROUPDAV affects tderesources
  88. # WITH_BIRTHDAYS affects tderesources
  89. # WITH_NEWEXCHANGE affects tderesources wizards
  90. # WITH_SCALIX affects tderesources wizards
  91. # WITH_CALDAV affects tderesources
  92. # WITH_CARDDAV affects tderesources
  93. # WITH_INDEXLIB affects kmail
  94. # NOTE: WITH_GNOKII support in kmobile is outdated and permanently disabled
  95. # for now
  96. # NOTE: WITH_{EGROUPWARE,KOLAB,SLOX,GROUPWISE,FEATUREPLAN,GROUPDAV,BIRTHDAYS,
  97. # NEWEXCHANGE,SCALIX,CALDAV,CARDDAV} in tderesources selects which
  98. # its modules would be built.
  99. ##### user requested modules ####################
  100. option( BUILD_ALL "Build all" OFF )
  101. option( BUILD_INDEXLIB "Build indexlib" ${BUILD_ALL} )
  102. option( BUILD_LIBKMIME "Build libkmime" ${BUILD_ALL} )
  103. option( BUILD_KTNEF "Build ktnef" ${BUILD_ALL} )
  104. option( BUILD_LIBKCAL "Build libkcal" ${BUILD_ALL} )
  105. option( BUILD_LIBTDEPIM "Build libtdepim" ${BUILD_ALL} )
  106. option( BUILD_LIBKPIMIDENTITIES "Build libkpimidentities" ${BUILD_ALL} )
  107. option( BUILD_LIBTDENETWORK "Build libtdenetwork" ${BUILD_ALL} )
  108. option( BUILD_CERTMANAGER "Build certmanager" ${BUILD_ALL} )
  109. option( BUILD_LIBKPGP "Build libkpgp" ${BUILD_ALL} )
  110. option( BUILD_MIMELIB "Build mimelib" ${BUILD_ALL} )
  111. option( BUILD_LIBKSIEVE "Build libksieve" ${BUILD_ALL} )
  112. option( BUILD_LIBKPIMEXCHANGE "Build libkpimexchange" ${BUILD_ALL} )
  113. option( BUILD_TDEIOSLAVE "Build tdeioslave" ${BUILD_ALL} )
  114. option( BUILD_KMAIL "Build kmail" ${BUILD_ALL} )
  115. option( BUILD_AKREGATOR "Build akregator" ${BUILD_ALL} )
  116. option( BUILD_KALARM "Build kalarm" ${BUILD_ALL} )
  117. option( BUILD_KADDRESSBOOK "Build kaddressbook" ${BUILD_ALL} )
  118. option( BUILD_KORN "Build korn" ${BUILD_ALL} )
  119. option( BUILD_KGANTT "Build kgantt" ${BUILD_ALL} )
  120. option( BUILD_LIBKHOLIDAYS "Build libkholidays" ${BUILD_ALL} )
  121. option( BUILD_KORGANIZER "Build korganizer" ${BUILD_ALL} )
  122. option( BUILD_PLUGINS "Build plugins" ${BUILD_ALL} )
  123. option( BUILD_KNOTES "Build knotes" ${BUILD_ALL} )
  124. option( BUILD_KODE "Build kode" ${BUILD_ALL} )
  125. option( BUILD_TDERESOURCES "Build tderesources" ${BUILD_ALL} )
  126. option( BUILD_WIZARDS "Build wizards" ${BUILD_ALL} )
  127. option( BUILD_TDEABC "Build tdeabc" ${BUILD_ALL} )
  128. option( BUILD_KONSOLEKALENDAR "Build konsolekalendar" ${BUILD_ALL} )
  129. option( BUILD_KMAILCVT "Build kmailcvt" ${BUILD_ALL} )
  130. option( BUILD_KARM "Build karm" ${BUILD_ALL} )
  131. option( BUILD_TDEFILE_PLUGINS "Build tdefile-plugins" ${BUILD_ALL} )
  132. option( BUILD_KANDY "Build kandy" ${BUILD_ALL} )
  133. option( BUILD_KNODE "Build knode" ${BUILD_ALL} )
  134. option( BUILD_KMOBILE "Build kmobile" ${BUILD_ALL} )
  135. option( BUILD_DOC "Build doc" ${BUILD_ALL} )
  136. option( BUILD_KONTACT "Build kontact" ${BUILD_ALL} )
  137. # deprecated
  138. option( BUILD_KITCHENSYNC "Build kitchensync" OFF )
  139. ##### configure checks ##########################
  140. include( ConfigureChecks.cmake )
  141. ###### global compiler settings #################
  142. add_definitions(
  143. -DHAVE_CONFIG_H
  144. )
  145. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  146. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  147. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  148. ##### activate dependencies #####################
  149. if( BUILD_LIBKCAL OR BUILD_LIBTDEPIM OR BUILD_LIBKPIMIDENTITIES OR BUILD_TDEIOSLAVE OR BUILD_KMAIL OR BUILD_KNODE )
  150. add_subdirectory( libemailfunctions )
  151. endif()
  152. if( BUILD_KADDRESSBOOK OR (BUILD_TDERESOURCES AND (WITH_EGROUPWARE OR WITH_BIRTHDAYS)) )
  153. add_subdirectory( kaddressbook/common )
  154. endif()
  155. ##### tdepim directories ########################
  156. tde_conditional_add_subdirectory( BUILD_INDEXLIB indexlib )
  157. tde_conditional_add_subdirectory( BUILD_LIBKMIME libkmime )
  158. tde_conditional_add_subdirectory( BUILD_KTNEF ktnef )
  159. tde_conditional_add_subdirectory( BUILD_LIBKCAL libkcal )
  160. tde_conditional_add_subdirectory( BUILD_LIBTDEPIM pixmaps )
  161. tde_conditional_add_subdirectory( BUILD_LIBTDEPIM libtdepim )
  162. tde_conditional_add_subdirectory( BUILD_LIBKPIMIDENTITIES libkpimidentities )
  163. tde_conditional_add_subdirectory( BUILD_LIBTDENETWORK libtdenetwork )
  164. tde_conditional_add_subdirectory( BUILD_CERTMANAGER certmanager )
  165. tde_conditional_add_subdirectory( BUILD_LIBKPGP libkpgp )
  166. tde_conditional_add_subdirectory( BUILD_MIMELIB mimelib )
  167. tde_conditional_add_subdirectory( BUILD_LIBKSIEVE libksieve )
  168. tde_conditional_add_subdirectory( BUILD_LIBKPIMEXCHANGE libkpimexchange )
  169. tde_conditional_add_subdirectory( BUILD_TDEIOSLAVE tdeioslave )
  170. tde_conditional_add_subdirectory( BUILD_KMAIL kmail )
  171. tde_conditional_add_subdirectory( BUILD_AKREGATOR akregator )
  172. tde_conditional_add_subdirectory( BUILD_KALARM kalarm )
  173. tde_conditional_add_subdirectory( BUILD_KADDRESSBOOK kaddressbook )
  174. tde_conditional_add_subdirectory( BUILD_KORN korn )
  175. tde_conditional_add_subdirectory( BUILD_KGANTT kgantt )
  176. tde_conditional_add_subdirectory( BUILD_LIBKHOLIDAYS libkholidays )
  177. tde_conditional_add_subdirectory( BUILD_KORGANIZER kdgantt )
  178. tde_conditional_add_subdirectory( BUILD_KORGANIZER korganizer )
  179. tde_conditional_add_subdirectory( BUILD_PLUGINS plugins )
  180. tde_conditional_add_subdirectory( BUILD_KNOTES knotes )
  181. tde_conditional_add_subdirectory( BUILD_KODE kode )
  182. tde_conditional_add_subdirectory( BUILD_TDERESOURCES tderesources )
  183. tde_conditional_add_subdirectory( BUILD_WIZARDS wizards )
  184. tde_conditional_add_subdirectory( BUILD_TDEABC tdeabc )
  185. tde_conditional_add_subdirectory( BUILD_KONSOLEKALENDAR konsolekalendar )
  186. tde_conditional_add_subdirectory( BUILD_KMAILCVT kmailcvt )
  187. tde_conditional_add_subdirectory( BUILD_KARM karm )
  188. tde_conditional_add_subdirectory( BUILD_TDEFILE_PLUGINS tdefile-plugins )
  189. tde_conditional_add_subdirectory( BUILD_KANDY kandy )
  190. tde_conditional_add_subdirectory( BUILD_KNODE knode )
  191. tde_conditional_add_subdirectory( BUILD_KMOBILE kmobile )
  192. tde_conditional_add_subdirectory( BUILD_DOC doc )
  193. tde_conditional_add_subdirectory( BUILD_KONTACT kontact )
  194. # deprecated
  195. tde_conditional_add_subdirectory( BUILD_KITCHENSYNC kitchensync )
  196. ##### write configure files #####################
  197. configure_file( config.h.cmake config.h @ONLY )