0026993: Configuration, CMake - use the abstraction level of VTK instead CSF_VTK...
[occt.git] / adm / cmake / occt_toolkit.cmake
index b191cd6..81112e3 100644 (file)
@@ -93,7 +93,7 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
 
     foreach(HEADER_FILE ${HEADER_FILES})
       if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
-        message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
+        message (STATUS "Info: consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
         list (APPEND USED_INCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
         SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
       else()
@@ -104,7 +104,7 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
 
     foreach(SOURCE_FILE ${SOURCE_FILES})
       if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
-        message (STATUS "Info. consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
+        message (STATUS "Info: consider patched file: ${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
         list (APPEND USED_SRCFILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
         SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
       else()
@@ -184,19 +184,24 @@ set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
 # parce EXTERNLIB file
 FILE_TO_LIST ("src/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
 foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
-  string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
-  if (NOT "${TK_FOUND}" STREQUAL "")
-    list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
-  else()
-    string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
-    if ("${CSF_FOUND}" STREQUAL "")
-      message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
-    else() # get CSF_ value
-      set (CURRENT_CSF ${${USED_ITEM}})
-      if (NOT "${CURRENT_CSF}" STREQUAL "")
-        # prepare a list from a string with whitespaces
-        separate_arguments (CURRENT_CSF)
-        list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
+  string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
+  if (NOT COMMENT_FOUND)
+    string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
+    string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
+    
+    if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
+      list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
+    else()
+      string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
+      if ("${CSF_FOUND}" STREQUAL "")
+        message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
+      else() # get CSF_ value
+        set (CURRENT_CSF ${${USED_ITEM}})
+        if (NOT "${CURRENT_CSF}" STREQUAL "")
+          # prepare a list from a string with whitespaces
+          separate_arguments (CURRENT_CSF)
+          list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
+        endif()
       endif()
     endif()
   endif()
@@ -207,7 +212,7 @@ if (APPLE)
   if (NOT ${IS_X11_FOUND} EQUAL -1)
     find_package (X11 COMPONENTS X11 Xext Xmu Xi)
     if (NOT X11_FOUND)
-      message (STATUS "Warning. X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
+      message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
     endif()
   endif()
 endif()