summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a44c8f..e54bb7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@ set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MO
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." ${BUILD_SHARED_LIBS} )
# Paths (Double escapes ne option needed)
@@ -132,6 +133,13 @@ target_link_libraries ( lua liblua )
add_executable ( luac ${SRC_CORE} ${SRC_LIB} ${SRC_LUAC} src/luac.rc )
target_link_libraries ( luac ${LIBS} )
+# On windows a variant of the lua interpreter without console output needs to be built
+if ( LUA_BUILD_WLUA )
+ add_executable ( wlua WIN32 src/wmain.c ${SRC_LUA} ${LUA_RC} )
+ target_link_libraries ( wlua liblua )
+ install_executable ( wlua )
+endif ( )
+
install_executable ( lua luac )
install_library ( liblua )
install_data ( README.md )