<div dir="ltr">Hi<div><br></div><div>I am rather confused about how to specify the output directory. I am working on Windows with the Ninja generator and Microsoft toolset. My default build type is Debug.  I am building a library and an executable:</div><div><br></div><div>add_subdirectory(../Kernel Kernel)<br></div><div>add_executable(MyExe ../Kernel/main.cpp)<br></div><div><br></div><div>The resulting directory structure, after a build, is:</div><div><br></div><div>Kernel       <== source files</div><div>    |--CMakeLists.txt</div><div>CMake<br></div><div>    |--CMakeLists.txt</div><div>    |-- build_msvc</div><div>            |--Kernel          <== library goes here</div><div>            |--debug          <==  exe goes here</div><div><br></div><div>I want the Kernel library to go into the 'debug' folder (where the exe is correctly being put).</div><div><br></div>$CMAKE_RUNTIME_OUTPUT_DIRECTORY and  $RUNTIME_OUTPUT_DIRECTORY are undefined.<div><br></div><div><div>How would I achieve this?</div><div><br></div><div>Which variable holds the exe output path: build_msvc/debug?</div><div><br></div><div>Best regards</div><div>David</div><div><br></div></div></div>