diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-07-15 14:53:06 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-15 14:53:06 +0100 |
commit | bed6d2bdd630fee36e6f1320ea8d2b7f251b8e09 (patch) | |
tree | b122255a63311c47479a8fd304035e4d3ab4dbd0 | |
parent | 1f4dbe7e9f9f7dbcfe3b084aeeccb89365c68da7 (diff) |
Put all executables into the bin subdirectory.
-rw-r--r-- | src/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5651e4f..981179d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,17 @@ find_package(OpenGL REQUIRED) find_package(TIFF) find_package(GLUT) +# Put all executables into the bin subdirectory +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + +# Do the same for MSVC, regardless of the build type. This only works correctly +# for CMake 2.8.1 and above. +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin) +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin) +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/bin) +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/bin) + if (NOT MSVC) check_c_compiler_flag ("-Wall" C_COMPILER_FLAG_WALL) if (C_COMPILER_FLAG_WALL) |