Skip to content

Commit c94cc19

Browse files
committed
lunasvg is now dynamically pulled.
1 parent f0179e8 commit c94cc19

4 files changed

Lines changed: 49 additions & 18 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@
1616
[submodule "dep/libromfs"]
1717
path = dep/libromfs
1818
url = https://github.com/WerWolv/libromfs.git
19-
[submodule "dep/lunasvg"]
20-
path = dep/lunasvg
21-
url = https://github.com/sammycage/lunasvg.git

dep/build.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,51 @@
408408
],
409409
),
410410
)
411+
412+
package(
413+
name="lunasvg",
414+
package="lunasvg",
415+
fallback=cxxlibrary(
416+
name="lunasvg_fallback_lib",
417+
srcs=[
418+
"dep/lunasvg/source/svgtextelement.cpp",
419+
"dep/lunasvg/source/lunasvg.cpp",
420+
"dep/lunasvg/source/graphics.h",
421+
"dep/lunasvg/source/svggeometryelement.cpp",
422+
"dep/lunasvg/source/svgproperty.cpp",
423+
"dep/lunasvg/source/graphics.cpp",
424+
"dep/lunasvg/source/svgpaintelement.cpp",
425+
"dep/lunasvg/source/svgparser.cpp",
426+
"dep/lunasvg/source/svgelement.cpp",
427+
"dep/lunasvg/source/svgrenderstate.h",
428+
"dep/lunasvg/source/svgproperty.h",
429+
"dep/lunasvg/source/svgpaintelement.h",
430+
"dep/lunasvg/source/svgelement.h",
431+
"dep/lunasvg/source/svgtextelement.h",
432+
"dep/lunasvg/source/svggeometryelement.h",
433+
"dep/lunasvg/source/svgparserutils.h",
434+
"dep/lunasvg/source/svglayoutstate.cpp",
435+
"dep/lunasvg/source/svglayoutstate.h",
436+
"dep/lunasvg/source/svgrenderstate.cpp",
437+
],
438+
hdrs={"lunasvg.h": "dep/lunasvg/include/lunasvg.h"},
439+
deps=[
440+
"dep+plutovg_lib",
441+
"dep+fmt_lib",
442+
git_repository(
443+
name="lunasvg_repo",
444+
url="https://github.com/sammycage/lunasvg",
445+
branch="v3.5.0",
446+
path="dep/lunasvg",
447+
),
448+
],
449+
cflags=[
450+
"-DLUNASVG_BUILD_STATIC",
451+
"-DPLUTOVG_BUILD_STATIC",
452+
],
453+
caller_cflags=[
454+
"-DLUNASVG_BUILD_STATIC",
455+
"-DPLUTOVG_BUILD_STATIC",
456+
],
457+
),
458+
)

dep/lunasvg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/gui2/build.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
'-DIMHEX_PROJECT_NAME=\\"fluxengine\\"',
1212
"-DIMHEX_STATIC_LINK_PLUGINS",
1313
'-DIMHEX_VERSION=\\"0.0.0\\"',
14-
"-DLUNASVG_BUILD_STATIC",
15-
"-DPLUTOVG_BUILD_STATIC",
1614
"-DUNICODE",
1715
# "-DDEBUG",
1816
]
@@ -74,17 +72,6 @@ def sources_from(path, except_for=[]):
7472
deps=[".+dbus_lib"],
7573
)
7674

77-
package(
78-
name="lunasvg",
79-
package="lunasvg",
80-
fallback=cxxlibrary(
81-
name="lunasvg_fallback_lib",
82-
srcs=sources_from("dep/lunasvg/source"),
83-
hdrs=headers_from("dep/lunasvg/include"),
84-
deps=["dep+plutovg_lib", "dep+fmt_lib"],
85-
cflags=cflags,
86-
),
87-
)
8875
cxxlibrary(
8976
name="imgui",
9077
srcs=sources_from("dep/imhex/lib/third_party/imgui/backend/source")
@@ -110,7 +97,7 @@ def sources_from(path, except_for=[]):
11097
"imgui_freetype.h": "dep/imhex/lib/third_party/imgui/imgui/include/misc/freetype/imgui_freetype.h",
11198
"imconfig.h": "./imhex_overrides/imconfig.h",
11299
},
113-
deps=[".+freetype2_lib", ".+lunasvg", ".+glfw3_lib"],
100+
deps=[".+freetype2_lib", "dep+lunasvg", ".+glfw3_lib"],
114101
)
115102

116103
cxxprogram(

0 commit comments

Comments
 (0)