更改示例程序的条件编译

This commit is contained in:
Lenheart 2026-02-11 16:30:06 +08:00
parent 6975f69d64
commit bcddad573a
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ add_rules("mode.debug", "mode.release")
-- ==============================================
option("examples")
set_default(true)
set_default(false)
set_showmenu(true)
set_description("Build example programs")
option_end()
@ -84,7 +84,7 @@ includes("xmake/engine.lua")
define_extra2d_engine()
-- 示例程序目标(作为子项目)
if has_config("examples") then
if is_config("examples","true") then
includes("examples/hello_world", {rootdir = "examples/hello_world"})
includes("examples/spatial_index_demo", {rootdir = "examples/spatial_index_demo"})
includes("examples/collision_demo", {rootdir = "examples/collision_demo"})