bgfx/premake/premake4.lua

150 lines
3.1 KiB
Lua
Raw Normal View History

2012-04-03 23:30:07 -04:00
--
2013-04-17 02:12:03 -04:00
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
2012-04-03 23:30:07 -04:00
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
solution "bgfx"
configurations {
"Debug",
"Release",
}
platforms {
"x32",
"x64",
"Xbox360",
"Native", -- for targets where bitness is not specified
2012-04-03 23:30:07 -04:00
}
language "C++"
2012-06-01 22:55:56 -04:00
BGFX_DIR = (path.getabsolute("..") .. "/")
local BGFX_BUILD_DIR = (BGFX_DIR .. ".build/")
local BGFX_THIRD_PARTY_DIR = (BGFX_DIR .. "3rdparty/")
2012-12-08 18:24:51 -05:00
BX_DIR = (BGFX_DIR .. "../bx/")
2012-09-16 20:36:08 -04:00
2013-02-27 00:27:31 -05:00
defines {
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
}
dofile (BX_DIR .. "premake/toolchain.lua")
toolchain(BGFX_BUILD_DIR, BGFX_THIRD_PARTY_DIR)
2012-04-03 23:30:07 -04:00
2012-06-02 00:56:20 -04:00
function copyLib()
end
2013-01-26 19:30:02 -05:00
function exampleProject(_name, _uuid)
project ("example-" .. _name)
uuid (_uuid)
kind "WindowedApp"
configuration {}
debugdir (BGFX_DIR .. "examples/runtime/")
includedirs {
BX_DIR .. "include",
BGFX_DIR .. "include",
2013-04-25 00:01:11 -04:00
BGFX_DIR .. "3rdparty",
BGFX_DIR .. "examples/common",
2013-01-26 19:30:02 -05:00
}
files {
BGFX_DIR .. "examples/" .. _name .. "/**.cpp",
BGFX_DIR .. "examples/" .. _name .. "/**.h",
}
links {
"bgfx",
"example-common",
2013-01-26 19:30:02 -05:00
}
2013-04-17 02:12:03 -04:00
configuration { "android*" }
kind "SharedLib"
targetextension ".so"
links {
"EGL",
"GLESv2",
}
2013-05-18 18:28:35 -04:00
configuration { "nacl or nacl-arm" }
kind "ConsoleApp"
2013-01-26 19:30:02 -05:00
targetextension ".nexe"
links {
"ppapi",
"ppapi_gles2",
"pthread",
}
2013-05-18 18:28:35 -04:00
configuration { "pnacl" }
kind "ConsoleApp"
targetextension ".pexe"
links {
"ppapi",
"ppapi_gles2",
"pthread",
}
2013-01-26 19:30:02 -05:00
configuration { "linux" }
links {
2013-04-29 22:35:33 -04:00
"X11",
2013-01-26 19:30:02 -05:00
"GL",
"pthread",
}
2013-04-13 02:43:46 -04:00
configuration { "osx" }
2013-01-26 19:30:02 -05:00
files {
2013-08-12 23:47:41 -04:00
-- BGFX_DIR .. "examples/common/**.mm",
2013-01-26 19:30:02 -05:00
}
links {
"Cocoa.framework",
"OpenGL.framework",
2013-08-12 23:47:41 -04:00
"SDL2",
2013-01-26 19:30:02 -05:00
}
2013-07-21 17:44:53 -04:00
configuration { "ios*" }
kind "ConsoleApp"
2013-07-14 16:14:48 -04:00
files {
BGFX_DIR .. "examples/common/**.mm",
}
2013-07-13 01:27:46 -04:00
linkoptions {
"-framework CoreFoundation",
"-framework Foundation",
"-framework OpenGLES",
2013-07-21 17:44:53 -04:00
"-framework UIKit",
"-framework QuartzCore",
2013-07-13 01:27:46 -04:00
}
configuration { "qnx*" }
targetextension ""
links {
"EGL",
"GLESv2",
}
configuration {}
strip()
2013-01-26 19:30:02 -05:00
end
2012-06-01 22:55:56 -04:00
dofile "bgfx.lua"
dofile "example-common.lua"
2013-01-26 19:30:02 -05:00
exampleProject("00-helloworld", "ff2c8450-ebf4-11e0-9572-0800200c9a66")
exampleProject("01-cubes", "fec3bc94-e1e5-11e1-9c59-c7eeec2c1c51")
exampleProject("02-metaballs", "413b2cb4-f7db-11e1-bf5f-a716de6a022f")
exampleProject("03-raymarch", "1cede802-0220-11e2-91ba-e108de6a022f")
exampleProject("04-mesh", "546bbc76-0c4a-11e2-ab09-debcdd6a022f")
exampleProject("05-instancing", "5d3da660-1105-11e2-aece-71e4dd6a022f")
exampleProject("06-bump", "ffb23e6c-167b-11e2-81df-94c4dd6a022f")
exampleProject("07-callback", "acc53bbc-52f0-11e2-9781-ad8edd4b7d02")
exampleProject("08-update", "e011e246-5862-11e2-b202-b7cb257a7926")
2013-02-27 00:24:16 -05:00
exampleProject("09-hdr", "969a4626-67ee-11e2-9726-9023267a7926")
2013-05-18 12:34:36 -04:00
exampleProject("10-font" , "ef6fd5b3-b52a-41c2-a257-9dfe709af9e1")
exampleProject("11-fontsdf", "f4e6f96f-3daa-4c68-8df8-bf2a3ecd9092")
exampleProject("12-lod", "0512e9e6-bfd8-11e2-8e34-0291bd4c8125")
2013-01-23 01:25:47 -05:00
dofile "makedisttex.lua"
dofile "shaderc.lua"
dofile "texturec.lua"
dofile "geometryc.lua"