cmake: fix lua_source for files stored in superproject
If Tarantool is built as a subproject, and there's a Lua source file stored in the superproject directory, its path won't start with PROJECT_SOURCE_DIR and hence won't be replaced with PROJECT_BINARY_DIR by the lua_source() function. As a result, the lua.c file generated by lua_source() will be put in the source directory instead of the binary directory. Fix this by using CMAKE dirs instead of PROJECT dirs. Ironically, CMAKE dirs were replaced with PROJECT dirs everywhere in the first place to allow building Tarantool as a subproject, see commit d8097325 ("cmake: align folders dependencies"). This patch basically reverts that change. NO_DOC=cmake NO_TEST=cmake NO_CHANGELOG=cmake
Please register or sign in to comment