[CMake] how to place all executables in /build/bin directory

Arvind Rao arvind.sbia at gmail.com
Tue Mar 22 18:12:36 EDT 2011


Hi All,

I have what should be a simple issue. I have successfully built a project
using CMAKE(out of source build). The executables are all placed in the
Project/build/Exec. But I want them placed in Project/build/bin/ instead.
Toward this end, I set the EXECUTABLE_OUTPUT_PATH, in the top-level
CMakeList file, like so:

cmake_minimum_required(VERSION 2.6)
project(EXAMPLE)

set(CMAKE_CXX_FLAGS "-Wall")
add_subdirectory(Exec)

set( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )

The result is that the executables are all placed in /Project/build/Exec,
whether Project/build/bin exists or not. Does anyone have ideas?

Best wishes,
Arvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110322/f9abb087/attachment.htm>


More information about the CMake mailing list