0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / CMakeLists.txt
index beee192..8690528 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
 
 set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
 
@@ -6,6 +6,26 @@ set (CMAKE_SUPPRESS_REGENERATION TRUE)
 
 set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
 
+# set using C++ standard
+set (BUILD_CPP_STANDARD "C++11" CACHE STRING "Select using c++ standard.")
+set_property(CACHE BUILD_CPP_STANDARD PROPERTY STRINGS "C++11" "C++14" "C++17" "C++20" "C++23")
+
+# Set desired C++ standard
+if     ("${BUILD_CPP_STANDARD}" STREQUAL "C++11")
+  set (CMAKE_CXX_STANDARD 11)
+elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++14")
+  set (CMAKE_CXX_STANDARD 14)
+elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++17")
+  set (CMAKE_CXX_STANDARD 17)
+elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++20")
+  set (CMAKE_CXX_STANDARD 20)
+elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++23")
+  set (CMAKE_CXX_STANDARD 23)
+else ()
+  message (FATAL_ERROR, "misprint in c++ standard name")
+endif()
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
+
 # macro: include patched file if it exists
 macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
   if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
@@ -15,6 +35,14 @@ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
   endif()
 endmacro()
 
+# set using memory manager option for TKernel
+set (USE_MMGR_TYPE "NATIVE" CACHE STRING "Select using memory manager tool.")
+set_property(CACHE USE_MMGR_TYPE PROPERTY STRINGS "NATIVE" "FLEXIBLE" "TBB" "JEMALLOC")
+
+# set profile for C++ compiler and linker
+set (BUILD_OPT_PROFILE "Default" CACHE STRING "Select profile for compiler and linker.")
+set_property(CACHE BUILD_OPT_PROFILE PROPERTY STRINGS "Default" "Production")
+
 # include variable description
 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
 
@@ -32,7 +60,6 @@ if ("${BUILD_LIBRARY_TYPE}" STREQUAL "Shared")
   endif()
 else()
   unset (BUILD_SHARED_LIBS)
-  message (STATUS "Info: Only 3rdparty's header files are used for building of static OCCT libraries")
   unset (BUILD_SHARED_LIBRARY_NAME_POSTFIX)
 endif()
 
@@ -57,6 +84,20 @@ set_property (GLOBAL PROPERTY OCC_VERSION_MAJOR ${OCC_VERSION_MAJOR})
 set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR})
 set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE})
 
+# set soversion variable determining compatibility version on platforms with symlinks
+# 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance
+if (NOT BUILD_SOVERSION_NUMBERS)
+  set (BUILD_SOVERSION_NUMBERS "0" CACHE STRING "${BUILD_SOVERSION_NUMBERS_DESCR}" FORCE)
+  SET_PROPERTY(CACHE BUILD_SOVERSION_NUMBERS PROPERTY STRINGS 0 1 2 3)
+
+  # update default state of soversion on different platforms
+  if (WIN32 OR ANDROID OR EMSCRIPTEN)
+    set (BUILD_SOVERSION_NUMBERS 0)
+  else()
+    set (BUILD_SOVERSION_NUMBERS 2)
+  endif()
+endif()
+
 set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
 
 # Regeneration of OCCT resource files
@@ -64,7 +105,7 @@ set (BUILD_RESOURCES OFF CACHE BOOL "${BUILD_RESOURCES_DESCR}")
 
 # single-configuration generator
 set (SINGLE_GENERATOR OFF)
-if (CMAKE_BUILD_TYPE)
+if (DEFINED CMAKE_BUILD_TYPE)
   set (SINGLE_GENERATOR ON)
 endif()
 
@@ -87,6 +128,21 @@ if (BUILD_WITH_DEBUG)
   set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
 endif()
 
