Commit 1aa809a1 authored by Artur Grunau's avatar Artur Grunau
Browse files

Better error message when Lua submodule is missing

If CAMPVIS_BUILD_LIB_LUA was set but the Lua Git submodule wasn't checked
out, the user would get a generic "could not find CMakeLists.txt" error
message which wasn't of much help.

Log a custom error message that provides a hint how to fix the problem in
the above situation.

References #1
parent 2a946aa2
......@@ -55,6 +55,11 @@ IF(CAMPVIS_BUILD_LIB_LUA)
SET(LUA_BUILD_WLUA OFF CACHE BOOL "Build wLua interpreter without console output")
ADD_SUBDIRECTORY(ext/lua)
# If the above command failed, provide a hint how to fix the problem
IF(NOT TARGET liblua)
MESSAGE(SEND_ERROR "Did you forget to run `git submodule update --init`?")
ENDIF(NOT TARGET liblua)
ENDIF()
IF(CAMPVIS_BUILD_CORE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment