From 2b396d2d87cc5b45b858cb0ee5737ba31032f6d3 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Tue, 3 Sep 2024 12:29:23 +0300 Subject: [PATCH] Handle error on uninitialized plog submodule Fail cmake configuration if plog submodule is not initialized. --- third_party/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 06be77c1..c7acb1fa 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -6,5 +6,9 @@ add_subdirectory(stb) if(USE_EXTERNAL_PLOG) find_package(plog REQUIRED) else() + if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/plog/CMakeLists.txt) + message(FATAL_ERROR "plog third-party directory could not be found. " + "Please run 'submodule update --init --recursive' in the source directory.") + endif() add_subdirectory(plog) endif()