+# option disabling OCCT exceptions in Release builds (No_Exception)
+if (NOT DEFINED BUILD_RELEASE_DISABLE_EXCEPTIONS)
+  set (BUILD_RELEASE_DISABLE_EXCEPTIONS ON CACHE BOOL "${BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR}")
+endif()
+
+if (MSVC)
+  set (BUILD_FORCE_RelWithDebInfo OFF CACHE BOOL "${BUILD_FORCE_RelWithDebInfo_DESCR}")
+else()
+  set (BUILD_FORCE_RelWithDebInfo OFF)
+endif()
+
+if (BUILD_FORCE_RelWithDebInfo)
+  set (CMAKE_CONFIGURATION_TYPES Release Debug CACHE INTERNAL "" FORCE)
+endif()
+
 # option to enable or disable use of precompiled headers
 if (NOT DEFINED BUILD_USE_PCH)
   set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}")
@@ -97,7 +153,7 @@ if (BUILD_USE_PCH)
   # Load Cotire tool for accelerating build procedure
   include(cotire)
 
-  # Set Cotire to ignore lxx, pxx, gxx 
+  # Set Cotire to ignore lxx, pxx, gxx
   set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "lxx;pxx;gxx" CACHE STRING "Set Cotire to ignore OCCT specific files that can be #included" FORCE)
 
   # Set priority for inclusion of system headers in PCH to reduce problems
