summaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-03-19 20:12:27 +0400
committerAlexander Gavrilov2012-03-19 20:12:27 +0400
commitdbbd9acfad8d5994f321840e3d695fe8a67ac315 (patch)
tree77d31425a26f6e4afd8a3b0c1a029c5ca78a9add /depends
parent296d3a0af306a5247048ed4f38b2bc72eb582d89 (diff)
downloaddfhack-dbbd9acfad8d5994f321840e3d695fe8a67ac315.tar.gz
dfhack-dbbd9acfad8d5994f321840e3d695fe8a67ac315.tar.bz2
dfhack-dbbd9acfad8d5994f321840e3d695fe8a67ac315.tar.xz
Export the type tree with enum keys to lua.
Diffstat (limited to 'depends')
-rw-r--r--depends/lua/CMakeLists.txt7
-rw-r--r--depends/lua/include/luaconf.h15
2 files changed, 18 insertions, 4 deletions
diff --git a/depends/lua/CMakeLists.txt b/depends/lua/CMakeLists.txt
index b135f221..6a97bd43 100644
--- a/depends/lua/CMakeLists.txt
+++ b/depends/lua/CMakeLists.txt
@@ -76,8 +76,13 @@ src/lzio.c
)
LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA})
-ADD_LIBRARY ( lua STATIC EXCLUDE_FROM_ALL ${SRC_LIBLUA} )
+ADD_LIBRARY ( lua SHARED EXCLUDE_FROM_ALL ${SRC_LIBLUA} )
TARGET_LINK_LIBRARIES ( lua ${LIBS})
+
+install(TARGETS lua
+ LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION}
+ RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION})
+
IDE_FOLDER(lua "Depends")
#SET ( SRC_LUA src/lua.c )
diff --git a/depends/lua/include/luaconf.h b/depends/lua/include/luaconf.h
index 66079335..b202967b 100644
--- a/depends/lua/include/luaconf.h
+++ b/depends/lua/include/luaconf.h
@@ -151,11 +151,20 @@
** the libraries, you may want to use the following definition (define
** LUA_BUILD_AS_DLL to get it).
*/
+#ifdef __cplusplus
+ #define LUA_API_EXTERN extern "C"
+#else
+ #define LUA_API_EXTERN extern
+#endif
#if defined(LUA_BUILD_AS_DLL)
- #if defined(LUA_CORE) || defined(LUA_LIB)
- #define LUA_API __declspec(dllexport)
+ #if defined(_MSC_VER)
+ #if defined(LUA_CORE) || defined(LUA_LIB)
+ #define LUA_API __declspec(dllexport) LUA_API_EXTERN
+ #else
+ #define LUA_API __declspec(dllimport) LUA_API_EXTERN
+ #endif
#else
- #define LUA_API __declspec(dllimport)
+ #define LUA_API LUA_API_EXTERN __attribute__ ((visibility("default")))
#endif
#else
#ifdef __cplusplus