diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-16 19:37:46 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-16 19:37:46 +0100 |
commit | 3373daca2675617117ac60abb7dd3f6511916d2c (patch) | |
tree | 6339eb1d6f6682869dd96e46e392b43dfbe6209c /src/CMakeLists.txt | |
parent | OBSOLETE'd obsolete functions (diff) | |
parent | Merge pull request #548 from worktycho/documention (diff) | |
download | cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar.gz cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar.bz2 cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar.lz cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar.xz cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.tar.zst cuberite-3373daca2675617117ac60abb7dd3f6511916d2c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 9 insertions, 7 deletions
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 |