diff options
author | madmaxoft <github@xoft.cz> | 2014-01-13 10:59:37 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-13 10:59:37 +0100 |
commit | caea934d37e65ef53a466fcb3e3ac888c53ae7bf (patch) | |
tree | a9494f32243ad048c0391203c25b928287a80b5f /lib/lua | |
parent | Moved the win resources into a separate subfolder. (diff) | |
download | cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar.gz cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar.bz2 cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar.lz cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar.xz cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.tar.zst cuberite-caea934d37e65ef53a466fcb3e3ac888c53ae7bf.zip |
Diffstat (limited to '')
-rw-r--r-- | lib/lua/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index af03f4b1a..4a77578dd 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -21,6 +21,16 @@ endif() # Lua needs to be linked dynamically on Windows and statically on *nix, so that LuaRocks work if (WIN32) add_library(lua SHARED ${SOURCE}) + set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/MCServer) + if (MSVC) + # MSVC generator adds a "Debug" or "Release" postfixes to the LIBRARY_OUTPUT_PATH, we need to cancel them: + SET_TARGET_PROPERTIES(lua PROPERTIES PREFIX "../") + SET_TARGET_PROPERTIES(lua PROPERTIES IMPORT_PREFIX "../") + + SET_TARGET_PROPERTIES( + lua PROPERTIES COMPILE_FLAGS "-D_CRT_SECURE_NO_WARNINGS" + ) + endif() else() add_library(lua ${SOURCE}) endif() @@ -33,3 +43,4 @@ endif() if (UNIX) target_link_libraries(lua m ${DYNAMIC_LOADER}) endif() + |