bam: move examples stuff to it's own file.
This commit is contained in:
parent
f3cada7ac8
commit
e4c086a1eb
2 changed files with 30 additions and 28 deletions
31
bam.lua
31
bam.lua
|
|
@ -207,36 +207,11 @@ local obj = Compile(settings, {
|
||||||
scene_module
|
scene_module
|
||||||
})
|
})
|
||||||
|
|
||||||
local libspectre = StaticLibrary(settings,
|
libspectre = StaticLibrary(settings,
|
||||||
"spectre",
|
"spectre",
|
||||||
obj,
|
obj,
|
||||||
ft2_obj
|
ft2_obj
|
||||||
)
|
)
|
||||||
|
|
||||||
--------------------------------
|
-- Examples
|
||||||
-- --
|
Import("examples/build.lua")
|
||||||
-- Examples --
|
|
||||||
-- --
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
local example_settings = CopySettings(global_settings, "Example")
|
|
||||||
|
|
||||||
-- Include spectre headers.
|
|
||||||
example_settings.cc.includes:Add("include/")
|
|
||||||
|
|
||||||
-- Link with spectre.
|
|
||||||
example_settings.link.extrafiles:Add(libspectre)
|
|
||||||
|
|
||||||
if TARGET_OS == "Win32" then
|
|
||||||
|
|
||||||
-- Windows needs to link against these.
|
|
||||||
example_settings.link.libs:Add("opengl32", "gdi32", "user32")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- For now, to get examples working
|
|
||||||
-- we copy the whole assets directory.
|
|
||||||
assets = CopyDir(PathJoin(paths.build, paths.examples), "assets")
|
|
||||||
|
|
||||||
BuildExamples(example_settings, {
|
|
||||||
"text"
|
|
||||||
}, assets)
|
|
||||||
|
|
|
||||||
27
examples/build.lua
Normal file
27
examples/build.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
--------------------------------
|
||||||
|
-- --
|
||||||
|
-- Examples --
|
||||||
|
-- --
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
local example_settings = CopySettings(global_settings, "Example")
|
||||||
|
|
||||||
|
-- Include spectre headers.
|
||||||
|
example_settings.cc.includes:Add("include/")
|
||||||
|
|
||||||
|
-- Link with spectre.
|
||||||
|
example_settings.link.extrafiles:Add(libspectre)
|
||||||
|
|
||||||
|
if TARGET_OS == "Win32" then
|
||||||
|
|
||||||
|
-- Windows needs to link against these.
|
||||||
|
example_settings.link.libs:Add("opengl32", "gdi32", "user32")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- For now, to get examples working
|
||||||
|
-- we copy the whole assets directory.
|
||||||
|
assets = CopyDir(PathJoin(paths.build, paths.examples), "assets")
|
||||||
|
|
||||||
|
BuildExamples(example_settings, {
|
||||||
|
"text"
|
||||||
|
}, assets)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue