From 30fcad4ba5059a0aea20a04ad3eddc06a49052c2 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 11:19:24 +0900 Subject: [PATCH 01/15] use young's fork --- cmake/pmc.CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/pmc.CMakeLists.txt.in b/cmake/pmc.CMakeLists.txt.in index 220eba0..0ec83c5 100644 --- a/cmake/pmc.CMakeLists.txt.in +++ b/cmake/pmc.CMakeLists.txt.in @@ -5,7 +5,7 @@ project(pmc-download NONE) include(ExternalProject) # Notice that this project uses a forked version of PMC with minor fixes & changes ExternalProject_Add(pmc - GIT_REPOSITORY https://github.com/jingnanshi/pmc.git + GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pmc-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/pmc-build" CONFIGURE_COMMAND "" From 819915c9f8155f2458f434d64ed64c17313c4dcd Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 11:22:29 +0900 Subject: [PATCH 02/15] fix build errors and warnings --- teaser/include/teaser/graph.h | 1 - teaser/src/graph.cc | 2 ++ test/teaser/graph-test.cc | 21 ++++++++++----------- test/teaser/registration-test.cc | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/teaser/include/teaser/graph.h b/teaser/include/teaser/graph.h index e7ab542..feadf99 100644 --- a/teaser/include/teaser/graph.h +++ b/teaser/include/teaser/graph.h @@ -41,7 +41,6 @@ class Graph { adj_list_.resize(adj_list.size()); num_edges_ = 0; for (const auto& e_list : adj_list) { - const auto& v = e_list.first; adj_list_[e_list.first] = e_list.second; num_edges_ += e_list.second.size(); } diff --git a/teaser/src/graph.cc b/teaser/src/graph.cc index e1c2ea7..1fbeb5c 100644 --- a/teaser/src/graph.cc +++ b/teaser/src/graph.cc @@ -9,6 +9,8 @@ #include "teaser/graph.h" #include "pmc/pmc.h" +using namespace std; + vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { // Handle deprecated field diff --git a/test/teaser/graph-test.cc b/test/teaser/graph-test.cc index cdcfd94..5bc8925 100644 --- a/test/teaser/graph-test.cc +++ b/test/teaser/graph-test.cc @@ -7,15 +7,14 @@ */ #include "gtest/gtest.h" -#include "gmock/gmock.h" #include #include #include "pmc/pmc.h" +#include "pmc/pmc_bool_vector.h" #include "pmc/pmc_input.h" #include "teaser/graph.h" -#include "test_utils.h" /** * A helper function to generate mock input for testing PMC code @@ -47,11 +46,11 @@ pmc::input generateMockInput() { * @param adj a bool** to the adjcency matrix * @param nodes number of nodes in the graph */ -void printAdjMatirx(const std::vector>& adj, int nodes) { +void printAdjMatirx(const std::vector& adj, int nodes) { std::cout << "Adjacency matrix: " << std::endl; - for (auto& i : adj) { - for (auto j : i) { - std::cout << j << " "; + for (const auto& row : adj) { + for (std::size_t i = 0; i < row.size(); ++i) { + std::cout << row[i] << " "; } std::cout << std::endl; } @@ -158,7 +157,7 @@ TEST(PMCTest, FindMaximumClique1) { } // lower-bound of max clique - vector C; + std::vector C; if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input pmc::pmc_heu maxclique(G, in); in.lb = maxclique.search(G, C); @@ -202,7 +201,7 @@ TEST(PMCTest, FindMaximumClique2) { } // lower-bound of max clique - vector C; + std::vector C; if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input pmc::pmc_heu maxclique(G, in); in.lb = maxclique.search(G, C); @@ -245,7 +244,7 @@ TEST(PMCTest, FindMaximumClique3) { } // lower-bound of max clique - vector C; + std::vector C; if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input pmc::pmc_heu maxclique(G, in); in.lb = maxclique.search(G, C); @@ -335,7 +334,7 @@ TEST(PMCTest, FindMaximumCliqueSingleThreaded) { } // lower-bound of max clique - vector C; + std::vector C; if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input pmc::pmc_heu maxclique(G, in); in.lb = maxclique.search(G, C); @@ -387,7 +386,7 @@ TEST(PMCTest, FindMaximumCliqueMultiThreaded) { } // lower-bound of max clique - vector C; + std::vector C; if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input pmc::pmc_heu maxclique(G, in); in.lb = maxclique.search(G, C); diff --git a/test/teaser/registration-test.cc b/test/teaser/registration-test.cc index ba357c7..5fada93 100644 --- a/test/teaser/registration-test.cc +++ b/test/teaser/registration-test.cc @@ -188,7 +188,7 @@ TEST(RegistrationTest, SolveForRotation) { params.rotation_gnc_factor = 1.4; params.rotation_estimation_algorithm = teaser::RobustRegistrationSolver::ROTATION_ESTIMATION_ALGORITHM::QUATRO; - params.inlier_selection_mode == + params.inlier_selection_mode = teaser::RobustRegistrationSolver::INLIER_SELECTION_MODE::PMC_HEU; params.rotation_cost_threshold = 0.005; From 993b59ea902df3d8c566f710df5f434a8ed46dca Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 13:01:29 +0900 Subject: [PATCH 03/15] remove using namespace std from graph.cc --- teaser/src/graph.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/teaser/src/graph.cc b/teaser/src/graph.cc index 1fbeb5c..953218c 100644 --- a/teaser/src/graph.cc +++ b/teaser/src/graph.cc @@ -9,9 +9,7 @@ #include "teaser/graph.h" #include "pmc/pmc.h" -using namespace std; - -vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { +std::vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { // Handle deprecated field if (!params_.solve_exactly) { @@ -19,8 +17,8 @@ vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { } // Create a PMC graph from the TEASER graph - vector edges; - vector vertices; + std::vector edges; + std::vector vertices; vertices.push_back(edges.size()); const auto all_vertices = graph.getVertices(); @@ -53,8 +51,8 @@ vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { in.heu_strat = "kcore"; in.vertex_search_order = "deg"; - // vector to represent max clique - vector C; + // std::vector to represent max clique + std::vector C; // upper-bound of max clique G.compute_cores(); @@ -71,7 +69,7 @@ vector teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) { static_cast(all_vertices.size()))) { TEASER_DEBUG_INFO_MSG("Using K-core heuristic finder."); // remove all nodes with core number less than max core number - // k_cores is a vector saving the core number of each vertex + // k_cores is a std::vector saving the core number of each vertex auto k_cores = G.get_kcores(); for (int i = 1; i < k_cores->size(); ++i) { // Note: k_core has size equals to num vertices + 1 From 3a793f3db71b44df5ce17a2962e04c20ad7e19b6 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 14:33:00 +0900 Subject: [PATCH 04/15] apply internal patch --- CMakeLists.txt | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7fd037..88c81c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,27 @@ endif () # export targets export(TARGETS ${TEASERPP_EXPORTED_TARGETS} FILE teaserpp-exports.cmake) +set(TEASERPP_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/teaserpp) + install(FILES cmake/teaserppConfig.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/teaserpp - ) + DESTINATION ${TEASERPP_CMAKE_DIR} +) + +include(CMakePackageConfigHelpers) +configure_package_config_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/teaserppConfig.cmake + teaserppConfig.cmake + INSTALL_DESTINATION ${TEASERPP_CMAKE_DIR} +) + +write_basic_package_version_file( + teaserppConfigVersion.cmake + COMPATIBILITY SameMinorVersion +) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/teaserppConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/teaserppConfigVersion.cmake + DESTINATION ${TEASERPP_CMAKE_DIR} +) \ No newline at end of file From 270b7e17b6e46594554836064230fb61f814bf6d Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 15:12:53 +0900 Subject: [PATCH 05/15] replace `configure_file` with `FetchContent` to better control --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88c81c7..8e70d3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,14 +79,15 @@ if (BUILD_TEASER_FPFH) endif () # googletest -configure_file(cmake/GoogleTest.CMakeLists.txt.in googletest-download/CMakeLists.txt) -execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download") -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -add_subdirectory("${CMAKE_BINARY_DIR}/googletest-src" - "${CMAKE_BINARY_DIR}/googletest-build" EXCLUDE_FROM_ALL) +if (BUILD_TESTS) + include(FetchContent) + FetchContent_Declare( + googletest + URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz + ) + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + FetchContent_MakeAvailable(googletest) +endif () # pmc (Parallel Maximum Clique) configure_file(cmake/pmc.CMakeLists.txt.in pmc-download/CMakeLists.txt) From a0c537ed96abde269f60f85c4217c1ad15d537c2 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 15:14:02 +0900 Subject: [PATCH 06/15] update min cmake version to 3.11 for fetch content --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e70d3b..9e5dbe0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.11) project(teaserpp VERSION 1.0.0) set(CMAKE_CXX_STANDARD 14) From eb167ca83473fd71e73d8de2ddb28979c6ae36d0 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 15:36:45 +0900 Subject: [PATCH 07/15] more use of fetchcontent --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e5dbe0..2dbc8c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,9 +78,10 @@ if (BUILD_TEASER_FPFH) endif() endif () +include(FetchContent) + # googletest if (BUILD_TESTS) - include(FetchContent) FetchContent_Declare( googletest URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz @@ -90,13 +91,12 @@ if (BUILD_TESTS) endif () # pmc (Parallel Maximum Clique) -configure_file(cmake/pmc.CMakeLists.txt.in pmc-download/CMakeLists.txt) -execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pmc-download") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pmc-download") -add_subdirectory("${CMAKE_BINARY_DIR}/pmc-src" - "${CMAKE_BINARY_DIR}/pmc-build") +FetchContent_Declare( + pmc + GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git + GIT_TAG ca31ac592f9e2eba10b499dc3b22fc5dd2f19ca2 +) +FetchContent_MakeAvailable(pmc) # tinyply configure_file(cmake/tinyply.CMakeLists.txt.in tinyply-download/CMakeLists.txt) From fd9351f17eead23ddcf7df95cc57dfc687014eb2 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 24 Apr 2025 15:47:19 +0900 Subject: [PATCH 08/15] update pmc --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dbc8c2..6282e81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ endif () FetchContent_Declare( pmc GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git - GIT_TAG ca31ac592f9e2eba10b499dc3b22fc5dd2f19ca2 + GIT_TAG 42d5c87c3fff6dc1fcdbd4bbcd2fee4384bb7a99 ) FetchContent_MakeAvailable(pmc) From d2a31d6419f437fff76769a6988cd555909fe3e0 Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 25 Apr 2025 09:35:38 +0900 Subject: [PATCH 09/15] rm unused cmake files --- cmake/GoogleTest.CMakeLists.txt.in | 14 -------------- cmake/pmc.CMakeLists.txt.in | 15 --------------- 2 files changed, 29 deletions(-) delete mode 100644 cmake/GoogleTest.CMakeLists.txt.in delete mode 100644 cmake/pmc.CMakeLists.txt.in diff --git a/cmake/GoogleTest.CMakeLists.txt.in b/cmake/GoogleTest.CMakeLists.txt.in deleted file mode 100644 index 83bdfd0..0000000 --- a/cmake/GoogleTest.CMakeLists.txt.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -project(googletest-download NONE) - -include(ExternalProject) -ExternalProject_Add(googletest - URL https://github.com/google/googletest/archive/release-1.8.1.zip - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - ) \ No newline at end of file diff --git a/cmake/pmc.CMakeLists.txt.in b/cmake/pmc.CMakeLists.txt.in deleted file mode 100644 index 0ec83c5..0000000 --- a/cmake/pmc.CMakeLists.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -project(pmc-download NONE) - -include(ExternalProject) -# Notice that this project uses a forked version of PMC with minor fixes & changes -ExternalProject_Add(pmc - GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pmc-src" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/pmc-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - ) \ No newline at end of file From 81abd9650ec70cff29f854704d8e9cd42529d350 Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 25 Apr 2025 11:39:00 +0900 Subject: [PATCH 10/15] update pmc --- CMakeLists.txt | 2 +- test/teaser/registration-test.cc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6282e81..8cc7150 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ endif () FetchContent_Declare( pmc GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git - GIT_TAG 42d5c87c3fff6dc1fcdbd4bbcd2fee4384bb7a99 + GIT_TAG 839f8b9882ede642b21b06f82ed0da849ead93c3 ) FetchContent_MakeAvailable(pmc) diff --git a/test/teaser/registration-test.cc b/test/teaser/registration-test.cc index 5fada93..2034555 100644 --- a/test/teaser/registration-test.cc +++ b/test/teaser/registration-test.cc @@ -454,13 +454,12 @@ TEST(RegistrationTest, OutlierDetection) { auto solution = solver.getSolution(); EXPECT_LE(teaser::test::getAngularError(T.topLeftCorner(3, 3), solution.rotation), 0.2); - EXPECT_LE((T.topRightCorner(3, 1) - solution.translation).norm(), 0.1); + EXPECT_LE((T.topRightCorner(3, 1) - solution.translation).squaredNorm(), 0.01); auto final_inliers = solver.getInlierMaxClique(); - - EXPECT_EQ(expected_inliers.size(), final_inliers.size()); - std::sort(expected_inliers.begin(), expected_inliers.end()); std::sort(final_inliers.begin(), final_inliers.end()); + + ASSERT_EQ(expected_inliers.size(), final_inliers.size()); for (size_t i = 0; i < expected_inliers.size(); ++i) { EXPECT_EQ(expected_inliers[i], final_inliers[i]); } From d7e889b323d18672e4bbb80b29fd3b748ffcb457 Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 25 Apr 2025 16:05:55 +0900 Subject: [PATCH 11/15] use pmc v1.0-sr --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cc7150..5eecb61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,7 @@ endif () # pmc (Parallel Maximum Clique) FetchContent_Declare( pmc - GIT_REPOSITORY https://github.com/young-seoulrobotics/pmc.git - GIT_TAG 839f8b9882ede642b21b06f82ed0da849ead93c3 + URL https://github.com/young-seoulrobotics/pmc/archive/refs/tags/v1.0-sr.tar.gz ) FetchContent_MakeAvailable(pmc) From 0f31b223c962459c2751701a2c4c2aecf4bcb6e4 Mon Sep 17 00:00:00 2001 From: jvonhacht Date: Wed, 30 Jul 2025 09:58:05 +0900 Subject: [PATCH 12/15] Make tinyply optional --- CMakeLists.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eecb61..ff21375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ option(BUILD_DOC "Build documentation" ON) option(BUILD_WITH_MARCH_NATIVE "Build with flag march=native" OFF) option(ENABLE_MKL "Try to use Eigen with MKL" OFF) option(ENABLE_DIAGNOSTIC_PRINT "Enable printing of diagnostic messages" ON) +option(TEASERPP_USE_EXTERNAL_TINPLY "Use an external tinyply library instead of the internal one." OFF) if (ENABLE_DIAGNOSTIC_PRINT) message(STATUS "Enable printing of diagnostic messages.") @@ -98,15 +99,22 @@ FetchContent_Declare( FetchContent_MakeAvailable(pmc) # tinyply -configure_file(cmake/tinyply.CMakeLists.txt.in tinyply-download/CMakeLists.txt) -execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tinyply-download") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tinyply-download") -add_subdirectory("${CMAKE_BINARY_DIR}/tinyply-src" - "${CMAKE_BINARY_DIR}/tinyply-build") -target_include_directories(tinyply PUBLIC - $) +if(NOT TEASERPP_USE_EXTERNAL_TINPLY) + message(STATUS "Using internal tinyply build.") + configure_file(cmake/tinyply.CMakeLists.txt.in tinyply-download/CMakeLists.txt) + execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tinyply-download") + execute_process(COMMAND "${CMAKE_COMMAND}" --build . + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tinyply-download") + add_subdirectory("${CMAKE_BINARY_DIR}/tinyply-src" + "${CMAKE_BINARY_DIR}/tinyply-build") + target_include_directories(tinyply PUBLIC + $) +else() + # Find the tinyply provided by the parent project. + message(STATUS "Looking for external tinyply library.") + find_package(tinyply REQUIRED) +endif() # spectra configure_file(cmake/spectra.CMakeLists.txt.in spectra-download/CMakeLists.txt) From 39f1e919a3c67ff6cdf2c313f4077deedf5efa0c Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 1 Aug 2025 15:31:39 +0900 Subject: [PATCH 13/15] apply johan's change --- teaser/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/teaser/CMakeLists.txt b/teaser/CMakeLists.txt index b96e2f3..5197712 100644 --- a/teaser/CMakeLists.txt +++ b/teaser/CMakeLists.txt @@ -12,13 +12,15 @@ if (NOT pmc_POPULATED) add_subdirectory(${pmc_SOURCE_DIR} ${pmc_BINARY_DIR} EXCLUDE_FROM_ALL) endif() -FetchContent_Declare(tinyply - GIT_REPOSITORY https://github.com/ddiakopoulos/tinyply.git - BUILD_COMMAND "" - INSTALL_COMMAND "" -) -if (NOT tinyply_POPULATED) - FetchContent_Populate(tinyply) +if(NOT TEASERPP_USE_EXTERNAL_TINPLY) + FetchContent_Declare(tinyply + GIT_REPOSITORY https://github.com/ddiakopoulos/tinyply.git + BUILD_COMMAND "" + INSTALL_COMMAND "" + ) + if (NOT tinyply_POPULATED) + FetchContent_Populate(tinyply) + endif() endif() FetchContent_Declare(spectra From 4f432da55f034bdab719d8caada128597178162d Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 1 Aug 2025 15:33:21 +0900 Subject: [PATCH 14/15] rm unused pybind cmake template --- cmake/pybind11.CMakeLists.txt.in | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 cmake/pybind11.CMakeLists.txt.in diff --git a/cmake/pybind11.CMakeLists.txt.in b/cmake/pybind11.CMakeLists.txt.in deleted file mode 100644 index e62ac51..0000000 --- a/cmake/pybind11.CMakeLists.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -project(pybind11-download NONE) - -include(ExternalProject) -ExternalProject_Add(pmc - GIT_REPOSITORY https://github.com/pybind/pybind11.git - GIT_TAG v2.13.6 - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pybind11-src" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/pybind11-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - ) From 92ae6396b375d945fdb70d4f8c8d8f5d2ab34ead Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 1 Aug 2025 16:02:38 +0900 Subject: [PATCH 15/15] sync cmakelist with the latest --- CMakeLists.txt | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 168e121..7aeb18d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,27 +101,6 @@ endif () # export targets export(TARGETS ${TEASERPP_EXPORTED_TARGETS} FILE teaserpp-exports.cmake) -set(TEASERPP_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/teaserpp) - install(FILES cmake/teaserppConfig.cmake - DESTINATION ${TEASERPP_CMAKE_DIR} -) - -include(CMakePackageConfigHelpers) -configure_package_config_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/teaserppConfig.cmake - teaserppConfig.cmake - INSTALL_DESTINATION ${TEASERPP_CMAKE_DIR} -) - -write_basic_package_version_file( - teaserppConfigVersion.cmake - COMPATIBILITY SameMinorVersion -) - -install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/teaserppConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/teaserppConfigVersion.cmake - DESTINATION ${TEASERPP_CMAKE_DIR} -) \ No newline at end of file + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/teaserpp + )