finish refactor, add docs and CI
CI / Build NRO (push) Successful in 29s
CI / Format check (push) Successful in 11s
CI / Layering check (push) Successful in 1s

This commit is contained in:
2026-04-27 01:49:41 +03:00
parent dc65a4c8a9
commit 9339e7dbfe
48 changed files with 1979 additions and 1476 deletions
+14 -6
View File
@@ -32,11 +32,7 @@ file(GLOB_RECURSE NXST_SOURCES
src/ui/*.cpp
)
file(GLOB_RECURSE PLUTONIUM_SOURCES
lib/Plutonium/source/*.cpp
)
add_executable(NXST ${NXST_SOURCES} ${PLUTONIUM_SOURCES})
add_executable(NXST ${NXST_SOURCES})
# ── Include paths ─────────────────────────────────────────────────────────────
target_include_directories(NXST PRIVATE
@@ -56,13 +52,25 @@ pkg_check_modules(PORTLIBS REQUIRED IMPORTED_TARGET ${NXST_PKG_MODULES})
target_include_directories(NXST PRIVATE ${PORTLIBS_INCLUDE_DIRS})
# ── Link libraries ────────────────────────────────────────────────────────────
# ── Plutonium static library ──────────────────────────────────────────────────
set(LIBPU_A ${CMAKE_SOURCE_DIR}/lib/Plutonium/lib/libpu.a)
add_custom_command(
OUTPUT ${LIBPU_A}
COMMAND make -C ${CMAKE_SOURCE_DIR}/lib/Plutonium -j
COMMENT "Building Plutonium (libpu.a)"
)
add_custom_target(plutonium DEPENDS ${LIBPU_A})
add_dependencies(NXST plutonium)
# ── Link libraries ────────────────────────────────────────────────────────────
# Order matters for static linking: put most dependent libs first.
# libpu.a first (contains C wrappers not in Plutonium source).
# drm_nouveau, harfbuzz, freetype, z appended explicitly after pkg-config output
# to fix the freetype→harfbuzz static link order (see build notes from libnx update).
target_link_libraries(NXST PRIVATE
${CMAKE_SOURCE_DIR}/lib/Plutonium/lib/libpu.a
${LIBPU_A}
PkgConfig::PORTLIBS
drm_nouveau
harfbuzz