2012-04-03 23:30:07 -04:00
|
|
|
--
|
2014-02-11 01:07:04 -05:00
|
|
|
-- Copyright 2010-2014 Branimir Karadzic. All rights reserved.
|
2012-04-03 23:30:07 -04:00
|
|
|
-- License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
--
|
|
|
|
|
2014-05-04 18:43:14 -04:00
|
|
|
newoption {
|
|
|
|
trigger = "with-tools",
|
|
|
|
description = "Enable building tools.",
|
|
|
|
}
|
|
|
|
|
2014-08-22 22:29:54 -04:00
|
|
|
newoption {
|
|
|
|
trigger = "with-shared-lib",
|
|
|
|
description = "Enable building shared library.",
|
|
|
|
}
|
|
|
|
|
2012-04-03 23:30:07 -04:00
|
|
|
solution "bgfx"
|
|
|
|
configurations {
|
|
|
|
"Debug",
|
|
|
|
"Release",
|
|
|
|
}
|
|
|
|
|
|
|
|
platforms {
|
|
|
|
"x32",
|
|
|
|
"x64",
|
2014-05-31 03:18:45 -04:00
|
|
|
-- "Xbox360",
|
2013-04-13 03:26:41 -04:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
|
2014-09-11 00:04:42 -04:00
|
|
|
dofile (BX_DIR .. "scripts/toolchain.lua")
|
2012-12-09 01:24:16 -05:00
|
|
|
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",
|
2013-05-24 01:07:54 -04:00
|
|
|
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",
|
2013-06-05 00:43:43 -04:00
|
|
|
"example-common",
|
2013-01-26 19:30:02 -05:00
|
|
|
}
|
|
|
|
|
2013-10-11 01:57:42 -04:00
|
|
|
configuration { "vs*" }
|
2013-10-11 23:38:47 -04:00
|
|
|
linkoptions {
|
|
|
|
"/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll
|
|
|
|
}
|
2013-10-11 01:57:42 -04:00
|
|
|
links { -- this is needed only for testing with GLES2/3 on Windows with VS2008
|
|
|
|
"DelayImp",
|
|
|
|
}
|
|
|
|
|
2014-09-09 15:24:17 -04:00
|
|
|
configuration { "vs201*" }
|
2013-10-11 01:57:42 -04:00
|
|
|
linkoptions { -- this is needed only for testing with GLES2/3 on Windows with VS201x
|
|
|
|
"/DELAYLOAD:\"libEGL.dll\"",
|
|
|
|
"/DELAYLOAD:\"libGLESv2.dll\"",
|
|
|
|
}
|
|
|
|
|
2013-04-17 02:12:03 -04:00
|
|
|
configuration { "android*" }
|
2013-12-02 22:46:25 -05:00
|
|
|
kind "ConsoleApp"
|
2013-04-17 02:12:03 -04:00
|
|
|
targetextension ".so"
|
2013-12-02 22:46:25 -05:00
|
|
|
linkoptions {
|
|
|
|
"-shared",
|
|
|
|
}
|
2013-04-17 02:12:03 -04:00
|
|
|
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",
|
|
|
|
}
|
|
|
|
|
2014-03-16 15:38:43 -04:00
|
|
|
configuration { "asmjs" }
|
|
|
|
kind "ConsoleApp"
|
|
|
|
targetextension ".bc"
|
|
|
|
|
2013-11-20 00:38:06 -05:00
|
|
|
configuration { "linux-*" }
|
2013-01-26 19:30:02 -05:00
|
|
|
links {
|
2013-04-29 22:35:33 -04:00
|
|
|
"X11",
|
2013-01-26 19:30:02 -05:00
|
|
|
"GL",
|
|
|
|
"pthread",
|
|
|
|
}
|
|
|
|
|
2014-08-24 20:41:41 -04:00
|
|
|
configuration { "rpi" }
|
|
|
|
links {
|
|
|
|
"X11",
|
|
|
|
"GLESv2",
|
|
|
|
"EGL",
|
|
|
|
"bcm_host",
|
2014-08-24 23:39:35 -04:00
|
|
|
"vcos",
|
|
|
|
"vchiq_arm",
|
2014-08-24 20:41:41 -04:00
|
|
|
"pthread",
|
|
|
|
}
|
|
|
|
|
2013-04-13 02:43:46 -04:00
|
|
|
configuration { "osx" }
|
2013-01-26 19:30:02 -05:00
|
|
|
files {
|
2013-10-20 00:22:52 -04:00
|
|
|
BGFX_DIR .. "examples/common/**.mm",
|
2013-01-26 19:30:02 -05:00
|
|
|
}
|
|
|
|
links {
|
|
|
|
"Cocoa.framework",
|
|
|
|
"OpenGL.framework",
|
2014-01-30 23:31:49 -05:00
|
|
|
-- "SDL2",
|
2013-01-26 19:30:02 -05:00
|
|
|
}
|
2013-04-13 04:47:30 -04:00
|
|
|
|
2014-08-23 07:24:39 -04:00
|
|
|
configuration { "xcode4" }
|
|
|
|
platforms {
|
|
|
|
"Universal"
|
|
|
|
}
|
|
|
|
files {
|
|
|
|
BGFX_DIR .. "examples/common/**.mm",
|
|
|
|
}
|
|
|
|
links {
|
|
|
|
"Cocoa.framework",
|
|
|
|
"Foundation.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2013-04-13 04:47:30 -04:00
|
|
|
configuration { "qnx*" }
|
|
|
|
targetextension ""
|
|
|
|
links {
|
|
|
|
"EGL",
|
|
|
|
"GLESv2",
|
|
|
|
}
|
2013-04-21 02:13:44 -04:00
|
|
|
|
|
|
|
configuration {}
|
|
|
|
|
|
|
|
strip()
|
2013-01-26 19:30:02 -05:00
|
|
|
end
|
|
|
|
|
2012-06-01 22:55:56 -04:00
|
|
|
dofile "bgfx.lua"
|
2013-06-05 00:43:43 -04:00
|
|
|
dofile "example-common.lua"
|
2014-08-22 22:29:54 -04:00
|
|
|
bgfxProject("", "2dc7fd80-ed76-11e0-be50-0800200c9a66", "StaticLib", {})
|
|
|
|
|
2013-12-10 22:37:51 -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")
|
|
|
|
exampleProject("09-hdr", "969a4626-67ee-11e2-9726-9023267a7926")
|
|
|
|
exampleProject("10-font" , "ef6fd5b3-b52a-41c2-a257-9dfe709af9e1")
|
|
|
|
exampleProject("11-fontsdf", "f4e6f96f-3daa-4c68-8df8-bf2a3ecd9092")
|
|
|
|
exampleProject("12-lod", "0512e9e6-bfd8-11e2-8e34-0291bd4c8125")
|
|
|
|
exampleProject("13-stencil", "d12d6522-37bc-11e3-b89c-e46428d43830")
|
|
|
|
exampleProject("14-shadowvolumes", "d7eb4bcc-37bc-11e3-b7a4-e46428d43830")
|
|
|
|
exampleProject("15-shadowmaps-simple", "a10f22ab-e0ee-471a-b2b6-2f6cb1c63fdc")
|
2014-01-19 02:43:16 -05:00
|
|
|
exampleProject("16-shadowmaps", "f9a91cb0-7b1b-11e3-981f-0800200c9a66")
|
|
|
|
exampleProject("17-drawstress", "9aeea4c6-80dc-11e3-b3ca-4da6db0f677b")
|
2014-02-13 23:46:34 -05:00
|
|
|
exampleProject("18-ibl", "711bcbb0-9531-11e3-a5e2-0800200c9a66")
|
2014-03-27 01:01:22 -04:00
|
|
|
exampleProject("19-oit", "d7eca4fc-96d7-11e3-a73b-fcafdb0f677b")
|
2014-04-27 02:50:11 -04:00
|
|
|
exampleProject("20-nanovg", "359ce7c4-cd06-11e3-bb8b-6c2f9a125b5a")
|
2014-05-21 23:33:12 -04:00
|
|
|
exampleProject("21-deferred", "f89e59ec-d16b-11e3-bc9c-2dfd99125b5a")
|
2013-12-10 22:37:51 -05:00
|
|
|
|
2014-08-22 22:29:54 -04:00
|
|
|
if _OPTIONS["with-shared-lib"] then
|
|
|
|
bgfxProject("-shared-lib", "09986168-e9d9-11e3-9c8e-f2aef940a72a", "SharedLib", {})
|
|
|
|
end
|
|
|
|
|
2014-05-04 18:43:14 -04:00
|
|
|
if _OPTIONS["with-tools"] then
|
|
|
|
dofile "makedisttex.lua"
|
|
|
|
dofile "shaderc.lua"
|
|
|
|
dofile "texturec.lua"
|
|
|
|
dofile "geometryc.lua"
|
|
|
|
end
|