-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add commented out logic for SPSR repository
Not adding the submodule yet - need to be sure this can actually work - but looking to use the "header only" mode of SPSR added to upstream code to replace the bundled copy in BRL-CAD. Once it is demonstrated to be working, add the submodule and uncomment in dependencies.cmake
- Loading branch information
1 parent
1c367b9
commit f607741
Showing
5 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Find Adaptive Multigrid Solver headers for Poisson Surface Reconstruction | ||
# | ||
# Once done this will define | ||
# | ||
# POISSONRECON_FOUND - system has Adaptive Multigrid Solver headers | ||
# POISSONRECON_INCLUDE_DIR - the Adaptive Multigrid Solver include directory | ||
# | ||
# and the following imported target: | ||
# | ||
# POISSONRECON::POISSONRECON- Provides include dir for headers | ||
|
||
set(_POISSONRECON_SEARCHES) | ||
|
||
# Search POISSONRECON_ROOT first if it is set. | ||
if(POISSONRECON_ROOT) | ||
set(_POISSONRECON_SEARCH_ROOT PATHS ${POISSONRECON_ROOT} NO_DEFAULT_PATH) | ||
list(APPEND _POISSONRECON_SEARCHES _POISSONRECON_SEARCH_ROOT) | ||
endif() | ||
|
||
# Try each search configuration. | ||
foreach(search ${_POISSONRECON_SEARCHES}) | ||
find_path(POISSONRECON_INCLUDE_DIR NAMES SPSR/Reconstructors.h ${${search}} PATH_SUFFIXES include) | ||
endforeach() | ||
|
||
mark_as_advanced(POISSONRECON_INCLUDE_DIR) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(POISSONRECON REQUIRED_VARS POISSONRECON_INCLUDE_DIR) | ||
|
||
if(POISSONRECON_FOUND) | ||
set(POISSONRECON_INCLUDE_DIRS ${POISSONRECON_INCLUDE_DIR}) | ||
|
||
if(NOT TARGET POISSONRECON::POISSONRECON) | ||
add_library(POISSONRECON::POISSONRECON UNKNOWN IMPORTED) | ||
set_target_properties(POISSONRECON::POISSONRECON PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${POISSONRECON_INCLUDE_DIRS}") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Decide if we're using GeometricTools | ||
cad_enable(POISSONRECON "libbg") | ||
|
||
unset(POISSONRECON_BUNDLED CACHE) | ||
|
||
if (NOT ENABLE_POISSONRECON AND NOT DISABLE_POISSONRECON) | ||
|
||
# https://github.com/mkazhdan/PoissonRecon/ | ||
find_package(POISSONRECON) | ||
|
||
if (NOT TARGET POISSONRECON::POISSONRECON) | ||
set(ENABLE_POISSONRECON "ON" CACHE BOOL "Enable SPSR build") | ||
endif (NOT TARGET POISSONRECON::POISSONRECON) | ||
|
||
endif (NOT ENABLE_POISSONRECON AND NOT DISABLE_POISSONRECON) | ||
|
||
set(ENABLE_POISSONRECON "${ENABLE_POISSONRECON}" CACHE BOOL "Enable SPSR build") | ||
|
||
# Decision made | ||
|
||
if (ENABLE_POISSONRECON) | ||
|
||
git_submodule_init(PoissonRecon POISSONRECON/CMakeLists.txt) | ||
|
||
TargetDeps(POISSONRECON) | ||
|
||
ExternalProject_Add(POISSONRECON_BLD | ||
URL "${CMAKE_CURRENT_SOURCE_DIR}/PoissonRecon" | ||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS} | ||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/poissonrecon.patch | ||
CMAKE_ARGS | ||
${BUILD_TYPE_SPECIFIER} | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_NOBUNDLE_INSTALL_PREFIX} | ||
LOG_CONFIGURE ${EXT_BUILD_QUIET} | ||
LOG_BUILD ${EXT_BUILD_QUIET} | ||
LOG_INSTALL ${EXT_BUILD_QUIET} | ||
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET} | ||
STEP_TARGETS install | ||
) | ||
|
||
TargetInstallDeps(POISSONRECON POISSONRECON_DEPENDS) | ||
|
||
set(POISSONRECON_BUNDLED TRUE CACHE BOOL "SPSR bundle flag") | ||
|
||
endif (ENABLE_POISSONRECON) | ||
|
||
# Local Variables: | ||
# tab-width: 8 | ||
# mode: cmake | ||
# indent-tabs-mode: t | ||
# End: | ||
# ex: shiftwidth=2 tabstop=8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PATCH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff -Naur PoissonRecon/CMakeLists.txt POISSONRECON_BLD/CMakeLists.txt | ||
--- PoissonRecon/CMakeLists.txt 1969-12-31 19:00:00.000000000 -0500 | ||
+++ POISSONRECON_BLD/CMakeLists.txt 2024-07-31 16:48:17.163077007 -0400 | ||
@@ -0,0 +1,19 @@ | ||
+cmake_minimum_required(VERSION 3.8) | ||
+ | ||
+project(SPSR) | ||
+ | ||
+file(GLOB SPSR_FILES "${CMAKE_SOURCE_DIR}/Src/*") | ||
+ | ||
+if(NOT DEFINED INCLUDE_DIR) | ||
+ set(INCLUDE_DIR include) | ||
+endif(NOT DEFINED INCLUDE_DIR) | ||
+ | ||
+install(FILES ${SPSR_FILES} DESTINATION ${INCLUDE_DIR}/SPSR) | ||
+ | ||
+# Local Variables: | ||
+# tab-width: 8 | ||
+# mode: cmake | ||
+# indent-tabs-mode: t | ||
+# End: | ||
+# ex: shiftwidth=2 tabstop=8 | ||
+ |