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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 3.5.13 )
  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_KFILE_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_KICONEDIT "Build kiconedit" ${BUILD_ALL} )
  61. option( BUILD_KMRML "Build kmrml" ${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. ##### configure checks ##########################
  74. include( ConfigureChecks.cmake )
  75. ###### global compiler settings #################
  76. add_definitions(
  77. -DHAVE_CONFIG_H
  78. )
  79. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  80. set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
  81. set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
  82. ##### tdegraphics directories ###################
  83. # tdefile-plugins/ps requires dscparse-static library
  84. if( BUILD_KFILE_PLUGINS AND NOT BUILD_KGHOSTVIEW )
  85. add_subdirectory( kghostview/dscparse )
  86. endif( )
  87. tde_conditional_add_subdirectory( BUILD_DOC doc )
  88. tde_conditional_add_subdirectory( BUILD_KAMERA kamera )
  89. tde_conditional_add_subdirectory( BUILD_KCOLOREDIT kcoloredit )
  90. tde_conditional_add_subdirectory( BUILD_KDVI kdvi )
  91. tde_conditional_add_subdirectory( BUILD_KFAX kfax )
  92. tde_conditional_add_subdirectory( BUILD_KFAXVIEW kfaxview )
  93. tde_conditional_add_subdirectory( BUILD_KFILE_PLUGINS tdefile-plugins )
  94. tde_conditional_add_subdirectory( BUILD_KGAMMA kgamma )
  95. tde_conditional_add_subdirectory( BUILD_KGHOSTVIEW kghostview )
  96. tde_conditional_add_subdirectory( BUILD_KICONEDIT kiconedit )
  97. tde_conditional_add_subdirectory( BUILD_KMRML kmrml )
  98. tde_conditional_add_subdirectory( BUILD_KOLOURPAINT kolourpaint )
  99. tde_conditional_add_subdirectory( BUILD_KOOKA kooka )
  100. tde_conditional_add_subdirectory( BUILD_KPDF kpdf )
  101. tde_conditional_add_subdirectory( BUILD_KPOVMODELER kpovmodeler )
  102. tde_conditional_add_subdirectory( BUILD_KRULER kruler )
  103. tde_conditional_add_subdirectory( BUILD_KSNAPSHOT ksnapshot )
  104. tde_conditional_add_subdirectory( BUILD_KSVG ksvg )
  105. tde_conditional_add_subdirectory( BUILD_KUICKSHOW kuickshow )
  106. tde_conditional_add_subdirectory( BUILD_KVIEW kview )
  107. tde_conditional_add_subdirectory( BUILD_KVIEWSHELL kviewshell )
  108. tde_conditional_add_subdirectory( BUILD_LIBKSCAN libkscan )
  109. ##### write configure files #####################
  110. configure_file( config.h.cmake config.h @ONLY )