mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Compile kdsingleapplicationguard as separate lib
This commit is contained in:
@@ -370,11 +370,6 @@ list(APPEND libSources
|
|||||||
utils/WeakObjectHash.cpp
|
utils/WeakObjectHash.cpp
|
||||||
utils/WeakObjectList.cpp
|
utils/WeakObjectList.cpp
|
||||||
utils/PluginLoader.cpp
|
utils/PluginLoader.cpp
|
||||||
|
|
||||||
thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
|
||||||
thirdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
|
||||||
thirdparty/kdsingleapplicationguard/kdtoolsglobal.cpp
|
|
||||||
thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory( accounts/configstorage )
|
add_subdirectory( accounts/configstorage )
|
||||||
|
@@ -97,6 +97,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
mac
|
mac
|
||||||
|
|
||||||
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
|
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
|
||||||
|
${THIRDPARTY_DIR}/kdsingleapplicationguard/
|
||||||
|
|
||||||
${TAGLIB_INCLUDES}
|
${TAGLIB_INCLUDES}
|
||||||
${LIBATTICA_INCLUDE_DIR}
|
${LIBATTICA_INCLUDE_DIR}
|
||||||
@@ -178,6 +179,7 @@ IF( WITH_CRASHREPORTER )
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( tomahawk_bin
|
TARGET_LINK_LIBRARIES( tomahawk_bin
|
||||||
|
kdsingleapplicationguard
|
||||||
${LINK_LIBRARIES}
|
${LINK_LIBRARIES}
|
||||||
${TOMAHAWK_WIDGETS_LIBRARIES}
|
${TOMAHAWK_WIDGETS_LIBRARIES}
|
||||||
${TOMAHAWK_PLAYDARAPI_LIBRARIES}
|
${TOMAHAWK_PLAYDARAPI_LIBRARIES}
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include "Typedefs.h"
|
#include "Typedefs.h"
|
||||||
#include "libtomahawk-playdarapi/PlaydarApi.h"
|
#include "libtomahawk-playdarapi/PlaydarApi.h"
|
||||||
#include "utils/TomahawkUtils.h"
|
#include "utils/TomahawkUtils.h"
|
||||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
#include "kdsingleapplicationguard.h"
|
||||||
|
|
||||||
#include "HeadlessCheck.h"
|
#include "HeadlessCheck.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "TomahawkApp.h"
|
#include "TomahawkApp.h"
|
||||||
|
|
||||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
#include "kdsingleapplicationguard.h"
|
||||||
#include "UbuntuUnityHack.h"
|
#include "UbuntuUnityHack.h"
|
||||||
#include "TomahawkSettings.h"
|
#include "TomahawkSettings.h"
|
||||||
#include "utils/TomahawkUtils.h"
|
#include "utils/TomahawkUtils.h"
|
||||||
|
1
thirdparty/CMakeLists.txt
vendored
1
thirdparty/CMakeLists.txt
vendored
@@ -1,4 +1,5 @@
|
|||||||
ADD_SUBDIRECTORY( qxt )
|
ADD_SUBDIRECTORY( qxt )
|
||||||
|
ADD_SUBDIRECTORY( kdsingleapplicationguard )
|
||||||
IF( WITH_CRASHREPORTER )
|
IF( WITH_CRASHREPORTER )
|
||||||
ADD_SUBDIRECTORY( libcrashreporter-qt )
|
ADD_SUBDIRECTORY( libcrashreporter-qt )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
24
thirdparty/kdsingleapplicationguard/CMakeLists.txt
vendored
Normal file
24
thirdparty/kdsingleapplicationguard/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
project(kdsingleapplicationguard)
|
||||||
|
|
||||||
|
list(APPEND kdsingleapplicationguard_INCLUDE_DIRECTORIES
|
||||||
|
${QT_INCLUDES}
|
||||||
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND kdsingleapplicationguard_SOURCES
|
||||||
|
kdsingleapplicationguard.cpp
|
||||||
|
kdsharedmemorylocker.cpp
|
||||||
|
kdtoolsglobal.cpp
|
||||||
|
kdlockedsharedmemorypointer.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(${kdsingleapplicationguard_INCLUDE_DIRECTORIES})
|
||||||
|
add_library(kdsingleapplicationguard STATIC ${kdsingleapplicationguard_SOURCES})
|
||||||
|
set_target_properties(
|
||||||
|
kdsingleapplicationguard
|
||||||
|
PROPERTIES
|
||||||
|
AUTOMOC TRUE
|
||||||
|
)
|
||||||
|
qt5_use_modules(kdsingleapplicationguard Core)
|
@@ -1,22 +1,21 @@
|
|||||||
#ifndef __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
|
#ifndef __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
|
||||||
#define __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
|
#define __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#ifndef QT_NO_SHAREDMEMORY
|
#ifndef QT_NO_SHAREDMEMORY
|
||||||
|
|
||||||
#include <QtCore/QStringList>
|
#include <QStringList>
|
||||||
#include <QtCore/QMetaType>
|
#include <QMetaType>
|
||||||
|
|
||||||
#include "pimpl_ptr.h"
|
#include "pimpl_ptr.h"
|
||||||
#include "DllMacro.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
template <typename T> class QVector;
|
template <typename T> class QVector;
|
||||||
class QCoreApplication;
|
class QCoreApplication;
|
||||||
|
|
||||||
class DLLEXPORT KDSingleApplicationGuard : public QObject
|
class KDSingleApplicationGuard : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS( Policy )
|
Q_ENUMS( Policy )
|
||||||
@@ -78,7 +77,7 @@ private:
|
|||||||
kdtools::pimpl_ptr< Private > d;
|
kdtools::pimpl_ptr< Private > d;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLLEXPORT KDSingleApplicationGuard::Instance {
|
class KDSingleApplicationGuard::Instance {
|
||||||
friend class ::KDSingleApplicationGuard;
|
friend class ::KDSingleApplicationGuard;
|
||||||
friend class ::KDSingleApplicationGuard::Private;
|
friend class ::KDSingleApplicationGuard::Private;
|
||||||
Instance( const QStringList &, bool, qint64 );
|
Instance( const QStringList &, bool, qint64 );
|
Reference in New Issue
Block a user