Skip to content

Conversation

@mcepl
Copy link

@mcepl mcepl commented Oct 10, 2025

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: #24

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: brimworks#24
Signed-off-by: Matěj Cepl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make package building with Lua 5.4

1 participant