I set EXECUTABLE_OUTPUT_PATH
as ${CMAKE_BINARY_DIR}/bin
but the executable is created in ${CMAKE_BINARY_DIR}/bin/Debug
or ${CMAKE_BINARY_DIR}/bin/Release
.
How can I make it put all output under ${CMAKE_BINARY_DIR}/bin
without Debug/Release folders?
Set variable CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG to the directory which will be used "as is" for Debug builds. Similarly, for Release builds variable CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE is used.
While you may set both these variables to the same value, note that executables created for release builds will overwrite ones for debug builds, which is not natural with CMake.
CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE all letter must be capital,i wrote as CMAKE_RUNTIME_OUTPUT_DIRECTORY_Release and it didn't work.so stupid i am
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With