From 9b18a32b0c9671db31c502e436ec28a94d6ad4f6 Mon Sep 17 00:00:00 2001 From: Nikolai Fedorov Date: Sun, 3 May 2026 13:00:36 +0300 Subject: [PATCH] build: replace Plutonium submodule with ExternalProject_Add fetch Plutonium is now downloaded at build time via ExternalProject_Add (GIT_REPOSITORY + GIT_TAG) instead of being a git submodule. Removes lib/, .gitmodules, and the linguist-vendored entry for it. Co-Authored-By: Claude Sonnet 4.6 --- .gitattributes | 1 - .gitignore | 1 + .gitmodules | 3 --- CMakeLists.txt | 14 +++++++++----- lib | 1 - 5 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 .gitmodules delete mode 160000 lib diff --git a/.gitattributes b/.gitattributes index c006aab..efc0677 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,6 @@ * text=auto eol=lf # Vendor: do not count toward language stats -lib/Plutonium/** linguist-vendored=true deps/** linguist-vendored=true # Binary assets diff --git a/.gitignore b/.gitignore index 3c9059b..7275bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ CMakeCache.txt CMakeFiles/ cmake_install.cmake compile_commands.json +.cache/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 4312018..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib"] - path = lib - url = https://github.com/XorTroll/Plutonium.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 64d4a4b..43f8420 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,12 +52,16 @@ target_include_directories(NXST PRIVATE ${PORTLIBS_INCLUDE_DIRS}) # ── Plutonium ───────────────────────────────────────────────────────────────── include(ExternalProject) -set(LIBPU_A ${CMAKE_SOURCE_DIR}/lib/Plutonium/lib/libpu.a) +set(PLUTONIUM_SOURCE_DIR ${CMAKE_BINARY_DIR}/plutonium) +set(LIBPU_A ${PLUTONIUM_SOURCE_DIR}/Plutonium/lib/libpu.a) ExternalProject_Add(plutonium_ep - SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/Plutonium + GIT_REPOSITORY https://github.com/XorTroll/Plutonium.git + GIT_TAG b56564b70d038c59eef875f2c3cf436859c827f2 + GIT_PROGRESS ON + SOURCE_DIR ${PLUTONIUM_SOURCE_DIR} CONFIGURE_COMMAND "" - BUILD_COMMAND make -j -C ${CMAKE_SOURCE_DIR}/lib/Plutonium + BUILD_COMMAND make -j -C ${PLUTONIUM_SOURCE_DIR}/Plutonium INSTALL_COMMAND "" BUILD_IN_SOURCE 1 BUILD_BYPRODUCTS ${LIBPU_A} @@ -66,9 +70,9 @@ ExternalProject_Add(plutonium_ep add_library(plutonium STATIC IMPORTED GLOBAL) add_dependencies(plutonium plutonium_ep) set_target_properties(plutonium PROPERTIES - IMPORTED_LOCATION ${LIBPU_A} - INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/lib/Plutonium/include + IMPORTED_LOCATION ${LIBPU_A} ) +target_include_directories(NXST PRIVATE ${PLUTONIUM_SOURCE_DIR}/Plutonium/include) # ── Link libraries ──────────────────────────────────────────────────────────── # Order matters for static linking: put most dependent libs first. diff --git a/lib b/lib deleted file mode 160000 index b56564b..0000000 --- a/lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b56564b70d038c59eef875f2c3cf436859c827f2