mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
Add proper QtSparkle find module and make it an optional dep
This commit is contained in:
@@ -139,6 +139,11 @@ macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://gith
|
|||||||
macro_optional_find_package(LibLastFm 1.0.0)
|
macro_optional_find_package(LibLastFm 1.0.0)
|
||||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||||
|
|
||||||
|
IF( WIN32 )
|
||||||
|
macro_optional_find_package(QtSparkle)
|
||||||
|
macro_log_feature(QTSPARKLE_FOUND "qtsparkle" "Library for creating auto updaters written in Qt" "https://github.com/davidsansome/qtsparkle" FALSE "" "")
|
||||||
|
ENDIF( WIN32 )
|
||||||
|
|
||||||
#### submodules start
|
#### submodules start
|
||||||
# automatically init submodules here, don't delete this code we may add submodules again
|
# automatically init submodules here, don't delete this code we may add submodules again
|
||||||
|
|
||||||
@@ -181,10 +186,6 @@ ELSE()
|
|||||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF( WIN32 )
|
|
||||||
find_library(QTSPARKLE_LIBRARIES qtsparkle)
|
|
||||||
ENDIF( WIN32 )
|
|
||||||
|
|
||||||
#show dep log
|
#show dep log
|
||||||
macro_display_feature_log()
|
macro_display_feature_log()
|
||||||
|
|
||||||
|
24
CMakeModules/FindQtSparkle.cmake
Normal file
24
CMakeModules/FindQtSparkle.cmake
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# - Find qtsparkle
|
||||||
|
# Find the qtsparkle includes and the qtsparkle libraries
|
||||||
|
# This module defines
|
||||||
|
# QTSPARKLE_INCLUDE_DIR, root qtsparkle include dir. Include qtsparkle includes with qtsparkle/foo.h
|
||||||
|
# QTSPARKLE_LIBRARY, the path to qtsparkle
|
||||||
|
# QTSPARKLE_FOUND, whether qtsparkle was found
|
||||||
|
|
||||||
|
FIND_PATH(QTSPARKLE_INCLUDE_DIR NAMES qtsparkle/Updater
|
||||||
|
HINTS
|
||||||
|
${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
${KDE4_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(QTSPARKLE_LIBRARIES NAMES qtsparkle
|
||||||
|
HINTS
|
||||||
|
${CMAKE_INSTALL_LIBDIR}
|
||||||
|
${KDE4_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QtSparkle
|
||||||
|
REQUIRED_VARS QTSPARKLE_LIBRARIES QTSPARKLE_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(QTSPARKLE_INCLUDE_DIR QTSPARKLE_LIBRARIES)
|
@@ -21,6 +21,7 @@
|
|||||||
#cmakedefine WITH_BREAKPAD
|
#cmakedefine WITH_BREAKPAD
|
||||||
#cmakedefine WITH_CRASHREPORTER
|
#cmakedefine WITH_CRASHREPORTER
|
||||||
#cmakedefine WITH_BINARY_ATTICA
|
#cmakedefine WITH_BINARY_ATTICA
|
||||||
|
#cmakedefine WITH_QtSparkle
|
||||||
|
|
||||||
|
|
||||||
#cmakedefine LIBLASTFM_FOUND
|
#cmakedefine LIBLASTFM_FOUND
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
#include "TomahawkWindow.h"
|
#include "TomahawkWindow.h"
|
||||||
#include "ui_TomahawkWindow.h"
|
#include "ui_TomahawkWindow.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
#include "LoadXSPFDialog.h"
|
#include "LoadXSPFDialog.h"
|
||||||
#include "widgets/ContainedMenuButton.h"
|
#include "widgets/ContainedMenuButton.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined( Q_WS_WIN ) && defined( WITH_QtSparkle )
|
||||||
#include <qtsparkle/Updater>
|
#include <qtsparkle/Updater>
|
||||||
#ifndef THBN_CLICKED
|
#ifndef THBN_CLICKED
|
||||||
#define THBN_CLICKED 0x1800
|
#define THBN_CLICKED 0x1800
|
||||||
@@ -411,7 +413,7 @@ TomahawkWindow::setupUpdateCheck()
|
|||||||
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
|
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
|
||||||
connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ),
|
connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ),
|
||||||
SLOT( checkForUpdates() ) );
|
SLOT( checkForUpdates() ) );
|
||||||
#elif defined( Q_WS_WIN )
|
#elif defined( Q_WS_WIN ) && defined( WITH_QtSparkle )
|
||||||
QUrl updaterUrl;
|
QUrl updaterUrl;
|
||||||
|
|
||||||
if ( qApp->arguments().contains( "--debug" ) )
|
if ( qApp->arguments().contains( "--debug" ) )
|
||||||
|
Reference in New Issue
Block a user