diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lua/CMakeLists.txt | 31 | ||||
-rw-r--r-- | lib/zlib/CMakeLists.txt | 8 | ||||
-rw-r--r-- | lib/zlib/example.c.txt (renamed from lib/zlib/example.c) | 0 | ||||
-rw-r--r-- | lib/zlib/minigzip.c.txt (renamed from lib/zlib/minigzip.c) | 0 |
4 files changed, 38 insertions, 1 deletions
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index af03f4b1a..4babae9b2 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.2) project (lua) include_directories ("${PROJECT_SOURCE_DIR}/../../src/") @@ -21,6 +21,34 @@ 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) + + # Output the executable into the $/MCServer folder, so that MCServer can find it: + set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/MCServer) + SET_TARGET_PROPERTIES(lua PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/MCServer + ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/MCServer + ARCHIVE_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/MCServer + ARCHIVE_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/MCServer + LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/MCServer + LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/MCServer + LIBRARY_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/MCServer + LIBRARY_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/MCServer + RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/MCServer + RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/MCServer + RUNTIME_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/MCServer + RUNTIME_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/MCServer + ) + + if (MSVC) + # Remove SCL warnings, we expect this library to have been tested safe + SET_TARGET_PROPERTIES( + lua PROPERTIES COMPILE_FLAGS "-D_CRT_SECURE_NO_WARNINGS" + ) + endif() + + # NOTE: The DLL for each configuration is stored at the same place, thus overwriting each other. + # This is known, however such behavior is needed for LuaRocks - they always load "lua.dll" else() add_library(lua ${SOURCE}) endif() @@ -33,3 +61,4 @@ endif() if (UNIX) target_link_libraries(lua m ${DYNAMIC_LOADER}) endif() + diff --git a/lib/zlib/CMakeLists.txt b/lib/zlib/CMakeLists.txt index fe6dba6ae..b1b74031d 100644 --- a/lib/zlib/CMakeLists.txt +++ b/lib/zlib/CMakeLists.txt @@ -9,3 +9,11 @@ file(GLOB SOURCE ) add_library(zlib ${SOURCE}) + +if (MSVC) + # Remove SCL warnings, we expect this library to have been tested safe + SET_TARGET_PROPERTIES( + zlib PROPERTIES COMPILE_FLAGS "-D_CRT_SECURE_NO_WARNINGS" + ) +endif() + diff --git a/lib/zlib/example.c b/lib/zlib/example.c.txt index f515a4853..f515a4853 100644 --- a/lib/zlib/example.c +++ b/lib/zlib/example.c.txt diff --git a/lib/zlib/minigzip.c b/lib/zlib/minigzip.c.txt index aa7ac7a04..aa7ac7a04 100644 --- a/lib/zlib/minigzip.c +++ b/lib/zlib/minigzip.c.txt |