TDE graphics utilities
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.

CMakeLists.txt 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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( tdegraphics )
  14. set( VERSION R14.1.0 )
  15. ##### include essential cmake modules ###########
  16. include( FindPkgConfig )
  17. include( CheckIncludeFile )
  18. include( CheckTypeSize )
  19. include( CheckCSourceCompiles )
  20. include( CheckCXXSourceCompiles )
  21. include( CheckLibraryExists )
  22. include( CheckSymbolExists )
  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. ##### optional stuff ############################
  30. option( WITH_T1LIB "Enable t1lib support" OFF )
  31. option( WITH_PAPER "Enable libpaper support" OFF )
  32. OPTION( WITH_TIFF "Enable tiff support (tdefile-plugins)" OFF )
  33. OPTION( WITH_OPENEXR "Enable openexr support (tdefile-plugins)" OFF )
  34. OPTION( WITH_PDF "Enable pdf support (tdefile-plugins)" OFF )
  35. ##### options comments ##########################
  36. # WITH_T1LIB affects kpdf
  37. # WITH_T1LIB description adds support for t1lb, a library for decoding
  38. # t1 fonts. If it is disabled or missing the freetype
  39. # library is used as a fallback implementation.
  40. # It is safe to disable this option. You shouldn't
  41. # lose any end-user functionality.
  42. # WITH_PAPER affects kpdf
  43. # WITH_PAPER description this library is only used to set some default
  44. # parameters of paper according to system settings.
  45. # WITH_TIFF affects tdefile-plugins(tiff)
  46. # WITH_OPENEXR affects tdefile-plugins(exr)
  47. # WITH_PDF affects tdefile-plugins(pdf dependencies/poppler-tqt)
  48. # NOTE: It seems that libtiff was planned to be used in
  49. # kviewshell(plugins/djvu) but isn't yet implemented
  50. ##### user requested modules ####################
  51. option( BUILD_ALL "Build all" OFF )
  52. option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
  53. option( BUILD_KAMERA "Build kamera" ${BUILD_ALL} )
  54. option( BUILD_KCOLOREDIT "Build kcoloredit" ${BUILD_ALL} )
  55. option( BUILD_KDVI "Build kdvi" ${BUILD_ALL} )
  56. option( BUILD_KFAX "Build kfax" ${BUILD_ALL} )
  57. option( BUILD_KFAXVIEW "Build kfaxview" ${BUILD_ALL} )
  58. option( BUILD_TDEFILE_PLUGINS "Build tdefile-plugins" ${BUILD_ALL} )
  59. option( BUILD_KGAMMA "Build kgamma" ${BUILD_ALL} )
  60. option( BUILD_KGHOSTVIEW "Build kghostview" ${BUILD_ALL} )
  61. option( BUILD_TDEICONEDIT "Build tdeiconedit" ${BUILD_ALL} )
  62. option( BUILD_KOLOURPAINT "Build kolourpaint" ${BUILD_ALL} )
  63. option( BUILD_KOOKA "Build kooka" ${BUILD_ALL} )
  64. option( BUILD_KPDF "Build kpdf" ${BUILD_ALL} )
  65. option( BUILD_KPOVMODELER "Build kpovmodeler" ${BUILD_ALL} )
  66. option( BUILD_KRULER "Build kruler" ${BUILD_ALL} )
  67. option( BUILD_KSNAPSHOT "Build ksnapshot" ${BUILD_ALL} )
  68. option( BUILD_KSVG "Build ksvg" ${BUILD_ALL} )
  69. option( BUILD_KUICKSHOW "Build kuickshow" ${BUILD_ALL} )
  70. option( BUILD_KVIEW "Build kview" ${BUILD_ALL} )
  71. option( BUILD_KVIEWSHELL "Build kviewshell" ${BUILD_ALL} )
  72. option( BUILD_LIBKSCAN "Build libkscan" ${BUILD_ALL} )
  73. # deprecated
  74. option( BUILD_KMRML "Build kmrml" OFF )
  75. ##### configure checks ##########################
  76. include( ConfigureChecks.cmake )
  77. ###### global compiler settings #################
  78. add_definitions(
  79. -DHAVE_CONFIG_H
  80. )
  81. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  82. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  83. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  84. ##### tdegraphics directories ###################
  85. # tdefile-plugins/ps requires dscparse-static library
  86. if( BUILD_TDEFILE_PLUGINS AND NOT BUILD_KGHOSTVIEW )
  87. add_subdirectory( kghostview/dscparse )
  88. endif( )
  89. # kdvi and kfax require a static library from kviewshell
  90. # see BUG 1593 for details
  91. if( BUILD_KVIEWSHELL OR BUILD_KDVI OR BUILD_KFAX )
  92. add_subdirectory( kviewshell )
  93. endif( )
  94. tde_conditional_add_subdirectory( BUILD_DOC doc )
  95. tde_conditional_add_subdirectory( BUILD_KAMERA kamera )
  96. tde_conditional_add_subdirectory( BUILD_KCOLOREDIT kcoloredit )
  97. tde_conditional_add_subdirectory( BUILD_KDVI kdvi )
  98. tde_conditional_add_subdirectory( BUILD_KFAX kfax )
  99. tde_conditional_add_subdirectory( BUILD_KFAXVIEW kfaxview )
  100. tde_conditional_add_subdirectory( BUILD_TDEFILE_PLUGINS tdefile-plugins )
  101. tde_conditional_add_subdirectory( BUILD_KGAMMA kgamma )
  102. tde_conditional_add_subdirectory( BUILD_KGHOSTVIEW kghostview )
  103. tde_conditional_add_subdirectory( BUILD_TDEICONEDIT tdeiconedit )
  104. tde_conditional_add_subdirectory( BUILD_KOLOURPAINT kolourpaint )
  105. tde_conditional_add_subdirectory( BUILD_KOOKA kooka )
  106. tde_conditional_add_subdirectory( BUILD_KPDF kpdf )
  107. tde_conditional_add_subdirectory( BUILD_KPOVMODELER kpovmodeler )
  108. tde_conditional_add_subdirectory( BUILD_KRULER kruler )
  109. tde_conditional_add_subdirectory( BUILD_KSNAPSHOT ksnapshot )
  110. tde_conditional_add_subdirectory( BUILD_KSVG ksvg )
  111. tde_conditional_add_subdirectory( BUILD_KUICKSHOW kuickshow )
  112. tde_conditional_add_subdirectory( BUILD_KVIEW kview )
  113. tde_conditional_add_subdirectory( BUILD_LIBKSCAN libkscan )
  114. # deprecated
  115. tde_conditional_add_subdirectory( BUILD_KMRML kmrml )
  116. ##### write configure files #####################
  117. configure_file( config.h.cmake config.h @ONLY )