This repository was archived by the owner on Nov 20, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,25 @@ set ( LUA_CDIR ${INSTALL_CMOD} )
3030
3131if ( LUA_USE_RELATIVE_LOADLIB )
3232 # This will set up relative paths to lib
33- string ( REGEX REPLACE "[^!/]+" ".." LUA_ROOT "!/${INSTALL_BIN} /" )
33+ string ( REGEX REPLACE "[^!/]+" ".." LUA_DIR "!/${INSTALL_BIN} /" )
3434else ()
3535 # Direct path to installation
36- set ( LUA_ROOT ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD." )
36+ set ( LUA_DIR ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD." )
3737endif ()
3838
39+ set ( LUA_PATH_DEFAULT "./?.lua;${LUA_DIR}${LUA_LDIR} /?.lua;${LUA_DIR}${LUA_LDIR} /?/init.lua" )
40+ set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX} ;${LUA_DIR}${LUA_CDIR} /?${LUA_MODULE_SUFFIX} ;${LUA_DIR}${LUA_CDIR} /loadall${LUA_MODULE_SUFFIX} " )
41+
3942if ( WIN32 AND NOT CYGWIN )
4043 # Windows systems
4144 option ( LUA_WIN "Windows specific build." ON )
4245 option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )
4346 # Paths (Double escapes needed)
4447 set ( LUA_DIRSEP "\\\\ " )
45- string ( REPLACE "/" ${LUA_DIRSEP} LUA_ROOT ${LUA_ROOT } )
48+ string ( REPLACE "/" ${LUA_DIRSEP} LUA_DIR ${LUA_DIR } )
4649 string ( REPLACE "/" ${LUA_DIRSEP} LUA_LDIR ${LUA_LDIR} )
4750 string ( REPLACE "/" ${LUA_DIRSEP} LUA_CDIR ${LUA_CDIR} )
51+
4852else ()
4953 # Posix systems (incl. Cygwin)
5054 option ( LUA_USE_POSIX "Use POSIX functionality." ON )
Original file line number Diff line number Diff line change 6464** path of the directory of the executable file of the current process.
6565*/
6666#cmakedefine LUA_MODULE_SUFFIX "@LUA_MODULE_SUFFIX@"
67- #cmakedefine LUA_ROOT "@LUA_ROOT @"
67+ #cmakedefine LUA_DIR "@LUA_DIR @"
6868#cmakedefine LUA_LDIR "@LUA_LDIR@"
6969#cmakedefine LUA_CDIR "@LUA_CDIR@"
7070
71- #define LUA_PATH_DEFAULT "./?.lua;" LUA_ROOT "/" LUA_LDIR "/?.lua;" LUA_ROOT "/" LUA_LDIR "/?/init.lua "
72- #define LUA_CPATH_DEFAULT "./?" LUA_MODULE_SUFFIX ";" LUA_ROOT "/" LUA_CDIR "/?" LUA_MODULE_SUFFIX ";" LUA_ROOT "/" LUA_CDIR "/loadall" LUA_MODULE_SUFFIX
71+ #define LUA_PATH_DEFAULT "@LUA_PATH_DEFAULT@ "
72+ #define LUA_CPATH_DEFAULT "@LUA_CPATH_DEFAULT@"
7373
7474/*
7575@@ LUA_DIRSEP is the directory separator (for submodules).
You can’t perform that action at this time.
0 commit comments