summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/inifile/iniFile.cpp6
-rw-r--r--lib/lua/CMakeLists.txt14
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/inifile/iniFile.cpp b/lib/inifile/iniFile.cpp
index c118eecaa..afa1c110d 100644
--- a/lib/inifile/iniFile.cpp
+++ b/lib/inifile/iniFile.cpp
@@ -446,12 +446,10 @@ bool cIniFile::SetValueF(const AString & a_KeyName, const AString & a_ValueName,
bool cIniFile::SetValueV(const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...)
{
- va_list args, argsCopy;
+ va_list args;
va_start(args, a_Format);
- va_start(argsCopy, a_Format);
AString Data;
- AppendVPrintf(Data, a_Format, args, argsCopy);
- va_end(argsCopy);
+ AppendVPrintf(Data, a_Format, args);
va_end(args);
return SetValue(a_KeyName, a_ValueName, Data);
}
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt
index 9052da194..02c20388d 100644
--- a/lib/lua/CMakeLists.txt
+++ b/lib/lua/CMakeLists.txt
@@ -22,11 +22,17 @@ endif()
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 "../")
+ # Output the executable into the $/MCServer folder, so that MCServer can find it:
+ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/MCServer)
+ SET_TARGET_PROPERTIES(${EXECUTABLE} PROPERTIES
+ 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"