mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Compile kdsingleapplicationguard as separate lib
This commit is contained in:
parent
fcf57ee535
commit
3257d2fbd5
@ -370,11 +370,6 @@ list(APPEND libSources
|
||||
utils/WeakObjectHash.cpp
|
||||
utils/WeakObjectList.cpp
|
||||
utils/PluginLoader.cpp
|
||||
|
||||
thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
||||
thirdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
||||
thirdparty/kdsingleapplicationguard/kdtoolsglobal.cpp
|
||||
thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
||||
)
|
||||
|
||||
add_subdirectory( accounts/configstorage )
|
||||
|
@ -97,6 +97,7 @@ INCLUDE_DIRECTORIES(
|
||||
mac
|
||||
|
||||
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
|
||||
${THIRDPARTY_DIR}/kdsingleapplicationguard/
|
||||
|
||||
${TAGLIB_INCLUDES}
|
||||
${LIBATTICA_INCLUDE_DIR}
|
||||
@ -178,6 +179,7 @@ IF( WITH_CRASHREPORTER )
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES( tomahawk_bin
|
||||
kdsingleapplicationguard
|
||||
${LINK_LIBRARIES}
|
||||
${TOMAHAWK_WIDGETS_LIBRARIES}
|
||||
${TOMAHAWK_PLAYDARAPI_LIBRARIES}
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "Typedefs.h"
|
||||
#include "libtomahawk-playdarapi/PlaydarApi.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||
#include "kdsingleapplicationguard.h"
|
||||
|
||||
#include "HeadlessCheck.h"
|
||||
#include "config.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "TomahawkApp.h"
|
||||
|
||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||
#include "kdsingleapplicationguard.h"
|
||||
#include "UbuntuUnityHack.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
|
1
thirdparty/CMakeLists.txt
vendored
1
thirdparty/CMakeLists.txt
vendored
@ -1,4 +1,5 @@
|
||||
ADD_SUBDIRECTORY( qxt )
|
||||
ADD_SUBDIRECTORY( kdsingleapplicationguard )
|
||||
IF( WITH_CRASHREPORTER )
|
||||
ADD_SUBDIRECTORY( libcrashreporter-qt )
|
||||
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__
|
||||
#define __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
#ifndef QT_NO_SHAREDMEMORY
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QStringList>
|
||||
#include <QMetaType>
|
||||
|
||||
#include "pimpl_ptr.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
template <typename T> class QVector;
|
||||
class QCoreApplication;
|
||||
|
||||
class DLLEXPORT KDSingleApplicationGuard : public QObject
|
||||
class KDSingleApplicationGuard : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS( Policy )
|
||||
@ -78,7 +77,7 @@ private:
|
||||
kdtools::pimpl_ptr< Private > d;
|
||||
};
|
||||
|
||||
class DLLEXPORT KDSingleApplicationGuard::Instance {
|
||||
class KDSingleApplicationGuard::Instance {
|
||||
friend class ::KDSingleApplicationGuard;
|
||||
friend class ::KDSingleApplicationGuard::Private;
|
||||
Instance( const QStringList &, bool, qint64 );
|
Loading…
x
Reference in New Issue
Block a user