mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Prevent mixing in-tree and out-of-tree builds
This is an easy pitfall to encounter when running an Android build.
This commit is contained in:
parent
9b2ee1dd5d
commit
94dd3da2aa
1 changed files with 3 additions and 0 deletions
|
@ -375,6 +375,9 @@ endif()
|
||||||
|
|
||||||
check_include_files(endian.h HAVE_ENDIAN_H)
|
check_include_files(endian.h HAVE_ENDIAN_H)
|
||||||
|
|
||||||
|
if((NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) AND EXISTS "${PROJECT_SOURCE_DIR}/cmake_config.h")
|
||||||
|
message(FATAL_ERROR "You are doing an out-of-tree build, but build artifacts are left in-tree. This will break the build!")
|
||||||
|
endif()
|
||||||
configure_file(
|
configure_file(
|
||||||
"${PROJECT_SOURCE_DIR}/cmake_config.h.in"
|
"${PROJECT_SOURCE_DIR}/cmake_config.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/cmake_config.h"
|
"${PROJECT_BINARY_DIR}/cmake_config.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue