lua-ev
lua-ev copied to clipboard
feat: Update CMake to use PkgConfig for Lua discovery
Refactor the CMake build system to leverage PkgConfig for locating Lua libraries and headers, improving compatibility and simplifying the build process.
- Removed the custom cmake/Modules/FindLua5X.cmake module.
- Updated CMakeLists.txt to use find_package(PkgConfig) and pkg_check_modules(LUA REQUIRED lua).
- Changed CMAKE_MINIMUM_REQUIRED to version 3.10.
- Replaced INCLUDE_DIRECTORIES with TARGET_INCLUDE_DIRECTORIES for cmod_ev.
- Modified lua_ev.c, lua_ev.h, obj_lua_ev.c, and watcher_lua_ev.c to make version, traceback, obj_index, and push_objs functions non-static, allowing them to be properly linked and used after the CMake changes.
- Adjusted assertions in watcher_lua_ev.c for clarity and consistency.
Fixes: https://github.com/brimworks/lua-ev/issues/24