Setting location for Debug and Release output file in CMake(Visual Studio)
I am using other library's source code and it uses CMake in creating project. Thus I am using CMake in generating Visual Studio Project. I would like to change the location of release and debug output file from default which are in the project folder itsel开发者_开发问答f.
How can I change that? What command do I have to append to CMake file?
You can set the location of binary file output with the EXECUTABLE_OUTPUT_PATH
variable. It's default is the value of CMAKE_CURRENT_BINARY_DIR
.
EXECUTABLE_OUTPUT_PATH
set this variable to specify a common place where CMake should put all executable files (instead of CMAKE_CURRENT_BINARY_DIR)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
精彩评论