@@ -161,7 +217,7 @@ if (NOT DEFINED CMAKE_INSTALL_PREFIX_PREV)
 elseif (NOT "${CMAKE_INSTALL_PREFIX_PREV}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
   # CMAKE_INSTALL_PREFIX has been changed at previous step
   set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
-  
+
   # INSTALL_DIR is required to be updated
   set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
 endif()
@@ -173,10 +229,10 @@ elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
   # INSTALL_DIR has been changed at previous step
   set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
 
-  # sync CMAKE_INSTALL_PREFIX with INSTALL_DIR 
+  # sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
   set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
 
-  # set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder 
+  # set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
   set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
 endif()
 
@@ -215,7 +271,7 @@ if (NOT DEFINED INSTALL_DIR_BIN)
   endif()
 endif()
 
-# define folder contaning all shell/batch scripts
+# define folder containing all shell/batch scripts
 if (NOT DEFINED INSTALL_DIR_SCRIPT)
   if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
     set (INSTALL_DIR_SCRIPT "${INSTALL_DIR_BIN}" CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
@@ -307,7 +363,7 @@ if (NOT DEFINED INSTALL_DIR_DOC)
   endif()
 endif()
 
-# define folder contaning CMake configuration files
+# define folder containing CMake configuration files
 if (NOT DEFINED INSTALL_DIR_CMAKE)
   if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
     if (INSTALL_DIR_WITH_VERSION)
@@ -344,9 +400,9 @@ set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESC
 separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
 
 if (MSVC)
-  set (BUILD_MODULE_MfcSamples OFF CACHE BOOL "${BUILD_MODULE_MfcSamples_DESCR}")
+  set (BUILD_SAMPLES_MFC OFF CACHE BOOL "${BUILD_SAMPLES_MFC_DESCR}")
 endif()
-set (BUILD_MODULE_QtSamples OFF CACHE BOOL "${BUILD_MODULE_QtSamples_DESCR}")
+set (BUILD_SAMPLES_QT OFF CACHE BOOL "${BUILD_SAMPLES_QT_DESCR}")
 
 set (BUILD_Inspector OFF CACHE BOOL "${BUILD_Inspector_DESCR}")
 
@@ -360,12 +416,28 @@ if (MSVC)
 endif()
 
 # whether use optional 3rdparty or not
-if (APPLE)
-  set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
+set (USE_TK        ON  CACHE BOOL "${USE_TK_DESCR}")
+set (USE_FREETYPE  ON  CACHE BOOL "${USE_FREETYPE_DESCR}")
+set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
+set (USE_FFMPEG    OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
+set (USE_OPENVR    OFF CACHE BOOL "${USE_OPENVR_DESCR}")
+set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}")
+set (USE_DRACO     OFF CACHE BOOL "${USE_DRACO_DESCR}")
+set (USE_TBB       OFF CACHE BOOL "${USE_TBB_DESCR}")
+set (USE_EIGEN     OFF CACHE BOOL "${USE_EIGEN_DESCR}")
+
+if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN)
+  # no Xlib
+elseif (APPLE)
+  set (USE_XLIB OFF CACHE BOOL "${USE_XLIB_DESCR}")
+else()
+  set (USE_XLIB ON  CACHE BOOL "${USE_XLIB_DESCR}")
 endif()
 
 if (WIN32)
   set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
+else()
+  set (USE_D3D OFF)
 endif()
 
 # Enable/Disable the floating point exceptions (FPE) during runtime.
@@ -379,6 +451,15 @@ else()
   set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
 endif()
 
+# OpenGL
+if (ANDROID OR IOS OR EMSCRIPTEN OR "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+  set (USE_OPENGL OFF)
+  set (USE_GLES2 ON)
+else()
+  set (USE_OPENGL ON CACHE BOOL "${USE_OPENGL_DESCR}")
+  set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
+endif()
+
 # include the patched or original list of modules
 # list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
 # list <OCCT_MODULES> will contain all modules
@@ -402,7 +483,7 @@ if (NOT DEFINED BUILD_DOC_Overview)
   set (DO_ONLY_CHECK_FOR_DOXYGEN ON)
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
   set (DO_ONLY_CHECK_FOR_DOXYGEN OFF)
-  
+
   if (CAN_DOXYGEN_BE_USED)
     message (STATUS "Info. Overview building is turned on")
   endif()
@@ -410,10 +491,6 @@ if (NOT DEFINED BUILD_DOC_Overview)
   set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
 endif()
 
-if (NOT USE_D3D)
-  list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
-endif()
-
 # accumulate used toolkits (first level) in BUILD_TOOLKITS variable
 list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
 
@@ -423,12 +500,6 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
   endif()
 endforeach()
 
-# DRAWEXE excluded when library build is static
-if (NOT BUILD_SHARED_LIBS)
-  list (REMOVE_ITEM BUILD_TOOLKITS DRAWEXE)
-  message (STATUS "Info: DRAWEXE is not included due to ${BUILD_LIBRARY_TYPE} build library type")
-endif()
-
 # accumulate all used toolkits
 list (REMOVE_DUPLICATES BUILD_TOOLKITS)
 set (RAW_BUILD_TOOLKITS)
@@ -480,36 +551,70 @@ endif()
 # search for CSF variable in EXTERNLIB of each being used toolkit
 OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGE)
 OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
-OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
-OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_GLES2)
-OCCT_IS_PRODUCT_REQUIRED (CSF_GL2PS CAN_USE_GL2PS)
+OCCT_IS_PRODUCT_REQUIRED (CSF_TclTkLibs CAN_USE_TK)
+OCCT_IS_PRODUCT_REQUIRED (CSF_XwLibs CAN_USE_XLIB)
+OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE CAN_USE_FREETYPE)
+OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_OPENGL)
+OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlesLibs CAN_USE_GLES2)
 OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
 OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
 
 # define CSF variable
 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
 
+# Tcl (mandatory for Draw Harness)
 if (USE_TCL)
   message (STATUS "Info: TCL is used by OCCT")
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
-  
-  message (STATUS "Info: TK is used by OCCT")
-  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
 else()
   OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TCL")
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
-
   OCCT_CHECK_AND_UNSET ("INSTALL_TCL")
+endif()
+
+# Tk (optional for Draw Harness)
+if (CAN_USE_TK)
+  if (USE_TK)
+    message (STATUS "Info: TK is used by OCCT")
+    add_definitions (-DHAVE_TK)
+    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
+  else()
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
+    OCCT_CHECK_AND_UNSET ("INSTALL_TK")
+  endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_TK")
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
   OCCT_CHECK_AND_UNSET ("INSTALL_TK")
 endif()
 
-if (USE_FREETYPE)
-  message (STATUS "Info: Freetype is used by OCCT")
-  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
+# Xlib
+if (CAN_USE_XLIB)
+  if (USE_XLIB)
+    message (STATUS "Info: Xlib is used by OCCT")
+    add_definitions (-DHAVE_XLIB)
+    if (APPLE)
+      OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
+    endif()
+  endif()
 else()
