CMake: Throw a more descriptive error when submodule files do not exist

Instead of having a long list of files that cannot be found, create an
error message that mentions that the git submodule should be checked out.
This commit is contained in:
Maarten Bent 2024-01-28 14:04:29 +01:00
parent 590e033344
commit 966c39802e
No known key found for this signature in database
GPG key ID: 58AAEE3F4A4FD070

View file

@ -593,6 +593,12 @@ endfunction()
function(wx_add_builtin_library name)
wx_list_add_prefix(src_list "${wxSOURCE_DIR}/" ${ARGN})
list(GET src_list 0 src_file)
if(NOT EXISTS "${src_file}")
message(FATAL_ERROR "${name} file does not exist: \"${src_file}\".\
Make sure you checkout the git submodules.")
endif()
if(${name} MATCHES "wx.*")
string(SUBSTRING ${name} 2 -1 name_short)
else()