Only consider openvdb debug if necessary. Add REQUIRED to openvdb

This commit is contained in:
tamasmeszaros 2019-12-17 16:53:45 +01:00
parent 558529146c
commit 4e27faa236
2 changed files with 4 additions and 3 deletions

View File

@ -409,8 +409,7 @@ if(SLIC3R_STATIC)
set(USE_BLOSC TRUE) set(USE_BLOSC TRUE)
endif() endif()
find_package(OpenVDB 5.0 REQUIRED COMPONENTS openvdb)
find_package(OpenVDB 5.0 COMPONENTS openvdb)
if(OpenVDB_FOUND) if(OpenVDB_FOUND)
slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release) slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release)
endif() endif()

View File

@ -235,7 +235,9 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
if (_is_multi) if (_is_multi)
list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY_RELEASE} ${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}) list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY_RELEASE} ${OpenVDB_${COMPONENT}_LIBRARY_DEBUG})
if(OpenVDB_${COMPONENT}_LIBRARY_RELEASE AND ${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}) list(FIND CMAKE_CONFIGURATION_TYPES "Debug" _has_debug)
if(OpenVDB_${COMPONENT}_LIBRARY_RELEASE AND (_has_debug LESS 0 OR OpenVDB_${COMPONENT}_LIBRARY_DEBUG))
set(OpenVDB_${COMPONENT}_FOUND TRUE) set(OpenVDB_${COMPONENT}_FOUND TRUE)
else() else()
set(OpenVDB_${COMPONENT}_FOUND FALSE) set(OpenVDB_${COMPONENT}_FOUND FALSE)