diff options
author | Jacques Beuarain <jacques.beaurain@gmail.com> | 2006-12-13 05:57:57 +0300 |
---|---|---|
committer | Jacques Beuarain <jacques.beaurain@gmail.com> | 2006-12-13 05:57:57 +0300 |
commit | 16b51f50979917962eaffd0a2b29a9dff8ebd4da (patch) | |
tree | 2b3953db38602bcd8375d83c6461f9612c1ea533 /CMakeLists.txt | |
parent | 228bebfaa84e389395dc8d8e836e9ebe3017b34b (diff) |
CMake: Give error on attempts to generate within the sources with
instructions on how to do it out-of-source
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 209522d3de0..1f5b4d30841 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,24 @@ # # ***** END GPL/BL DUAL LICENSE BLOCK ***** +#----------------------------------------------------------------------------- +# We don't allow in-source builds. This causes no end of troubles because +# all out-of-source builds will use the CMakeCache.txt file there and even +# build the libs and objects in it. It will also conflict with the current +# Makefile system for Blender + +IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) +MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! +Remove the CMakeCache.txt file and try again from another folder, e.g.: + + rm CMakeCache.txt + cd .. + mkdir cmake-make + cd cmake-make + cmake -G \"Unix Makefiles\" ../blender +") +ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + CMAKE_MINIMUM_REQUIRED(VERSION 2.4) PROJECT(Blender) |