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