question: how to compile `lua-rapidjson` with specified Lua/Luajit version.
membphis opened this issue · 10 comments
membphis commented
I want to compile the lua-rapidjson
with specified Luajit, for example:
$ ls /usr/local/openresty/luajit/include/luajit-2.1
lauxlib.h lua.h lua.hpp luaconf.h luajit.h lualib.h
$ ls /usr/local/openresty/luajit/lib
libluajit-5.1.2.1.0.dylib libluajit-5.1.2.dylib libluajit-5.1.a libluajit-5.1.dylib lua pkgconfig
How can I implement this? One more thing, I'm working on MAC OSX.
membphis commented
It seems that the option LUA_DIR
did not take effect.
$ cmake -H. -Bbuild -G 'Unix Makefiles' -DLUA_DIR=/usr/local/openresty/luajit
-- The C compiler identification is AppleClang 11.0.0.11000020
-- The CXX compiler identification is AppleClang 11.0.0.11000020
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/local/bin/git (found version "2.17.0")
-- LUA_RAPIDJSON_VERSION: v0.5.1-22-g7c4c6f4-dirty
-- Found Lua: /usr/local/lib/liblua5.1.dylib (found version "5.1.5")
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
LUA_DIR
$ fgrep -r "include" ./build/*.txt
./build/CMakeCache.txt:LUA_INCLUDE_DIR:PATH=/usr/local/include/lua5.1
./build/CMakeCache.txt:FIND_PACKAGE_MESSAGE_DETAILS_Lua:INTERNAL=[/usr/local/lib/liblua5.1.dylib][/usr/local/include/lua5.1][v5.1.5()]
xpol commented
how about `LUA_DIR=... cmake...`?
…Sent from my iPhone
On Jul 6, 2019, at 11:25 AM, YuanSheng Wang ***@***.***> wrote:
It seems that the option LUA_DIR did not take effect.
$ cmake -H. -Bbuild -G 'Unix Makefiles' -DLUA_DIR=/usr/local/openresty/luajit
-- The C compiler identification is AppleClang 11.0.0.11000020
-- The CXX compiler identification is AppleClang 11.0.0.11000020
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/local/bin/git (found version "2.17.0")
-- LUA_RAPIDJSON_VERSION: v0.5.1-22-g7c4c6f4-dirty
-- Found Lua: /usr/local/lib/liblua5.1.dylib (found version "5.1.5")
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
LUA_DIR
$ fgrep -r "include" ./build/*.txt
./build/CMakeCache.txt:LUA_INCLUDE_DIR:PATH=/usr/local/include/lua5.1
./build/CMakeCache.txt:FIND_PACKAGE_MESSAGE_DETAILS_Lua:INTERNAL=[/usr/local/lib/liblua5.1.dylib][/usr/local/include/lua5.1][v5.1.5()]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
membphis commented
failed again , here is the log:
$ cmake ../ -DLUA_DIR=/usr/local/openresty/luajit
-- The C compiler identification is AppleClang 11.0.0.11000020
-- The CXX compiler identification is AppleClang 11.0.0.11000020
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/local/bin/git (found version "2.17.0")
-- LUA_RAPIDJSON_VERSION: v0.5.1-22-g7c4c6f4-dirty
-- Found Lua: /usr/local/lib/liblua5.1.dylib (found version "5.1.5")
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
LUA_DIR
-- Build files have been written to: /Users/rain/Downloads/lua-rapidjson/build
xpol commented
I mean LUA_DIR=/usr/local/openresty/luajit cmake -H. -Bbuild -G 'Unix Makefiles'
membphis commented
it works fine for me: luarocks install --lua-dir=/usr/local/openresty/luajit rapidjson
and it works fine too: LUA_DIR=/usr/local/openresty/luajit cmake -H. -Bbuild -G 'Unix Makefiles'
thx for your help. @xpol
membphis commented
we should update the readme doc.
xpol commented
membphis commented
many thx for your great job.