  #endif // _WIN32
  
 diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt
-index 57fbec0..55b3850 100644
+index 57fbec0..0379756 100644
 --- a/openvdb/cmd/CMakeLists.txt
 +++ b/openvdb/cmd/CMakeLists.txt
 @@ -74,8 +74,9 @@ if(WIN32)

-  set(_ENV_TBB_ROOT $ENV{TBB_ROOT})
-  if(_ENV_TBB_ROOT)
-    list(APPEND _TBB_ROOT_SEARCH_DIR ${_ENV_TBB_ROOT})
+  ##################################
+  # Check the build type
+  ##################################
+  
+  if(NOT DEFINED TBB_USE_DEBUG_BUILD)
+    if(CMAKE_BUILD_TYPE MATCHES "(Debug|DEBUG|debug)")
+      set(TBB_BUILD_TYPE DEBUG)

    )
+
+   if (OPENVDB_USE_STATIC_LIBS)
+    set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
+      INTERFACE_COMPILE_DEFINITIONS "OPENVDB_STATICLIB;OPENVDB_OPENEXR_STATICLIB"
+    )
+   endif()
