Commit 6f9c893
committed
rockspec: propagate CMake options
Sometimes one needs to build a luzer module using rockspec with
a non-system Lua library and headers or set other CMake options
before building. The patch adds variables for the rockspec to set
the following CMake options via environment variables:
ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ:
luarocks install --tree=lua_modules luzer-scm-1.rockspec \
ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON
The patch also renames CMake variables used for setting a custom
Lua library and Lua include directory: LUA_LIBRARIES to
CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR.
This is needed because with empty environment variables
LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake
module for finding Lua package:
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1")
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:49 (find_package)
After renaming these options can be specified for luarocks.
The patch also sorts variables in alphabetical order.
Needed for google/oss-fuzz#146101 parent a0ecdf9 commit 6f9c893
3 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
0 commit comments