diff --git a/.gitignore b/.gitignore index 0d50e757..537478c0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,5 @@ cmake-build-debug/ src/bin/BuiltHamcoreFiles/ tmp/ .gitconfig - - +CMakeCache.txt +CMakeFiles/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eac7fd5..540aba12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,4 +4,9 @@ project(SoftEtherVPN LANGUAGES C) set(default_build_type "Release") +# Check that submodules are present only if source was downloaded with git +if(EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURCE_DIR}/src/Mayaqua/cpu_features/CMakeLists.txt") + message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive") +endif() + add_subdirectory(src)