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.

201 lines
7.6KB

  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( kdepim )
  14. set( PACKAGE kdepim )
  15. set( VERSION "3.5.13" )
  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 our cmake modules #################
  24. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  25. include( TDEMacros )
  26. ##### setup install paths #######################
  27. include( TDESetupPaths )
  28. tde_setup_paths( )
  29. ##### add apidox targets ############
  30. add_custom_target(apidox
  31. COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html"
  32. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  33. add_custom_target(install-apidox
  34. COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
  35. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
  36. ##### optional stuff ############################
  37. option( WITH_ARTS "Enable aRts support" OFF )
  38. option( WITH_SASL "Enable cyrus-sasl support" OFF )
  39. option( WITH_NEWDISTRLISTS "Enable the new distribution lists" ON )
  40. option( WITH_GNOKII "Enable gnokii support" OFF )
  41. option( WITH_EXCHANGE "Enable Microsoft Exchange 2000 support" OFF )
  42. option( WITH_EGROUPWARE "Enable egroupware support" OFF )
  43. option( WITH_KOLAB "Enable kolab support" OFF )
  44. option( WITH_SLOX "Enable slox support" OFF )
  45. option( WITH_GROUPWISE "Enable groupwise support" OFF )
  46. option( WITH_FEATUREPLAN "Enable featureplan support" OFF )
  47. option( WITH_GROUPDAV "Enable groupdav support" OFF )
  48. option( WITH_BIRTHDAYS "Enable birthdays support" OFF )
  49. option( WITH_NEWEXCHANGE "Enable newexchange support" OFF )
  50. option( WITH_SCALIX "Enable scalix support" OFF )
  51. option( WITH_CALDAV "Enable caldav support" OFF )
  52. option( WITH_CARDDAV "Enable carddav support" OFF )
  53. option( WITH_INDEXLIB "Enable indexlib support (in kmail)" OFF )
  54. if( NOT WITH_ARTS )
  55. set( WITHOUT_ARTS 1 )
  56. endif( )
  57. if( WITH_NEWDISTRLISTS )
  58. set( KDEPIM_NEW_DISTRLISTS 1 )
  59. endif( )
  60. ##### user requested modules ####################
  61. option( BUILD_ALL "Build all" OFF )
  62. option( BUILD_INDEXLIB "Build indexlib" ${BUILD_ALL} )
  63. option( BUILD_LIBKMIME "Build libkmime" ${BUILD_ALL} )
  64. option( BUILD_KTNEF "Build ktnef" ${BUILD_ALL} )
  65. option( BUILD_LIBKCAL "Build libkcal" ${BUILD_ALL} )
  66. option( BUILD_LIBKDEPIM "Build libtdepim" ${BUILD_ALL} )
  67. option( BUILD_LIBKPIMIDENTITIES "Build libkpimidentities" ${BUILD_ALL} )
  68. option( BUILD_LIBKDENETWORK "Build libkdenetwork" ${BUILD_ALL} )
  69. option( BUILD_CERTMANAGER "Build certmanager" ${BUILD_ALL} )
  70. option( BUILD_LIBKPGP "Build libkpgp" ${BUILD_ALL} )
  71. option( BUILD_MIMELIB "Build mimelib" ${BUILD_ALL} )
  72. option( BUILD_LIBKSIEVE "Build libksieve" ${BUILD_ALL} )
  73. option( BUILD_LIBKPIMEXCHANGE "Build libkpimexchange" ${BUILD_ALL} )
  74. option( BUILD_KIOSLAVES "Build kioslaves" ${BUILD_ALL} )
  75. option( BUILD_KMAIL "Build kmail" ${BUILD_ALL} )
  76. option( BUILD_AKREGATOR "Build akregator" ${BUILD_ALL} )
  77. option( BUILD_KALARM "Build kalarm" ${BUILD_ALL} )
  78. option( BUILD_KADDRESSBOOK "Build kaddressbook" ${BUILD_ALL} )
  79. option( BUILD_KORN "Build korn" ${BUILD_ALL} )
  80. option( BUILD_KGANTT "Build kgantt" ${BUILD_ALL} )
  81. option( BUILD_LIBKHOLIDAYS "Build libkholidays" ${BUILD_ALL} )
  82. option( BUILD_KORGANIZER "Build korganizer" ${BUILD_ALL} )
  83. option( BUILD_PLUGINS "Build plugins" ${BUILD_ALL} )
  84. option( BUILD_KNOTES "Build knotes" ${BUILD_ALL} )
  85. option( BUILD_KODE "Build kode" ${BUILD_ALL} )
  86. option( BUILD_KRESOURCES "Build kresources" ${BUILD_ALL} )
  87. option( BUILD_WIZARDS "Build wizards" ${BUILD_ALL} )
  88. option( BUILD_KABC "Build kabc" ${BUILD_ALL} )
  89. option( BUILD_KONSOLEKALENDAR "Build konsolekalendar" ${BUILD_ALL} )
  90. option( BUILD_KMAILCVT "Build kmailcvt" ${BUILD_ALL} )
  91. option( BUILD_KARM "Build karm" ${BUILD_ALL} )
  92. option( BUILD_KFILE_PLUGINS "Build kfile-plugins" ${BUILD_ALL} )
  93. option( BUILD_KANDY "Build kandy" ${BUILD_ALL} )
  94. option( BUILD_KNODE "Build knode" ${BUILD_ALL} )
  95. option( BUILD_KMOBILE "Build kmobile" ${BUILD_ALL} )
  96. option( BUILD_DOC "Build doc" ${BUILD_ALL} )
  97. option( BUILD_KONTACT "Build kontact" ${BUILD_ALL} )
  98. # deprecated
  99. option( BUILD_KITCHENSYNC "Build kitchensync" OFF )
  100. ##### configure checks ##########################
  101. include( ConfigureChecks.cmake )
  102. ###### global compiler settings #################
  103. add_definitions(
  104. -DHAVE_CONFIG_H
  105. )
  106. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  107. set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
  108. set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
  109. ##### activate dependencies #####################
  110. if( BUILD_LIBKCAL OR BUILD_LIBKDEPIM OR BUILD_LIBKPIMIDENTITIES OR BUILD_KIOSLAVES OR BUILD_KMAIL OR BUILD_KNODE )
  111. add_subdirectory( libemailfunctions )
  112. endif()
  113. if( BUILD_KADDRESSBOOK OR (BUILD_KRESOURCES AND (WITH_EGROUPWARE OR WITH_BIRTHDAYS)) )
  114. add_subdirectory( kaddressbook/common )
  115. endif()
  116. ##### kdepim directories ########################
  117. tde_conditional_add_subdirectory( BUILD_INDEXLIB indexlib )
  118. tde_conditional_add_subdirectory( BUILD_LIBKMIME libkmime )
  119. tde_conditional_add_subdirectory( BUILD_KTNEF ktnef )
  120. tde_conditional_add_subdirectory( BUILD_LIBKCAL libkcal )
  121. tde_conditional_add_subdirectory( BUILD_LIBKDEPIM pixmaps )
  122. tde_conditional_add_subdirectory( BUILD_LIBKDEPIM libtdepim )
  123. tde_conditional_add_subdirectory( BUILD_LIBKPIMIDENTITIES libkpimidentities )
  124. tde_conditional_add_subdirectory( BUILD_LIBKDENETWORK libkdenetwork )
  125. tde_conditional_add_subdirectory( BUILD_CERTMANAGER certmanager )
  126. tde_conditional_add_subdirectory( BUILD_LIBKPGP libkpgp )
  127. tde_conditional_add_subdirectory( BUILD_MIMELIB mimelib )
  128. tde_conditional_add_subdirectory( BUILD_LIBKSIEVE libksieve )
  129. tde_conditional_add_subdirectory( BUILD_LIBKPIMEXCHANGE libkpimexchange )
  130. tde_conditional_add_subdirectory( BUILD_KIOSLAVES kioslaves )
  131. tde_conditional_add_subdirectory( BUILD_KMAIL kmail )
  132. tde_conditional_add_subdirectory( BUILD_AKREGATOR akregator )
  133. tde_conditional_add_subdirectory( BUILD_KALARM kalarm )
  134. tde_conditional_add_subdirectory( BUILD_KADDRESSBOOK kaddressbook )
  135. tde_conditional_add_subdirectory( BUILD_KORN korn )
  136. tde_conditional_add_subdirectory( BUILD_KGANTT kgantt )
  137. tde_conditional_add_subdirectory( BUILD_LIBKHOLIDAYS libkholidays )
  138. tde_conditional_add_subdirectory( BUILD_KORGANIZER kdgantt )
  139. tde_conditional_add_subdirectory( BUILD_KORGANIZER korganizer )
  140. tde_conditional_add_subdirectory( BUILD_PLUGINS plugins )
  141. tde_conditional_add_subdirectory( BUILD_KNOTES knotes )
  142. tde_conditional_add_subdirectory( BUILD_KODE kode )
  143. tde_conditional_add_subdirectory( BUILD_KRESOURCES kresources )
  144. tde_conditional_add_subdirectory( BUILD_WIZARDS wizards )
  145. tde_conditional_add_subdirectory( BUILD_KABC kabc )
  146. tde_conditional_add_subdirectory( BUILD_KONSOLEKALENDAR konsolekalendar )
  147. tde_conditional_add_subdirectory( BUILD_KMAILCVT kmailcvt )
  148. tde_conditional_add_subdirectory( BUILD_KARM karm )
  149. tde_conditional_add_subdirectory( BUILD_KFILE_PLUGINS kfile-plugins )
  150. tde_conditional_add_subdirectory( BUILD_KANDY kandy )
  151. tde_conditional_add_subdirectory( BUILD_KNODE knode )
  152. tde_conditional_add_subdirectory( BUILD_KMOBILE kmobile )
  153. tde_conditional_add_subdirectory( BUILD_KITCHENSYNC kitchensync )
  154. tde_conditional_add_subdirectory( BUILD_DOC doc )
  155. tde_conditional_add_subdirectory( BUILD_KONTACT kontact )
  156. ##### write configure files #####################
  157. configure_file( config.h.cmake config.h @ONLY )