Skip to content

Commit

Permalink
Fix lua path on posix
Browse files Browse the repository at this point in the history
  • Loading branch information
topilski committed Jan 24, 2015
1 parent 19b3089 commit feddead
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/third-party/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ IF(OS_WINDOWS)
ELSEIF(OS_LINUX)
ADD_DEFINITIONS(-DLUA_USE_LINUX)
ELSEIF(OS_MACOSX)
ADD_DEFINITIONS(-LUA_USE_MACOSX)
ADD_DEFINITIONS(-DLUA_USE_MACOSX)
ELSEIF(OS_ANDROID)
ADD_DEFINITIONS(-DLUA_ANSI)
ENDIF()
Expand Down
16 changes: 15 additions & 1 deletion src/third-party/lua/lua-5.3.0/src/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,25 @@
#define LUA_ROOT "/usr/local/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
#ifdef FASTOREDIS
#ifdef OS_MACOSX
#define LUA_FDIR "./" PROJECT_NAME ".app/Contents/MacOS/lua/?.lua;"
#else
#define LUA_FDIR "./lua/?.lua;"
#endif

#define LUA_PATH_DEFAULT \
LUA_FDIR \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
"./?.lua;" "./?/init.lua"
#else
#define LUA_PATH_DEFAULT \
"./lua/?.lua;" \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
"./?.lua;" "./?/init.lua"
#endif

#define LUA_CPATH_DEFAULT \
LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
#endif /* } */
Expand Down

0 comments on commit feddead

Please sign in to comment.