Commit fddd3469 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Adapt the output folders to handle multi config generators

The Visual studio generator is a multi config generator.
This means, that form one project, e.g debug and release can be build.
This caused issues, as the default behaviour is to append the configuration type to the output directory.
Thus, dlls and required files were not copied to the right locations.

By adding the generator expression '$<Config>' to the CMAKE_RUNTIME_OUTPUT_DIRECTORY path,
the default appending behaviour is supressed and every configuration uses its own output folder.
The dlls and required files can then be copied in the correct folder for each configuration.
parent c723d6d5
...@@ -9,9 +9,9 @@ project ( ...@@ -9,9 +9,9 @@ project (
set (CMAKE_DEBUG_POSTFIX "-d") set (CMAKE_DEBUG_POSTFIX "-d")
if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY AND WIN32) if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY AND WIN32)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/bin)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/lib)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/lib)
endif () endif ()
if (CMAKE_GENERATOR MATCHES "Visual Studio") if (CMAKE_GENERATOR MATCHES "Visual Studio")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment