Assuming that the person building the targets will use the appropiate generator (see CMake Multiarchitecture Compilation ),
How can I specify the output directory accordingly.
Something like:
if(WIN32)
if(64bit)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ./DEBUG/win64)
elseif(32bit)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ./DEBUG/win32)
endif()
endif()
and so on for if(UNIX)
and if(APPLE)
which probably the same answer will work given CMake phylosophy.
Note that I'm not talking about cross-compiling. And assuming the generator is known.