mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd3bad5250 |
369
CMakeLists.txt
369
CMakeLists.txt
@@ -396,15 +396,29 @@ else()
|
||||
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
|
||||
endif()
|
||||
|
||||
set (MINIMAL_BUILD OFF CACHE BOOL "${MINIMAL_BUILD_DESCR}")
|
||||
|
||||
# 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
|
||||
OCCT_MODULES_AND_TOOLKITS (MODULES "TOOLKITS" OCCT_MODULES)
|
||||
if (MINIMAL_BUILD)
|
||||
OCCT_MODULES_AND_TOOLKITS (MODULES_MIN "TOOLKITS" OCCT_MODULES)
|
||||
|
||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}" FORCE)
|
||||
set (BUILD_MODULE_MfcSamples OFF CACHE BOOL "${BUILD_MODULE_MfcSamples_DESCR}" FORCE)
|
||||
else ()
|
||||
OCCT_MODULES_AND_TOOLKITS (MODULES "TOOLKITS" OCCT_MODULES)
|
||||
endif ()
|
||||
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
BUILD_MODULE (${OCCT_MODULE})
|
||||
endforeach()
|
||||
|
||||
if (MINIMAL_BUILD AND BUILD_MODULE_Draw)
|
||||
message (STATUS "Info. Draw module is turned off for the minimal configuration")
|
||||
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
if (ANDROID AND BUILD_MODULE_Draw)
|
||||
message (STATUS "Info. Draw module is turned off due to it is not supported on Android")
|
||||
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
|
||||
@@ -456,204 +470,232 @@ set (BUILD_TOOLKITS ${RAW_BUILD_TOOLKITS})
|
||||
# include the patched or original list of definitions and flags
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_defs_flags")
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/3rdparty_macro")
|
||||
|
||||
# search for TKIVtk and TKIVtkDraw in BUILD_TOOLKITS
|
||||
list (FIND BUILD_TOOLKITS TKIVtk CAN_USE_VTK)
|
||||
if (CAN_USE_VTK EQUAL -1)
|
||||
list (FIND BUILD_TOOLKITS TKIVtkDraw CAN_USE_VTK)
|
||||
if (MINIMAL_BUILD)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOCC_MINIMAL_BUILD")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOCC_MINIMAL_BUILD")
|
||||
endif()
|
||||
|
||||
if (NOT CAN_USE_VTK EQUAL -1)
|
||||
if (NOT DEFINED USE_VTK)
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
if (NOT MINIMAL_BUILD)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/3rdparty_macro")
|
||||
|
||||
# search for TKIVtk and TKIVtkDraw in BUILD_TOOLKITS
|
||||
list (FIND BUILD_TOOLKITS TKIVtk CAN_USE_VTK)
|
||||
if (CAN_USE_VTK EQUAL -1)
|
||||
list (FIND BUILD_TOOLKITS TKIVtkDraw CAN_USE_VTK)
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (USE_VTK)
|
||||
endif()
|
||||
|
||||
# Rebuild *.yacc and *.lex files that are contained by TKMath toolkit
|
||||
list (FIND BUILD_TOOLKITS TKMath CAN_REBUILD_PDC_FOR_TKMATH)
|
||||
list (FIND BUILD_TOOLKITS StepFile CAN_REBUILD_PDC_FOR_STEPFILE)
|
||||
|
||||
if (NOT ${CAN_REBUILD_PDC_FOR_TKMATH} EQUAL -1 OR NOT ${CAN_REBUILD_PDC_FOR_STEPFILE} EQUAL -1)
|
||||
set (BUILD_YACCLEX OFF CACHE BOOL "${BUILD_YACCLEX_DESCR}")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
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_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")
|
||||
|
||||
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")
|
||||
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")
|
||||
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()
|
||||
|
||||
# VTK
|
||||
if (USE_VTK)
|
||||
add_definitions (-DHAVE_VTK)
|
||||
set (OCCT_VTK_USED_TARGETS "" CACHE INTERNAL "" FORCE)
|
||||
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")
|
||||
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtkDraw)
|
||||
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")
|
||||
if (NOT DEFINED USE_VTK)
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (USE_VTK)
|
||||
endif()
|
||||
|
||||
# Rebuild *.yacc and *.lex files that are contained by TKMath toolkit
|
||||
list (FIND BUILD_TOOLKITS TKMath CAN_REBUILD_PDC_FOR_TKMATH)
|
||||
list (FIND BUILD_TOOLKITS StepFile CAN_REBUILD_PDC_FOR_STEPFILE)
|
||||
|
||||
if (NOT ${CAN_REBUILD_PDC_FOR_TKMATH} EQUAL -1 OR NOT ${CAN_REBUILD_PDC_FOR_STEPFILE} EQUAL -1)
|
||||
set (BUILD_YACCLEX OFF CACHE BOOL "${BUILD_YACCLEX_DESCR}")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
|
||||
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")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
|
||||
endif()
|
||||
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
|
||||
if (USE_FREETYPE)
|
||||
message (STATUS "Info: Freetype is used by OCCT")
|
||||
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()
|
||||
|
||||
# VTK
|
||||
if (USE_VTK)
|
||||
add_definitions (-DHAVE_VTK)
|
||||
set (OCCT_VTK_USED_TARGETS "" CACHE INTERNAL "" FORCE)
|
||||
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")
|
||||
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# GLX
|
||||
if (USE_GLX)
|
||||
add_definitions (-DMACOSX_USE_GLX)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
|
||||
endif()
|
||||
|
||||
# FREEIMAGE
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_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")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_FREEIMAGE")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_FREEIMAGE")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
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)
|
||||
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
|
||||
|
||||
# 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)
|
||||
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
|
||||
|
||||
if (USE_OPENVR)
|
||||
add_definitions (-DHAVE_OPENVR)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/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()
|
||||
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}")
|
||||
|
||||
# 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")
|
||||
if (USE_FFMPEG)
|
||||
add_definitions (-DHAVE_FFMPEG)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/ffmpeg")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_FFMPEG")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_FFMPEG")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
|
||||
endif()
|
||||
|
||||
# OpenGL
|
||||
if (CAN_USE_OPENGL)
|
||||
if (USE_OPENGL)
|
||||
add_definitions (-DHAVE_OPENGL_EXT)
|
||||
# OpenGL
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_OPENGL)
|
||||
if (CAN_USE_OPENGL)
|
||||
if (USE_OPENGL)
|
||||
add_definitions (-DHAVE_OPENGL_EXT)
|
||||
else()
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
|
||||
endif()
|
||||
else()
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
|
||||
OCCT_CHECK_AND_UNSET ("USE_OPENGL")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_OPENGL")
|
||||
endif()
|
||||
|
||||
# OpenGL ES 2.0
|
||||
if (CAN_USE_GLES2)
|
||||
if (USE_GLES2)
|
||||
add_definitions (-DHAVE_GLES2_EXT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
# OpenGL ES 2.0
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlesLibs CAN_USE_GLES2)
|
||||
if (CAN_USE_GLES2)
|
||||
if (USE_GLES2)
|
||||
add_definitions (-DHAVE_GLES2_EXT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
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")
|
||||
|
||||
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()
|
||||
|
||||
# D3D
|
||||
if (USE_D3D)
|
||||
add_definitions (-DHAVE_D3D)
|
||||
#if(MSVC_VERSION LESS 1700)
|
||||
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
|
||||
#endif()
|
||||
else()
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (USE_VTK)
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TCL")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TCL")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
|
||||
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")
|
||||
OCCT_CHECK_AND_UNSET ("USE_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("USE_GLES2")
|
||||
|
||||
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")
|
||||
endif()
|
||||
|
||||
# D3D
|
||||
if (USE_D3D)
|
||||
add_definitions (-DHAVE_D3D)
|
||||
#if(MSVC_VERSION LESS 1700)
|
||||
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
|
||||
#endif()
|
||||
else()
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
|
||||
OCCT_CHECK_AND_UNSET ("USE_GL2PS")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
|
||||
OCCT_CHECK_AND_UNSET ("USE_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
|
||||
OCCT_CHECK_AND_UNSET ("USE_OPENVR")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
|
||||
endif()
|
||||
|
||||
# TBB
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
|
||||
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
|
||||
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
|
||||
|
||||
@@ -694,6 +736,8 @@ else()
|
||||
endif()
|
||||
|
||||
# EIGEN
|
||||
# search for CSF_EIGEN variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
|
||||
if (CAN_USE_EIGEN)
|
||||
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
|
||||
|
||||
@@ -711,8 +755,11 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_EIGEN")
|
||||
endif()
|
||||
|
||||
# define CSF variable
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
|
||||
|
||||
# Doxygen
|
||||
if (BUILD_DOC_Overview)
|
||||
if (NOT MINIMAL_BUILD AND BUILD_DOC_Overview)
|
||||
if (NOT DEFINED INSTALL_DOC_Overview)
|
||||
set (INSTALL_DOC_Overview OFF CACHE BOOL "${INSTALL_DOC_Overview_DESCR}")
|
||||
endif()
|
||||
|
6
adm/MODULES_MIN
Normal file
6
adm/MODULES_MIN
Normal file
@@ -0,0 +1,6 @@
|
||||
FoundationClasses TKernel TKMath
|
||||
ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKMesh TKShHealing
|
||||
Visualization TKService TKV3d
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKBin TKVCAF
|
||||
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKBinXCAF
|
@@ -114,10 +114,14 @@ else()
|
||||
set (CSF_androidlog "log")
|
||||
elseif (UNIX)
|
||||
set (CSF_ThreadLibs "pthread rt stdc++")
|
||||
set (CSF_OpenGlLibs "GL")
|
||||
set (CSF_OpenGlesLibs "EGL GLESv2")
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
|
||||
if (NOT MINIMAL_BUILD)
|
||||
set (CSF_OpenGlLibs "GL")
|
||||
set (CSF_OpenGlesLibs "EGL GLESv2")
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
set (CSF_fontconfig "fontconfig")
|
||||
endif()
|
||||
|
||||
set (CSF_dl "dl")
|
||||
set (CSF_fontconfig "fontconfig")
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -194,6 +194,8 @@ set (USE_GLX_DESCR "Indicates whether X11 OpenGl on OSX is used or not")
|
||||
|
||||
set (USE_D3D_DESCR "Indicates whether optional Direct3D wrapper in OCCT visualization module should be build or not")
|
||||
|
||||
set (MINIMAL_BUILD_DESCR "Indicates whether minimal build should be produced.")
|
||||
|
||||
macro (BUILD_MODULE MODULE_NAME)
|
||||
set (ENABLE_MODULE TRUE)
|
||||
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
|
||||
|
@@ -15,9 +15,11 @@
|
||||
#include <AIS_TextLabel.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
#include <Font_FTFont.hxx>
|
||||
#include <Font_FontMgr.hxx>
|
||||
#include <Font_Rect.hxx>
|
||||
#endif
|
||||
#include <Graphic3d_AspectText3d.hxx>
|
||||
#include <Graphic3d_RenderingParams.hxx>
|
||||
#include <Graphic3d_Text.hxx>
|
||||
@@ -404,6 +406,8 @@ Standard_Boolean AIS_TextLabel::calculateLabelParams (const gp_Pnt& thePosition,
|
||||
{
|
||||
// Get width and height of text
|
||||
Handle(Prs3d_TextAspect) anAsp = myDrawer->TextAspect();
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
Font_FTFontParams aFontParams;
|
||||
aFontParams.PointSize = (unsigned int) anAsp->Height();
|
||||
aFontParams.Resolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
|
||||
@@ -440,6 +444,9 @@ Standard_Boolean AIS_TextLabel::calculateLabelParams (const gp_Pnt& thePosition,
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
#else
|
||||
return Standard_False;
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection,Standard_Transient)
|
||||
// =======================================================================
|
||||
Aspect_DisplayConnection::Aspect_DisplayConnection()
|
||||
{
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined (OCC_MINIMAL_BUILD)
|
||||
myDisplay = NULL;
|
||||
myDefVisualInfo = NULL;
|
||||
myDefFBConfig = NULL;
|
||||
@@ -41,7 +41,7 @@ Aspect_DisplayConnection::Aspect_DisplayConnection()
|
||||
// =======================================================================
|
||||
Aspect_DisplayConnection::~Aspect_DisplayConnection()
|
||||
{
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined (OCC_MINIMAL_BUILD)
|
||||
if (myDefVisualInfo != NULL)
|
||||
{
|
||||
XFree (myDefVisualInfo);
|
||||
@@ -54,7 +54,7 @@ Aspect_DisplayConnection::~Aspect_DisplayConnection()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined (OCC_MINIMAL_BUILD)
|
||||
// =======================================================================
|
||||
// function : Aspect_DisplayConnection
|
||||
// purpose :
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <Font_FTFont.hxx>
|
||||
|
||||
#include <Font_FTLibrary.hxx>
|
||||
@@ -621,3 +623,5 @@ const FT_Outline* Font_FTFont::renderGlyphOutline (const Standard_Utf32Char theC
|
||||
}
|
||||
return &myActiveFTFace->glyph->outline;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <Font_FTLibrary.hxx>
|
||||
|
||||
#include <ft2build.h>
|
||||
@@ -44,3 +46,5 @@ Font_FTLibrary::~Font_FTLibrary()
|
||||
FT_Done_FreeType (myFTLib);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <Font_FontMgr.hxx>
|
||||
|
||||
#include <Font_NameOfFont.hxx>
|
||||
@@ -1158,3 +1160,5 @@ Handle(NCollection_Buffer) Font_FontMgr::EmbedFallbackFont()
|
||||
Font_DejavuSans_Latin_woff_size,
|
||||
const_cast<Standard_Byte*>(Font_DejavuSans_Latin_woff));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <Font_TextFormatter.hxx>
|
||||
|
||||
#include <Font_FTFont.hxx>
|
||||
@@ -424,3 +426,5 @@ Standard_ShortReal Font_TextFormatter::LineWidth (const Standard_Integer theInde
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -23,8 +23,12 @@
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
#include <Font_BRepFont.hxx>
|
||||
#include <Font_BRepTextBuilder.hxx>
|
||||
#endif
|
||||
|
||||
#include <GC_MakeCircle.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
@@ -311,6 +315,7 @@ TCollection_ExtendedString PrsDim_Dimension::GetValueString (Standard_Real& theW
|
||||
|
||||
theWidth = 0.0;
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
if (myDrawer->DimensionAspect()->IsText3d())
|
||||
{
|
||||
// text width produced by BRepFont
|
||||
@@ -341,6 +346,7 @@ TCollection_ExtendedString PrsDim_Dimension::GetValueString (Standard_Real& theW
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValueStr;
|
||||
}
|
||||
@@ -412,6 +418,9 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati
|
||||
const Standard_Integer theLabelPosition)
|
||||
{
|
||||
Handle(Graphic3d_Group) aGroup = thePresentation->NewGroup();
|
||||
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
if (myDrawer->DimensionAspect()->IsText3d())
|
||||
{
|
||||
// getting font parameters
|
||||
@@ -545,6 +554,9 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati
|
||||
|
||||
return;
|
||||
}
|
||||
#else
|
||||
(void)theLabelPosition;
|
||||
#endif
|
||||
|
||||
// generate primitives for 2D text
|
||||
myDrawer->DimensionAspect()->TextAspect()->Aspect()->SetDisplayType (Aspect_TODT_DIMENSION);
|
||||
|
@@ -12,6 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <StdPrs_BRepFont.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
@@ -670,3 +672,5 @@ Standard_Boolean StdPrs_BRepFont::renderGlyph (const Standard_Utf32Char theChar,
|
||||
myCache.Bind (theChar, theShape);
|
||||
return !theShape.IsNull();
|
||||
}
|
||||
|
||||
#endif
|
@@ -12,6 +12,7 @@
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
#ifndef OCC_MINIMAL_BUILD
|
||||
|
||||
#include <StdPrs_BRepTextBuilder.hxx>
|
||||
|
||||
@@ -75,3 +76,5 @@ TopoDS_Shape StdPrs_BRepTextBuilder::Perform (StdPrs_BRepFont&
|
||||
|
||||
return Perform (theFont, aFormatter, thePenLoc);
|
||||
}
|
||||
|
||||
#endif
|
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <Xw_Window.hxx>
|
||||
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
|
||||
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined (OCC_MINIMAL_BUILD)
|
||||
|
||||
#include <Aspect_Convert.hxx>
|
||||
#include <Aspect_WindowDefinitionError.hxx>
|
||||
|
Reference in New Issue
Block a user