mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Do cmake-options the right way
This commit is contained in:
@@ -2,6 +2,7 @@ PROJECT( tomahawk )
|
|||||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.6 )
|
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.6 )
|
||||||
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||||
CMAKE_POLICY(SET CMP0017 NEW)
|
CMAKE_POLICY(SET CMP0017 NEW)
|
||||||
|
INCLUDE(CMakeDependentOption)
|
||||||
|
|
||||||
###
|
###
|
||||||
### Tomahawk application info
|
### Tomahawk application info
|
||||||
@@ -44,10 +45,13 @@ option(WITH_BREAKPAD "Build with breakpad integration" ON)
|
|||||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
|
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
|
||||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
||||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||||
option(WITH_UPOWER "Build with support for UPower events" OFF)
|
|
||||||
option(WITH_GNOMESHORTCUTHANDLER "Build with shortcut handler for GNOME" OFF)
|
|
||||||
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
|
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
|
||||||
|
|
||||||
|
CMAKE_DEPENDENT_OPTION(WITH_UPOWER "Build with support for UPower events" ON
|
||||||
|
"UNIX;NOT APPLE" OFF)
|
||||||
|
CMAKE_DEPENDENT_OPTION(WITH_GNOMESHORTCUTHANDLER "Build with shortcut handler for GNOME" ON
|
||||||
|
"UNIX;NOT APPLE" OFF)
|
||||||
|
|
||||||
IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
|
IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
|
||||||
message(STATUS "Build of breakpad library disabled on this platform.")
|
message(STATUS "Build of breakpad library disabled on this platform.")
|
||||||
SET(WITH_BREAKPAD OFF)
|
SET(WITH_BREAKPAD OFF)
|
||||||
@@ -118,8 +122,10 @@ if( NOT BUILD_WITH_QT4 )
|
|||||||
find_package(Qt5Widgets QUIET)
|
find_package(Qt5Widgets QUIET)
|
||||||
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
||||||
|
|
||||||
# We need this to find the paths to qdbusxml2cpp and co
|
if( UNIX AND NOT APPLE )
|
||||||
find_package(Qt5DBus REQUIRED)
|
# We need this to find the paths to qdbusxml2cpp and co
|
||||||
|
find_package(Qt5DBus REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
macro(qt_wrap_ui)
|
macro(qt_wrap_ui)
|
||||||
qt5_wrap_ui(${ARGN})
|
qt5_wrap_ui(${ARGN})
|
||||||
@@ -213,11 +219,6 @@ if( BUILD_GUI AND UNIX AND NOT APPLE )
|
|||||||
find_package( X11 )
|
find_package( X11 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF( UNIX AND NOT APPLE AND QT_QTDBUS_FOUND )
|
|
||||||
SET( WITH_UPOWER ON )
|
|
||||||
SET( WITH_GNOMESHORTCUTHANDLER ON )
|
|
||||||
ENDIF( UNIX AND NOT APPLE AND QT_QTDBUS_FOUND )
|
|
||||||
|
|
||||||
macro_optional_find_package(Echonest 2.1.0)
|
macro_optional_find_package(Echonest 2.1.0)
|
||||||
macro_log_feature(ECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 2.1.0 is needed for dynamic playlists and the infosystem")
|
macro_log_feature(ECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 2.1.0 is needed for dynamic playlists and the infosystem")
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ FOREACH( _file ${_icons} )
|
|||||||
ENDFOREACH( _file )
|
ENDFOREACH( _file )
|
||||||
|
|
||||||
IF( WITH_UPOWER )
|
IF( WITH_UPOWER )
|
||||||
qt4_add_dbus_interface(tomahawkSources "${CMAKE_CURRENT_SOURCE_DIR}/linux/org.freedesktop.UPower.xml" "UPowerProxy")
|
qt_add_dbus_interface(tomahawkSources "${CMAKE_CURRENT_SOURCE_DIR}/linux/org.freedesktop.UPower.xml" "UPowerProxy")
|
||||||
SET( tomahawkSources ${tomahawkSources} linux/UPowerHandler.cpp )
|
SET( tomahawkSources ${tomahawkSources} linux/UPowerHandler.cpp )
|
||||||
ENDIF( WITH_UPOWER )
|
ENDIF( WITH_UPOWER )
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user