1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fix exporting QtSingleApplication

This commit is contained in:
David Rosca 2018-02-25 22:26:37 +01:00
parent 5e1635bffa
commit 6dff236e07
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 3 additions and 22 deletions

View File

@ -49,25 +49,11 @@
#include <QApplication> #include <QApplication>
#include "qzcommon.h"
class QtLocalPeer; class QtLocalPeer;
#if defined(Q_OS_WIN) class FALKON_EXPORT QtSingleApplication : public QApplication
# if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT)
# define QT_QTSINGLEAPPLICATION_EXPORT
# elif defined(QT_QTSINGLEAPPLICATION_IMPORT)
# if defined(QT_QTSINGLEAPPLICATION_EXPORT)
# undef QT_QTSINGLEAPPLICATION_EXPORT
# endif
# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport)
# elif defined(QT_QTSINGLEAPPLICATION_EXPORT)
# undef QT_QTSINGLEAPPLICATION_EXPORT
# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport)
# endif
#else
# define QT_QTSINGLEAPPLICATION_EXPORT
#endif
class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication
{ {
Q_OBJECT Q_OBJECT

View File

@ -3,15 +3,10 @@ add_definitions(-DFALKON_SHAREDLIBRARY)
set(CMAKE_CXX_STANDARD 14) # Enable C++14, with cmake >= 3.1 set(CMAKE_CXX_STANDARD 14) # Enable C++14, with cmake >= 3.1
set(CMAKE_CXX_EXTENSIONS OFF) # Don't enable gcc-specific extensions set(CMAKE_CXX_EXTENSIONS OFF) # Don't enable gcc-specific extensions
if (WIN32)
add_definitions(-DQT_QTSINGLEAPPLICATION_EXPORT=)
endif()
set(SRCS set(SRCS
3rdparty/qtsingleapplication/qtsingleapplication.cpp 3rdparty/qtsingleapplication/qtsingleapplication.cpp
3rdparty/qtsingleapplication/qtlocalpeer.cpp 3rdparty/qtsingleapplication/qtlocalpeer.cpp
) )
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication)
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(SRCS ${SRCS} ${CMAKE_SOURCE_DIR}/tests/modeltest/modeltest.cpp) set(SRCS ${SRCS} ${CMAKE_SOURCE_DIR}/tests/modeltest/modeltest.cpp)