Fix build output paths for Visual Studio generator

The Visual Studio cmake generator creates subdirectories inside
the build path for different build configuration. But this breaks some of our
cmake scripts, like the help tags installer, that assume the targets are
built in that location. Updated CMakeLists.txt to remove extra paths.
This commit is contained in:
Rui Abreu Ferreira 2016-01-09 02:40:57 +00:00 committed by Seth Jackson
parent dd8812c7cb
commit 1ce329e7dd

View File

@ -332,9 +332,16 @@ endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
# Place targets in bin/ or lib/ for all build configurations
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CFGNAME} CFGNAME)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
endforeach()
# Find Lua interpreter
include(LuaHelpers)