diff --git a/bam.lua b/bam.lua index a169c2d..e2d9f73 100644 --- a/bam.lua +++ b/bam.lua @@ -207,36 +207,11 @@ local obj = Compile(settings, { scene_module }) -local libspectre = StaticLibrary(settings, +libspectre = StaticLibrary(settings, "spectre", obj, ft2_obj ) --------------------------------- --- -- --- 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) +-- Examples +Import("examples/build.lua") diff --git a/examples/build.lua b/examples/build.lua new file mode 100644 index 0000000..d60361d --- /dev/null +++ b/examples/build.lua @@ -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)