| 7c1ac65 by Maximilian Kossick at 2007-02-02 | 1 | project(Amarok) |
| 2 | ||
| c1458f1 by Kevin Funk at 2009-01-12 | 3 | cmake_minimum_required(VERSION 2.6.2) |
| 87b88b4 by Dan Meltzer at 2008-04-19 | 4 | |
| 2af4c3b by Dan Meltzer at 2007-04-28 | 5 | set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} |
| 7670eec by Dan Meltzer at 2007-04-28 | 6 | ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ) |
| 2af4c3b by Dan Meltzer at 2007-04-28 | 7 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 8 | option(WITH_UTILITIES "Enable building of utilities" ON) |
| d6599e1 by Jeff Mitchell at 2009-03-11 | 9 | option(WITH_PLAYER "Enable building of main Amarok player" ON) |
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 10 | option(WITH_MP3Tunes "Enable mp3tunes in the Amarok player, requires multiple extra dependencies" ON) |
| 2dd9222 by Dan Meltzer at 2008-08-21 | 11 | |
| 9424e5a by Dan Meltzer at 2008-08-20 | 12 | include(CheckLibraryExists) |
| b8ff5a5 by Mark Kretschmann at 2008-08-20 | 13 | check_library_exists(dl dlopen "" LIBDL_FOUND) |
| 14 | ||
| 179c070 by Dan Meltzer at 2008-04-08 | 15 | set(TAGLIB_MIN_VERSION "1.5") |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 16 | find_package(Taglib REQUIRED) |
| 17 | ||
| 0f06b91 by Andreas Pakulat at 2009-03-21 | 18 | find_package(Taglib-Extras 0.1 REQUIRED) |
| f3651f2 by Jeff Mitchell at 2009-03-19 | 19 | if( TAGLIB-EXTRAS_FOUND ) |
| 20 | add_definitions( -DTAGLIB_EXTRAS_FOUND ) |
|
| 21 | endif( TAGLIB-EXTRAS_FOUND ) |
|
| 0ea3803 by Jeff Mitchell at 2009-03-12 | 22 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 23 | include(CheckTagLibFileName) |
| 24 | ||
| 25 | check_taglib_filename(COMPLEX_TAGLIB_FILENAME) |
|
| 8bece85 by Dan Meltzer at 2007-03-15 | 26 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 27 | configure_file(config-amarok.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-amarok.h ) |
| 09de99f by Jeff Mitchell at 2009-03-09 | 28 | |
| 3bfec67 by Jeff Mitchell at 2009-03-11 | 29 | if( WITH_PLAYER ) |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 30 | #We depend on kde4.2 now.. I believe this is the easiest way to do it. |
| 31 | set(KDE_MIN_VERSION "4.2.0") |
|
| 32 | find_package( KDE4 REQUIRED ) |
|
| 33 | include (KDE4Defaults) |
|
| 34 | include (MacroLibrary) |
|
| 3a5b47f by Dan Meltzer at 2008-05-16 | 35 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 36 | include(MacroBoolTo01) |
| 37 | include(MacroLogFeature) |
|
| 284cfd0 by Ian Monroe at 2008-09-23 | 38 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 39 | macro_log_feature( KDE4_FOUND "kdelibs" "The toolkit Amarok uses to build" "http://www.kde.org" TRUE "4.2.0" "" ) |
| 7f4d1c8 by Patrick Spendrin at 2008-09-24 | 40 | |
| 26672fe by Ian Monroe at 2009-03-21 | 41 | find_package( QtScriptQtBindings REQUIRED ) |
| 42 | macro_log_feature( QTSCRIPTQTBINDINGS_FOUND "qtscript-qt" "QtScript Qt Bindings" "http://code.google.com/p/qtscriptgenerator/" TRUE "" "" ) |
|
| 4fb36f7 by Dan Meltzer at 2007-03-16 | 43 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 44 | add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) |
| 690847f by Dan Meltzer at 2008-03-01 | 45 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 46 | find_package(MySQLAmarok REQUIRED) |
| 47 | macro_log_feature( MYSQL_EMBEDDED_FOUND "mysqld" "Embedded MySQL" "http://www.mysql.com" TRUE "" "" ) |
|
| bf3b08e by Alejandro Daniel Wainzinger at 2008-06-05 | 48 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 49 | # zlib is required for mysql embedded |
| 50 | find_package(ZLIB REQUIRED) |
|
| 51 | macro_log_feature( ZLIB_FOUND "zlib" "zlib" "" TRUE "" "" ) |
|
| d9ad9ea by Alejandro Daniel Wainzinger at 2008-07-27 | 52 | |
| 91f340a by Jeff Mitchell at 2009-03-12 | 53 | macro_optional_find_package(Strigi) |
| 54 | macro_log_feature( STRIGI_FOUND "strigi" "Index metadata of files" "http://strigi.sourceforge.net" TRUE "" "" ) |
|
| 4cfee6f by Jeff Mitchell at 2009-03-12 | 55 | |
| bae663e by Leo Franchi at 2009-06-12 | 56 | macro_optional_find_package(LibLastFm) |
| 57 | if(LIBLASTFM_FOUND) |
|
| 07c443c by Leo Franchi at 2009-06-12 | 58 | macro_log_feature( LIBLASTFM_FOUND "liblastfm" "Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists" "http://cdn.last.fm/src/liblastfm-0.3.0.tar.bz2" FALSE "0.3" "" ) |
| bae663e by Leo Franchi at 2009-06-12 | 59 | endif(LIBLASTFM_FOUND) |
| 60 | ||
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 61 | macro_optional_find_package(Ipod) |
| 91f340a by Jeff Mitchell at 2009-03-12 | 62 | if(IPOD_FOUND) |
| 63 | macro_ensure_version("0.7.0" ${IPOD_VERSION} IPOD_0_7) |
|
| 64 | endif(IPOD_FOUND) |
|
| 65 | macro_log_feature( IPOD_0_7 "libgpod" "Support Apple iPod audio devices" "http://sourceforge.net/projects/gtkpod/" FALSE "0.7.0" "" ) |
|
| ece30c0 by Jeff Mitchell at 2009-03-12 | 66 | |
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 67 | if( WITH_Ipod ) |
| ece30c0 by Jeff Mitchell at 2009-03-12 | 68 | macro_optional_find_package(Gdk) |
| 69 | macro_log_feature( GDK_FOUND "Gdk" "Support for artwork on iPod audio devices via GdkPixbuf" "http://developer.gnome.org/arch/imaging/gdkpixbuf.html" FALSE "2.0.x" "" ) |
|
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 70 | endif( WITH_Ipod ) |
| ece30c0 by Jeff Mitchell at 2009-03-12 | 71 | |
| 91f340a by Jeff Mitchell at 2009-03-12 | 72 | macro_optional_find_package(Mtp) |
| 73 | macro_log_feature( MTP_FOUND "libmtp" "Enable Support for portable media devices that use the media transfer protocol" "http://libmtp.sourceforge.net/" FALSE "0.3.0" "") |
|
| 6f513c8 by Casey Link at 2008-06-30 | 74 | |
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 75 | if( WITH_MP3Tunes ) |
| d6599e1 by Jeff Mitchell at 2009-03-11 | 76 | find_package(CURL) |
| 77 | macro_log_feature( CURL_FOUND "curl" "cURL provides the necessary network libraries required by mp3tunes." "http://curl.haxx.se" FALSE "" "" ) |
|
| c2eb8e4 by Casey Link at 2008-06-28 | 78 | |
| d6599e1 by Jeff Mitchell at 2009-03-11 | 79 | find_package(LibXml2) |
| 80 | macro_log_feature( LIBXML2_FOUND "libxml2" "LibXML2 is an XML parser required by mp3tunes." "http://www.xmlsoft.org" FALSE "" "" ) |
|
| 690847f by Dan Meltzer at 2008-03-01 | 81 | |
| ece30c0 by Jeff Mitchell at 2009-03-12 | 82 | macro_optional_find_package(OpenSSL) |
| 83 | macro_optional_find_package(Libgcrypt) |
|
| d6599e1 by Jeff Mitchell at 2009-03-11 | 84 | if ( OPENSSL_FOUND OR LIBGCRYPT_FOUND ) |
| 85 | set (_mp3tunes_crypto TRUE ) |
|
| 7641b68 by Jeff Mitchell at 2009-03-12 | 86 | else ( OPENSSL_FOUND OR LIBGCRYPT_FOUND ) |
| 87 | message( SEND_ERROR "Building with mp3tunes support REQUIRES either OpenSSL or GNU Libgcrypt" ) |
|
| d6599e1 by Jeff Mitchell at 2009-03-11 | 88 | endif ( OPENSSL_FOUND OR LIBGCRYPT_FOUND ) |
| 89 | macro_log_feature( _mp3tunes_crypto "openssl or libgcrypt" "OpenSSL or GNU Libgcrypt provides cryptographic functions required by mp3tunes." "http://www.openssl.org/ or http://www.gnupg.org/download/#libgcrypt" FALSE "" "" ) |
|
| 106aac2 by Daniel Winter at 2008-06-12 | 90 | |
| d6599e1 by Jeff Mitchell at 2009-03-11 | 91 | find_package(GObject) |
| 92 | macro_log_feature( GOBJECT_FOUND "gobject" "Required by mp3tunes." "http://www.gtk.org" FALSE "2.x" "" ) |
|
| 106aac2 by Daniel Winter at 2008-06-12 | 93 | |
| 91f340a by Jeff Mitchell at 2009-03-12 | 94 | find_package(Loudmouth) |
| 731eb63 by Henry de Valence at 2009-03-14 | 95 | macro_log_feature( LOUDMOUTH_FOUND "loudmouth" "Loudmouth is the communication backend needed by mp3tunes for syncing." "http://www.loudmouth-project.org" FALSE "" "" ) |
| d6599e1 by Jeff Mitchell at 2009-03-11 | 96 | |
| 97 | include(CheckQtGlib) |
|
| 98 | macro_log_feature(QT4_GLIB_SUPPORT "Qt4 Glib support" "Qt4 must be compiled with glib support for mp3tunes" "http://www.trolltech.com" FALSE "" "") |
|
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 99 | endif( WITH_MP3Tunes ) |
| f101e55 by Leo Franchi at 2008-10-30 | 100 | |
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 101 | if( WITH_Ipod OR WITH_MP3Tunes ) |
| 91f340a by Jeff Mitchell at 2009-03-12 | 102 | find_package(GLIB2) |
| 103 | macro_log_feature( GLIB2_FOUND "glib2" "Required by libgpod and mp3tunes" "http://www.gtk.org" FALSE "2.x" "") |
|
| 60a24d9 by Jeff Mitchell at 2009-05-16 | 104 | endif( WITH_Ipod OR WITH_MP3Tunes ) |
| 91f340a by Jeff Mitchell at 2009-03-12 | 105 | |
| ece30c0 by Jeff Mitchell at 2009-03-12 | 106 | #These two are currently unused |
| 107 | #macro_optional_find_package(Soprano) |
|
| 108 | #macro_log_feature( Soprano_FOUND "soprano" "Soprano is a RDF framework required by Nepomuk Collection" "http://soprano.sourceforge.net" FALSE "2.1.0" "") |
|
| 109 | #macro_optional_find_package(Nepomuk) |
|
| 110 | #macro_log_feature( NEPOMUK_FOUND "nepomuk" "Nepomuk Libraries required by Nepomuk Collection (part of kdelibs)" "http://www.kde.org" FALSE "4.1" "") |
|
| 9d9fb43 by David Faure at 2007-03-21 | 111 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 112 | macro_bool_to_01(LIBVISUAL_FOUND HAVE_LIBVISUAL) |
| 9d9fb43 by David Faure at 2007-03-21 | 113 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 114 | include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${TAGLIB_INCLUDES}) |
| def96dc by Ian Monroe at 2007-02-02 | 115 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 116 | add_subdirectory( src ) |
| 117 | add_subdirectory( tests ) |
|
| 106aac2 by Daniel Winter at 2008-06-12 | 118 | |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 119 | macro_display_feature_log() |
| 120 | ||
| 70145a6 by Jeff Mitchell at 2009-04-21 | 121 | #Do not remove or modify these. The release script substitutes in for these |
| 122 | #comments with appropriate doc and translation directories. |
|
| 123 | #PO_SUBDIR |
|
| 12b6c00 by Jeff Mitchell at 2009-04-21 | 124 | #DOC_SUBDIR |
| 70145a6 by Jeff Mitchell at 2009-04-21 | 125 | |
| df770b6 by Ian Monroe at 2009-05-05 | 126 | add_executable( bindingstest cmake/modules/QtScriptBindingsTest.cpp ) |
| 127 | target_link_libraries( bindingstest ${QT_QTSCRIPT_LIBRARY} ${KDE4_KDEUI_LIBS} ) |
|
| 128 | ||
| 3bfec67 by Jeff Mitchell at 2009-03-11 | 129 | else( WITH_PLAYER ) |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 130 | |
| 131 | find_package( Qt4 REQUIRED ) |
|
| 132 | add_definitions(${QT_DEFINITIONS}) |
|
| 133 | include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${TAGLIB_INCLUDES}) |
|
| 134 | ||
| 3bfec67 by Jeff Mitchell at 2009-03-11 | 135 | endif( WITH_PLAYER ) |
| b2607f7 by Jeff Mitchell at 2009-03-11 | 136 | |
| 137 | if( WITH_UTILITIES ) |
|
| 138 | set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE) |
|
| 139 | set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The subdirectory to the binaries prefix (default prefix/bin)" FORCE) |
|
| 140 | add_subdirectory( utilities ) |
|
| 141 | endif( WITH_UTILITIES ) |
|
| 106aac2 by Daniel Winter at 2008-06-12 | 142 | |
| 143 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") |
|
| 144 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") |
|
| 145 |

