bgfx/scripts/example-common.lua

98 lines
2.4 KiB
Lua
Raw Normal View History

2013-05-18 06:39:08 +04:00
--
2020-01-15 08:37:06 +03:00
-- Copyright 2010-2020 Branimir Karadzic. All rights reserved.
2016-01-01 11:11:04 +03:00
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
2013-05-18 06:39:08 +04:00
--
project ("example-glue")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
}
files {
path.join(BGFX_DIR, "examples/common/example-glue.cpp"),
}
project ("example-common")
2013-05-18 06:39:08 +04:00
kind "StaticLib"
includedirs {
2017-04-04 08:42:27 +03:00
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
2013-05-18 06:39:08 +04:00
}
files {
path.join(BGFX_DIR, "3rdparty/meshoptimizer/src/**.cpp"),
path.join(BGFX_DIR, "3rdparty/meshoptimizer/src/**.h"),
2018-05-06 18:57:48 +03:00
path.join(BGFX_DIR, "3rdparty/dear-imgui/**.cpp"),
path.join(BGFX_DIR, "3rdparty/dear-imgui/**.h"),
path.join(BGFX_DIR, "examples/common/**.cpp"),
path.join(BGFX_DIR, "examples/common/**.h"),
2013-05-18 06:39:08 +04:00
}
2019-03-13 03:05:39 +03:00
if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-gnm"),
{ path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_orbis.cpp") }) then
2019-01-22 04:07:21 +03:00
files {
2019-03-13 03:05:39 +03:00
path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_orbis.cpp"),
}
end
if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-nvn"),
{ path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_nx.cpp") }) then
files {
path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_nx.cpp"),
2019-01-22 04:07:21 +03:00
}
end
removefiles {
path.join(BGFX_DIR, "examples/common/example-glue.cpp"),
}
if _OPTIONS["with-sdl"] then
defines {
"ENTRY_CONFIG_USE_SDL=1",
}
includedirs {
"$(SDL2_DIR)/include",
}
end
2015-03-25 08:19:21 +03:00
if _OPTIONS["with-glfw"] then
defines {
"ENTRY_CONFIG_USE_GLFW=1",
}
end
if _OPTIONS["with-wayland"] then
defines {
"ENTRY_CONFIG_USE_WAYLAND=1",
}
end
2016-02-15 21:45:58 +03:00
configuration { "linux-steamlink" }
defines {
"EGL_API_FB",
}
2015-03-25 08:19:21 +03:00
2015-10-12 23:32:39 +03:00
configuration { "osx or ios* or tvos*" }
2015-08-28 06:27:03 +03:00
files {
path.join(BGFX_DIR, "examples/common/**.mm"),
}
2017-12-15 07:40:30 +03:00
configuration { "winstore* or durango"}
files {
path.join(BGFX_DIR, "examples/common/**.cx"),
}
linkoptions {
"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
}
premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"