summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt59
1 files changed, 45 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d8d83be..6e27d43a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,22 +9,24 @@
#
#################################################
-cmake_minimum_required( VERSION 2.8 )
+
+##### set project version ########################
+
+include( TDEVersion )
+cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
+tde_set_project_version( )
##### general package setup #####################
project( tdemultimedia )
-
set( PACKAGE tdemultimedia )
-set( VERSION R14.1.0 )
-
-enable_testing( )
##### include essential cmake modules ###########
include( FindPkgConfig )
+include( FindThreads )
include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckTypeSize )
@@ -33,11 +35,12 @@ include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckLibraryExists )
include( CheckSymbolExists )
+enable_language( ASM )
+enable_testing( )
##### include our cmake modules #################
-set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
@@ -49,7 +52,7 @@ tde_setup_paths( )
##### optional stuff ############################
-OPTION( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_ALSA "Enable ALSA support (kscd, kmix)" ON )
option( WITH_ARTS_AKODE "Enable aRts akode plugin" ${WITH_ALL_OPTIONS} )
option( WITH_ARTS_AUDIOFILE "Enable aRts audiofile plugin" ${WITH_ALL_OPTIONS} )
@@ -64,7 +67,7 @@ option( WITH_MUSICBRAINZ "Enable MusicBrainz support (juk)" OFF )
option( WITH_TAGLIB "Enable taglib support (juk, tdefile-plugins)" ${WITH_ALL_OPTIONS} )
option( WITH_THEORA "Enable Ogg/Theora support (tdefile-plugins)" ${WITH_ALL_OPTIONS} )
option( WITH_VORBIS "Enable Ogg/Vorbis support (krec, mpeglib, oggarts, tdefile-plugins)" ${WITH_ALL_OPTIONS} )
-
+option( WITH_KMIX_EXPERIMENTAL "Enable experimental/unmaintained KMix features" OFF )
##### user requested modules ####################
@@ -138,6 +141,11 @@ if( BUILD_KAUDIOCREATOR )
add_subdirectory( kaudiocreator )
endif( BUILD_KAUDIOCREATOR )
tde_conditional_add_subdirectory( BUILD_KMIX kmix )
+if( WITH_KMIX_EXPERIMENTAL )
+ if( NOT BUILD_KMIX )
+ tde_message_fatal( "KMix experimental features requested, but KMix won't be built" )
+ endif( )
+endif( WITH_KMIX_EXPERIMENTAL )
if( BUILD_KREC )
if( NOT BUILD_ARTS )
tde_message_fatal( "krec can not be built without building arts" )
@@ -159,10 +167,33 @@ configure_file( config.h.cmake config.h @ONLY )
##### add apidox targets ############
-add_custom_target(apidox
- COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html"
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
+add_custom_target( apidox
+ COMMAND ${CMAKE_COMMAND} -E env
+ "TQTDOCDIR=/usr/share/tqt3/doc/html"
+ "DOXDATA=${HTML_INSTALL_DIR}/en/common"
+ ${CMAKE_SOURCE_DIR}/admin/doxygen.sh
+ --no-modulename
+ ${CMAKE_SOURCE_DIR}
+ COMMAND
+ find ${CMAKE_BINARY_DIR}/apidocs -name '*.html' |
+ xargs -r sed -i 's|${CMAKE_BINARY_DIR}/apidocs|${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs|g'
+ COMMAND
+ find ${CMAKE_BINARY_DIR}/apidocs -name '*.tag' |
+ xargs -r sed -i 's|${CMAKE_SOURCE_DIR}/|${PROJECT_NAME}/|g'
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+)
+
+add_custom_target( install-apidox
+ COMMAND ${CMAKE_COMMAND} -E echo Apidox installed in ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
+)
-add_custom_target(install-apidox
- COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
+install( CODE "
+ if( EXISTS ${CMAKE_BINARY_DIR}/apidocs )
+ file(
+ INSTALL ${CMAKE_BINARY_DIR}/apidocs/
+ DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
+ PATTERN doxygen_sqlite3.db EXCLUDE
+ PATTERN installdox-slow EXCLUDE
+ )
+ endif()"
+)