diff options
author | madmaxoft <github@xoft.cz> | 2014-01-16 18:33:28 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-16 18:33:28 +0100 |
commit | dab37db5627fce29b260a09483e3c2d7f29b2456 (patch) | |
tree | aedfc73d0b799ace495586ffe14327d69ebfad5b | |
parent | Added packet diagnostics to 1.7 protocol. (diff) | |
download | cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar.gz cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar.bz2 cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar.lz cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar.xz cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.tar.zst cuberite-dab37db5627fce29b260a09483e3c2d7f29b2456.zip |
Diffstat (limited to '')
-rw-r--r-- | lib/lua/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/CMakeLists.txt | 16 |
2 files changed, 19 insertions, 11 deletions
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" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c031173b..b3af6aedd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.2) project (MCServer) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") @@ -88,13 +88,15 @@ set(EXECUTABLE MCServer) add_executable(${EXECUTABLE} ${SOURCE}) -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/MCServer) -if (MSVC) - # MSVC generator adds a "Debug" or "Release" postfixes to the EXECUTABLE_OUTPUT_PATH, we need to cancel them: - SET_TARGET_PROPERTIES(${EXECUTABLE} PROPERTIES PREFIX "../") - SET_TARGET_PROPERTIES(${EXECUTABLE} PROPERTIES IMPORT_PREFIX "../") -endif() +# Output the executable into the $/MCServer folder, so that it has access to external resources: +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 +) # Make the debug executable have a "_debug" suffix |