diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-03-07 13:01:26 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-03-07 13:02:09 +0000 |
commit | f6ec945f81f839f715d7a7a045f0864ad2b50e7c (patch) | |
tree | 2950b7340ee172966a48907d0da0915c68471a1b | |
parent | c7ff7a94800176cf9860dee0253f35b11efdf4ec (diff) |
cmake: Put the binaries in the right place for MSVS too.
Until now MSVS was putting binaries on a Debug/Release/etc sub-directory.
This implied using CMAKE_RUNTIME_OUTPUT_DIRECTORY and
CMAKE_LIBRARY_OUTPUT_DIRECTORY instead of deprecated
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH vars.
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3634bb45e..e4336233c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,16 @@ FIND_LIBRARY(OPENGL_egl_LIBRARY ) find_library(OPENGL_gles2_LIBRARY NAMES GLESv2) -set(EXECUTABLE_OUTPUT_PATH ${piglit_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${piglit_BINARY_DIR}/lib) +# Put all executables into the bin subdirectory +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${piglit_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${piglit_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 ${piglit_BINARY_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${piglit_BINARY_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${piglit_BINARY_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${piglit_BINARY_DIR}/bin) check_function_exists(strchrnul HAVE_STRCHRNUL) check_function_exists(fopen_s HAVE_FOPEN_S) |