From 15f3bae801aa979981d86aa072f6a35a88a4f21a Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 13 Apr 2014 07:06:35 -0300 Subject: Add checks for lpeg/cmsgpack lua packages These checks will stop the build process with meaningful error messages if any of those packages are not installed. --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3ed0f8640..2bc344d4d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,24 @@ else() message(FATAL_ERROR "A lua interpreter is required for building the Neovim") endif() +execute_process(COMMAND ${LUA_PRG} -e "require('lpeg')" + RESULT_VARIABLE LUA_LPEG_MISSING + ERROR_QUIET) + +if(${LUA_LPEG_MISSING}) + message(FATAL_ERROR + "The 'lpeg' lua package is required for building Neovim") +endif() + +execute_process(COMMAND ${LUA_PRG} -e "require('cmsgpack')" + RESULT_VARIABLE LUA_MSGPACK_MISSING + ERROR_QUIET) + +if(${LUA_MSGPACK_MISSING}) + message(FATAL_ERROR + "The 'cmsgpack' lua package is required for building Neovim") +endif() + add_subdirectory(config) add_subdirectory(src) add_subdirectory(test/includes) -- cgit