1 SET(TAGLIB_MINIMUM_VERSION 1.5)
2 ############################################################
3 # You probably don't want to edit anything below this line #
4 ############################################################
5 # See the CMakeLists.txt in src/, src/core, src/plugins
8 # Stop cmake 2.6 from whining
9 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
10 IF(COMMAND cmake_policy)
11 CMAKE_POLICY(SET CMP0003 NEW)
12 ENDIF(COMMAND cmake_policy)
13 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
15 ADD_DEFINITIONS(-DQT_STATICPLUGIN)
18 CONFIGURE_FILE(Doxyfile.cmake Doxyfile)
19 ADD_CUSTOM_TARGET(doc doxygen)
20 ADD_CUSTOM_TARGET(pdfdoc gmake DEPENDS doc WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/latex)
23 FIND_PACKAGE( Qt4 REQUIRED )
25 SET( QT_USE_QTNETWORK TRUE )
26 SET( QT_USE_QTOPENGL TRUE ) # dependency of phonon
27 SET( QT_USE_QTSQL TRUE )
28 SET( QT_USE_QTMAIN TRUE )
29 SET( QT_USE_QTDBUS TRUE )
30 SET( QT_USE_QTSVG TRUE )
32 # Include the cmake file needed to use qt4
33 INCLUDE( ${QT_USE_FILE} )
36 FIND_LIBRARY( PHONON_LIBRARY phonon REQUIRED PATHS "${QT_LIBRARY_DIR}" )
37 FIND_PATH( PHONON_INCLUDE_DIR phonon/mediaobject.h PATHS "${QT_INCLUDE_DIR}" )
38 INCLUDE_DIRECTORIES( ${PHONON_INCLUDE_DIR} )
40 # Make it so the compiler can find generated files
41 INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
42 INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/include/ )
45 OPTION(HAVE_TAGLIB_ASF "Mark as ON if your TagLib has ASF support" OFF)
46 FIND_LIBRARY( TAGLIB_LIBRARY tag REQUIRED )
49 FIND_FILE( TAGLIB_CONFIG NAMES taglib-config taglib-config.exe DOC "Path to taglib-config binary" )
50 EXECUTE_PROCESS(COMMAND ${TAGLIB_CONFIG} --version OUTPUT_VARIABLE TAGLIB_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE )
51 IF(${TAGLIB_VERSION} EQUAL ${TAGLIB_MINIMUM_VERSION} OR ${TAGLIB_VERSION} GREATER ${TAGLIB_MINIMUM_VERSION})
52 FIND_PATH( TAGLIB_INCLUDE_DIR taglib/tag.h )
53 INCLUDE_DIRECTORIES( ${TAGLIB_INCLUDE_DIR}/taglib/.. ${TAGLIB_INCLUDE_DIR}/taglib )
54 MESSAGE(STATUS "Found taglib version ${TAGLIB_VERSION}")
55 ELSE(${TAGLIB_VERSION} EQUAL ${TAGLIB_MINIMUM_VERSION} OR ${TAGLIB_VERSION} GREATER ${TAGLIB_MINIMUM_VERSION})
56 MESSAGE(FATAL_ERROR "Found taglib version ${TAGLIB_VERSION}, but at least version ${TAGLIB_MINIMUM_VERSION} is required.")
57 ENDIF(${TAGLIB_VERSION} EQUAL ${TAGLIB_MINIMUM_VERSION} OR ${TAGLIB_VERSION} GREATER ${TAGLIB_MINIMUM_VERSION})
59 # Add include directories
60 INCLUDE_DIRECTORIES("include")
62 # If building for release, don't include QDebug stuff
63 IF("x${CMAKE_BUILD_TYPE}" STREQUAL "x")
64 SET(CMAKE_BUILD_TYPE "Release")
66 IF("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
67 ADD_DEFINITIONS("-DQT_NO_DEBUG_OUTPUT -DQT_NODEBUG -DQT_NO_DEBUG")
68 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
78 ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
84 ${CMAKE_INSTALL_PREFIX}/share/applications
87 ADD_SUBDIRECTORY(include)