Mercurial > projects > qtd
comparison CMakeLists.txt @ 242:f2f4c9cbadc2
Fix #28.
You cannot build in the sources folder by default but can override this behavior using ALLOW_IN_SOURCE_BUILDS option. However, in this case you'll have to use 'cmake . && make' instead of make. Otherwise, the generator won't start.
author | SokoL_SD |
---|---|
date | Mon, 20 Jul 2009 09:33:10 +0000 |
parents | e792a5287673 |
children | e4cbe1e9ded6 |
comparison
equal
deleted
inserted
replaced
241:e792a5287673 | 242:f2f4c9cbadc2 |
---|---|
4 ########################################################## | 4 ########################################################## |
5 ## Building generator && settings. | 5 ## Building generator && settings. |
6 ########################################################## | 6 ########################################################## |
7 if(NOT SECOND_RUN) | 7 if(NOT SECOND_RUN) |
8 | 8 |
9 option(FORCE_IN_SOURCE_BUILD "Force the in-source building" "OFF") | 9 option(ALLOW_IN_SOURCE_BUILDS "Allow in-source builds" "OFF") |
10 if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT FORCE_IN_SOURCE_BUILD) | 10 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT ALLOW_IN_SOURCE_BUILDS) |
11 message(FATAL_ERROR "In-source builds are not allowed. | 11 message(FATAL_ERROR "In-source builds are not allowed. |
12 Please create a directory and run cmake from there, passing the path | 12 Please create a directory and run cmake from there, passing the path |
13 to this source directory as the last argument. | 13 to this source directory as the last argument. |
14 This process created the file `CMakeCache.txt` and the directory `CMakeFiles'. | 14 This process created the file `CMakeCache.txt` and the directory `CMakeFiles'. |
15 Please delete them. | 15 Please delete them. |
16 | 16 |
17 Or you can restart cmake with `-DFORCE_IN_SOURCE_BUILD=1`, but it is not | 17 Or you can restart cmake with `-DALLOW_IN_SOURCE_BUILDS=1`, but it is not |
18 recomended. | 18 recomended. |
19 ") | 19 ") |
20 endif() | 20 endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT ALLOW_IN_SOURCE_BUILDS) |
21 | |
22 | 21 |
23 FIND_PACKAGE(Qt4 REQUIRED) | 22 FIND_PACKAGE(Qt4 REQUIRED) |
24 set (QT_USE_QTMAIN false) | 23 set (QT_USE_QTMAIN false) |
25 set (QT_USE_QTGUI false) | 24 set (QT_USE_QTGUI false) |
26 | 25 |