From 03c68664bde76944a6d04d29407b696672e46c07 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 27 Mar 2024 12:49:21 +0100 Subject: [PATCH 1/5] Correctly guard the building of documentation --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20c2e052a..54c1c6c2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,7 +150,9 @@ endif() add_subdirectory(src) # Add documentation building through the CMake build system -add_subdirectory(doc) +if(BUILD_DOCS) + add_subdirectory(doc) +endif() # Add installation rules for the Helios++ executable and Python bindings library From 93c7adb15dc0f9e17e77851a0857d8967ce96def Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 27 Mar 2024 15:14:36 +0100 Subject: [PATCH 2/5] Avoid overlinking dependencies --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54c1c6c2e..e5912f7e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,11 +58,8 @@ add_library(helios) find_package(GDAL REQUIRED) find_package(tinyxml2 REQUIRED) find_package(glm REQUIRED) -find_package(ZLIB REQUIRED) find_package(Boost REQUIRED COMPONENTS system thread regex filesystem serialization iostreams random) find_package(Armadillo REQUIRED) -find_package(BLAS REQUIRED) -find_package(LAPACK REQUIRED) # LasTools's CMake is not Modern CMake yet, so we have to use old-style find_package # that uses the provoded FindLASTools.cmake file @@ -80,7 +77,6 @@ target_link_libraries(helios GDAL::GDAL tinyxml2::tinyxml2 glm::glm - ZLIB::ZLIB Boost::system Boost::thread Boost::regex @@ -88,8 +84,6 @@ target_link_libraries(helios Boost::serialization Boost::iostreams Boost::random - BLAS::BLAS - LAPACK::LAPACK ${LASTOOLS_LIBRARIES} ${ARMADILLO_LIBRARIES} ) From d4a7e6f53f70135ce1ff964da62a8215e9599e52 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 27 Mar 2024 17:22:31 +0100 Subject: [PATCH 3/5] Use exported Armadillo target --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5912f7e4..0bbde57e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ target_link_libraries(helios Boost::iostreams Boost::random ${LASTOOLS_LIBRARIES} - ${ARMADILLO_LIBRARIES} + armadillo ) target_include_directories(helios From 9d72a866e41ee3b47db1bf4326271b1e969d794c Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Tue, 2 Apr 2024 11:17:30 +0200 Subject: [PATCH 4/5] Use CONFIG to look for armadillo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0bbde57e0..9623ad84b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ find_package(GDAL REQUIRED) find_package(tinyxml2 REQUIRED) find_package(glm REQUIRED) find_package(Boost REQUIRED COMPONENTS system thread regex filesystem serialization iostreams random) -find_package(Armadillo REQUIRED) +find_package(Armadillo CONFIG REQUIRED) # LasTools's CMake is not Modern CMake yet, so we have to use old-style find_package # that uses the provoded FindLASTools.cmake file From 73581d9e64b3ac36413bf698621afbcb6f9f08e7 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Tue, 2 Apr 2024 16:24:09 +0200 Subject: [PATCH 5/5] Privately link to our internal library --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9623ad84b..a070045c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ endif() # Add the HelIOS++ executable add_executable(helios++) -target_link_libraries(helios++ PUBLIC helios) +target_link_libraries(helios++ PRIVATE helios) if(BUILD_PYTHON) find_package(Python COMPONENTS Interpreter Development) @@ -126,7 +126,7 @@ if(BUILD_PYTHON) add_library(_pyhelios MODULE) target_link_libraries(_pyhelios - PUBLIC + PRIVATE helios Boost::python Python::Module