2013-05-18 06:39:08 +04:00
|
|
|
--
|
2014-02-11 10:07:04 +04:00
|
|
|
-- Copyright 2010-2014 Branimir Karadzic. All rights reserved.
|
2013-05-18 06:39:08 +04:00
|
|
|
-- License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
--
|
|
|
|
|
2014-08-22 08:02:16 +04:00
|
|
|
function bgfxProject(_name, _uuid, _kind, _defines)
|
2013-02-22 09:13:56 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
project ("bgfx" .. _name)
|
|
|
|
uuid (_uuid)
|
|
|
|
kind (_kind)
|
2013-02-22 09:13:56 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
if _kind == "SharedLib" then
|
|
|
|
defines {
|
|
|
|
"BGFX_SHARED_LIB_BUILD=1",
|
|
|
|
}
|
|
|
|
end
|
2013-02-22 09:13:56 +04:00
|
|
|
|
|
|
|
includedirs {
|
2014-08-01 09:00:36 +04:00
|
|
|
BGFX_DIR .. "../bx/include",
|
2013-02-22 09:13:56 +04:00
|
|
|
}
|
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
defines {
|
|
|
|
-- "BGFX_CONFIG_RENDERER_OPENGL=1",
|
2013-02-22 09:13:56 +04:00
|
|
|
}
|
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration { "Debug" }
|
|
|
|
defines {
|
|
|
|
"BGFX_CONFIG_DEBUG=1",
|
2014-08-22 08:02:16 +04:00
|
|
|
_defines,
|
2014-08-01 09:00:36 +04:00
|
|
|
}
|
2013-02-22 09:13:56 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration { "android*" }
|
|
|
|
links {
|
|
|
|
"EGL",
|
|
|
|
"GLESv2",
|
|
|
|
}
|
2013-02-22 09:13:56 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration { "windows" }
|
|
|
|
includedirs {
|
|
|
|
"$(DXSDK_DIR)/include",
|
|
|
|
}
|
2014-08-21 08:41:21 +04:00
|
|
|
links {
|
|
|
|
"gdi32",
|
|
|
|
}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
2014-08-23 15:24:39 +04:00
|
|
|
configuration { "xcode4 or osx or ios*" }
|
2014-08-01 09:00:36 +04:00
|
|
|
files {
|
|
|
|
BGFX_DIR .. "src/**.mm",
|
|
|
|
}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration { "osx" }
|
|
|
|
links {
|
|
|
|
"Cocoa.framework",
|
|
|
|
}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
2014-08-23 15:24:39 +04:00
|
|
|
configuration { "vs* or linux or mingw or osx or xcode4 or ios*" }
|
2014-08-01 09:00:36 +04:00
|
|
|
includedirs {
|
|
|
|
--nacl has GLES2 headers modified...
|
|
|
|
BGFX_DIR .. "3rdparty/khronos",
|
|
|
|
}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration {}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
|
|
|
includedirs {
|
2014-08-01 09:00:36 +04:00
|
|
|
BGFX_DIR .. "include",
|
2014-06-02 02:26:36 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
files {
|
2014-08-01 09:00:36 +04:00
|
|
|
BGFX_DIR .. "include/**.h",
|
|
|
|
BGFX_DIR .. "src/**.cpp",
|
|
|
|
BGFX_DIR .. "src/**.h",
|
2014-07-08 06:53:00 +04:00
|
|
|
}
|
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
excludes {
|
|
|
|
BGFX_DIR .. "src/**.bin.h",
|
2014-06-02 02:26:36 +04:00
|
|
|
}
|
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
configuration {}
|
2014-06-02 02:26:36 +04:00
|
|
|
|
2014-08-01 09:00:36 +04:00
|
|
|
copyLib()
|
|
|
|
end
|