diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a7957bd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "external/boost"] + path = external/boost + url = https://github.com/bagobor/boost.git +[submodule "external/lua"] + path = external/lua + url = https://github.com/lua/lua diff --git a/external/boost b/external/boost new file mode 160000 index 0000000..f9e97d9 --- /dev/null +++ b/external/boost @@ -0,0 +1 @@ +Subproject commit f9e97d9dcc85bcd338d1f384ff6f3c2973b3d262 diff --git a/external/lua b/external/lua new file mode 160000 index 0000000..570b787 --- /dev/null +++ b/external/lua @@ -0,0 +1 @@ +Subproject commit 570b787fcb304dd3cc3472452808abe0d6e9b915 diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..ddf8699 --- /dev/null +++ b/premake5.lua @@ -0,0 +1,85 @@ +-- premake5.lua + +local BUILD_DIR = (".build/" .. _ACTION) + +workspace "lua-api-pp" + configurations { "Debug", "Release" } + location (BUILD_DIR) + platforms { "x32", "x64" } + + startproject "luapp_test" + + filter "configurations:Debug" + defines { "DEBUG" } + flags { "Symbols" } + + filter "configurations:Release" + defines { "NDEBUG" } + optimize "On" + +project "liblua" + kind "StaticLib" + location (BUILD_DIR .. "/lua") + language "C" + targetdir (BUILD_DIR .. "/lib/%{cfg.buildcfg}") + + includedirs {"./external/lua/src/"} +--libdirs { "../lua/libs", "../zlib" } + + files { "./external/lua/src/**.c", "./external/lua/src/**.h" } + removefiles {"**luac.c", "**lua.c"} + +-- project "lua" +-- kind "ConsoleApp" +-- location (BUILD_DIR .. "/lua") +-- language "C" +-- targetdir (BUILD_DIR .. "/%{cfg.buildcfg}") +-- includedirs {"./external/lua/src/"} +-- files {"./external/lua/src/lua.c"} +-- libdirs { BUILD_DIR .. "/lib/%{cfg.buildcfg}" } +-- links { "liblua" } + +-- project "luac" +-- kind "ConsoleApp" +-- location (BUILD_DIR .. "/lua") +-- language "C" +-- targetdir (BUILD_DIR .. "/%{cfg.buildcfg}") +-- includedirs {"./external/lua/src/"} +-- files {"./external/lua/src/luac.c"} +-- libdirs { BUILD_DIR .. "/lib/%{cfg.buildcfg}" } +-- links { "liblua" } + +project "libluapp" + kind "StaticLib" + location (BUILD_DIR .. "/luapp") + language "C++" + targetdir (BUILD_DIR .. "/lib/%{cfg.buildcfg}") + + includedirs { + "./external/lua/src/", + "./external/boost/", + "./" + } + files { "./luapp/**.*" } + + +project "luapp_test" + kind "ConsoleApp" + location (BUILD_DIR .. "/test") + language "C++" + targetdir (BUILD_DIR .. "/%{cfg.buildcfg}") + + -- defines { "LUAPP_NONDISCARDABLE_CONCAT" } + + includedirs { + "./external/lua/src/", + "./external/boost/", + "./" + } + + libdirs { BUILD_DIR .. "/lib/%{cfg.buildcfg}" } + + links { "liblua", "lialuapp"} + + files { "./test/**.*" } +