From b1837c6d35326df841b29c3029187a1ccd51cdaf Mon Sep 17 00:00:00 2001 From: resserops Date: Mon, 11 May 2026 20:40:26 +0800 Subject: [PATCH] build: add matplotplusplus as git submodule --- .gitmodules | 3 +++ CMakeLists.txt | 1 + third_party/cmake/matplotplusplus.cmake | 13 +++++++++++++ third_party/matplotplusplus | 1 + 4 files changed, 18 insertions(+) create mode 100644 third_party/cmake/matplotplusplus.cmake create mode 160000 third_party/matplotplusplus diff --git a/.gitmodules b/.gitmodules index 6e1ca9c..b98b36b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "third_party/glob"] path = third_party/glob url = https://github.com/p-ranav/glob.git +[submodule "third_party/matplotplusplus"] + path = third_party/matplotplusplus + url = https://github.com/alandefreitas/matplotplusplus.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e97a71..e49e794 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ include(${oops_3rd_cmake_dir}/argparse.cmake) include(${oops_3rd_cmake_dir}/fmt.cmake) include(${oops_3rd_cmake_dir}/scnlib.cmake) include(${oops_3rd_cmake_dir}/glob.cmake) +include(${oops_3rd_cmake_dir}/matplotplusplus.cmake) if(ENABLE_TEST) include(${oops_3rd_cmake_dir}/googletest.cmake) endif() diff --git a/third_party/cmake/matplotplusplus.cmake b/third_party/cmake/matplotplusplus.cmake new file mode 100644 index 0000000..e8e5894 --- /dev/null +++ b/third_party/cmake/matplotplusplus.cmake @@ -0,0 +1,13 @@ +# matplotplusplus-1.2.2 (fe308e13) +set(lib_dir ${oops_3rd_dir}/matplotplusplus) +if(NOT EXISTS "${lib_dir}/CMakeLists.txt") + execute_process(COMMAND git submodule update --init --recursive ${lib_dir}) +endif() + +add_subdirectory(${lib_dir}) +if(TARGET nodesoup) + target_compile_options(nodesoup PRIVATE -w) +endif() +if(TARGET matplot) + target_compile_options(matplot PRIVATE -w) +endif() diff --git a/third_party/matplotplusplus b/third_party/matplotplusplus new file mode 160000 index 0000000..fe308e1 --- /dev/null +++ b/third_party/matplotplusplus @@ -0,0 +1 @@ +Subproject commit fe308e13f6c3ac7c5bd2b2f4717961d1d56d07ea