From 4ed6953bb63eb65aeb84c5217f2bcc40cb204e25 Mon Sep 17 00:00:00 2001 From: Mike Stewart Date: Mon, 26 Mar 2012 16:37:37 -0700 Subject: [PATCH 1/3] Added a test for submodules that prints out a helpful error message. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60b4ab656..1ced79f94 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") From 92bae9d652a80456a707b5c8ed77235fdef71e08 Mon Sep 17 00:00:00 2001 From: Mike Stewart Date: Mon, 26 Mar 2012 16:39:16 -0700 Subject: [PATCH 2/3] Removed dead check... --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ced79f94..220a6a222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,9 +48,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 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() From b57ab1493c83596c7237fc818bc2525a19d59286 Mon Sep 17 00:00:00 2001 From: Mike Stewart Date: Tue, 27 Mar 2012 08:42:49 -0700 Subject: [PATCH 3/3] Look for df-structures instead of protobuf in the submodule check. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 220a6a222..17423974d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") endif() # make sure all the necessary submodules have been set up -if (NOT EXISTS ${dfhack_SOURCE_DIR}/depends/protobuf/CMakeLists.txt OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/clsocket/CMakeLists.txt) +if (NOT EXISTS ${dfhack_SOURCE_DIR}/library/xml/codegen.pl 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()