diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-13 07:06:35 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-13 07:32:52 -0300 |
commit | 15f3bae801aa979981d86aa072f6a35a88a4f21a (patch) | |
tree | 83c0be66401d634760f3f910642e52a8ccb474eb | |
parent | 3ee5683a78f8a667c2be68d8bc3b46ffc63e4646 (diff) | |
download | rneovim-15f3bae801aa979981d86aa072f6a35a88a4f21a.tar.gz rneovim-15f3bae801aa979981d86aa072f6a35a88a4f21a.tar.bz2 rneovim-15f3bae801aa979981d86aa072f6a35a88a4f21a.zip |
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.
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
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) |