diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2021-07-14 17:26:44 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2021-07-15 10:36:28 +0300 |
commit | e6507594fb6893156056c2123822a2b37f7f179d (patch) | |
tree | 7bfae1c0e3bd84e7f550533c952f3a0aff0dfb9c /CMakeLists.txt | |
parent | 062031a4c6a9fa4d941955f9547e416055f65c02 (diff) |
Search for a better openvdb find module if available
Solves #6681, alternative path for openvdb installation can be specified via cache variable
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b6fe88e48..b8b9add60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,8 @@ option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1) option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0) option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0) +set(OPENVDB_FIND_MODULE_PATH "" CACHE PATH "Path to OpenVDB installation's find modules.") + set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") set(IS_CROSS_COMPILE FALSE) @@ -492,13 +494,17 @@ find_package(NLopt 1.4 REQUIRED) if(SLIC3R_STATIC) set(OPENVDB_USE_STATIC_LIBS ON) set(USE_BLOSC TRUE) -endif() +endif () -find_package(OpenVDB 5.0 REQUIRED COMPONENTS openvdb) +find_package(OpenVDB 5.0 COMPONENTS openvdb) if(OpenVDB_FOUND) slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release) slic3r_remap_configs(Blosc::blosc RelWithDebInfo Release) -endif() +else () + message(FATAL_ERROR "OpenVDB could not be found with the bundled find module. " + "You can try to specify the find module location of your " + "OpenVDB installation with the OPENVDB_FIND_MODULE_PATH cache variable.") +endif () set(TOP_LEVEL_PROJECT_DIR ${PROJECT_SOURCE_DIR}) function(prusaslicer_copy_dlls target) |