diff options
| author | Mike Stewart | 2012-03-26 16:37:37 -0700 |
|---|---|---|
| committer | Mike Stewart | 2012-03-26 16:37:37 -0700 |
| commit | 4ed6953bb63eb65aeb84c5217f2bcc40cb204e25 (patch) | |
| tree | fe306c7308117da31424e97b25e6bf30e5a22296 | |
| parent | 3761426ef5ce79696ef942547b3fbcd7b4f3fcae (diff) | |
| download | dfhack-4ed6953bb63eb65aeb84c5217f2bcc40cb204e25.tar.gz dfhack-4ed6953bb63eb65aeb84c5217f2bcc40cb204e25.tar.bz2 dfhack-4ed6953bb63eb65aeb84c5217f2bcc40cb204e25.tar.xz | |
Added a test for submodules that prints out a helpful error message.
| -rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 60b4ab65..1ced79f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,14 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") message(FATAL_ERROR "In-source builds are not allowed.") endif() +# make sure all the necessary submodules have been set up +#if (NOT EXISTS "depends/protobuf/CMakeLists.txt" OR NOT EXISTS "depends/clsocket/CMakeLists.txt") +# message(FATAL_ERROR "Required submodules could not be found! First run 'git submodule init' and 'git submodule update' from the root DFHack directory. (See the section 'Getting the Code' in Compile.html)") +#endif() +if (NOT EXISTS ${dfhack_SOURCE_DIR}/depends/protobuf/CMakeLists.txt OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/clsocket/CMakeLists.txt) + message(FATAL_ERROR "Required submodules could not be found! First run 'git submodule init' and 'git submodule update' from the root DFHack directory. (See the section 'Getting the Code' in Compile.html)") +endif() + # set up versioning. set(DF_VERSION_MAJOR "0") set(DF_VERSION_MINOR "34") |
