Update of template for compilation in debug mode
[occt.git] / adm / templates / vtk.cmake
index 1b044db..bd1495f 100644 (file)
@@ -57,8 +57,13 @@ if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
   if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
     if(EXISTS "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}")
       set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
-    endif()
-  else()
+    else()
+         if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/lib")
+           set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
+      endif()
+       endif()
+  endif()
+  if(3RDPARTY_VTK_LIBRARY_DIR)
     list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
   endif()
 endif()
@@ -107,7 +112,11 @@ if (WIN32)
   if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
     if(EXISTS "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}")
       set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
-    endif()
+    else()
+         if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/bin")
+           set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
+      endif()
+       endif()
   endif()
 endif()