fix for static build

This commit is contained in:
Syping 2018-08-27 02:09:14 +02:00
parent d8c75c11a2
commit 74d0e57ce0
4 changed files with 10 additions and 0 deletions

View file

@ -24,6 +24,7 @@ TEMPLATE = lib
DEFINES += LUAENGINE_LIBRARY DEFINES += LUAENGINE_LIBRARY
DEFINES += LUA_COMPAT_5_2 DEFINES += LUA_COMPAT_5_2
shared: win32: DEFINES += LUA_BUILD_AS_DLL shared: win32: DEFINES += LUA_BUILD_AS_DLL
static: DEFINES += LUAENGINE_STATIC
linux: DEFINES += LUA_USE_LINUX linux: DEFINES += LUA_USE_LINUX
linux: LIBS += -Wl,-E -ldl -lreadline linux: LIBS += -Wl,-E -ldl -lreadline

View file

@ -20,10 +20,14 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#ifndef LUAENGINE_STATIC
#ifdef LUAENGINE_LIBRARY #ifdef LUAENGINE_LIBRARY
#define LUAENGINESHARED_EXPORT Q_DECL_EXPORT #define LUAENGINESHARED_EXPORT Q_DECL_EXPORT
#else #else
#define LUAENGINESHARED_EXPORT Q_DECL_IMPORT #define LUAENGINESHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#else
#define LUAENGINESHARED_EXPORT
#endif
#endif // LUAENGINE_GLOBAL_H #endif // LUAENGINE_GLOBAL_H

View file

@ -20,10 +20,14 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#ifndef LUAENGINEGUI_STATIC
#ifdef LUAENGINEGUI_LIBRARY #ifdef LUAENGINEGUI_LIBRARY
#define LUAENGINEGUISHARED_EXPORT Q_DECL_EXPORT #define LUAENGINEGUISHARED_EXPORT Q_DECL_EXPORT
#else #else
#define LUAENGINEGUISHARED_EXPORT Q_DECL_IMPORT #define LUAENGINEGUISHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#else
#define LUAENGINEGUISHARED_EXPORT
#endif
#endif // LUAENGINEGUI_GLOBAL_H #endif // LUAENGINEGUI_GLOBAL_H

View file

@ -22,6 +22,7 @@ TARGET = luaenginegui
TEMPLATE = lib TEMPLATE = lib
DEFINES += LUAENGINEGUI_LIBRARY DEFINES += LUAENGINEGUI_LIBRARY
static: DEFINES += LUAENGINEGUI_STATIC
CONFIG(debug, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/debug -lluaengine CONFIG(debug, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/debug -lluaengine
CONFIG(release, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/release -lluaengine CONFIG(release, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/release -lluaengine