CMake: Improve handling of missing TBB & OpenVDB
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Tue, 15 Jan 2019 00:13:31 +0000 (11:13 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 15 Jan 2019 00:14:36 +0000 (11:14 +1100)
build_files/cmake/platform/platform_unix.cmake

index f9ea942..b2f880a 100644 (file)
@@ -245,13 +245,17 @@ if(WITH_OPENVDB)
        find_package_wrapper(OpenVDB)
        find_package_wrapper(TBB)
        find_package_wrapper(Blosc)
-       if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
+       if(NOT TBB_FOUND)
+               set(WITH_OPENVDB OFF)
+               set(WITH_OPENVDB_BLOSC OFF)
+               message(STATUS "TBB not found, disabling OpenVDB")
+       elseif(NOT OPENVDB_FOUND)
                set(WITH_OPENVDB OFF)
                set(WITH_OPENVDB_BLOSC OFF)
                message(STATUS "OpenVDB not found, disabling it")
        elseif(NOT BLOSC_FOUND)
                set(WITH_OPENVDB_BLOSC OFF)
-               message(STATUS "Blosc not found, disabling it")
+               message(STATUS "Blosc not found, disabling it for OpenVBD")
        endif()
 endif()