summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-09-18 20:59:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-09-18 20:59:45 +0200
commit3f7006b6807add37a3de957c525600a31424a498 (patch)
treec0a1c00a80c3ec28c7f38da2e5e91ff6e3a385be /CMakeLists.txt
parent3fbf943ee75e74a85c489508303987cfd5f8ea01 (diff)
downloadtellico-3f7006b6807add37a3de957c525600a31424a498.tar.gz
tellico-3f7006b6807add37a3de957c525600a31424a498.zip
Initial cmake conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt123
1 files changed, 123 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..226b666
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,123 @@
+#################################################
+#
+# (C) 2016 Slávek Banko
+# slavek.banko (AT) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+##### general package setup #####################
+
+project( tellico )
+set( VERSION 1.3.6 )
+
+
+##### include essential cmake modules ###########
+
+include( FindPkgConfig )
+include( CheckIncludeFile )
+include( CheckLibraryExists )
+include( CheckSymbolExists )
+include( CheckTypeSize )
+# EXAMPLE:
+# include( CheckCSourceCompiles )
+# include( CheckCXXSourceCompiles )
+
+enable_testing()
+
+
+##### include our cmake modules #################
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### setup install paths #######################
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### optional stuff ############################
+
+option( WITH_ALL_OPTIONS "Enable all sane supported options" OFF )
+
+option( WITH_LIBKCDDB "Enable FreeDB integration" ${WITH_ALL_OPTIONS} )
+option( WITH_LIBKCAL "Enable KOrganizer integration" ${WITH_ALL_OPTIONS} )
+option( WITH_LIBBTPARSE "Use btparse shared library" ${WITH_ALL_OPTIONS} )
+option( WITH_SAX_LOADER "Use SAX document loading (experimental)" ${WITH_ALL_OPTIONS} )
+
+
+##### options comments ##########################
+
+# WITH_LIBKCDDB enable searching via freedb
+# WITH_LIBKCAL enable integration with KOrganizer
+# WITH_LIBBTPARSE if enabled use system library btparse instead of build-in
+# WITH_SAX_LOADER if enabled documents will be openned using SAX loader
+
+
+##### user requested modules ####################
+
+option( BUILD_DOC "Build documentation" ON )
+option( BUILD_TRANSLATIONS "Build translations" ON )
+option( BUILD_XMLCATALOG "" OFF )
+
+option( BUILD_AMAZON_SUPPORT "Build Amazon.com searching support" ON )
+option( BUILD_IMDB_SUPPORT "Build IMDb searching support" ON )
+option( BUILD_CDTEXT_SUPPORT "Build CD-Text support (Linux only)" ON )
+option( BUILD_OOO_SUPPORT "Build LibreOffice/OpenOffice.org support" OFF )
+option( BUILD_EXEMPI_SUPPORT "Build exempi support" ON )
+option( BUILD_POPPLER_SUPPORT "Build poppler support" ON )
+option( BUILD_WEBCAM_SUPPORT "Build support for scanning barcodes (experimental)" ON )
+
+
+##### configure checks ##########################
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings #################
+
+add_definitions(
+ -DHAVE_CONFIG_H
+)
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
+
+
+##### tellico directories #######################
+
+add_subdirectory( src )
+add_subdirectory( icons )
+add_subdirectory( xslt )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+
+
+##### other data ################################
+
+install( FILES tellico.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
+install( FILES tellico.xml
+ DESTINATION ${XDG_MIME_INSTALL_DIR}
+)
+install( FILES x-tellico.desktop
+ DESTINATION ${MIME_INSTALL_DIR}/application
+)
+install( FILES tellico.dtd tellico.tips
+ DESTINATION ${DATA_INSTALL_DIR}/${CMAKE_PROJECT_NAME}
+)
+
+
+##### write configure files #####################
+
+configure_file( config.h.cmake config.h @ONLY )