summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-14 21:13:18 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-14 21:13:18 +0000
commitc36e31eb1b45088e320d6262f9f23771f6fa8f6f (patch)
tree38b38f49ee6f6c3083931783f85ec95d9526dec5 /CMakeLists.txt
parentba720458ac360333dca07ea5161ba574b78c6fad (diff)
downloadamarok-c36e31eb1b45088e320d6262f9f23771f6fa8f6f.tar.gz
amarok-c36e31eb1b45088e320d6262f9f23771f6fa8f6f.zip
[applications/amarok] initial cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1214485 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt124
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 )