From 74d0e57ce056020acdbf98b453c1331649cc3606 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 27 Aug 2018 02:09:14 +0200 Subject: [PATCH] fix for static build --- src/luaengine/luaengine.pro | 1 + src/luaengine/luaengine/LuaEngine_global.h | 4 ++++ src/luaenginegui/luaengine/LuaEngineGui_global.h | 4 ++++ src/luaenginegui/luaenginegui.pro | 1 + 4 files changed, 10 insertions(+) diff --git a/src/luaengine/luaengine.pro b/src/luaengine/luaengine.pro index 83e31aa..ca1a7d9 100644 --- a/src/luaengine/luaengine.pro +++ b/src/luaengine/luaengine.pro @@ -24,6 +24,7 @@ TEMPLATE = lib DEFINES += LUAENGINE_LIBRARY DEFINES += LUA_COMPAT_5_2 shared: win32: DEFINES += LUA_BUILD_AS_DLL +static: DEFINES += LUAENGINE_STATIC linux: DEFINES += LUA_USE_LINUX linux: LIBS += -Wl,-E -ldl -lreadline diff --git a/src/luaengine/luaengine/LuaEngine_global.h b/src/luaengine/luaengine/LuaEngine_global.h index f058112..02d8c98 100644 --- a/src/luaengine/luaengine/LuaEngine_global.h +++ b/src/luaengine/luaengine/LuaEngine_global.h @@ -20,10 +20,14 @@ #include +#ifndef LUAENGINE_STATIC #ifdef LUAENGINE_LIBRARY #define LUAENGINESHARED_EXPORT Q_DECL_EXPORT #else #define LUAENGINESHARED_EXPORT Q_DECL_IMPORT #endif +#else +#define LUAENGINESHARED_EXPORT +#endif #endif // LUAENGINE_GLOBAL_H diff --git a/src/luaenginegui/luaengine/LuaEngineGui_global.h b/src/luaenginegui/luaengine/LuaEngineGui_global.h index cb72404..08dab34 100644 --- a/src/luaenginegui/luaengine/LuaEngineGui_global.h +++ b/src/luaenginegui/luaengine/LuaEngineGui_global.h @@ -20,10 +20,14 @@ #include +#ifndef LUAENGINEGUI_STATIC #ifdef LUAENGINEGUI_LIBRARY #define LUAENGINEGUISHARED_EXPORT Q_DECL_EXPORT #else #define LUAENGINEGUISHARED_EXPORT Q_DECL_IMPORT #endif +#else +#define LUAENGINEGUISHARED_EXPORT +#endif #endif // LUAENGINEGUI_GLOBAL_H diff --git a/src/luaenginegui/luaenginegui.pro b/src/luaenginegui/luaenginegui.pro index 9d97556..a3a8950 100644 --- a/src/luaenginegui/luaenginegui.pro +++ b/src/luaenginegui/luaenginegui.pro @@ -22,6 +22,7 @@ TARGET = luaenginegui TEMPLATE = lib DEFINES += LUAENGINEGUI_LIBRARY +static: DEFINES += LUAENGINEGUI_STATIC CONFIG(debug, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/debug -lluaengine CONFIG(release, debug|release): win32: LIBS += -L$$OUT_PWD/../luaengine/release -lluaengine