--- /dev/null
+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
+