NOISSUE fix librainbow

This commit is contained in:
Mrazek, Petr 2015-08-20 15:27:51 +02:00
parent cc4d0a0a8e
commit e5f7676622
2 changed files with 11 additions and 6 deletions

View File

@ -13,8 +13,9 @@ include/rainbow.h
src/rainbow.cpp src/rainbow.cpp
) )
add_definitions(-DRAINBOW_LIBRARY) #add_definitions(-DRAINBOW_LIBRARY)
add_definitions(-DRAINBOW_STATIC)
set(RAINBOW_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE) set(RAINBOW_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
add_library(rainbow SHARED ${RAINBOW_SOURCES}) add_library(rainbow STATIC ${RAINBOW_SOURCES})
qt5_use_modules(rainbow Core Gui) qt5_use_modules(rainbow Core Gui)

View File

@ -15,8 +15,12 @@
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#ifdef RAINBOW_LIBRARY #ifdef RAINBOW_STATIC
#define RAINBOW_EXPORT Q_DECL_EXPORT #define RAINBOW_EXPORT
#else #else
#define RAINBOW_EXPORT Q_DECL_IMPORT #ifdef RAINBOW_LIBRARY
#endif #define RAINBOW_EXPORT Q_DECL_EXPORT
#else
#define RAINBOW_EXPORT Q_DECL_IMPORT
#endif
#endif