diff options
author | Slávek Banko <[email protected]> | 2017-03-26 15:58:46 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2017-03-26 15:59:04 +0200 |
commit | efcdd889254fc98314dd48854d50e90aa21e53c0 (patch) | |
tree | 5dc7034c23a5a18ca31d90225137f5eeaec809c4 /CMakeLists.txt | |
parent | 25709e498d5832125f5f584bd10e3c66d05ec5ee (diff) | |
download | tdemultimedia-efcdd889254fc98314dd48854d50e90aa21e53c0.tar.gz tdemultimedia-efcdd889254fc98314dd48854d50e90aa21e53c0.zip |
Initial cmake conversion
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 8b12682035e2ae92a29a9ce12abc5fbcf38b1192)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 88 |
1 files changed, 87 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 29f6fe82..ad2d6405 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,15 +19,20 @@ project( tdemultimedia ) set( PACKAGE tdemultimedia ) set( VERSION R14.0.5 ) +enable_testing( ) + ##### include essential cmake modules ########### include( FindPkgConfig ) include( CheckIncludeFile ) +include( CheckIncludeFileCXX ) include( CheckTypeSize ) include( CheckCSourceCompiles ) include( CheckCXXSourceCompiles ) +include( CheckFunctionExists ) include( CheckLibraryExists ) +include( CheckSymbolExists ) ##### include our cmake modules ################# @@ -44,13 +49,41 @@ tde_setup_paths( ) ##### optional stuff ############################ -option( WITH_ALSA "Enable ALSA support" ON ) +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} ) +option( WITH_ARTS_MPEGLIB "Enable aRts mpeglib pluing" ${WITH_ALL_OPTIONS} ) +option( WITH_ARTS_XINE "Enable aRts xine plugin" ${WITH_ALL_OPTIONS} ) +option( WITH_CDPARANOIA "Enable CDParanoia support (mpeglib, tdeioslave-audiocd)" ${WITH_ALL_OPTIONS} ) +option( WITH_FLAC "Enable FLAC support (tdeioslave)" ${WITH_ALL_OPTIONS} ) +option( WITH_GSTREAMER "Enable gstreamer support (juk)" ${WITH_ALL_OPTIONS} ) +option( WITH_KSCD_CDDA "Enable cdda support in kscd" ${WITH_ALL_OPTIONS} ) +option( WITH_LAME "Enable lame support (krec)" ${WITH_ALL_OPTIONS} ) +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} ) ##### user requested modules #################### option( BUILD_ALL "Build all" OFF ) +option( BUILD_ARTS "Build aRts" ${BUILD_ALL} ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_JUK "Build Juk player" ${BUILD_ALL} ) +option( BUILD_KABOODLE "Build Kaboodle video player" ${BUILD_ALL} ) +option( BUILD_KAPPFINDER_DATA "Build data for kappfinder" ${BUILD_ALL} ) +option( BUILD_KAUDIOCREATOR "Build KAudio Creator" ${BUILD_ALL} ) option( BUILD_KMIX "Build kmix" ${BUILD_ALL} ) +option( BUILD_KREC "Build krec" ${BUILD_ALL} ) +option( BUILD_KSCD "Build kscd player" ${BUILD_ALL} ) +option( BUILD_LIBKCDDB "Build kcddb library" ${BUILD_ALL} ) +option( BUILD_MPEGLIB "Build mpeg library" ${BUILD_ALL} ) +option( BUILD_NOATUN "Build noatun player" ${BUILD_ALL} ) +option( BUILD_TDEFILE_PLUGINS "Build tdefile plugins" ${BUILD_ALL} ) +option( BUILD_TDEIOSLAVE "Build tdeio slave plugins" ${BUILD_ALL} ) +option( BUILD_TDEMID "Build tdemid" ${BUILD_ALL} ) ##### configure checks ########################## @@ -74,9 +107,62 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) ##### tdemultimedia directories ######################## +if( BUILD_MPEGLIB ) # must be before mpeglib_artsplug + if( NOT BUILD_ARTS ) + tde_message_fatal( "mpeglib can not be built without building arts" ) + endif( ) + add_subdirectory( mpeglib ) +endif( BUILD_MPEGLIB ) +if( BUILD_ARTS ) + add_subdirectory( arts ) + tde_conditional_add_subdirectory( WITH_ARTS_AKODE akode_artsplugin ) + tde_conditional_add_subdirectory( WITH_ARTS_AUDIOFILE audiofile_artsplugin ) + if( WITH_ARTS_MPEGLIB ) + if( NOT BUILD_MPEGLIB ) + tde_message_fatal( "mpeglib aRts plugin can not be built without building mpeglib" ) + endif( ) + add_subdirectory( mpeglib_artsplug ) + else( WITH_ARTS_MPEGLIB ) + tde_conditional_add_subdirectory( WITH_VORBIS oggvorbis_artsplugin ) + endif( WITH_ARTS_MPEGLIB ) + tde_conditional_add_subdirectory( WITH_ARTS_XINE xine_artsplugin ) +endif( BUILD_ARTS ) +tde_conditional_add_subdirectory( BUILD_DOC doc ) +tde_conditional_add_subdirectory( BUILD_JUK juk ) +tde_conditional_add_subdirectory( BUILD_KABOODLE kaboodle ) +tde_conditional_add_subdirectory( BUILD_KAPPFINDER_DATA kappfinder-data ) +if( BUILD_KAUDIOCREATOR ) + if( NOT BUILD_KSCD ) + tde_message_fatal( "kaudiocreator can not be built without building kscd" ) + endif( ) + add_subdirectory( kaudiocreator ) +endif( BUILD_KAUDIOCREATOR ) tde_conditional_add_subdirectory( BUILD_KMIX kmix ) +if( BUILD_KREC ) + if( NOT BUILD_ARTS ) + tde_message_fatal( "krec can not be built without building arts" ) + endif( ) + add_subdirectory( krec ) +endif( BUILD_KREC ) +tde_conditional_add_subdirectory( BUILD_KSCD kscd ) +tde_conditional_add_subdirectory( BUILD_LIBKCDDB libkcddb ) +tde_conditional_add_subdirectory( BUILD_NOATUN noatun ) +tde_conditional_add_subdirectory( BUILD_TDEFILE_PLUGINS tdefile-plugins ) +tde_conditional_add_subdirectory( BUILD_TDEIOSLAVE tdeioslave ) +tde_conditional_add_subdirectory( BUILD_TDEMID tdemid ) ##### write configure files ##################### 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(install-apidox + COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/") |