+  OCCT_CHECK_AND_UNSET ("USE_XLIB")
+endif()
+
+# FreeType
+if (CAN_USE_FREETYPE)
+  if (USE_FREETYPE)
+    message (STATUS "Info: FreeType is used by OCCT")
+    add_definitions (-DHAVE_FREETYPE)
+    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
+  else()
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
+    OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
+    OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
+    OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
+  endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_FREETYPE")
   OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
-  OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
-  OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
   OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
 endif()
 
@@ -520,7 +625,7 @@ if (USE_VTK)
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
 else()
   OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
-  
+
   if (NOT CAN_USE_VTK EQUAL -1)
     message (STATUS "Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled")
 
@@ -529,25 +634,8 @@ else()
   endif()
 endif()
 
-# D3D
-if (USE_D3D)
-  add_definitions (-DHAVE_D3D)
-  #if(MSVC_VERSION LESS 1700)
-  #OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
-  #endif()
-endif()
-
-# GLX
-if (USE_GLX)
-  add_definitions (-DMACOSX_USE_GLX)
-  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
-endif()
-
 # FREEIMAGE
-
 if (CAN_USE_FREEIMAGE)
-  set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
-
   if (USE_FREEIMAGE)
     add_definitions (-DHAVE_FREEIMAGE)
     OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimage")
@@ -562,13 +650,29 @@ else()
   OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
 endif()
 
+# OpenVR
+# search for CSF_OpenVR variable in EXTERNLIB of each being used toolkit
+OCCT_IS_PRODUCT_REQUIRED (CSF_OpenVR CAN_USE_OPENVR)
+if (CAN_USE_OPENVR)
+  if (USE_OPENVR)
+    add_definitions (-DHAVE_OPENVR)
+    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/openvr")
+  else()
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
+    OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
+  endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_OPENVR")
+
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
+  OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
+endif()
+
 # FFmpeg
 # search for CSF_FFmpeg variable in EXTERNLIB of each being used toolkit
 OCCT_IS_PRODUCT_REQUIRED (CSF_FFmpeg CAN_USE_FFMPEG)
 
 if (CAN_USE_FFMPEG)
-  set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
-
   if (USE_FFMPEG)
     add_definitions (-DHAVE_FFMPEG)
     OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/ffmpeg")
@@ -583,23 +687,33 @@ else()
   OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
 endif()
 
-# OpenGL ES 2.0
-if (CAN_USE_GLES2)
-  if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
-    set (USE_GLES2 ON)
+# OpenGL
+if (CAN_USE_OPENGL)
+  if (USE_OPENGL)
+    add_definitions (-DHAVE_OPENGL_EXT)
   else()
-    set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
+    list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
+    list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
   endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_OPENGL")
+endif()
 
+# OpenGL ES 2.0
+if (CAN_USE_GLES2)
   if (USE_GLES2)
-    add_definitions (-DHAVE_GLES2)
-    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
-       OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
+    add_definitions (-DHAVE_GLES2_EXT)
+    if (NOT IOS)
+      OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
+      OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
+    endif()
   else()
     OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
     OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
     OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
     OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
+    list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGles)
+    list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlesTest)
   endif()
 else()
   OCCT_CHECK_AND_UNSET ("USE_GLES2")
@@ -610,28 +724,19 @@ else()
   OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
 endif()
 
-# GL2PS
-if (NOT DEFINED ANDROID AND CAN_USE_GL2PS)
-  set (USE_GL2PS OFF CACHE BOOL "${USE_GL2PS_DESCR}")
-
-  if (USE_GL2PS)
-    add_definitions (-DHAVE_GL2PS)
-    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gl2ps")
-  else()
-    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
-    OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
-  endif()
+# D3D
+if (USE_D3D)
+  add_definitions (-DHAVE_D3D)
+  #if(MSVC_VERSION LESS 1700)
+  #OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
+  #endif()
 else()
