diff options
author | drahosp <drahosp@gmail.com> | 2011-10-24 15:40:23 +0200 |
---|---|---|
committer | drahosp <drahosp@gmail.com> | 2011-10-24 15:40:23 +0200 |
commit | 068edf316ea60ba0d32c4e50af3b9e1711876aa2 (patch) | |
tree | f7b9621f60574264c2b8dfb20235e23debd9153d | |
parent | fa0a457861871810ad6943aa79cf61aff19cb379 (diff) | |
download | lua-068edf316ea60ba0d32c4e50af3b9e1711876aa2.tar.gz |
Added LUA_PATH entry. On Windows added wlua. Closes #50. Closes #515.1.4
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eeb08a..b0c00a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,13 @@ else () set ( LUA_DIR ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD.") endif () -set ( LUA_PATH_DEFAULT "./?.lua;${LUA_DIR}${LUA_LDIR}/?.lua;${LUA_DIR}${LUA_LDIR}/?/init.lua" ) +set ( LUA_PATH_DEFAULT "./?.lua;${LUA_DIR}${LUA_LDIR}/?.lua;${LUA_DIR}${LUA_LDIR}/?/init.lua;./?/init.lua" ) set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/loadall${LUA_MODULE_SUFFIX}" ) if ( WIN32 AND NOT CYGWIN ) # Windows systems option ( LUA_WIN "Windows specific build." ON ) + option ( LUA_BUILD_WLUA "Build wLua interpretter without console output." ON) option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON ) # Paths (Double escapes needed) set ( LUA_DIRSEP "\\\\" ) @@ -135,6 +136,13 @@ target_link_libraries ( liblua_static ${LIBS} ) add_executable ( lua ${SRC_LUA} ${LUA_RC} ) target_link_libraries ( lua liblua ) +# On windows a variant of the lua interpreter without console output needs to be built +if(LUA_BUILD_WLUA) + add_executable ( wlua WIN32 ${SRC_LUA} ${LUA_RC} ) + target_link_libraries ( wlua liblua ) + install_executable ( wlua ) +endif() + add_executable ( luac ${SRC_LUAC} ${LUAC_RC} ) target_link_libraries ( luac liblua_static ) |