Tellico – collection manager for books, videos, music
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 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #################################################
  2. #
  3. # (C) 2016 Slávek Banko
  4. # slavek.banko (AT) axis.cz
  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( tellico )
  14. set( VERSION 1.3.6 )
  15. ##### include essential cmake modules ###########
  16. include( FindPkgConfig )
  17. include( CheckIncludeFile )
  18. include( CheckLibraryExists )
  19. include( CheckSymbolExists )
  20. include( CheckTypeSize )
  21. # EXAMPLE:
  22. # include( CheckCSourceCompiles )
  23. # include( CheckCXXSourceCompiles )
  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. ##### optional stuff ############################
  32. option( WITH_ALL_OPTIONS "Enable all sane supported options" OFF )
  33. option( WITH_LIBKCDDB "Enable FreeDB integration" ${WITH_ALL_OPTIONS} )
  34. option( WITH_LIBKCAL "Enable KOrganizer integration" ${WITH_ALL_OPTIONS} )
  35. option( WITH_LIBBTPARSE "Use btparse shared library" ${WITH_ALL_OPTIONS} )
  36. option( WITH_SAX_LOADER "Use SAX document loading (experimental)" ${WITH_ALL_OPTIONS} )
  37. ##### options comments ##########################
  38. # WITH_LIBKCDDB enable searching via freedb
  39. # WITH_LIBKCAL enable integration with KOrganizer
  40. # WITH_LIBBTPARSE if enabled use system library btparse instead of build-in
  41. # WITH_SAX_LOADER if enabled documents will be openned using SAX loader
  42. ##### user requested modules ####################
  43. option( BUILD_DOC "Build documentation" ON )
  44. option( BUILD_TRANSLATIONS "Build translations" ON )
  45. option( BUILD_XMLCATALOG "" OFF )
  46. option( BUILD_AMAZON_SUPPORT "Build Amazon.com searching support" ON )
  47. option( BUILD_IMDB_SUPPORT "Build IMDb searching support" ON )
  48. option( BUILD_CDTEXT_SUPPORT "Build CD-Text support (Linux only)" ON )
  49. option( BUILD_OOO_SUPPORT "Build LibreOffice/OpenOffice.org support" OFF )
  50. option( BUILD_EXEMPI_SUPPORT "Build exempi support" ON )
  51. option( BUILD_POPPLER_SUPPORT "Build poppler support" ON )
  52. option( BUILD_WEBCAM_SUPPORT "Build support for scanning barcodes (experimental)" ON )
  53. ##### configure checks ##########################
  54. include( ConfigureChecks.cmake )
  55. ###### global compiler settings #################
  56. add_definitions(
  57. -DHAVE_CONFIG_H
  58. )
  59. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  60. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  61. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  62. ##### tellico directories #######################
  63. add_subdirectory( src )
  64. add_subdirectory( icons )
  65. add_subdirectory( xslt )
  66. tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
  67. tde_conditional_add_subdirectory( BUILD_DOC doc )
  68. ##### other data ################################
  69. install( FILES tellico.desktop
  70. DESTINATION ${XDG_APPS_INSTALL_DIR}
  71. )
  72. install( FILES tellico.xml
  73. DESTINATION ${XDG_MIME_INSTALL_DIR}
  74. )
  75. install( FILES x-tellico.desktop
  76. DESTINATION ${MIME_INSTALL_DIR}/application
  77. )
  78. install( FILES tellico.dtd tellico.tips
  79. DESTINATION ${DATA_INSTALL_DIR}/${CMAKE_PROJECT_NAME}
  80. )
  81. ##### write configure files #####################
  82. configure_file( config.h.cmake config.h @ONLY )