-  OCCT_CHECK_AND_UNSET ("USE_GL2PS")
-
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
-  OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
+  list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
+  list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
 endif()
 
 # TBB
 if (NOT DEFINED ANDROID AND CAN_USE_TBB)
-  set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
-
   if (USE_TBB)
     add_definitions (-DHAVE_TBB)
     OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
@@ -648,10 +753,44 @@ else()
   OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
 endif()
 
+# RapidJSON
+# search for CSF_RapidJSON variable in EXTERNLIB of each being used toolkit
+OCCT_IS_PRODUCT_REQUIRED (CSF_RapidJSON CAN_USE_RAPIDJSON)
+if (CAN_USE_RAPIDJSON)
+  if (USE_RAPIDJSON)
+    add_definitions (-DHAVE_RAPIDJSON)
+    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/rapidjson")
+  else()
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_RAPIDJSON")
+    OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
+  endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_RAPIDJSON")
+
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_RAPIDJSON")
+  OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
+endif()
+
+# Draco library
+# search for CSF_Draco variable in EXTERNLIB of each being used toolkit
+OCCT_IS_PRODUCT_REQUIRED (CSF_Draco CAN_USE_DRACO)
+if (CAN_USE_DRACO)
+  if (USE_DRACO)
+    add_definitions (-DHAVE_DRACO)
+    OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/draco")
+  else()
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO")
+    OCCT_CHECK_AND_UNSET ("INSTALL_DRACO")
+  endif()
+else()
+  OCCT_CHECK_AND_UNSET ("USE_DRACO")
+
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO")
+  OCCT_CHECK_AND_UNSET ("INSTALL_DRACO")
+endif()
+
 # EIGEN
 if (CAN_USE_EIGEN)
-  set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
-
   if (USE_EIGEN)
     add_definitions (-DHAVE_EIGEN)
     OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen")
@@ -689,25 +828,44 @@ else()
   OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
 endif()
 
-# bison 
+# bison
 if (BUILD_YACCLEX)
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
 else()
   OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
 endif()
 
-# flex 
+# flex
 if (BUILD_YACCLEX)
   OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
 else()
   OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
 endif()
 
-string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
+# Jemalloc
+if ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC")
+  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/jemalloc")
+else()
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_JEMALLOC")
+  OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
+endif()
+
+# qt for inspector and samples
+if (BUILD_Inspector OR BUILD_SAMPLES_QT)
+  # check qt 3rdparty path
+  add_definitions (-DHAVE_QT)
+  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
+  message (STATUS "Info: Qt is used by OCCT")
+else()
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
+  OCCT_CHECK_AND_UNSET ("INSTALL_QT")
+endif()
 
-# check all 3rdparty paths
+# check all 3rdparty include paths
+string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
 if (3RDPARTY_NOT_INCLUDED)
