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.

199 lines
5.2KB

  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. # required stuff
  12. find_package( TQt )
  13. find_package( TDE )
  14. tde_setup_architecture_flags( )
  15. include(TestBigEndian)
  16. test_big_endian(WORDS_BIGENDIAN)
  17. tde_setup_largefiles( )
  18. ##### check for gcc visibility support
  19. if( WITH_GCC_VISIBILITY )
  20. tde_setup_gcc_visibility( )
  21. endif( WITH_GCC_VISIBILITY )
  22. set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" )
  23. ##### check system configuration ################
  24. check_symbol_exists( strdup "string.h" HAVE_STRDUP_DECL )
  25. check_type_size( ushort USHORT )
  26. check_type_size( boolean BOOLEAN )
  27. check_type_size( "int" SIZEOF_INT )
  28. check_type_size( "long" SIZEOF_LONG )
  29. check_type_size( "short" SIZEOF_SHORT )
  30. check_type_size( "unsigned char" SIZEOF_UNSIGNED_CHAR )
  31. check_type_size( "unsigned int" SIZEOF_UNSIGNED_INT )
  32. check_type_size( "unsigned long" SIZEOF_UNSIGNED_LONG )
  33. check_type_size( "unsigned short" SIZEOF_UNSIGNED_SHORT )
  34. pkg_search_module( LIBXML libxml-2.0>=2.6.0 )
  35. if( NOT LIBXML_FOUND )
  36. tde_message_fatal( "libxml at least 2.6.0 is required, but not found on your system" )
  37. endif( NOT LIBXML_FOUND )
  38. pkg_search_module( LIBXSLT libexslt>=0.8.0 )
  39. if( NOT LIBXSLT_FOUND )
  40. pkg_search_module( LIBXSLT libxslt>=1.0.19 )
  41. if( NOT LIBXSLT_FOUND )
  42. tde_message_fatal( "libxslt at least 1.0.19 is required, but not found on your system" )
  43. endif( )
  44. endif( NOT LIBXSLT_FOUND )
  45. pkg_search_module( TAGLIB taglib )
  46. if( TAGLIB_FOUND )
  47. set( HAVE_TAGLIB 1 )
  48. endif( TAGLIB_FOUND )
  49. pkg_search_module( YAZ yaz )
  50. if( YAZ_FOUND )
  51. set( HAVE_YAZ 1 )
  52. endif( YAZ_FOUND )
  53. if( WITH_LIBKCDDB )
  54. message( "-- checking for 'libkcddb'" )
  55. find_path(
  56. LIBKCDDB_INCLUDE_DIR
  57. cddb.h
  58. PATHS
  59. ${TDE_INCLUDE_DIR}/tde/libkcddb
  60. ${TDE_INCLUDE_DIR}/libkcddb
  61. NO_DEFAULT_PATH
  62. )
  63. find_library(
  64. LIBKCDDB_LIBRARY
  65. kcddb
  66. PATHS
  67. ${TDE_LIB_DIR}
  68. ${TQT_LIBRARY_DIRS}
  69. )
  70. if( LIBKCDDB_LIBRARY )
  71. get_filename_component( LIBKCDDB_LIBRARY_DIR ${LIBKCDDB_LIBRARY} PATH CACHE )
  72. endif( )
  73. if( NOT LIBKCDDB_INCLUDE_DIR OR NOT LIBKCDDB_LIBRARY_DIR )
  74. tde_message_fatal( "libkcddb is required, but was not found on your system" )
  75. else( )
  76. set( HAVE_KCDDB 1 )
  77. endif( )
  78. endif( WITH_LIBKCDDB )
  79. if( WITH_LIBKCAL )
  80. message( "-- checking for 'libkcal'" )
  81. find_path(
  82. LIBKCAL_INCLUDE_DIR
  83. kcalversion.h
  84. PATHS
  85. ${TDE_INCLUDE_DIR}/libkcal
  86. ${TDE_INCLUDE_DIR}
  87. ${TQT_INCLUDE_DIRS}
  88. )
  89. find_library(
  90. LIBKCAL_LIBRARY
  91. kcal
  92. PATHS
  93. ${TDE_LIB_DIR}
  94. ${TQT_LIBRARY_DIRS}
  95. )
  96. if( LIBKCAL_LIBRARY )
  97. get_filename_component( LIBKCAL_LIBRARY_DIR ${LIBKCAL_LIBRARY} PATH CACHE )
  98. endif( )
  99. if( NOT LIBKCAL_INCLUDE_DIR OR NOT LIBKCAL_LIBRARY_DIR )
  100. tde_message_fatal( "libkcal is required, but was not found on your system" )
  101. else( )
  102. set( HAVE_KCAL 1 )
  103. endif( )
  104. endif( WITH_LIBKCAL )
  105. if( WITH_LIBBTPARSE )
  106. check_library_exists( btparse bt_initialize "" HAVE_LIBBTPARSE )
  107. if( NOT HAVE_LIBBTPARSE )
  108. tde_message_fatal( "libbtparse is required, but was not found on your system" )
  109. endif( NOT HAVE_LIBBTPARSE )
  110. set( BTPARSE_LIBRARIES btparse )
  111. else( )
  112. set( BTPARSE_LIBRARIES btparse-static )
  113. endif( WITH_LIBBTPARSE )
  114. if( WITH_SAX )
  115. set( SAX_SUPPORT 1 CACHE INTERNAL "" )
  116. endif( WITH_SAX )
  117. if( BUILD_AMAZON_SUPPORT )
  118. set( AMAZON_SUPPORT 1 CACHE INTERNAL "" )
  119. endif( BUILD_AMAZON_SUPPORT )
  120. if( BUILD_IMDB_SUPPORT )
  121. set( IMDB_SUPPORT 1 CACHE INTERNAL "" )
  122. endif( BUILD_IMDB_SUPPORT )
  123. if( BUILD_CDTEXT_SUPPORT )
  124. set( USE_CDTEXT 1 CACHE INTERNAL "" )
  125. endif( BUILD_CDTEXT_SUPPORT )
  126. if( BUILD_OOO_SUPPORT )
  127. # FIXME - add configure checks for LibreOffice/OpenOffice.org
  128. #set( WITH_OOO 1 CACHE INTERNAL "" )
  129. tde_message_fatal( "CMake build with LibreOffice/OpenOffice.org support is not yet complete" )
  130. endif( BUILD_OOO_SUPPORT )
  131. if( BUILD_EXEMPI_SUPPORT )
  132. pkg_search_module( EXEMPI exempi-2.0>=1.99.0 )
  133. if( NOT EXEMPI_FOUND )
  134. tde_message_fatal( "exempi at least 1.99.0 is required, but not found on your system" )
  135. else( )
  136. set( HAVE_EXEMPI 1 CACHE INTERNAL "" )
  137. endif( )
  138. endif( BUILD_EXEMPI_SUPPORT )
  139. if( BUILD_POPPLER_SUPPORT )
  140. pkg_search_module( POPPLER poppler-tqt>=0.5 )
  141. if( NOT POPPLER_FOUND )
  142. tde_message_fatal( "poppler-tqt at least 0.5 is required, but not found on your system" )
  143. else( )
  144. set( HAVE_POPPLER 1 CACHE INTERNAL "" )
  145. endif( )
  146. endif( BUILD_POPPLER_SUPPORT )
  147. if( BUILD_WEBCAM_SUPPORT )
  148. check_include_file( "libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H )
  149. if( HAVE_LIBV4L1_VIDEODEV_H )
  150. set( ENABLE_WEBCAM 1 CACHE INTERNAL "" )
  151. set( VIDEODEV_HEADER "libv4l1-videodev.h" CACHE INTERNAL "" )
  152. else( )
  153. check_include_file( "linux/videodev.h" HAVE_VIDEODEV_H )
  154. if( HAVE_VIDEODEV_H )
  155. set( ENABLE_WEBCAM 1 CACHE INTERNAL "" )
  156. set( VIDEODEV_HEADER "linux/videodev.h" CACHE INTERNAL "" )
  157. else( )
  158. tde_message_fatal( "libv4l1-videodev.h or linux/videodev.h is required, but not found on your system" )
  159. endif( )
  160. endif( )
  161. set( WEBCAM_LIBRARIES barcode-static )
  162. endif( BUILD_WEBCAM_SUPPORT )