diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 124 |
1 files changed, 74 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 432227e4..44cfd0ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,51 +1,75 @@ -project(extragear-multimedia) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules ) - -# search packages used by KDE -find_package(KDE4 REQUIRED) -include (KDE4Defaults) -include (MacroLibrary) -include(MacroOptionalAddSubdirectory) -find_package(RUBY) -find_package(KdeMultimedia) -find_package(OpenGL) -find_package(Xine) -# are these two really required ? -if (APPLE) - find_package(Carbon REQUIRED) -endif (APPLE) -set(TAGLIB_MIN_VERSION "1.5") -find_package(Taglib) - -#amarok needs to be before add_definitions, since it builds -#some qt-only software -if(TAGLIB_FOUND AND RUBY_EXECUTABLE AND RUBY_INCLUDE_PATH) - macro_optional_add_subdirectory(amarok) -endif(TAGLIB_FOUND AND RUBY_EXECUTABLE AND RUBY_INCLUDE_PATH) - - -add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) - -include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) - -include (ConfigureChecks.cmake) - -if(TAGLIB_FOUND) -include_directories (${TAGLIB_INCLUDES}) -endif(TAGLIB_FOUND) - -if(KDEMULTIMEDIA_FOUND) - macro_optional_add_subdirectory(k3b) - macro_optional_add_subdirectory(kaudiocreator) -endif(KDEMULTIMEDIA_FOUND) -macro_optional_add_subdirectory(kaffeine) -macro_optional_add_subdirectory(kmid) -macro_optional_add_subdirectory(kplayer) -macro_optional_add_subdirectory(kmplayer) -macro_optional_add_subdirectory(doc) - -if(QT_QTOPENGL_FOUND AND OPENGL_FOUND AND XINE_FOUND) - macro_optional_add_subdirectory(kaffeinegl) -endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND AND XINE_FOUND) +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# +cmake_minimum_required( VERSION 2.6 ) + + +##### general package setup ##################### + +project( amarok ) + + +##### include essential cmake modules ########### + +include( CheckCXXSourceCompiles ) +include( CheckFunctionExists ) +include( CheckIncludeFileCXX ) +include( CheckStructHasMember ) +include( CheckSymbolExists ) +include( CheckTypeSize ) +include( FindPkgConfig ) + + +##### 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_LIBVISUAL "Enable libvisual support" OFF ) +option( WITH_KONQSIDEBAR "Enable konqsidebar plugin" OFF ) +option( WITH_XINE "Enable xine-engine support" OFF ) +option( WITH_LIBGPOD "Enable iPod support from libgpod" OFF ) + + +##### configure checks ########################## + +include( ConfigureChecks.cmake ) + + +###### global compiler settings ################# + +add_definitions( + -DHAVE_CONFIG_H + ${TQT_CFLAGS_OTHER} +) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) + + +##### source directories ######################## + +add_subdirectory( amarok ) + + +##### write configure files ##################### + +configure_file( config.h.cmake config.h @ONLY ) |