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

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