mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- Remove per-lib set_project() calls that overrode the global lcui
project name; xmake show now correctly reports the project as lcui.
- Move per-lib set_version() into the corresponding target() block so
each sub-library keeps an independent version usable for standalone
packaging.
- Add set_default(false) and set_group(examples) to all pandagl
examples so they are no longer picked up by xmake package.
- Rename targets to use dashes for consistency:
pandagl_cairo_example -> pandagl-cairo-example
preview_block_layout -> preview-block-layout
preview_flex_layout -> preview-flex-layout
preview_scrollbar -> preview-scrollbar
preview_widget_opacity -> preview-widget-opacity
- Bump yutil submodule to drop its set_project() call as well.
72 lines
2.2 KiB
Lua
72 lines
2.2 KiB
Lua
add_requires("libpng", "libjpeg", {optional = true})
|
|
add_requires("freetype", {optional = true, configs = {shared = false}})
|
|
|
|
if is_plat("linux") then
|
|
add_requires("fontconfig", {optional = true})
|
|
end
|
|
|
|
option("with-pandagl-font")
|
|
set_default(true)
|
|
set_showmenu(true)
|
|
set_configvar("PANDAGL_HAS_FONT", 1)
|
|
|
|
option("with-pandagl-image")
|
|
set_default(true)
|
|
set_showmenu(true)
|
|
set_configvar("PANDAGL_HAS_IMAGE", 1)
|
|
|
|
option("with-pandagl-text")
|
|
set_default(true)
|
|
set_showmenu(true)
|
|
set_configvar("PANDAGL_HAS_TEXT", 1)
|
|
|
|
target("pandagl")
|
|
set_version("0.1.0-a")
|
|
set_kind("$(kind)")
|
|
add_files("src/*.c")
|
|
add_deps("yutil")
|
|
add_includedirs("include")
|
|
set_configdir("include/pandagl")
|
|
add_configfiles("src/config.h.in")
|
|
add_headerfiles("include/pandagl.h", "include/(pandagl/*.h)")
|
|
add_packages("libpng", "libjpeg", "freetype", "fontconfig")
|
|
if is_kind("static") then
|
|
set_configvar("PANDAGL_STATIC_BUILD", 1)
|
|
elseif is_plat("windows") then
|
|
add_defines("PANDAGL_DLL_EXPORT")
|
|
end
|
|
add_options("with-pandagl-font", "with-pandagl-image", "with-pandagl-text")
|
|
if has_config("with-pandagl-font") then
|
|
add_files("src/font/*.c")
|
|
if has_package("freetype") then
|
|
set_configvar("PANDAGL_HAS_FREETYPE", 1)
|
|
end
|
|
if has_package("fontconfig") then
|
|
set_configvar("PANDAGL_HAS_FONTCONFIG", 1)
|
|
end
|
|
end
|
|
if has_config("with-pandagl-font") then
|
|
add_files("src/text/*.c")
|
|
end
|
|
if has_config("with-pandagl-image") then
|
|
add_files("src/image/*.c")
|
|
if has_package("libpng") then
|
|
set_configvar("PANDAGL_HAS_LIBPNG", 1)
|
|
end
|
|
if has_package("libjpeg") then
|
|
set_configvar("PANDAGL_HAS_LIBJPEG", 1)
|
|
end
|
|
end
|
|
|
|
target("pandagl-tests")
|
|
set_default(false)
|
|
set_kind("binary")
|
|
set_group("tests")
|
|
set_rundir("tests/fixtures")
|
|
add_files("tests/main.c", "tests/test_canvas_mix.c", "tests/test_image_reader.c", "tests/test_font_load.c", "tests/test_text_edit.c", "tests/test_font_cache.c")
|
|
add_deps("ctest", "pandagl")
|
|
add_rules("tests.runnable")
|
|
add_tests("default", {group = "tests"})
|
|
|
|
includes("examples/*/xmake.lua")
|