[CMake] getting the output directory in a cmake script

Brandon Van Every bvanevery at gmail.com
Tue Jan 8 16:48:02 EST 2008


On Jan 8, 2008 2:46 PM, Jesse Corrington <jesse.corrington at gmail.com> wrote:
> Is there any variable that stores the output directory where the project
> files are generated. I need this information to create a post build step to
> copy a file to the project root.

Sure, CMAKE_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR.
http://www.cmake.org/Wiki/CMake_Useful_Variables
You could also use PROJECT_BINARY_DIR or MyProjectName_BINARY_DIR.

Cheers,
Brandon Van Every


More information about the CMake mailing list