aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-04-07 10:54:17 -0400
committerGitHub <noreply@github.com>2022-04-07 15:54:17 +0100
commit21f17e871ea3de419f682a8088337ba6ae1d015e (patch)
treeae0ac3ca448dcbe1436f67124b4ff6c967e757c3 /lib/lua/src/CMakeLists.txt
parent837cea6b4a2315966b9670ae50cff9d3679bcff4 (diff)
downloadminetest-21f17e871ea3de419f682a8088337ba6ae1d015e.tar.gz
minetest-21f17e871ea3de419f682a8088337ba6ae1d015e.tar.bz2
minetest-21f17e871ea3de419f682a8088337ba6ae1d015e.zip
Compile Lua as C++ (#11683)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'lib/lua/src/CMakeLists.txt')
-rw-r--r--lib/lua/src/CMakeLists.txt18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/lua/src/CMakeLists.txt b/lib/lua/src/CMakeLists.txt
index 8f6cc1213..2ca4f4168 100644
--- a/lib/lua/src/CMakeLists.txt
+++ b/lib/lua/src/CMakeLists.txt
@@ -31,24 +31,14 @@ set(LUA_CORE_SRC
lvm.c
lzio.c
)
-set(LUA_LIB_HEADERS
- lua.h
- lualib.h
- lauxlib.h
- luaconf.h
-)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR})
-# Lua library.
+# Lua library
add_library(lua STATIC ${LUA_CORE_SRC})
target_link_libraries(lua ${LIBS})
-set(LUA_STATIC_LIB lua)
-set(LUA_LIBS lua)
-
-set_target_properties(${LUA_LIBS} PROPERTIES
+set_target_properties(lua PROPERTIES
VERSION ${LUA_VERSION}
CLEAN_DIRECT_OUTPUT 1
)
+# Compile code as C++
+set_source_files_properties(${LUA_CORE_SRC} PROPERTIES LANGUAGE CXX)