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 <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-11-25 11:07:35 +01:00
parent 7874d61998
commit eaa93e8631
2 changed files with 8 additions and 0 deletions

View File

@@ -35,6 +35,8 @@
#if defined(CPPTOOLS_LIBRARY) #if defined(CPPTOOLS_LIBRARY)
# define CPPTOOLS_EXPORT Q_DECL_EXPORT # define CPPTOOLS_EXPORT Q_DECL_EXPORT
#elif defined(CPPTOOLS_STATIC_LIBRARY)
# define CPPTOOLS_EXPORT
#else #else
# define CPPTOOLS_EXPORT Q_DECL_IMPORT # define CPPTOOLS_EXPORT Q_DECL_IMPORT
#endif #endif

View File

@@ -1,3 +1,9 @@
contains(CONFIG, dll) {
DEFINES += CPPTOOLS_LIBRARY
} else {
DEFINES += CPPTOOLS_STATIC_LIBRARY
}
HEADERS += $$PWD/senddocumenttracker.h HEADERS += $$PWD/senddocumenttracker.h
SOURCES += $$PWD/senddocumenttracker.cpp SOURCES += $$PWD/senddocumenttracker.cpp