aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-03-07 13:01:26 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-03-07 13:02:09 +0000
commitf6ec945f81f839f715d7a7a045f0864ad2b50e7c (patch)
tree2950b7340ee172966a48907d0da0915c68471a1b /CMakeLists.txt
parentc7ff7a94800176cf9860dee0253f35b11efdf4ec (diff)
downloadpiglit-f6ec945f81f839f715d7a7a045f0864ad2b50e7c.tar.gz
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3634bb45..e4336233 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)