-  message (FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
+  message (FATAL_ERROR "Could not find headers of used third-party products: ${3RDPARTY_NOT_INCLUDED}" )
 endif()
 
 if (3RDPARTY_INCLUDE_DIRS)
@@ -720,13 +878,28 @@ endif()
 # include <cmake binary folder>/inc
 include_directories (${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE})
 
-if (3RDPARTY_LIBRARY_DIRS AND BUILD_SHARED_LIBS)
+# check all 3rdparty library paths
+string (REGEX REPLACE ";" " " 3RDPARTY_NO_LIBS "${3RDPARTY_NO_LIBS}")
+if (3RDPARTY_NO_LIBS)
+  if (BUILD_SHARED_LIBS)
+    message (SEND_ERROR "Could not find libraries of used third-party products: ${3RDPARTY_NO_LIBS}" )
+  else()
+    message (WARNING "Could not find libraries of used third-party products: ${3RDPARTY_NO_LIBS}" )
+  endif()
+endif()
+if (3RDPARTY_LIBRARY_DIRS)
   list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
   string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
   message (STATUS "Info: The directories of 3rdparty libraries: \n\t${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
   link_directories (${3RDPARTY_LIBRARY_DIRS})
 endif()
 
+# report not found 3rdparty dll paths
+string (REGEX REPLACE ";" " " 3RDPARTY_NO_DLLS "${3RDPARTY_NO_DLLS}")
+if (3RDPARTY_NO_DLLS)
+  message (WARNING "Could not find DLLs of used third-party products: ${3RDPARTY_NO_DLLS}" )
+endif()
+
 # build directories
 if (SINGLE_GENERATOR)
   set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
@@ -749,7 +922,7 @@ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${
 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
 
-if (WIN32) 
+if (WIN32)
   set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE        "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
   set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
   set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG          "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
@@ -776,22 +949,13 @@ else()
   set (SCRIPT_EXT sh)
 endif()
 
-if (BUILD_Inspector OR BUILD_MODULE_QtSamples)
-  # check qt 3rdparty path
-  add_definitions (-DHAVE_QT)
-  OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/qt")
-  message (STATUS "Info: Qt is used by OCCT")
-else()
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_QT")
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TQTMALLOC")
-  OCCT_CHECK_AND_UNSET ("INSTALL_QT")
-endif()
-
 # OCCT tools
 # include the patched or original list of tools
 # list <TOOLNAME>_TOOLKITS is created foreach tool and contains its toolkits
 # list <OCCT_TOOLS> will contain all tools
 if (BUILD_Inspector)
+  add_definitions (-DHAVE_Inspector)
+
   OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS)
   foreach (OCCT_TOOL ${OCCT_TOOLS})
     list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS})
@@ -827,9 +991,11 @@ if (INSTALL_SAMPLES)
   OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
   OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
   OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code" "${INSTALL_DIR_SAMPLES}/OCCTOverview")
 
   install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
   install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
+  install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/OCCTOverview" RENAME "env.${SCRIPT_EXT}")
   install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
 endif()
 
@@ -898,16 +1064,27 @@ OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${S
 # write current custom.bat/sh (for build directory)
 OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
 
-if (BUILD_MODULE_MfcSamples OR BUILD_MODULE_QtSamples)
-  OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
-  OCCT_COPY_FILE_OR_DIR    ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
+if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
+  OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
+  OCCT_COPY_FILE_OR_DIR    ("adm/templates/sample.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
 endif()
 
-# env script for draw in building environment
-OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
-
-# install env script
-install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}")
+if (WIN32)
+  # env script for draw in building environment
+  OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
+  # install env script
+  install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}")
+  # copy build.bat and install.bat scripts to CMake binary folder
+  OCCT_COPY_FILE_OR_DIR ("adm/templates/build.bat" "${CMAKE_BINARY_DIR}")
+  OCCT_COPY_FILE_OR_DIR ("adm/templates/install.bat" "${CMAKE_BINARY_DIR}")
+else()
+  set (SUB_ENV_NAME "env.${SCRIPT_EXT}")
+  set (SUB_ENV_BUILD_NAME "env.install.${SCRIPT_EXT}")
+  # install env script
+  OCCT_CONFIGURE_AND_INSTALL ("adm/templates/env.install.${SCRIPT_EXT}.in" "${SUB_ENV_BUILD_NAME}" "${SUB_ENV_NAME}" "${INSTALL_DIR_SCRIPT}")
+  # env script for draw in building environment
+  OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
+endif()
 
 # copy DrawAppliInit from OCCT source to build directory
 if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
@@ -926,12 +1103,21 @@ foreach(RESOURCE ${RESOURCES})
   endif()
 endforeach()
 
-if (BUILD_MODULE_QtSamples)
+if (BUILD_SAMPLES_QT)
   FILE_TO_LIST ("adm/SAMPLES_RESOURCES" SAMPLES_RESOURCES)
   foreach(RESOURCE ${SAMPLES_RESOURCES})
     OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
     #message("Copy Sample resources: samples/${RESOURCE} into ${INSTALL_DIR_RESOURCE}/samples")
   endforeach()
+
+  ## Copy sources of OCCTOverview for using in the sample
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
+  OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
 endif()
 
 
