From c4f71c672ac14e0ccc4c94f93ca521d5fbbcc530 Mon Sep 17 00:00:00 2001 From: "Denis V. Ovod" Date: Wed, 9 Sep 2015 15:08:02 +0300 Subject: [PATCH 1/2] added boost and lua modules --- .gitmodules | 6 ++++++ external/boost | 1 + external/lua | 1 + 3 files changed, 8 insertions(+) create mode 100644 .gitmodules create mode 160000 external/boost create mode 160000 external/lua 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 From 2f7937179129e032e30c9e37e03c8eaec156d904 Mon Sep 17 00:00:00 2001 From: "Denis V. Ovod" Date: Wed, 9 Sep 2015 15:24:48 +0300 Subject: [PATCH 2/2] premake script --- premake5.lua | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 premake5.lua 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/**.*" } +