From eaa93e86317eed6a325bd5196b317281a3a4f52b Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 25 Nov 2015 11:07:35 +0100 Subject: [PATCH] CppTools: Enable not exporting symbols Having a dllexport in the sources for a TEMPLATE=app project (e.g. unittest.pro) will create a library on Windows, which is not needed. Change-Id: I0d454cdb7e3eb862200766ea101d41cef2758986 Reviewed-by: Marco Bubke --- src/plugins/cpptools/cpptools_global.h | 2 ++ src/plugins/cpptools/cpptoolsunittestfiles.pri | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/plugins/cpptools/cpptools_global.h b/src/plugins/cpptools/cpptools_global.h index 57b5dbab707..b30e9e29190 100644 --- a/src/plugins/cpptools/cpptools_global.h +++ b/src/plugins/cpptools/cpptools_global.h @@ -35,6 +35,8 @@ #if defined(CPPTOOLS_LIBRARY) # define CPPTOOLS_EXPORT Q_DECL_EXPORT +#elif defined(CPPTOOLS_STATIC_LIBRARY) +# define CPPTOOLS_EXPORT #else # define CPPTOOLS_EXPORT Q_DECL_IMPORT #endif diff --git a/src/plugins/cpptools/cpptoolsunittestfiles.pri b/src/plugins/cpptools/cpptoolsunittestfiles.pri index 6e0ab0d990c..2d011718e66 100644 --- a/src/plugins/cpptools/cpptoolsunittestfiles.pri +++ b/src/plugins/cpptools/cpptoolsunittestfiles.pri @@ -1,3 +1,9 @@ +contains(CONFIG, dll) { + DEFINES += CPPTOOLS_LIBRARY +} else { + DEFINES += CPPTOOLS_STATIC_LIBRARY +} + HEADERS += $$PWD/senddocumenttracker.h SOURCES += $$PWD/senddocumenttracker.cpp