CMake: Lua DLL is built in the correct folder.
Also removed SCL warnings from MSVC builds.
This commit is contained in:
parent
118b7a121b
commit
caea934d37
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user