0029266: CMake install does not copy pdb files in Debug mode due to the changes in...
[occt.git] / adm / cmake / occt_toolkit.cmake
index e6b1d94..1702611 100644 (file)
@@ -11,6 +11,9 @@ set (PRECOMPILED_DEFS)
 
 if (NOT BUILD_SHARED_LIBS)
   list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
+  if (WIN32)
+    list (APPEND PRECOMPILED_DEFS "-DHAVE_NO_DLL")
+  endif()
 endif()
 
 # Get all used packages from toolkit
@@ -139,7 +142,7 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
   endif()
 endforeach()
 
-if (NOT SINGLE_GENERATOR)
+if (WIN32)
   OCCT_INSERT_CODE_FOR_TARGET ()
 endif()
 
@@ -152,8 +155,8 @@ else()
   add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
 
   if (MSVC)
-    install (FILES  ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
-             CONFIGURATIONS Debug
+    install (FILES  ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
+             CONFIGURATIONS Debug RelWithDebInfo
              DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
   endif()
 
@@ -213,6 +216,9 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
     
     if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
       list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
+      if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
+        OCCT_INSTALL_VTK(${USED_ITEM})
+      endif()
     else()
       string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
       if ("${CSF_FOUND}" STREQUAL "")
@@ -278,9 +284,19 @@ if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
       list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
       if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
         list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
+        if(VTK_MAJOR_VERSION GREATER 6)
+          list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
+        endif()
       endif()
     endif()
   endforeach()
+else()
+  if(VTK_MAJOR_VERSION EQUAL 6 AND VTK_MINOR_VERSION GREATER 2 OR VTK_MAJOR_VERSION GREATER 6)
+    list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL" IS_VTK_RENDER_FREETYPE_FOUND)
+    if (NOT ${IS_VTK_RENDER_FREETYPE_FOUND} EQUAL -1)
+      list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL")
+    endif()
+  endif()
 endif()
 
 if (BUILD_SHARED_LIBS)