@@ -979,40 +1165,34 @@ endif()
 
 message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
 # samples do not support patch usage
-if (BUILD_MODULE_MfcSamples OR BUILD_MODULE_QtSamples)
+if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
   set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
 endif()
 
-if (BUILD_MODULE_MfcSamples)
+if (BUILD_SAMPLES_MFC)
   set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
   set (COMMON_WINMAIN_FILE      ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
 
   add_subdirectory(samples/mfc/standard/mfcsample)
   add_subdirectory(samples/mfc/standard/01_Geometry)
   add_subdirectory(samples/mfc/standard/02_Modeling)
-  add_subdirectory(samples/mfc/standard/03_Viewer2d)
-  add_subdirectory(samples/mfc/standard/04_Viewer3d)
-  add_subdirectory(samples/mfc/standard/05_ImportExport)
-  add_subdirectory(samples/mfc/standard/06_Ocaf)
-  add_subdirectory(samples/mfc/standard/07_Triangulation)
-  add_subdirectory(samples/mfc/standard/08_HLR)
-  add_subdirectory(samples/mfc/standard/09_Animation)
-  add_subdirectory(samples/mfc/standard/10_Convert)
+  add_subdirectory(samples/mfc/standard/03_ImportExport)
+  add_subdirectory(samples/mfc/standard/04_HLR)
 
   message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added")
 endif()
 
 OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
 
-if (BUILD_MODULE_QtSamples)
-  if (NOT Qt5_FOUND OR NOT USE_GLES2)
-    list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
-    message (STATUS "Info: AndroidQt sample excluded due to Qt5 or GLES2 usage are disabled")
-  endif()
-
-  if (NOT BUILD_Inspector)
-    list (REMOVE_ITEM tools_SAMPLES_TOOLKITS TInspectorEXE)
-    message (STATUS "Info: TInspectorEXE sample excluded due to BUILD_Inspector is disabled")
+if (BUILD_Inspector OR BUILD_SAMPLES_QT)
+  if (BUILD_SAMPLES_QT)
+    if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
+      list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
+      message (STATUS "Info: AndroidQt sample excluded due to OS is not Windows or Qt is configured without ANGLE")
+    endif()
+  else()
+    list (REMOVE_ITEM OCCT_SAMPLES qt)
+    message (STATUS "Info: qt samples excluded due to BUILD_SAMPLES_QT is disabled")
   endif()
 
   foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
@@ -1043,8 +1223,9 @@ if (BUILD_TOOL_TOOLKITS)
             PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
   endif()
 
+  set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
   # patch TInspectorEXE
-  OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/samples/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
+  OCCT_CONFIGURE ("adm/templates/TInspectorEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/tools/TInspectorEXE/TInspectorEXE.vcxproj.user")
 endif()
 
 # Prepare variables for configuration of OpenCASCADE cmake config file
@@ -1074,6 +1255,9 @@ foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS})
 endforeach()
 list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED)
 list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
+# these macros are defined for specific tookits, not globalwise
+list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_OPENGL)
+list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_GLES2)
 
 # export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
 foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
@@ -1091,7 +1275,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
 endforeach()
 # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
 install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
-install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
+install (CODE "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)")
 
 foreach (OCCT_MODULE ${OCCT_MODULES})
   if (BUILD_MODULE_${OCCT_MODULE})
@@ -1127,7 +1311,7 @@ if (WIN32)
   set (SET_OpenCASCADE_WITH_D3D "set (OpenCASCADE_WITH_D3D       ${USE_D3D})")
 endif()
 if (APPLE)
-  set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX       ${USE_GLX})")
+  set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX       ${USE_XLIB})")
 endif()
 
 # Configure and install cmake config file
@@ -1148,7 +1332,7 @@ foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
   install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}")
 endforeach()
 
-# Update generated OpenCASCADETargets-*.cmake files 
+# Update generated OpenCASCADETargets-*.cmake files
 # to have correct paths to libraries depending on the configuration
 OCCT_UPDATE_TARGET_FILE ()