OSDN Git Service

add luabinding
[meshio/meshio.git] / lua / premake4.lua
diff --git a/lua/premake4.lua b/lua/premake4.lua
new file mode 100755 (executable)
index 0000000..075fa53
--- /dev/null
@@ -0,0 +1,67 @@
+newoption {
+    --[[ usage: premake4 --static gmake ]]--
+    trigger     = "static",
+    description = "build static library"
+}
+
+solution "lmeshio"
+
+configurations { "Debug", "Release" }
+
+if _OPTIONS["static"] then
+    kind "StaticLib"
+    libdirs {
+    }
+    links {
+        "tolua++", "lua",
+        "meshio",
+    }
+    project "lmeshio_static"
+else
+    kind "SharedLib"
+    defines {
+        --"TOLUA_API='__declspec(dllexport)'",
+    }
+    libdirs {
+        "/x86_64-w64-mingw32/local/bin",
+    }
+    links {
+        "tolua++", "lua51",
+        "meshio",
+    }
+    project "lmeshio"
+end
+
+language "C++"
+files {
+    "lmeshio_bind.cpp",
+}
+prebuildcommands {
+    "make -f tolua.make",
+}
+buildoptions {
+    "-std=c++0x",
+}
+defines {
+}
+includedirs {
+    "../src",
+}
+linkoptions {
+}
+
+configuration "Debug"
+do
+    defines { "DEBUG" }
+    flags { "Symbols" }
+    targetdir "../debug"
+    libdirs { "../debug" }
+end
+configuration "Release"
+do
+    defines { "NDEBUG" }
+    flags { "Optimize" }
+    targetdir "../release"
+    libdirs { "../release" }
+end
+