build: fix build flags for LuaJIT
@@ -429,8 +429,8 @@ if(FLB_LUAJIT)
set(LUA_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/luajit-2.0.5)
ExternalProject_Add(luajit
SOURCE_DIR ${LUA_PATH}
- CONFIGURE_COMMAND export "CFLAGS=-g -fPIC" #${LUA_PATH}/configure
- BUILD_COMMAND make -C ${LUA_PATH}
+ CONFIGURE_COMMAND ${LUA_PATH}/configure
+ BUILD_COMMAND make BUILD_MODE=static XCFLAGS="-fPIC" -C ${LUA_PATH}
INSTALL_COMMAND cp ${LUA_PATH}/src/libluajit.a "${CMAKE_CURRENT_BINARY_DIR}/lib/libluajit.a")
add_library(libluajit STATIC IMPORTED GLOBAL)
set_target_properties(libluajit PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib/libluajit.a")
