summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-09-26 18:25:18 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-09-26 18:25:18 +0300
commitd53a564c982c6ec5869a15bb03201708ab80d32f (patch)
tree91de2c2caaf3ad12c116c92af8e8df2ac14adfd4
parentLinting (diff)
downloadnheko-d53a564c982c6ec5869a15bb03201708ab80d32f.tar.xz
Handle missing git submodules automatically
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index 3482d0b6..db0523d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -13,6 +13,12 @@ find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" ) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY) +if (NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/lmdbxx/.git" ) + message(WARNING "The git submodules are not available.") + message(STATUS "Running git submodule update --init --recursive ...") + execute_process(COMMAND git submodule update --init --recursive) +endif() + # # Discover Qt dependencies. #