Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
97c092f27b |
2
.gitignore
vendored
@@ -58,5 +58,5 @@ Release
|
||||
/Makefile
|
||||
/libtool
|
||||
/stamp*
|
||||
/build*
|
||||
/build
|
||||
/install
|
||||
|
356
CMakeLists.txt
@@ -6,8 +6,8 @@ set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FO
|
||||
|
||||
# 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")
|
||||
include (${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake")
|
||||
include (${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
else()
|
||||
include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
endif()
|
||||
@@ -31,27 +31,10 @@ endif()
|
||||
# the name of the project
|
||||
project (OCCT)
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# Solution folder property
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# get current OCCT version
|
||||
OCC_VERSION (OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
|
||||
|
||||
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 (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||
|
||||
# single-configuration generator
|
||||
set (SINGLE_GENERATOR OFF)
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set (SINGLE_GENERATOR ON)
|
||||
endif()
|
||||
|
||||
set (INSTALL_OCCT_TEST_CASES OFF CACHE BOOL "${INSTALL_OCCT_TEST_CASES_DESCR}")
|
||||
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
|
||||
# check this variable and set if it's required
|
||||
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
|
||||
@@ -59,127 +42,19 @@ if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration ge
|
||||
endif()
|
||||
|
||||
# enable extended messages of many OCCT algorithms
|
||||
set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}")
|
||||
if (BUILD_WITH_DEBUG)
|
||||
set (OCCT_ALGO_EXTENDED_OUTPUT OFF CACHE BOOL "${OCCT_ALGO_EXTENDED_OUTPUT_DESCR}")
|
||||
if (OCCT_ALGO_EXTENDED_OUTPUT_DESCR)
|
||||
add_definitions (-DOCCT_DEBUG)
|
||||
endif()
|
||||
|
||||
# copy samples to install directory
|
||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
||||
set (INSTALL_OCCT_SAMPLES OFF CACHE BOOL "${INSTALL_OCCT_SAMPLES_DESCR}")
|
||||
|
||||
# install dir of the project
|
||||
if (NOT DEFINED INSTALL_DIR)
|
||||
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
|
||||
endif()
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_PREFIX_PREV)
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
|
||||
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()
|
||||
|
||||
if (NOT DEFINED INSTALL_DIR_PREV)
|
||||
set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
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
|
||||
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 "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
# The structure of install folder should be reset
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_BIN_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_SCRIPT_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_LIB_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_INCLUDE_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_OCCT_RESOURCE_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_SHARE_DIR)
|
||||
endif()
|
||||
|
||||
# hide CMAKE_INSTALL_PREFIX from a user
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
set (BIN_LETTER "")
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
set (BIN_LETTER "d")
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set (BIN_LETTER "i")
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# do not define INSTALL_BIN_DIR for win.
|
||||
# Leave library structure for win: <prefix>/win64/vc10/bin(d)
|
||||
if (NOT DEFINED INSTALL_BIN_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_BIN_DIR "${INSTALL_DIR}/bin" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||
else()
|
||||
if (SINGLE_GENERATOR)
|
||||
set (INSTALL_BIN_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define folder contaning all shell/batch scripts
|
||||
if (NOT DEFINED INSTALL_SCRIPT_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_SCRIPT_DIR "${INSTALL_BIN_DIR}/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_SCRIPT_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||
if (NOT DEFINED INSTALL_LIB_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_LIB_DIR "${INSTALL_DIR}/lib" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||
else()
|
||||
if (SINGLE_GENERATOR)
|
||||
set (INSTALL_LIB_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT headers: <prefix>/inc for windows,
|
||||
# <prefix>/include/opencascade-7.0.0 for unix
|
||||
if (NOT DEFINED INSTALL_INCLUDE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/include/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/inc" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT resources: <prefix>/src for windows,
|
||||
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||
if (NOT DEFINED INSTALL_OCCT_RESOURCE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}/resources" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/src" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT data
|
||||
if (NOT DEFINED INSTALL_SHARE_DIR)
|
||||
if (UNIX)
|
||||
set (INSTALL_SHARE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||
else()
|
||||
set (INSTALL_SHARE_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# a directory recognized as a 'patch' for OCCT
|
||||
set (BUILD_PATCH "" CACHE PATH "${BUILD_PATCH_DESCR}")
|
||||
set (APPLY_OCCT_PATCH_DIR "" CACHE PATH "${APPLY_OCCT_PATCH_DIR_DESCR}")
|
||||
|
||||
# the list of being built toolkits
|
||||
set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
|
||||
@@ -194,9 +69,10 @@ if (APPLE)
|
||||
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
||||
endif()
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# include the patched or original list of modules
|
||||
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
||||
@@ -207,16 +83,12 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
BUILD_MODULE (${OCCT_MODULE})
|
||||
endforeach()
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
# Overview
|
||||
set (BUILD_DOC_OcctOverview OFF CACHE BOOL "${BUILD_DOC_OcctOverview_DESCR}")
|
||||
|
||||
if (NOT USE_D3D)
|
||||
list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
|
||||
if (NOT USE_VTK)
|
||||
list (REMOVE_ITEM Visualization_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM Draw_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
|
||||
# accumulate used toolkits (first level) in BUILD_TOOLKITS variable
|
||||
@@ -237,7 +109,7 @@ endif()
|
||||
# accumulate all used toolkits
|
||||
list (REMOVE_DUPLICATES BUILD_TOOLKITS)
|
||||
set (RAW_BUILD_TOOLKITS)
|
||||
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
|
||||
foreach(BUILD_TOOLKIT ${BUILD_TOOLKITS})
|
||||
OCCT_TOOLKIT_FULL_DEP (${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS)
|
||||
list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS})
|
||||
endforeach()
|
||||
@@ -250,56 +122,48 @@ 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)
|
||||
endif()
|
||||
|
||||
if (NOT CAN_USE_VTK EQUAL -1)
|
||||
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}")
|
||||
if (NOT "${CAN_REBUILD_PDC_FOR_TKMATH}" STREQUAL "-1" OR NOT "${CAN_REBUILD_PDC_FOR_STEPFILE}" STREQUAL "-1")
|
||||
set (REBUILD_PLATFORM_DEPENDENT_CODE OFF CACHE BOOL "${REBUILD_PLATFORM_DEPENDENT_CODE_DESCR}")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
OCCT_CHECK_AND_UNSET (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# search for 3rdparty dir
|
||||
if ("${3RDPARTY_DIR}" STREQUAL "")
|
||||
if (DEFINED ENV{3RDPARTY_DIR})
|
||||
set (3RDPARTY_DIR "$ENV{3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/../")
|
||||
# in version 6.7.0 and above, occt parent directory contains 3rdparties
|
||||
get_filename_component (3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/../" ABSOLUTE)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# search for CSF_TclLibs variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
|
||||
|
||||
if (USE_TCL)
|
||||
if ("${USE_TCL}" STREQUAL ON)
|
||||
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()
|
||||
|
||||
# search for CSF_FREETYPE variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
|
||||
|
||||
if (USE_FREETYPE)
|
||||
if ("${USE_FREETYPE}" STREQUAL ON)
|
||||
message (STATUS "Info: Freetype is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
|
||||
else()
|
||||
@@ -315,21 +179,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")
|
||||
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# D3D
|
||||
if (USE_D3D)
|
||||
add_definitions (-DHAVE_D3D)
|
||||
#if(MSVC_VERSION LESS 1700)
|
||||
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
|
||||
#endif()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
|
||||
endif()
|
||||
|
||||
# GLX
|
||||
@@ -416,12 +266,9 @@ if (BUILD_DOC_OcctOverview)
|
||||
endif()
|
||||
|
||||
if (INSTALL_DOC_OcctOverview)
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_SHARE_DIR}/doc")
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/doc")
|
||||
|
||||
# create overview.html only for windows
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_SCRIPT_DIR}")
|
||||
endif()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||
@@ -429,18 +276,18 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_DOC_OcctOverview")
|
||||
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_EXECUTABLE")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_DOT_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# bison
|
||||
if (BUILD_YACCLEX)
|
||||
if (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
|
||||
endif()
|
||||
|
||||
# flex
|
||||
if (BUILD_YACCLEX)
|
||||
if (REBUILD_PLATFORM_DEPENDENT_CODE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
||||
@@ -456,7 +303,7 @@ endif()
|
||||
if (3RDPARTY_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
|
||||
message (STATUS "Info: The directories of 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
include_directories (${3RDPARTY_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
@@ -466,10 +313,14 @@ include_directories (${CMAKE_BINARY_DIR}/inc)
|
||||
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: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# build directories
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
@@ -489,33 +340,29 @@ if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
if ("${INSTALL_DIR}" STREQUAL "")
|
||||
get_filename_component (CMAKE_BINARY_DIR_PARENT ${CMAKE_BINARY_DIR} DIRECTORY)
|
||||
|
||||
set (INSTALL_DIR "${CMAKE_BINARY_DIR_PARENT}/install" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
message (STATUS "Info: INSTALL_DIR has been set as ${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
message (STATUS "\nInfo: Collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
|
||||
# collect all the headers to <binary dir>/inc folder
|
||||
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}")
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_SHARE_DIR}")
|
||||
|
||||
# OCCT samples
|
||||
if (INSTALL_SAMPLES)
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_SHARE_DIR}/samples")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_SHARE_DIR}/samples")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_SHARE_DIR}/samples")
|
||||
if (INSTALL_OCCT_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_SHARE_DIR}/samples")
|
||||
|
||||
if (INSTALL_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_SHARE_DIR}")
|
||||
if (INSTALL_OCCT_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
@@ -524,16 +371,14 @@ else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
# copy draw script to install script folder
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
# DRAW.BAT or DRAW.SH
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install (FILES "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
else()
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
|
||||
# copy draw script to CMake binary folder
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
|
||||
set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
@@ -541,29 +386,29 @@ set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
if (WIN32)
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM_NAME}\" (\n call \"%~dp0${SUB_CUSTOM_NAME}\" %VCVER% %ARCH% %CASDEB% \n)")
|
||||
else()
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\$1\" \"\$2\" \nfi")
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
|
||||
endif()
|
||||
|
||||
# change custom.bat/sh
|
||||
if (EXISTS "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||
if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||
|
||||
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
||||
|
||||
file (WRITE "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
else()
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# write current custom.bat/sh (for install directory)
|
||||
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR}")
|
||||
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
if (BUILD_MODULE_OcctMfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_SCRIPT_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -571,31 +416,29 @@ endif()
|
||||
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
|
||||
# end script for draw in standalone environment
|
||||
if (UNIX)
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.sh.in" "env.install.sh")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.sh" DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.sh")
|
||||
else()
|
||||
# release version
|
||||
set (CURRENT_BUILD_LETTER "")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.release.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.bat"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
# release version
|
||||
set (BUILD_LETTER "")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.release.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# debug version
|
||||
set (CURRENT_BUILD_LETTER "d")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.debug.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.bat"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
# debug version
|
||||
set (BUILD_LETTER "d")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.debug.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# release with debug info version
|
||||
set (CURRENT_BUILD_LETTER "i")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.relwithdebinfo.bat")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.bat"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||
endif()
|
||||
# release with debug info version
|
||||
set (BUILD_LETTER "i")
|
||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.relwithdebinfo.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.${SCRIPT_EXT}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}"
|
||||
RENAME "env.${SCRIPT_EXT}")
|
||||
|
||||
# copy DrawAppliInit from OCCT source to build directory
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
|
||||
@@ -608,15 +451,12 @@ foreach(RESOURCE ${RESOURCES})
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
|
||||
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
|
||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}/${RESOURCE_FOLDER}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src/${RESOURCE_FOLDER}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# define CSF variable
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
|
||||
|
||||
# include patched toolkit projects or original ones
|
||||
foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
|
||||
OCCT_ADD_SUBDIRECTORY ("src/${BUILD_TOOLKIT}")
|
||||
|
18
adm/CMPLRS
@@ -1,18 +1,18 @@
|
||||
wnt WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
|
||||
lin WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
|
||||
|
||||
wnt cmplrs_cxx f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_cxx b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_cxx f -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_cxx b -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_cxx Aspect (wnt cmplrs_cxx b) -D_AFXDLL
|
||||
wnt cmplrs_cxx (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL
|
||||
wnt cmplrs_cxx WNT (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL
|
||||
|
||||
wnt cmplrs_c f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_c b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_c f -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_c b -DWNT -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50
|
||||
|
||||
lin cmplrs_cxx f -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
lin cmplrs_cxx b -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
lin cmplrs_cxx f -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
lin cmplrs_cxx b -DLIN -DLININTEL -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_GL2PS -DHAVE_TBB -DHAVE_OPENCL
|
||||
|
||||
lin cmplrs_c f -D_GNU_SOURCE=1 -fexceptions
|
||||
lin cmplrs_c b -D_GNU_SOURCE=1 -fexceptions
|
||||
lin cmplrs_c f -DLIN -DLININTEL -D_GNU_SOURCE=1 -fexceptions
|
||||
lin cmplrs_c b -DLIN -DLININTEL -D_GNU_SOURCE=1 -fexceptions
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
FoundationClasses TKernel TKMath
|
||||
ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
||||
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKShape FWOSPlugin TKTObj TKBinTObj TKXmlTObj TKVCAF
|
||||
Visualization TKService TKV3d TKOpenGl TKMeshVS TKVoxel TKIVtk
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml FWOSPlugin TKTObj TKBinTObj TKXmlTObj
|
||||
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
19
adm/UDLIST
@@ -67,7 +67,6 @@ n GeomLProp
|
||||
n GeomLib
|
||||
n GeomProjLib
|
||||
n GeomTools
|
||||
n GeomEvaluator
|
||||
n Hermit
|
||||
n IntAna
|
||||
n IntAna2d
|
||||
@@ -213,6 +212,8 @@ n StdPrs
|
||||
n StdSelect
|
||||
n TColQuantity
|
||||
n V3d
|
||||
n Visual3d
|
||||
n Voxel
|
||||
n WNT
|
||||
n Xw
|
||||
n Cocoa
|
||||
@@ -223,6 +224,7 @@ t TKOpenGl
|
||||
t TKD3DHost
|
||||
t TKService
|
||||
t TKV3d
|
||||
t TKVoxel
|
||||
n BinTObjDrivers
|
||||
n LDOM
|
||||
n TObj
|
||||
@@ -237,18 +239,13 @@ n BinMDataXtd
|
||||
n BinMDocStd
|
||||
n BinMFunction
|
||||
n BinMNaming
|
||||
n BinMPrsStd
|
||||
n BinObjMgt
|
||||
n BinTools
|
||||
n CDF
|
||||
n CDM
|
||||
n FWOSDriver
|
||||
n PCDM
|
||||
n StdLDrivers
|
||||
n StdLPersistent
|
||||
n StdObjMgt
|
||||
n StdDrivers
|
||||
n StdPersistent
|
||||
n ShapePersistent
|
||||
n TDF
|
||||
n TDataStd
|
||||
n TDataXtd
|
||||
@@ -265,6 +262,7 @@ n XmlMDataXtd
|
||||
n XmlMDocStd
|
||||
n XmlMFunction
|
||||
n XmlMNaming
|
||||
n XmlMPrsStd
|
||||
n XmlObjMgt
|
||||
r StdResource
|
||||
r XmlOcafResource
|
||||
@@ -277,9 +275,6 @@ t TKCAF
|
||||
t TKCDF
|
||||
t TKLCAF
|
||||
|
||||
t TKStdL
|
||||
t TKStd
|
||||
t TKShape
|
||||
t TKTObj
|
||||
t TKXml
|
||||
t TKXmlL
|
||||
@@ -317,7 +312,6 @@ n MoniTool
|
||||
n RWHeaderSection
|
||||
n RWStepAP203
|
||||
n RWStepAP214
|
||||
n RWStepAP242
|
||||
n RWStepBasic
|
||||
n RWStepDimTol
|
||||
n RWStepElement
|
||||
@@ -335,7 +329,6 @@ n STEPSelections
|
||||
n StepAP203
|
||||
n StepAP209
|
||||
n StepAP214
|
||||
n StepAP242
|
||||
n StepBasic
|
||||
n StepData
|
||||
n StepDimTol
|
||||
@@ -438,5 +431,3 @@ n IVtkTools
|
||||
t TKIVtk
|
||||
n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
|
@@ -1,103 +1,113 @@
|
||||
##
|
||||
|
||||
if(3RDPARTY_MACRO_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
|
||||
#
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
|
||||
|
||||
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
|
||||
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
|
||||
endif()
|
||||
|
||||
# define 3RDPARTY_${PRODUCT_NAME}_DIR variable is it isn't defined
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
|
||||
endif()
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# specify product folder in connectin with 3RDPARTY_DIR
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}")
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
|
||||
if (${PRODUCT_NAME}_DIR_NAME)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
# search for product directory inside 3RDPARTY_DIR directory
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "${PRODUCT_NAME}" ${PRODUCT_NAME}_DIR_NAME)
|
||||
if (${PRODUCT_NAME}_DIR_NAME)
|
||||
message (STATUS "Info: ${PRODUCT_NAME}: ${${PRODUCT_NAME}_DIR_NAME} folder is used")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
#set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
|
||||
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
|
||||
message (STATUS "${INSTALL_${PRODUCT_NAME}_DESCR}")
|
||||
if (NOT "${INSTALL_${PRODUCT_NAME}_DESCR}" STREQUAL "")
|
||||
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
|
||||
else()
|
||||
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} required to be copied into install directory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
# search for include directory
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/include"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER}
|
||||
NO_DEFAULT_PATH)
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
elseif (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# search for library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# library path
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# search for shared library (just for win case)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR PATH "the path to ${PRODUCT_NAME}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY FILEPATH "the path to ${PRODUCT_NAME} library")
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
else()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR PATH "The directory containing ${PRODUCT_NAME} library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL FILEPATH "the path to ${PRODUCT_NAME} shared library")
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
else()
|
||||
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR PATH "The directory containing ${PRODUCT_NAME} shared library")
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
elseif (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component(3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to ${HEADER_NAME}" FORCE)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
|
||||
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
|
||||
PATH_SUFFIXES include
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
|
||||
PATH_SUFFIXES include
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
|
||||
# shared library path
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -105,79 +115,16 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
|
||||
endif()
|
||||
|
||||
# library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
|
||||
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
|
||||
if (ANDROID)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
|
||||
endif()
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY NAMES ${LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY NAMES ${LIBRARY_NAME}
|
||||
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# shared library
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL NAMES ${LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
@@ -191,62 +138,47 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
||||
|
||||
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${FREEIMLIB}.3)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
|
||||
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${GL2PSLIB}.1)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
@@ -260,60 +192,3 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
endmacro()
|
||||
|
||||
macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
|
||||
if (3RDPARTY_${LIBNAME}_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DIR}")
|
||||
# include dir
|
||||
set (DOES_PATH_CONTAIN FALSE)
|
||||
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
|
||||
# library dir
|
||||
set (DOES_PATH_CONTAIN FALSE)
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# shared library dir
|
||||
if (WIN32)
|
||||
set (DOES_PATH_CONTAIN FALSE)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check library
|
||||
set (DOES_PATH_CONTAIN FALSE)
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# check shared library
|
||||
if (WIN32)
|
||||
set (DOES_PATH_CONTAIN FALSE)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
endif()
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -9,7 +9,7 @@ endif()
|
||||
# BISON_EXECUTABLE is required by BISON_TARGET macro and should be defined
|
||||
set (BISON_EXECUTABLE "${3RDPARTY_BISON_EXECUTABLE}" CACHE FILEPATH "path to the bison executable" FORCE)
|
||||
|
||||
find_package (BISON)
|
||||
find_package (Bison)
|
||||
|
||||
if (BISON_FOUND)
|
||||
set (3RDPARTY_BISON_EXECUTABLE "${BISON_EXECUTABLE}" CACHE FILEPATH "The Path to the bison command" FORCE)
|
||||
|
@@ -1,35 +1,32 @@
|
||||
# doxygen
|
||||
|
||||
set (3RDPARTY_DOT_EXECUTABLE_DESCR "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR "The path to the doxygen command")
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "The Path to the doxygen command")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "" CACHE FILEPATH "The path to the dot program used by doxygen")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
|
||||
if (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE))
|
||||
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE})
|
||||
find_package (Doxygen)
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "The Path to the doxygen command" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "The path to the dot program used by doxygen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -37,9 +34,9 @@ if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
if (NOT 3RDPARTY_DOXYGEN_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_DOT_EXECUTABLE}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -8,27 +8,29 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
|
||||
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
|
||||
endif()
|
||||
|
||||
# store ENV{FREETYPE_DIR}
|
||||
SET (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
# specify freetype folder in connectin with 3RDPARTY_DIR
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
|
||||
if (NOT ENV{FREETYPE_DIR})
|
||||
# search for freetype in user defined directory
|
||||
if (NOT 3RDPARTY_FREETYPE_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
|
||||
if (FREETYPE_DIR_NAME)
|
||||
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
#set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype" FORCE)
|
||||
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define required freetype variables
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
|
||||
endif()
|
||||
@@ -37,296 +39,202 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check 3RDPARTY_FREETYPE_ paths for consistency with specified 3RDPARTY_FREETYPE_DIR
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build FILEPATH "the path to ft2build.h")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "the path to ftheader.h")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
|
||||
find_package(Freetype)
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
else()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY_DIR PATH "The directory containing freetype library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL FILEPATH "the path to freetype shared library")
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype shared library" FORCE)
|
||||
else()
|
||||
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
# ft2build header
|
||||
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path of ft2build.h" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# the FIRST step in search for freetype library and header folders (built-in search engine)
|
||||
|
||||
# execute built-in search engine to seek freetype
|
||||
set (IS_BUILTIN_SEARCH_REQUIRED OFF)
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
set (IS_BUILTIN_SEARCH_REQUIRED ON)
|
||||
elseif (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
set (IS_BUILTIN_SEARCH_REQUIRED ON)
|
||||
elseif (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
set (IS_BUILTIN_SEARCH_REQUIRED ON)
|
||||
#elseif (WIN32)
|
||||
#if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
# set (IS_BUILTIN_SEARCH_REQUIRED ON)
|
||||
#endif()
|
||||
endif()
|
||||
|
||||
if (IS_BUILTIN_SEARCH_REQUIRED)
|
||||
|
||||
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
set (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
|
||||
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Freetype)
|
||||
|
||||
# restore ENV{FREETYPE_DIR}
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
|
||||
endif()
|
||||
|
||||
# check the found paths for consistency with specified 3RDPARTY_FREETYPE_DIR
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "the path to ft2build.h")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "the path to ftheader.h")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
|
||||
endif()
|
||||
|
||||
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path to ft2build.h" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path to ftheader.h" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# the SECOND step in search for freetype library and header folders (additional search algorithms)
|
||||
|
||||
# ft2build.h
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
set (FT2BUILD_NAMES ft2build.h config/ft2build.h freetype/config/ft2build.h)
|
||||
|
||||
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build-NOTFOUND" CACHE FILEPATH "the path to ft2build.h" FORCE)
|
||||
|
||||
# cmake (version < 3.0) doesn't find ft2build.h of freetype (version is >= 2.5.1)
|
||||
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
# cmake (version is < 3.0) doesn't find ftheader.h of freetype (version is >= 2.5.1)
|
||||
# do search taking into account freetype structure of 2.5.1 version
|
||||
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES
|
||||
freetype/config/ftheader.h
|
||||
config/ftheader.h
|
||||
HINTS
|
||||
ENV FREETYPE_DIR
|
||||
PATHS
|
||||
/usr/X11R6
|
||||
/usr/local/X11R6
|
||||
/usr/local/X11
|
||||
/usr/freeware
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
NO_DEFAULT_PATH)
|
||||
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h)
|
||||
elseif (FREETYPE_INCLUDE_DIR_freetype2 OR EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
|
||||
PATHS ${3RDPARTY_FREETYPE_DIR}
|
||||
PATH_SUFFIXES include freetype2 include/freetype2
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
|
||||
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
endif()
|
||||
get_filename_component (3RDPARTY_FREETYPE_DIR_ABS "${3RDPARTY_FREETYPE_DIR}" ABSOLUTE)
|
||||
get_filename_component (FREETYPE_INCLUDE_DIR_freetype2_ABS "${FREETYPE_INCLUDE_DIR_freetype2}" ABSOLUTE)
|
||||
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
string (REGEX MATCH "${3RDPARTY_FREETYPE_DIR_ABS}" DOES_PATH_CONTAIN "${FREETYPE_INCLUDE_DIR_freetype2_ABS}")
|
||||
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path to ft2build.h" FORCE)
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN) # if cmake found freetype2 at different place from 3RDPARTY_FREETYPE_DIR
|
||||
# search for freetype2 in 3RDPARTY_FREETYPE_DIR and if it will be found - replace freetyp2 path by new one
|
||||
set (TMP_FREETYPE2 "TMP_FREETYPE2-NOTFOUND" CACHE FILEPATH "" FORCE)
|
||||
find_path (TMP_FREETYPE2 NAMES freetype/config/ftheader.h config/ftheader.h
|
||||
PATHS "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# ftheader.h
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
set (FTHEADER_NAMES ftheader.h config/ftheader.h freetype/config/ftheader.h)
|
||||
if (TMP_FREETYPE2 OR NOT EXISTS "${TMP_FREETYPE2}")
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${TMP_FREETYPE2}" CACHE FILEPATH "the path of freetype2" FORCE)
|
||||
|
||||
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2-NOTFOUND" CACHE FILEPATH "the path to ftheader.h" FORCE)
|
||||
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
|
||||
HINTS ${3RDPARTY_FREETYPE_DIR}
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
|
||||
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path to ftheader.h" FORCE)
|
||||
endif()
|
||||
|
||||
# freetype library
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
|
||||
|
||||
set (FREETYPE_PATH_SUFFIXES lib)
|
||||
if (ANDROID)
|
||||
set (FREETYPE_PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES} libs/${ANDROID_ABI})
|
||||
endif()
|
||||
|
||||
# set 3RDPARTY_FREETYPE_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_LIBRARY
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "3RDPARTY_FREETYPE_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
find_library (3RDPARTY_FREETYPE_LIBRARY freetype
|
||||
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_FREETYPE_LIBRARY freetype
|
||||
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
# freetype shared library
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
|
||||
|
||||
# set 3RDPARTY_FREETYPE_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_DLL
|
||||
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "The path to freetype shared library" FORCE)
|
||||
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype
|
||||
PATHS "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype
|
||||
PATH_SUFFIXES bin)
|
||||
# hide and remove TMP_FREETYPE2
|
||||
mark_as_advanced (TMP_FREETYPE2)
|
||||
unset (TMP_FREETYPE2)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
|
||||
# return ENV{FREETYPE_DIR}
|
||||
SET (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
|
||||
|
||||
# freetype2 header
|
||||
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path of freetype2" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
|
||||
elseif (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_DIR_TMP "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_FREETYPE_LIBRARY_DIR}" STREQUAL "${3RDPARTY_FREETYPE_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
elseif (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component(3RDPARTY_FREETYPE_DLL_DIR_TMP "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_FREETYPE_DLL_DIR}" STREQUAL "${3RDPARTY_FREETYPE_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
# freetype library
|
||||
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE FILEPATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (FREETYPE_LIBRARY_PARENT_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" PATH) # parent of the library directory
|
||||
|
||||
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype PATHS "${FREETYPE_LIBRARY_PARENT_DIR}/bin" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE FILEPATH "The directory containing freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing shared freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_FREETYPE_DLL OR EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# install instructions
|
||||
if (INSTALL_FREETYPE)
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
get_filename_component(FREETYPELIB ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
DESTINATION "${INSTALL_LIB_DIR}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
endif()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||
@@ -344,4 +252,4 @@ OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
|
||||
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
|
||||
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY)
|
||||
|
||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
@@ -1,106 +0,0 @@
|
||||
# CSF variables definition
|
||||
|
||||
if(CSFS_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(CSFS_ALREADY_INCLUDED 1)
|
||||
|
||||
|
||||
if (NOT DEFINED USE_TCL)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
|
||||
endif()
|
||||
|
||||
if (USE_TCL)
|
||||
if ("${3RDPARTY_TCL_LIBRARY_VERSION}" STREQUAL "")
|
||||
message (STATUS "Warning: TCL version has not been specified by CSF_TclLibs defining thus it will be used as 8.6")
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION "8.6")
|
||||
endif()
|
||||
|
||||
if ("${3RDPARTY_TK_LIBRARY_VERSION}" STREQUAL "")
|
||||
message (STATUS "Warning: TK version has not been specified by CSF_TclTkLibs defining thus it will be used as 8.6")
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION "8.6")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_TBB)
|
||||
set (CSF_TBB "tbb tbbmalloc")
|
||||
else()
|
||||
set (CSF_TBB)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (CSF_advapi32 "advapi32.lib")
|
||||
set (CSF_gdi32 "gdi32.lib")
|
||||
set (CSF_user32 "user32.lib")
|
||||
set (CSF_wsock32 "wsock32.lib")
|
||||
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
||||
set (CSF_OpenGlLibs "opengl32.lib glu32.lib")
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}.lib")
|
||||
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}.lib")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
if (APPLE)
|
||||
set (CSF_objc "objc")
|
||||
|
||||
# frameworks
|
||||
find_library (Appkit_LIB NAMES Appkit)
|
||||
set (CSF_Appkit ${Appkit_LIB})
|
||||
|
||||
find_library (IOKit_LIB NAMES IOKit)
|
||||
set (CSF_IOKit ${IOKit_LIB})
|
||||
|
||||
OCCT_CHECK_AND_UNSET (Appkit_LIB)
|
||||
OCCT_CHECK_AND_UNSET (IOKit_LIB)
|
||||
|
||||
if (USE_GLX)
|
||||
set (CSF_OpenGlLibs GL)
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
else()
|
||||
find_library (OpenGlLibs_LIB NAMES OpenGL)
|
||||
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
|
||||
|
||||
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
|
||||
endif()
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclTkLibs Tk)
|
||||
set (CSF_TclLibs Tcl)
|
||||
endif()
|
||||
elseif (ANDROID)
|
||||
set (CSF_ThreadLibs "c")
|
||||
set (CSF_OpenGlLibs "EGL GLESv2")
|
||||
elseif (UNIX)
|
||||
set (CSF_ThreadLibs "pthread rt stdc++")
|
||||
set (CSF_OpenGlLibs "GLU GL")
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")
|
||||
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_FREETYPE)
|
||||
set (CSF_FREETYPE "freetype")
|
||||
else()
|
||||
set (CSF_FREETYPE)
|
||||
endif()
|
||||
|
||||
if (USE_FREEIMAGE)
|
||||
set (CSF_FreeImagePlus "freeimage")
|
||||
else()
|
||||
set (CSF_FreeImagePlus)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ANDROID)
|
||||
if (USE_GL2PS)
|
||||
set (CSF_GL2PS "gl2ps")
|
||||
else()
|
||||
set (CSF_GL2PS)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
@@ -1,31 +1,23 @@
|
||||
##
|
||||
|
||||
if(FLAGS_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(FLAGS_ALREADY_INCLUDED 1)
|
||||
|
||||
if (MSVC)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp:precise")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp:precise")
|
||||
add_definitions(/fp:precise)
|
||||
endif()
|
||||
|
||||
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
|
||||
# ONLY for 32-bit
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if (MSVC80 OR MSVC90 OR MSVC10)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
|
||||
add_definitions(/arch:SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions (-DCSFDB)
|
||||
if (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4996")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4996")
|
||||
add_definitions (/DWNT -wd4996)
|
||||
elseif (APPLE)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC")
|
||||
add_definitions(-DOCC_CONVERT_SIGNALS)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
|
||||
endif()
|
||||
|
||||
# enable structured exceptions for MSVC
|
||||
@@ -36,44 +28,16 @@ elseif (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
|
||||
endif()
|
||||
|
||||
# remove _WINDOWS flag if it exists
|
||||
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (IS_WINDOWSFLAG)
|
||||
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
|
||||
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove WIN32 flag if it exists
|
||||
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (IS_WIN32FLAG)
|
||||
message (STATUS "Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS")
|
||||
string (REGEX REPLACE "/DWIN32" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove _WINDOWS flag if it exists
|
||||
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_C_FLAGS}")
|
||||
if (IS_WINDOWSFLAG)
|
||||
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS")
|
||||
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove WIN32 flag if it exists
|
||||
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_C_FLAGS}")
|
||||
if (IS_WIN32FLAG)
|
||||
message (STATUS "Info: /DWIN32 has been removed from CMAKE_C_FLAGS")
|
||||
string (REGEX REPLACE "/DWIN32" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
# remove DEBUG flag if it exists
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_CXX)
|
||||
message (STATUS "Info: -DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif()
|
||||
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_C)
|
||||
message (STATUS "Info: -DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif()
|
||||
# enable parallel compilation on MSVC 9 and above
|
||||
@@ -84,26 +48,23 @@ endif()
|
||||
# generate a single response file which enlist all of the object files
|
||||
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
|
||||
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
|
||||
if (MSVC)
|
||||
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif()
|
||||
|
||||
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Optimize size of binaries
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
||||
endif()
|
||||
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
||||
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")
|
@@ -1,11 +1,4 @@
|
||||
##
|
||||
|
||||
if(OCCT_MACROS_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(OCCT_MACROS_ALREADY_INCLUDED 1)
|
||||
|
||||
|
||||
#
|
||||
macro (OCCT_CHECK_AND_UNSET VARNAME)
|
||||
if (DEFINED ${VARNAME})
|
||||
unset (${VARNAME} CACHE)
|
||||
@@ -60,8 +53,6 @@ macro (OCCT_MAKE_COMPILER_SHORT_NAME)
|
||||
set (COMPILER vc11)
|
||||
elseif (MSVC12)
|
||||
set (COMPILER vc12)
|
||||
elseif (MSVC14)
|
||||
set (COMPILER vc14)
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
|
||||
set (COMPILER gcc)
|
||||
@@ -91,21 +82,22 @@ endfunction()
|
||||
|
||||
function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
|
||||
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
|
||||
file (GLOB FOUND_FILES "${BUILD_PATCH}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
|
||||
file (GLOB FOUND_FILES "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
endif()
|
||||
|
||||
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
foreach (ORIGIN_FILE ${ORIGIN_FILES})
|
||||
# check for existence of patched version of current file
|
||||
if (NOT BUILD_PATCH OR NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
else()
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
|
||||
get_filename_component (ORIGIN_FILE_NAME "${ORIGIN_FILE}" NAME)
|
||||
if (NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
if (EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
continue()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# append origin version if patched one is not found
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
endforeach()
|
||||
|
||||
set (${RESULT} ${FOUND_FILES} PARENT_SCOPE)
|
||||
@@ -117,12 +109,11 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
|
||||
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
|
||||
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+")
|
||||
list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}")
|
||||
|
||||
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
|
||||
|
||||
@@ -142,21 +133,23 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
endforeach()
|
||||
|
||||
if (LOCAL_RESULT)
|
||||
list (GET LOCAL_RESULT -1 DUMMY)
|
||||
list (LENGTH "${LOCAL_RESULT}" LOC_LEN)
|
||||
math (EXPR LAST_ELEMENT_INDEX "${LOC_LEN}-1")
|
||||
list (GET LOCAL_RESULT ${LAST_ELEMENT_INDEX} DUMMY)
|
||||
set (${RESULT} ${DUMMY} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
|
||||
if (IS_DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
if (IS_DIRECTORY "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
# first of all, install original files
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
|
||||
# secondly, rewrite original files with patched ones
|
||||
install (DIRECTORY "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (DIRECTORY "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${BUILD_PATCH}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (FILES "${APPLY_OCCT_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
else()
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
@@ -168,8 +161,8 @@ macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME DESTINATION_PATH)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
endif()
|
||||
@@ -178,147 +171,54 @@ macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME
|
||||
endmacro()
|
||||
|
||||
macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOOLKITS)
|
||||
set (OCCT_USED_PACKAGES)
|
||||
set (OCCT_SOURCE_DIRS)
|
||||
|
||||
# consider patched header.in template
|
||||
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${BUILD_PATCH}/adm/templates/header.in")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${APPLY_OCCT_PATCH_DIR}/adm/templates/header.in")
|
||||
endif()
|
||||
|
||||
set (ROOT_OCCT_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS})
|
||||
# append parent folder
|
||||
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT})
|
||||
|
||||
# append all required package folders
|
||||
set (OCCT_TOOLKIT_PACKAGES)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
set (OCCT_USED_TOOLKIT_DEPS)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_USED_TOOLKIT_DEPS)
|
||||
endif()
|
||||
|
||||
list (APPEND OCCT_USED_PACKAGES ${OCCT_TOOLKIT_PACKAGES})
|
||||
foreach (OCCT_USED_TOOLKIT_DEP ${OCCT_USED_TOOLKIT_DEPS})
|
||||
list (APPEND OCCT_SOURCE_DIRS ${OCCT_USED_TOOLKIT_DEP})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
list (REMOVE_DUPLICATES OCCT_USED_PACKAGES)
|
||||
foreach (OCCT_SOURCE_DIR ${OCCT_SOURCE_DIRS})
|
||||
# get all header files from each src folder
|
||||
file (GLOB OCCT_HEADER_FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${CMAKE_SOURCE_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
|
||||
install (FILES ${OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
|
||||
|
||||
set (OCCT_HEADER_FILES_COMPLETE)
|
||||
set (OCCT_HEADER_FILE_NAMES_NOT_IN_FILES)
|
||||
set (OCCT_HEADER_FILE_WITH_PROPER_NAMES)
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Compare FILES with files in package directories...")
|
||||
|
||||
foreach (OCCT_PACKAGE ${OCCT_USED_PACKAGES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES)
|
||||
else()
|
||||
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB)
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" )
|
||||
|
||||
# emit warnings if there is unprocessed headers
|
||||
file (GLOB OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/*.*")
|
||||
file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*")
|
||||
|
||||
# use patched header files
|
||||
foreach (OCCT_FILE_IN_PATCH_DIR ${OCCT_ALL_FILES_IN_PATCH_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_PATCH_DIR_NAME ${OCCT_FILE_IN_PATCH_DIR} NAME)
|
||||
list (REMOVE_ITEM OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${OCCT_FILE_IN_PATCH_DIR_NAME}")
|
||||
list (APPEND OCCT_ALL_FILES_IN_DIR "${OCCT_FILE_IN_PATCH_DIR}")
|
||||
# create new file including found header
|
||||
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
|
||||
# consider pathed the source files
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}")
|
||||
file (GLOB PATCHED_OCCT_HEADER_FILES "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.[hgl]xx" "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_SOURCE_DIR}/*.h")
|
||||
install (FILES ${PATCHED_OCCT_HEADER_FILES} DESTINATION "${INSTALL_DIR}/inc")
|
||||
|
||||
set (OCCT_FILE_IN_DIR_STATUS OFF)
|
||||
|
||||
if (${ALL_FILES_NB} LESS 0)
|
||||
break()
|
||||
endif()
|
||||
|
||||
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
|
||||
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
|
||||
|
||||
if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}")
|
||||
set (OCCT_FILE_IN_DIR_STATUS ON)
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR})
|
||||
|
||||
# collect header files with name that does not contain its package one
|
||||
string (FIND "${OCCT_FILE_NAME}" "${OCCT_PACKAGE}_" FOUND_INDEX)
|
||||
if (NOT ${FOUND_INDEX} EQUAL 0)
|
||||
list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# remove found element from list
|
||||
list (REMOVE_AT OCCT_ALL_FILE_NAMES ${FILE_INDEX})
|
||||
math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) # decrement number
|
||||
|
||||
break()
|
||||
endif()
|
||||
# create new patched file including found header
|
||||
foreach (OCCT_HEADER_FILE ${PATCHED_OCCT_HEADER_FILES})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
if (NOT OCCT_FILE_IN_DIR_STATUS)
|
||||
message (STATUS "Warning. File ${OCCT_FILE_IN_DIR} is not listed in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
|
||||
string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}")
|
||||
if (IS_HEADER_FOUND)
|
||||
list (APPEND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${OCCT_FILE_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# create new file including found header
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Create header-links in inc folder...")
|
||||
|
||||
foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME)
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_INCLUDE_DIR}")
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...")
|
||||
|
||||
file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/inc/*")
|
||||
foreach (OCCT_HEADER_FILE_OLD ${OCCT_HEADER_FILES_OLD})
|
||||
get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE_OLD} NAME)
|
||||
string (REGEX MATCH "^[a-zA-Z0-9]+" PACKAGE_NAME "${HEADER_FILE_NAME}")
|
||||
|
||||
list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
||||
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
||||
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/src/${PACKAGE_NAME}/${HEADER_FILE_NAME}")
|
||||
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not presented in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
||||
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
||||
else()
|
||||
list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND)
|
||||
if (NOT ${IS_HEADER_FOUND} EQUAL -1)
|
||||
message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is presented in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
||||
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set (IS_HEADER_FOUND -1)
|
||||
if (NOT "${OCCT_HEADER_FILE_WITH_PROPER_NAMES}" STREQUAL "")
|
||||
list (FIND OCCT_HEADER_FILE_WITH_PROPER_NAMES ${HEADER_FILE_NAME} IS_HEADER_FOUND)
|
||||
endif()
|
||||
|
||||
if (${IS_HEADER_FOUND} EQUAL -1)
|
||||
message (STATUS "Warning. \(${PACKAGE_NAME}\) ${OCCT_HEADER_FILE_OLD} is not used and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc")
|
||||
file (REMOVE "${OCCT_HEADER_FILE_OLD}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
@@ -329,23 +229,23 @@ macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
|
||||
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_COPIED_OBJECT}")
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}")
|
||||
# secondly, rewrite original files with patched ones
|
||||
file (COPY "${BUILD_PATCH}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
file (COPY "${APPLY_OCCT_PATCH_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${BUILD_PATCH}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_ADD_SUBDIRECTORY BEING_ADDED_DIRECTORY)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory(${BUILD_PATCH}/${BEING_ADDED_DIRECTORY})
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory(${APPLY_OCCT_PATCH_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
else()
|
||||
@@ -360,8 +260,8 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
|
||||
message(STATUS "Warning: the list of being used toolkits is empty")
|
||||
else()
|
||||
foreach (USED_TOOLKIT ${BUILD_TOOLKITS})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${APPLY_OCCT_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
endif()
|
||||
@@ -378,8 +278,8 @@ endfunction()
|
||||
|
||||
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
|
||||
set (LOCAL_FILE_CONTENT)
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}")
|
||||
file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
endif()
|
||||
@@ -470,60 +370,27 @@ function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
|
||||
set (${MODULE_LIST} ${${MODULE_LIST}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Returns OCC version string from file Standard_Version.hxx (if available)
|
||||
function (OCC_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
|
||||
# Returns OCCT version string from file Standard_Version.hxx (if available)
|
||||
function (OCCT_VERSION OCCT_VERSION_VAR)
|
||||
set (OCC_VERSION_COMPLETE "7.1.0")
|
||||
set (OCC_VERSION_DEVELOPMENT "")
|
||||
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
|
||||
|
||||
set (OCC_VERSION_MAJOR 7)
|
||||
set (OCC_VERSION_MINOR 0)
|
||||
set (OCC_VERSION_MAINTENANCE 0)
|
||||
set (OCC_VERSION_DEVELOPMENT dev)
|
||||
set (OCC_VERSION_COMPLETE "7.0.0")
|
||||
|
||||
set (STANDARD_VERSION_FILE "${CMAKE_SOURCE_DIR}/src/Standard/Standard_Version.hxx")
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
|
||||
set (STANDARD_VERSION_FILE "${BUILD_PATCH}/src/Standard/Standard_Version.hxx")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${STANDARD_VERSION_FILE}")
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE)
|
||||
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
||||
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*([^ ]+).*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
||||
endforeach()
|
||||
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_DEVELOPMENT OCC_VERSION_COMPLETE)
|
||||
foreach (SOUGHT_VERSION OCC_VERSION_COMPLETE OCC_VERSION_DEVELOPMENT)
|
||||
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
||||
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*\"([^ ]+)\".*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
||||
endforeach()
|
||||
|
||||
if (NOT "${OCC_VERSION_DEVELOPMENT}" STREQUAL "")
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}")
|
||||
else()
|
||||
set (OCCT_VERSION_LOCALVAR "${OCC_VERSION_COMPLETE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (OCC_VERSION_MAJOR "${OCC_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_MINOR "${OCC_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_MAINTENANCE "${OCC_VERSION_MAINTENANCE}" PARENT_SCOPE)
|
||||
set (OCC_VERSION_DEVELOPMENT "${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
|
||||
|
||||
if (OCC_VERSION_DEVELOPMENT AND OCC_VERSION_COMPLETE)
|
||||
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}.${OCC_VERSION_DEVELOPMENT}" PARENT_SCOPE)
|
||||
else()
|
||||
set (OCC_VERSION_STRING_EXT "${OCC_VERSION_COMPLETE}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
set (${OCCT_VERSION_VAR} "${OCCT_VERSION_LOCALVAR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
|
||||
|
||||
set (THE_ROOT_PATH "${${THE_ROOT_PATH_NAME}}")
|
||||
set (THE_BEING_CHECKED_PATH "${${THE_BEING_CHECKED_PATH_NAME}}")
|
||||
|
||||
if (THE_BEING_CHECKED_PATH OR EXISTS "${THE_BEING_CHECKED_PATH}")
|
||||
get_filename_component (THE_ROOT_PATH_ABS "${THE_ROOT_PATH}" ABSOLUTE)
|
||||
get_filename_component (THE_BEING_CHECKED_PATH_ABS "${THE_BEING_CHECKED_PATH}" ABSOLUTE)
|
||||
|
||||
string (REGEX MATCH "${THE_ROOT_PATH_ABS}" DOES_PATH_CONTAIN "${THE_BEING_CHECKED_PATH_ABS}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN) # if cmake found the being checked path at different place from THE_ROOT_PATH_ABS
|
||||
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (${THE_BEING_CHECKED_PATH_NAME} "" CACHE ${THE_VAR_TYPE} "${THE_MESSAGE_OF_BEING_CHECKED_PATH}" FORCE)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
@@ -1,138 +1,128 @@
|
||||
# script for each OCCT toolkit
|
||||
|
||||
# parce PACKAGES file
|
||||
if ("${PROJECT_NAME}" STREQUAL DRAWEXE)
|
||||
set (USED_PACKAGES DRAWEXE)
|
||||
else()
|
||||
FILE_TO_LIST ("src/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
|
||||
endif()
|
||||
|
||||
set (PRECOMPILED_DEFS)
|
||||
|
||||
# Get all used packages from toolkit
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
|
||||
# TKService contains platform-dependent packages: Xw and WNT
|
||||
if ((WIN32 AND "${OCCT_PACKAGE}" STREQUAL "Xw") OR (NOT WIN32 AND "${OCCT_PACKAGE}" STREQUAL "WNT"))
|
||||
# do nothing
|
||||
else()
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
|
||||
endif()
|
||||
|
||||
set (SOURCE_FILES)
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${BUILD_YACCLEX})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||
|
||||
# bison files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||
|
||||
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
|
||||
|
||||
list (SORT SOURCE_FILES_FLEX)
|
||||
list (SORT SOURCE_FILES_BISON)
|
||||
|
||||
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
|
||||
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
|
||||
|
||||
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
|
||||
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
|
||||
|
||||
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
|
||||
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
|
||||
|
||||
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
|
||||
|
||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
|
||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header files
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
|
||||
if(APPLE)
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
|
||||
endif()
|
||||
|
||||
foreach(HEADER_FILE ${HEADER_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
list (APPEND USED_INCFILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
else()
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
list (APPEND USED_SRCFILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${BUILD_PATCH}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
else()
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach (OCCT_PACKAGE ${TOOLKIT_MODULES})
|
||||
if (WIN32)
|
||||
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE}_DLL")
|
||||
endif()
|
||||
# ${OCCT_SOURCE_DIR}/src/${OCCT_PACKAGE}
|
||||
|
||||
set (SOURCE_FILES)
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||
list (SORT SOURCE_FILES_FLEX)
|
||||
|
||||
# bison files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||
list (SORT SOURCE_FILES_BISON)
|
||||
|
||||
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
|
||||
|
||||
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
|
||||
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
|
||||
|
||||
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
|
||||
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
|
||||
|
||||
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
|
||||
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
|
||||
|
||||
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
|
||||
|
||||
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
|
||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
|
||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMP_DIR}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMP_DIR}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
|
||||
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# header files
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
else()
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
|
||||
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
|
||||
if(APPLE)
|
||||
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
|
||||
endif()
|
||||
|
||||
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}")
|
||||
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()
|
||||
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${HEADER_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
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}")
|
||||
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()
|
||||
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE}" FILES "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/${SOURCE_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_RCFILE "")
|
||||
if (MSVC)
|
||||
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
|
||||
|
||||
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
|
||||
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
# Get from toolkits EXTERNLIB all used libs
|
||||
OCCT_TOOLKIT_DEP (${PROJECT_NAME} ${PROJECT_NAME}_DEPS)
|
||||
foreach (PROJECT_DEP ${${PROJECT_NAME}_DEPS})
|
||||
IS_OCCT_TOOLKIT (${PROJECT_DEP} OCCT_MODULES FOUND_TOOLKIT)
|
||||
if ("${FOUND_TOOLKIT}" STREQUAL "ON")
|
||||
list (APPEND USED_LIBS "${PROJECT_DEP}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
# Create project for toolkit
|
||||
list (FIND BUILD_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
if ("${BUILD_TOOLKITS}" STREQUAL "" OR NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
set (CURRENT_MODULE ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
@@ -142,13 +132,9 @@ if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
@@ -164,72 +150,14 @@ else()
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
list (FIND ${OCCT_MODULE}_TOOLKITS ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
|
||||
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
|
||||
set (CURRENT_MODULE ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Modules/${CURRENT_MODULE}")
|
||||
endif()
|
||||
|
||||
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
|
||||
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
||||
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
||||
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||
|
||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
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 "^ *#" 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()
|
||||
endforeach()
|
||||
|
||||
if (APPLE)
|
||||
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
||||
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")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_LIBS})
|
||||
endif()
|
@@ -9,6 +9,55 @@ if (NOT DEFINED 3RDPARTY_TBB_DIR)
|
||||
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
|
||||
endif()
|
||||
|
||||
# tbb include directory
|
||||
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the tbb")
|
||||
endif()
|
||||
|
||||
# tbb library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY OR NOT 3RDPARTY_TBB_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBB_LIBRARY "" CACHE FILEPATH "tbb library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb library directory
|
||||
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBB_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb library")
|
||||
endif()
|
||||
|
||||
# tbb malloc library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY OR NOT 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_LIBRARY "" CACHE FILEPATH "tbb malloc library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb malloc library directory
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb malloc library")
|
||||
endif()
|
||||
|
||||
# tbb shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TBB_DLL OR NOT 3RDPARTY_TBB_DLL_DIR)
|
||||
set (3RDPARTY_TBB_DLL "" CACHE FILEPATH "tbb shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tbb shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TBB_DLL_DIR)
|
||||
set (3RDPARTY_TBB_DLL_DIR "" CACHE FILEPATH "The directory containing tbb shared library")
|
||||
endif()
|
||||
|
||||
# tbb malloc shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL OR NOT 3RDPARTY_TBBMALLOC_DLL_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_DLL "" CACHE FILEPATH "tbb malloc shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tbb malloc shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
|
||||
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
|
||||
@@ -17,270 +66,184 @@ endif()
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# specify TBB folder in connectin with 3RDPARTY_DIR
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_TBB_DIR PATH "The directory containing tbb")
|
||||
# search for product directory inside 3RDPARTY_DIR directory
|
||||
if (NOT 3RDPARTY_TBB_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "TBB" TBB_DIR_NAME)
|
||||
if (TBB_DIR_NAME)
|
||||
message (STATUS "Info: TBB: ${TBB_DIR_NAME} folder is used")
|
||||
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_TBB_DIR OR NOT EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
|
||||
if (TBB_DIR_NAME)
|
||||
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (${COMPILER_BITNESS} STREQUAL 32)
|
||||
set (TBB_ARCH_NAME ia32)
|
||||
else()
|
||||
set (TBB_ARCH_NAME intel64)
|
||||
endif()
|
||||
|
||||
# search for include directory in defined 3rdparty directory
|
||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
|
||||
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include" NO_DEFAULT_PATH)
|
||||
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# TBB_COMPILER_FOLER
|
||||
#if (WIN32)
|
||||
set (TBB_COMPILER_FOLER ${COMPILER})
|
||||
#else()
|
||||
# set (TBB_COMPILER_FOLER ${COMPILER})
|
||||
#endif()
|
||||
|
||||
# search for tbb and tbb malloc library in defined 3rdparty directory
|
||||
foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (NOT WIN32)
|
||||
file (GLOB TBB_SUBDIRS RELATIVE ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/ ${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/*)
|
||||
list (SORT TBB_SUBDIRS)
|
||||
list (REVERSE TBB_SUBDIRS)
|
||||
list (LENGTH TBB_SUBDIRS TBB_SUBDIRS_LENGTH)
|
||||
set (TBB_SUBDIR_FIRST "")
|
||||
if (${TBB_SUBDIRS_LENGTH})
|
||||
list (GET TBB_SUBDIRS 0 TBB_SUBDIR_FIRST)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_SUBDIR_FIRST}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
#set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing TBB" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
# check 3RDPARTY_TBB_INCLUDE_DIR for consictency with specified 3RDPARTY_TBB_DIR
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_TBB_INCLUDE_DIR PATH "The directory containing headers of the TBB")
|
||||
endif()
|
||||
|
||||
# tbb.h
|
||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
|
||||
set (HEADER_NAMES tbb.h tbb/tbb.h)
|
||||
|
||||
# set 3RDPARTY_TBB_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_TBB_INCLUDE_DIR
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to tbb.h" FORCE)
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATHS ${3RDPARTY_TBB_DIR}
|
||||
PATH_SUFFIXES include
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATH_SUFFIXES include
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
|
||||
elseif (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
string (TOLOWER "${LIBRARY_NAME}" lower_LIBRARY_NAME)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${lower_LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
endif()
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} library" FORCE)
|
||||
|
||||
# search for dll in defined 3rdparty directory (just for win case)
|
||||
if (WIN32)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
|
||||
elseif (3RDPARTY_${LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif() # end dll search
|
||||
endforeach() # end tbb / tbbmalloc
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE)
|
||||
endif()
|
||||
|
||||
# common steps for tbb and tbbmalloc
|
||||
macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
|
||||
|
||||
string (TOLOWER ${PRODUCT_NAME} lower_PRODUCT_NAME)
|
||||
|
||||
# define required tbb/tbbmalloc variables
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library")
|
||||
foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library")
|
||||
endif()
|
||||
|
||||
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_TBB_DIR
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY FILEPATH "the path to ${PRODUCT_NAME} library")
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
if (3RDPARTY_${LIBRARY_NAME}_DLL OR EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
|
||||
else()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR PATH "The directory containing ${PRODUCT_NAME} library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL FILEPATH "the path to ${PRODUCT_NAME} shared library")
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
else()
|
||||
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR PATH "The directory containing ${PRODUCT_NAME} shared library")
|
||||
endif()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (${COMPILER_BITNESS} EQUAL 32)
|
||||
set (${PRODUCT_NAME}_ARCH_NAME ia32)
|
||||
else()
|
||||
set (${PRODUCT_NAME}_ARCH_NAME intel64)
|
||||
endif()
|
||||
|
||||
# tbb/tbbmalloc library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME})
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
if (NOT EXISTS "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER}")
|
||||
if (EXISTS "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}")
|
||||
file (GLOB ${PRODUCT_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/lib/${${PRODUCT_NAME}_ARCH_NAME}/*")
|
||||
if (${PRODUCT_NAME}_COMPILER_LIST)
|
||||
list (GET ${PRODUCT_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
|
||||
if (THE_MOST_FRESH_COMPILER_VERSION)
|
||||
get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME)
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME} lib/${${PRODUCT_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME} lib/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${lower_PRODUCT_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}"
|
||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${lower_PRODUCT_NAME}
|
||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb/tbbmalloc shared library
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
|
||||
set (PRODUCT_PATH_SUFFIXES bin)
|
||||
|
||||
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
if (NOT EXISTS "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER}")
|
||||
if (EXISTS "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}")
|
||||
file (GLOB ${PRODUCT_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/bin/${${PRODUCT_NAME}_ARCH_NAME}/*")
|
||||
if (${PRODUCT_NAME}_COMPILER_LIST)
|
||||
list (GET ${PRODUCT_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
|
||||
if (THE_MOST_FRESH_COMPILER_VERSION)
|
||||
get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME)
|
||||
set (PRODUCT_PATH_SUFFIXES bin bin/${${PRODUCT_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set (PRODUCT_PATH_SUFFIXES bin bin/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL ${lower_PRODUCT_NAME}
|
||||
PATHS "${3RDPARTY_TBB_DIR}"
|
||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL ${lower_PRODUCT_NAME} PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES})
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tbb/tbbmalloc
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
DESTINATION "${INSTALL_LIB_DIR}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
endmacro()
|
||||
|
||||
|
||||
TBB_PRODUCT_SEARCH (TBB)
|
||||
TBB_PRODUCT_SEARCH (TBBMALLOC)
|
||||
|
||||
|
||||
# install tbb
|
||||
if (INSTALL_TBB)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(TBBLIB ${3RDPARTY_TBB_LIBRARY} NAME)
|
||||
get_filename_component(TBBMALLOCLIB ${3RDPARTY_TBBMALLOC_LIBRARY} NAME)
|
||||
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${TBBLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${TBBLIB}.2)
|
||||
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_TBB_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
@@ -290,3 +253,5 @@ else()
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)
|
||||
|
@@ -14,6 +14,11 @@ if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
|
||||
endif()
|
||||
|
||||
# tk include directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
|
||||
endif()
|
||||
|
||||
# tcl library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
|
||||
@@ -24,6 +29,16 @@ if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
|
||||
endif()
|
||||
|
||||
# tk library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
|
||||
endif()
|
||||
|
||||
# tk library directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
|
||||
endif()
|
||||
|
||||
# tcl shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
|
||||
@@ -36,6 +51,18 @@ if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
|
||||
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
|
||||
endif()
|
||||
|
||||
# tk shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tk shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
|
||||
endif()
|
||||
|
||||
# search for tcl in user defined directory
|
||||
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
|
||||
@@ -49,148 +76,226 @@ if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
|
||||
set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
|
||||
endif()
|
||||
|
||||
# check tcl include dir, library dir and shared library dir
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
|
||||
# check tcl/tk include dir, library dir and shared library dir
|
||||
macro (DIR_SUBDIR_FILE_FIT LIBNAME)
|
||||
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
|
||||
# tcl/tk include dir
|
||||
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl/tk library dir
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl/tk shared library dir
|
||||
if (WIN32)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check tcl/tk library
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# check tcl/tk shared library
|
||||
if (WIN32)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
DIR_SUBDIR_FILE_FIT(TCL)
|
||||
DIR_SUBDIR_FILE_FIT(TK)
|
||||
|
||||
|
||||
# use default (CMake) TCL search
|
||||
find_package(TCL)
|
||||
|
||||
# tcl include dir
|
||||
if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
if (TCL_INCLUDE_PATH AND EXISTS "${TCL_INCLUDE_PATH}")
|
||||
set (3RDPARTY_TCL_INCLUDE_DIR "${TCL_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TCL" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
foreach (LIBNAME TCL TK)
|
||||
string (TOLOWER "${LIBNAME}" LIBNAME_L)
|
||||
|
||||
# tcl dir and library
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY)
|
||||
if (TCL_LIBRARY AND EXISTS "${TCL_LIBRARY}")
|
||||
set (3RDPARTY_TCL_LIBRARY "${TCL_LIBRARY}" CACHE FILEPATH "TCL library" FORCE)
|
||||
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
|
||||
# tcl/tk include dir
|
||||
if (NOT 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
|
||||
if (${LIBNAME}_INCLUDE_PATH AND EXISTS "${${LIBNAME}_INCLUDE_PATH}")
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "${${LIBNAME}_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tcl/tk dir and library
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
if (${LIBNAME}_LIBRARY AND EXISTS "${${LIBNAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "${${LIBNAME}_LIBRARY}" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_TCL_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll)
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_TCL_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
elseif (3RDPARTY_TCL_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
|
||||
find_library (3RDPARTY_TCL_DLL NAMES tcl86 tcl85
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
|
||||
|
||||
# tcl dir and library
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY)
|
||||
set (3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "TCL library" FORCE)
|
||||
find_library (3RDPARTY_TCL_LIBRARY NAMES tcl8.6 tcl86 tcl8.5 tcl85
|
||||
PATHS "${3RDPARTY_TCL_LIBRARY_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# search in another place if previous search doesn't find anything
|
||||
find_library (3RDPARTY_TCL_LIBRARY NAMES tcl8.6 tcl86 tcl8.5 tcl85
|
||||
PATHS "${3RDPARTY_TCL_DIR}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY OR NOT EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "TCL library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY_DIR AND 3RDPARTY_TCL_LIBRARY)
|
||||
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION "")
|
||||
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
get_filename_component (TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
|
||||
string(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY_NAME}")
|
||||
|
||||
if (NOT "${TCL_LIBRARY_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION "${TCL_LIBRARY_VERSION}")
|
||||
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
|
||||
message (STATUS "Info: TCL version isn't found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "")
|
||||
if (3RDPARTY_TCL_LIBRARY_VERSION)
|
||||
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TCL_MAJOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
|
||||
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TCL_MINOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
|
||||
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TCL_MAJOR_VERSION}.${3RDPARTY_TCL_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_TCL_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll)
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_TCL_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
else()
|
||||
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
|
||||
find_library (3RDPARTY_TCL_DLL NAMES tcl${3RDPARTY_TCL_LIBRARY_VERSION}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT 3RDPARTY_TCL_DLL OR NOT EXISTS "${3RDPARTY_TCL_DLL}")
|
||||
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "TCL shared library" FORCE)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (NOT 3RDPARTY_TCL_DLL_DIR AND 3RDPARTY_TCL_DLL)
|
||||
get_filename_component (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
|
||||
set (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL_DIR}" CACHE FILEPATH "The directory containing TCL shared library" FORCE)
|
||||
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
elseif (3RDPARTY_${LIBNAME}_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}86 ${LIBNAME_L}85
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_TCL_INCLUDE_DIR AND EXISTS "${3RDPARTY_TCL_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TCL_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
endif()
|
||||
DIR_SUBDIR_FILE_FIT(${LIBNAME})
|
||||
|
||||
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_TCL_DLL OR EXISTS "${3RDPARTY_TCL_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TCL_DLL_DIR}")
|
||||
# tcl/tk dir and library
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "3RDPARTY_${LIBNAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
|
||||
PATHS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# search in another place if previous search doesn't find anything
|
||||
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
|
||||
PATHS "${3RDPARTY_TCL_DIR}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR AND 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
get_filename_component (${LIBNAME}_LIBRARY_NAME "${3RDPARTY_${LIBNAME}_LIBRARY}" NAME)
|
||||
string(REGEX REPLACE "^.*${LIBNAME_L}([0-9]\\.*[0-9]).*$" "\\1" ${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_NAME}")
|
||||
|
||||
if (NOT "${${LIBNAME}_LIBRARY_VERSION}" STREQUAL "${${LIBNAME}_LIBRARY_NAME}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_VERSION}")
|
||||
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
|
||||
message (STATUS "Info: ${LIBNAME} version isn't found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_VERSION)
|
||||
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_${LIBNAME}_MAJOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
|
||||
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_${LIBNAME}_MINOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_${LIBNAME}_MAJOR_VERSION}.${3RDPARTY_${LIBNAME}_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
else()
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL_DIR AND 3RDPARTY_${LIBNAME}_DLL)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tcl
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_${LIBNAME}_DLL OR EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# install tcltk
|
||||
if (INSTALL_TCL)
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
@@ -201,51 +306,49 @@ if (INSTALL_TCL)
|
||||
if (WIN32)
|
||||
# tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
|
||||
|
||||
# collect and install all dlls from tcl dll dirs
|
||||
# collect and install all dlls from tcl/tk dll dirs
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without)
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
endif()
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
endif()
|
||||
|
||||
@@ -259,20 +362,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
|
||||
|
||||
if (TK_FOUND AND 3RDPARTY_TCL_DIR)
|
||||
|
||||
get_filename_component (TK_WISH_ABSOLUTE "${TK_WISH}" ABSOLUTE)
|
||||
get_filename_component (3RDPARTY_TCL_DIR_ABSOLUTE "${3RDPARTY_TCL_DIR}" ABSOLUTE)
|
||||
|
||||
string (FIND "${TK_WISH_ABSOLUTE}" "${3RDPARTY_TCL_DIR_ABSOLUTE}" THE_SAME_FOLDER)
|
||||
|
||||
if (${THE_SAME_FOLDER} EQUAL 0)
|
||||
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
|
||||
message (STATUS "Info: TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
|
||||
|
||||
# unset all redundant variables
|
||||
#TCL
|
||||
|
@@ -1,274 +0,0 @@
|
||||
# tk
|
||||
|
||||
if (NOT DEFINED INSTALL_TK)
|
||||
set (INSTALL_TK OFF CACHE BOOL "${INSTALL_TK_DESCR}")
|
||||
endif()
|
||||
|
||||
# tk directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_DIR)
|
||||
set (3RDPARTY_TK_DIR "" CACHE PATH "The directory containing tk")
|
||||
endif ()
|
||||
|
||||
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_TCLTK_DIR)
|
||||
set (3RDPARTY_TK_DIR "${3RDPARTY_TCLTK_DIR}" CACHE PATH "The directory containing tk" FORCE)
|
||||
endif()
|
||||
|
||||
# tk include directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
|
||||
endif()
|
||||
|
||||
# tk library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
|
||||
endif()
|
||||
|
||||
# tk library directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
|
||||
endif()
|
||||
|
||||
# tk shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tk shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
|
||||
endif()
|
||||
|
||||
# search for tk in user defined directory
|
||||
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tk TK_DIR_NAME)
|
||||
if (TK_DIR_NAME)
|
||||
set (3RDPARTY_TK_DIR "${3RDPARTY_DIR}/${TK_DIR_NAME}" CACHE PATH "The directory containing tk" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define paths for default engine
|
||||
if (3RDPARTY_TK_DIR AND EXISTS "${3RDPARTY_TK_DIR}")
|
||||
set (TK_INCLUDE_PATH "${3RDPARTY_TK_DIR}/include")
|
||||
endif()
|
||||
|
||||
# check tk include dir, library dir and shared library dir
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
|
||||
|
||||
# use default (CMake) TCL search
|
||||
find_package(TCL)
|
||||
|
||||
# tk include dir
|
||||
if (NOT 3RDPARTY_TK_INCLUDE_DIR)
|
||||
if (TK_INCLUDE_PATH AND EXISTS "${TK_INCLUDE_PATH}")
|
||||
set (3RDPARTY_TK_INCLUDE_DIR "${TK_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tk dir and library
|
||||
if (NOT 3RDPARTY_TK_LIBRARY)
|
||||
if (TK_LIBRARY AND EXISTS "${TK_LIBRARY}")
|
||||
set (3RDPARTY_TK_LIBRARY "${TK_LIBRARY}" CACHE FILEPATH "TK library" FORCE)
|
||||
|
||||
if (NOT 3RDPARTY_TK_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
|
||||
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_TK_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_TK_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
|
||||
elseif (3RDPARTY_TK_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
|
||||
elseif (3RDPARTY_TK_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
|
||||
find_library (3RDPARTY_TK_DLL NAMES tk86 tk85
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
|
||||
|
||||
# tk dir and library
|
||||
if (NOT 3RDPARTY_TK_LIBRARY)
|
||||
set (3RDPARTY_TK_LIBRARY "3RDPARTY_TK_LIBRARY-NOTFOUND" CACHE FILEPATH "TK library" FORCE)
|
||||
find_library (3RDPARTY_TK_LIBRARY NAMES tk8.6 tk86 tk8.5 tk85
|
||||
PATHS "${3RDPARTY_TK_LIBRARY_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# search in another place if previous search doesn't find anything
|
||||
find_library (3RDPARTY_TK_LIBRARY NAMES tk8.6 tk86 tk8.5 tk85
|
||||
PATHS "${3RDPARTY_TK_DIR}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_TK_LIBRARY OR NOT EXISTS "${3RDPARTY_TK_LIBRARY}")
|
||||
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "TK library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_TK_LIBRARY_DIR AND 3RDPARTY_TK_LIBRARY)
|
||||
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
|
||||
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION "")
|
||||
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
|
||||
get_filename_component (TK_LIBRARY_NAME "${3RDPARTY_TK_LIBRARY}" NAME)
|
||||
string(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY_NAME}")
|
||||
|
||||
if (NOT "${TK_LIBRARY_VERSION}" STREQUAL "${TK_LIBRARY_NAME}")
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION "${TK_LIBRARY_VERSION}")
|
||||
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
|
||||
message (STATUS "Info: TK version isn't found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "")
|
||||
if (3RDPARTY_TK_LIBRARY_VERSION)
|
||||
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TK_MAJOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
|
||||
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TK_MINOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
|
||||
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TK_MAJOR_VERSION}.${3RDPARTY_TK_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_TK_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_TK_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
|
||||
elseif (3RDPARTY_TK_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
|
||||
else()
|
||||
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
|
||||
find_library (3RDPARTY_TK_DLL NAMES tk${3RDPARTY_TK_LIBRARY_VERSION}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT 3RDPARTY_TK_DLL OR NOT EXISTS "${3RDPARTY_TK_DLL}")
|
||||
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "TK shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if (NOT 3RDPARTY_TK_DLL_DIR AND 3RDPARTY_TK_DLL)
|
||||
get_filename_component (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL}" PATH)
|
||||
set (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL_DIR}" CACHE FILEPATH "The directory containing TK shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_TK_INCLUDE_DIR AND EXISTS "${3RDPARTY_TK_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TK_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_TK_DLL OR EXISTS "${3RDPARTY_TK_DLL}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TK_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tk
|
||||
if (INSTALL_TK)
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
# tk 8.6 requires zlib. install all dlls from tk bin folder that may contain zlib also
|
||||
|
||||
# collect and install all dlls from tk dll dirs
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
|
||||
if (DEFINED INSTALL_BIN_DIR)
|
||||
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||
else()
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tk is required to install in lib folder (without)
|
||||
if (DEFINED INSTALL_LIB_DIR)
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
else()
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
endif()
|
||||
else()
|
||||
message (STATUS "\nWarning: tkX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_TK_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TK_LIBRARY 3RDPARTY_TK_DLL)
|
||||
|
||||
# unset all redundant variables
|
||||
#TCL
|
||||
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
|
||||
#TK
|
||||
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TK_WISH)
|
@@ -1,7 +1,7 @@
|
||||
# variable description
|
||||
|
||||
#
|
||||
set (BUILD_PATCH_DESCR
|
||||
set (APPLY_OCCT_PATCH_DIR_DESCR
|
||||
"Points to the directory recognized as a 'patch' for OCCT. If specified,
|
||||
the files from this directory take precedence over the corresponding native
|
||||
OCCT sources. This way you are able to introduce patches to Open CASCADE
|
||||
@@ -13,19 +13,19 @@ set (BUILD_LIBRARY_TYPE_DESCR
|
||||
are linked dynamically and loaded at runtime. 'Static' libraries
|
||||
are archives of object files for use when linking other targets")
|
||||
|
||||
set (BUILD_YACCLEX_DESCR
|
||||
set (REBUILD_PLATFORM_DEPENDENT_CODE_DESCR
|
||||
"Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and
|
||||
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
|
||||
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
|
||||
|
||||
set (BUILD_WITH_DEBUG_DESCR
|
||||
set (OCCT_ALGO_EXTENDED_OUTPUT_DESCR
|
||||
"Enables extended messages of many OCCT algorithms, usually printed to cout.
|
||||
These include messages on internal errors and special cases encountered, timing etc")
|
||||
|
||||
# install variables
|
||||
set (INSTALL_DIR_DESCR
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
||||
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_OCCT_TEST_CASES variable),
|
||||
samples (INSTALL_OCCT_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
other similar variables) will be placed during the installation process (building INSTALL project)")
|
||||
|
||||
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
|
||||
@@ -34,8 +34,8 @@ set (${INSTALL_TARGET_VARIABLE}_DESCR
|
||||
project) into the installation directory (INSTALL_DIR variable)")
|
||||
endmacro()
|
||||
|
||||
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_DOC_OcctOverview "OCCT overview documentation (HTML format)")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
|
||||
@@ -43,8 +43,7 @@ INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
|
||||
INSTALL_MESSAGE (INSTALL_GL2PS "GL2PS binaries")
|
||||
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
|
||||
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
|
||||
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
|
||||
#INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
|
||||
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
|
||||
|
||||
# build variables
|
||||
macro (BUILD_MODULE_MESSAGE BUILD_MODULE_TARGET_VARIABLE BUILD_MODULE_TARGET_STRING)
|
||||
@@ -107,8 +106,6 @@ VTK by means of its dedicated VIS component (VTK Integration Services).")
|
||||
|
||||
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")
|
||||
|
||||
macro (BUILD_MODULE MODULE_NAME)
|
||||
set (BUILD_MODULE_${MODULE_NAME} ON CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
|
||||
endmacro()
|
||||
|
@@ -1,197 +1,183 @@
|
||||
# vtk
|
||||
|
||||
#if (NOT DEFINED INSTALL_VTK)
|
||||
# set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
|
||||
#endif()
|
||||
if (NOT DEFINED INSTALL_VTK)
|
||||
set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
|
||||
endif()
|
||||
|
||||
# vtk directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_DIR)
|
||||
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
|
||||
endif()
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# specify VTK folder in connectin with 3RDPARTY_DIR
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
|
||||
|
||||
if (NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" VTK VTK_DIR_NAME)
|
||||
if (VTK_DIR_NAME)
|
||||
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
#set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK" FORCE)
|
||||
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing vtk")
|
||||
endif()
|
||||
|
||||
# vtk include directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of vtk")
|
||||
endif()
|
||||
|
||||
# vtk library directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing vtk library")
|
||||
endif()
|
||||
|
||||
# vtk dll directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
|
||||
set (3RDPARTY_VTK_DLL_DIR "" CACHE FILEPATH "The directory containing VTK dll")
|
||||
endif()
|
||||
|
||||
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_INCLUDE_DIR PATH "The directory containing headers of VTK")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
|
||||
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
|
||||
# search for vtk in user defined directory
|
||||
if (NOT 3RDPARTY_VTK_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" vtk VTK_DIR_NAME)
|
||||
if (VTK_DIR_NAME)
|
||||
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing vtk product" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
set (CACHED_VTK_DIR $ENV{VTK_DIR})
|
||||
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
|
||||
endif()
|
||||
|
||||
# find installed vtk
|
||||
find_package(VTK QUIET)
|
||||
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
|
||||
# find native vtk
|
||||
if (NOT VTK_FOUND)
|
||||
find_package(VTK QUIET PATHS "${3RDPARTY_VTK_DIR}")
|
||||
endif()
|
||||
|
||||
if (VTK_FOUND)
|
||||
if (NOT VTK_FOUND AND NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
message(SEND_ERROR "VTK not found. Set the 3RDPARTY_VTK_DIR cmake cache entry to the directory containing VTK.")
|
||||
set (3RDPARTY_VTK_DIR "3RDPARTY_VTK_DIR-NOTFOUND" CACHE PATH "The directory containing vtk product" FORCE)
|
||||
endif()
|
||||
|
||||
# add compiler flags, preprocessor definitions, include and link dirs
|
||||
include (${VTK_USE_FILE})
|
||||
|
||||
if (VTK_LIBRARIES)
|
||||
|
||||
set (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
set (3RDPARTY_VTK_DLL_DIRS)
|
||||
|
||||
set (HARDCODED_D3D9_LIB "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x64/d3d9.lib")
|
||||
|
||||
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
|
||||
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
|
||||
if (IS_VTK_LIBRARY)
|
||||
# get paths from corresponding variables
|
||||
if (${VTK_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if (${VTK_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
|
||||
endif()
|
||||
|
||||
if (${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
if (NOT WIN32)
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# get paths from corresponding properties
|
||||
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY} IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if (TARGET_VTK_IMPORT_CONFS)
|
||||
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
|
||||
|
||||
# todo: choose configuration in connection with the build type
|
||||
#if (CMAKE_BUILD_TYPE)
|
||||
# foreach (IMPORT_CONF ${TARGET_VTK_IMPORT_CONFS})
|
||||
# endforeach()
|
||||
#endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
|
||||
list (FIND TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES "${HARDCODED_D3D9_LIB}" D3D9_INDEX)
|
||||
if (NOT D3D9_INDEX EQUAL -1)
|
||||
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from ${VTK_LIBRARY}")
|
||||
|
||||
list (REMOVE_AT TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${D3D9_INDEX})
|
||||
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_IMP_PATH ${VTK_LIBRARY} IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
|
||||
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
|
||||
endif()
|
||||
|
||||
get_target_property (TARGET_PROPERTY_LOCATION_PATH ${VTK_LIBRARY} IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
|
||||
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
|
||||
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set(VTK_VERSION "")
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
get_filename_component(3RDPARTY_VTK_DIR_NAME "${3RDPARTY_VTK_DIR}" NAME)
|
||||
string(REGEX MATCH "^VTK-([0-9].[0-9])" VTK_VERSION "${3RDPARTY_VTK_DIR_NAME}")
|
||||
set(VTK_VERSION "${CMAKE_MATCH_1}")
|
||||
if (NOT 3RDPARTY_VTK_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_DIR}/include/vtk-${VTK_VERSION}" CACHE FILEPATH "The directory containing includes of VTK" FORCE)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
|
||||
|
||||
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
|
||||
|
||||
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
|
||||
|
||||
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
|
||||
if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/lib")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
elseif (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()
|
||||
if(3RDPARTY_VTK_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# vtk libraries
|
||||
# lib
|
||||
set (VTK_LIBRARY_NAMES vtkCommonCore-${VTK_VERSION}.lib vtkCommonDataModel-${VTK_VERSION}.lib vtkCommonExecutionModel-${VTK_VERSION}.lib
|
||||
vtkCommonMath-${VTK_VERSION}.lib vtkCommonTransforms-${VTK_VERSION}.lib vtkRenderingCore-${VTK_VERSION}.lib
|
||||
vtkRenderingOpenGL-${VTK_VERSION}.lib vtkFiltersGeneral-${VTK_VERSION}.lib vtkIOCore-${VTK_VERSION}.lib
|
||||
vtkIOImage-${VTK_VERSION}.lib vtkImagingCore-${VTK_VERSION}.lib vtkInteractionStyle-${VTK_VERSION}.lib )
|
||||
|
||||
#dll
|
||||
set (VTK_DLL_NAMES vtkCommonComputationalGeometry-${VTK_VERSION}.dll
|
||||
vtkCommonCore-${VTK_VERSION}.dll
|
||||
vtkCommonDataModel-${VTK_VERSION}.dll
|
||||
vtkCommonExecutionModel-${VTK_VERSION}.dll
|
||||
vtkCommonMath-${VTK_VERSION}.dll
|
||||
vtkCommonMisc-${VTK_VERSION}.dll
|
||||
vtkCommonSystem-${VTK_VERSION}.dll
|
||||
vtkCommonTransforms-${VTK_VERSION}.dll
|
||||
vtkDICOMParser-${VTK_VERSION}.dll
|
||||
vtkFiltersCore-${VTK_VERSION}.dll
|
||||
vtkFiltersExtraction-${VTK_VERSION}.dll
|
||||
vtkFiltersGeneral-${VTK_VERSION}.dll
|
||||
vtkFiltersGeometry-${VTK_VERSION}.dll
|
||||
vtkFiltersSources-${VTK_VERSION}.dll
|
||||
vtkFiltersStatistics-${VTK_VERSION}.dll
|
||||
vtkIOCore-${VTK_VERSION}.dll
|
||||
vtkIOImage-${VTK_VERSION}.dll
|
||||
vtkImagingCore-${VTK_VERSION}.dll
|
||||
vtkImagingFourier-${VTK_VERSION}.dll
|
||||
vtkImagingHybrid-${VTK_VERSION}.dll
|
||||
vtkInteractionStyle-${VTK_VERSION}.dll
|
||||
vtkRenderingCore-${VTK_VERSION}.dll
|
||||
vtkRenderingOpenGL-${VTK_VERSION}.dll
|
||||
vtkalglib-${VTK_VERSION}.dll
|
||||
vtkjpeg-${VTK_VERSION}.dll
|
||||
vtkmetaio-${VTK_VERSION}.dll
|
||||
vtkpng-${VTK_VERSION}.dll
|
||||
vtksys-${VTK_VERSION}.dll
|
||||
vtktiff-${VTK_VERSION}.dll
|
||||
vtkzlib-${VTK_VERSION}.dll )
|
||||
|
||||
# search for dll directory
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/bin")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
elseif (EXISTS "${3RDPARTY_VTK_DIR}/bind")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bind" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
OCCT_CHECK_AND_UNSET(VTK_DIR)
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
endif()
|
||||
if (INSTALL_VTK)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
if (WIN32)
|
||||
if(3RDPARTY_VTK_DLL_DIR AND EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
|
||||
set (3RDPARTY_VTK_DLL "3RDPARTY_VTK_DLL-NOTFOUND" CACHE FILEPATH "VTK shared library" FORCE)
|
||||
find_library(3RDPARTY_VTK_DLL "${VTK_DLL_NAME}" PATHS "${3RDPARTY_VTK_DLL_DIR}" NO_DEFAULT_PATH)
|
||||
if (NOT 3RDPARTY_VTK_DLL OR NOT EXISTS "${3RDPARTY_VTK_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED "${3RDPARTY_VTK_DLL}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endforeach()
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL)
|
||||
endif()
|
||||
else ()
|
||||
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
|
||||
string(REPLACE ".dll" ".so.1" VTK_DLL_NAME "${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
|
||||
set (USED_3RDPARTY_VTK_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_DLL_DIR)
|
||||
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
|
||||
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
|
||||
OCCT_CHECK_AND_UNSET (VTK_DIR)
|
||||
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)
|
||||
|
114
adm/genconf.tcl
@@ -27,12 +27,8 @@ source [file join [file dirname [info script]] genconfdeps.tcl]
|
||||
package require Tk
|
||||
|
||||
set aRowIter 0
|
||||
set aCheckRowIter 0
|
||||
frame .myFrame -padx 5 -pady 5
|
||||
pack .myFrame -fill both -expand 1
|
||||
frame .myFrame.myVsFrame
|
||||
frame .myFrame.myHxxChecks
|
||||
frame .myFrame.myChecks
|
||||
|
||||
set SYS_VS_LIST {}
|
||||
set SYS_VC_LIST {}
|
||||
@@ -90,8 +86,8 @@ proc wokdep:gui:Close {} {
|
||||
}
|
||||
|
||||
proc wokdep:gui:SwitchConfig {} {
|
||||
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
|
||||
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsCombo current]]
|
||||
set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsCombo current]]
|
||||
|
||||
set ::CSF_OPT_INC {}
|
||||
set ::CSF_OPT_LIB32 {}
|
||||
@@ -363,38 +359,38 @@ proc wokdep:gui:Show64Bitness { theRowIter } {
|
||||
}
|
||||
|
||||
# Header
|
||||
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration" -relief solid -padding {5 5 80 5}
|
||||
ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
|
||||
ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
||||
ttk::label .myFrame.myVsLbl -text "Visual Studio configuration" -relief solid -padding {5 5 80 5}
|
||||
ttk::combobox .myFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
|
||||
ttk::combobox .myFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
|
||||
entry .myFrame.myVcEntry -textvariable VCVER -width 6
|
||||
entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
|
||||
ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
|
||||
|
||||
#
|
||||
ttk::label .myFrame.myHxxChecks.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5}
|
||||
checkbutton .myFrame.myHxxChecks.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
|
||||
ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Short-cut headers instead original ones in inc"
|
||||
ttk::label .myFrame.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5}
|
||||
checkbutton .myFrame.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
|
||||
ttk::label .myFrame.myScutsLbl -text "Short-cut headers instead original ones in inc"
|
||||
|
||||
#
|
||||
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path" -relief solid -padding {5 5 80 5}
|
||||
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
|
||||
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
|
||||
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
|
||||
checkbutton .myFrame.myChecks.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myGl2psLbl -text "Use GL2PS"
|
||||
checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myTbbLbl -text "Use Intel TBB"
|
||||
checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
|
||||
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
||||
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
|
||||
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
|
||||
checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
|
||||
checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK"
|
||||
checkbutton .myFrame.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myFImageLbl -text "Use FreeImage"
|
||||
checkbutton .myFrame.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myGl2psLbl -text "Use GL2PS"
|
||||
checkbutton .myFrame.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myTbbLbl -text "Use Intel TBB"
|
||||
checkbutton .myFrame.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myOpenClLbl -text "Use OpenCL"
|
||||
checkbutton .myFrame.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
|
||||
ttk::label .myFrame.myMacGLXLbl -text "Use X11 for windows drawing"
|
||||
ttk::label .myFrame.myVtkLbl -text "Use VTK"
|
||||
checkbutton .myFrame.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
|
||||
checkbutton .myFrame.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myQt4Lbl -text "Search Qt4"
|
||||
checkbutton .myFrame.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myJDKLbl -text "Search JDK"
|
||||
|
||||
# Additional headers search paths
|
||||
ttk::label .myFrame.myIncLbl -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
|
||||
@@ -453,10 +449,10 @@ ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
|
||||
# Create grid
|
||||
# Header
|
||||
if { "$tcl_platform(platform)" == "windows" } {
|
||||
grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
|
||||
grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5
|
||||
grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2
|
||||
grid .myFrame.myVsLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVsCombo -row $aRowIter -column 0 -columnspan 2 -sticky w
|
||||
grid .myFrame.myArchCombo -row $aRowIter -column 2 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVcEntry -row $aRowIter -column 0
|
||||
grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
|
||||
@@ -465,10 +461,10 @@ if { "$tcl_platform(platform)" == "windows" } {
|
||||
}
|
||||
|
||||
#
|
||||
grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myHxxChecks.myOcctBuildLbl -row 0 -column 0
|
||||
grid .myFrame.myHxxChecks.myScutsCheck -row 0 -column 1
|
||||
grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 2
|
||||
grid .myFrame.myOcctBuildLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myScutsCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myScutsLbl -row $aRowIter -column 1 -columnspan 2 -sticky w
|
||||
incr aRowIter
|
||||
#
|
||||
grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
@@ -476,29 +472,29 @@ incr aRowIter
|
||||
grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5
|
||||
grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
|
||||
incr aRowIter
|
||||
|
||||
grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myFImageCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myFImageLbl -row $aRowIter -column 1 -sticky w
|
||||
grid .myFrame.myQt4Check -row $aRowIter -column 2 -sticky e
|
||||
grid .myFrame.myQt4Lbl -row $aRowIter -column 3 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myGl2psCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myGl2psLbl -row $aRowIter -column 1 -sticky w
|
||||
grid .myFrame.myJDKCheck -row $aRowIter -column 2 -sticky e
|
||||
grid .myFrame.myJDKLbl -row $aRowIter -column 3 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myTbbCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myTbbLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myOpenClCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myOpenClLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myVtkCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myVtkLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 5 -sticky w
|
||||
#grid .myFrame.myChecks.myOpenClCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
#grid .myFrame.myChecks.myOpenClLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myChecks.myGl2psCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myGl2psLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
|
||||
grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
|
||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 5 -sticky w
|
||||
incr aCheckRowIter
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 1 -sticky w
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e
|
||||
grid .myFrame.myMacGLXLbl -row $aRowIter -column 1 -sticky w
|
||||
incr aRowIter
|
||||
}
|
||||
|
||||
# Additional headers search paths
|
||||
@@ -532,10 +528,10 @@ grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
|
||||
grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
|
||||
|
||||
# Bind events
|
||||
bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
|
||||
bind .myFrame.myVsCombo <<ComboboxSelected>> {
|
||||
wokdep:gui:SwitchConfig
|
||||
}
|
||||
bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
|
||||
bind .myFrame.myArchCombo <<ComboboxSelected>> {
|
||||
wokdep:gui:SwitchArch
|
||||
}
|
||||
|
||||
|
@@ -426,56 +426,43 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
set aFImagePlusDist "Wrapper/FreeImagePlus/dist"
|
||||
|
||||
set isFound "true"
|
||||
set aFImageHPath [wokdep:SearchHeader "FreeImage.h"]
|
||||
if { "$aFImageHPath" == "" } {
|
||||
set aFImageHPath [wokdep:SearchHeader "FreeImage.h"]
|
||||
set aFImagePlusHPath [wokdep:SearchHeader "FreeImagePlus.h"]
|
||||
if { "$aFImageHPath" == "" || "$aFImagePlusHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/FreeImage.h"] } {
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/FreeImage.h"] && [file exists "$aPath/include/FreeImagePlus.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} elseif { "$aPath" != "" && [file exists "$aPath/$aFImageDist/FreeImage.h"] } {
|
||||
} elseif { "$aPath" != "" && [file exists "$aPath/$aFImageDist/FreeImage.h"] && [file exists "$aPath/$aFImagePlusDist/FreeImagePlus.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/$aFImageDist"
|
||||
if { [file exists "$aPath/$aFImagePlusDist/FreeImagePlus.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/$aFImagePlusDist"
|
||||
}
|
||||
lappend ::CSF_OPT_INC "$aPath/$aFImagePlusDist"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'FreeImage.h' not found (FreeImage)"
|
||||
lappend anErrInc "Error: 'FreeImage.h' or 'FreeImagePlus.h' not found (FreeImage)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
set aFImagePlusHPath [wokdep:SearchHeader "FreeImagePlus.h"]
|
||||
if { "$::tcl_platform(platform)" == "windows" && "$aFImagePlusHPath" == "" } {
|
||||
lappend anErrInc "Error: 'FreeImagePlus.h' not found (FreeImage)"
|
||||
set isFound "false"
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter"]
|
||||
if { "$aFImageLibPath" == "" } {
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter"]
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter"]
|
||||
if { "$aFImageLibPath" == "" || "$aFImagePlusLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$anArchIter" ]
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aFImageLibPath" != "" } {
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/lib"]
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aFImageLibPath" != "" && "$aFImagePlusLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/$aFImageDist"]
|
||||
if { "$aFImageLibPath" != "" } {
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/$aFImageDist"]
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter" "$aPath/$aFImagePlusDist"]
|
||||
if { "$aFImageLibPath" != "" && "$aFImagePlusLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImageDist"
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter" "$aPath/$aFImagePlusDist"]
|
||||
if { "$aFImagePlusLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImagePlusDist"
|
||||
}
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImagePlusDist"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freeimage.${::SYS_LIB_SUFFIX}' not found (FreeImage)"
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freeimage.${::SYS_LIB_SUFFIX}' or '${::SYS_LIB_PREFIX}freeimageplus.${::SYS_LIB_SUFFIX}' not found (FreeImage)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter"]
|
||||
if { "$aFImagePlusLibPath" == "" } {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freeimageplus.${::SYS_LIB_SUFFIX}' not found (FreeImage)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter"]
|
||||
set aFImagePlusDllPath [wokdep:SearchBin "freeimageplus.dll" "$anArchIter"]
|
||||
if { "$aFImageDllPath" == "" || "$aFImagePlusDllPath" == "" } {
|
||||
@@ -770,10 +757,10 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
||||
# We didn't find preferred binary path => search through inc path or among all available VTK directories
|
||||
if { "$aVtkBinPath" == "" } {
|
||||
# Try to find in lib path
|
||||
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/bin"]
|
||||
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/bin"
|
||||
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/lib"] != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/lib"
|
||||
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/bin"]
|
||||
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/bin"
|
||||
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/lib"] != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/lib"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
|
||||
set isFound "false"
|
||||
|
@@ -731,7 +731,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
|
||||
|
||||
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
|
||||
puts $doxyFile "DOT_PATH = $graphvizPath"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
|
||||
|
||||
# list of files to generate
|
||||
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
|
||||
|
238
adm/genproj.tcl
@@ -27,11 +27,7 @@
|
||||
source [file join [file dirname [info script]] genconfdeps.tcl]
|
||||
|
||||
set path ""
|
||||
set THE_CASROOT ""
|
||||
set fBranch ""
|
||||
if { [info exists ::env(CASROOT)] } {
|
||||
set THE_CASROOT "$::env(CASROOT)"
|
||||
}
|
||||
switch -exact -- "$tcl_platform(platform)" {
|
||||
"windows" {set targetStation "wnt"}
|
||||
"unix" {set targetStation "lin"}
|
||||
@@ -42,9 +38,10 @@ switch -exact -- "$tcl_platform(os)" {
|
||||
}
|
||||
|
||||
proc _get_options { platform type branch } {
|
||||
global path
|
||||
set res ""
|
||||
if {[file exists "$::THE_CASROOT/adm/CMPLRS"]} {
|
||||
set fd [open "$::THE_CASROOT/adm/CMPLRS" rb]
|
||||
if {[file exists "$path/adm/CMPLRS"]} {
|
||||
set fd [open "$path/adm/CMPLRS" rb]
|
||||
set opts [split [read $fd] "\n"]
|
||||
close $fd
|
||||
foreach line $opts {
|
||||
@@ -59,22 +56,16 @@ proc _get_options { platform type branch } {
|
||||
}
|
||||
|
||||
proc _get_type { name } {
|
||||
set UDLIST {}
|
||||
if {[file exists "$::path/adm/UDLIST"]} {
|
||||
set fd [open "$::path/adm/UDLIST" rb]
|
||||
set UDLIST [concat $UDLIST [split [read $fd] "\n"]]
|
||||
global path
|
||||
if {[file exists "$path/adm/UDLIST"]} {
|
||||
set fd [open "$path/adm/UDLIST" rb]
|
||||
set UDLIST [split [read $fd] "\n"]
|
||||
close $fd
|
||||
}
|
||||
if { "$::path/adm/UDLIST" != "$::THE_CASROOT/adm/UDLIST" && [file exists "$::THE_CASROOT/adm/UDLIST"] } {
|
||||
set fd [open "$::THE_CASROOT/adm/UDLIST" rb]
|
||||
set UDLIST [concat $UDLIST [split [read $fd] "\n"]]
|
||||
close $fd
|
||||
}
|
||||
|
||||
foreach uitem $UDLIST {
|
||||
set line [split $uitem]
|
||||
if {[lindex $line 1] == "$name"} {
|
||||
return [lindex $line 0]
|
||||
foreach uitem $UDLIST {
|
||||
set line [split $uitem]
|
||||
if {[lindex $line 1] == "$name"} {
|
||||
return [lindex $line 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
@@ -112,17 +103,9 @@ proc _get_used_files { pk {inc true} {src true} } {
|
||||
return $lret
|
||||
}
|
||||
|
||||
# return location of the path within src directory
|
||||
proc osutils:findSrcSubPath {theSubPath} {
|
||||
if {[file exists "$::path/src/$theSubPath"]} {
|
||||
return "$::path/src/$theSubPath"
|
||||
}
|
||||
return "$::THE_CASROOT/src/$theSubPath"
|
||||
}
|
||||
|
||||
# Wrapper-function to generate VS project files
|
||||
proc genproj { args } {
|
||||
global path THE_CASROOT targetStation
|
||||
global path targetStation
|
||||
set aSupportedTargets { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "xcd" }
|
||||
set anArgs $args
|
||||
|
||||
@@ -217,10 +200,15 @@ proc genproj { args } {
|
||||
|
||||
OS:MKPRC "$anAdmPath" "$anTarget" "$aLibType" "$aPlatform"
|
||||
|
||||
genprojbat "$anTarget"
|
||||
genprojbat "$anAdmPath" "$anTarget"
|
||||
}
|
||||
|
||||
proc genprojbat {theIDE} {
|
||||
proc genprojbat {thePath theIDE} {
|
||||
global path
|
||||
|
||||
set anOsIncPath "$path/src/OS"
|
||||
set anOsRootPath "$path"
|
||||
|
||||
set aTargetPlatform "lin"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aTargetPlatform "wnt"
|
||||
@@ -237,31 +225,34 @@ proc genprojbat {theIDE} {
|
||||
set aTargetPlatformExt bat
|
||||
}
|
||||
|
||||
set aBox [file normalize "$thePath/.."]
|
||||
|
||||
if {"$theIDE" != "cmake"} {
|
||||
set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
|
||||
set anEnvTmplFile [open "$path/adm/templates/env.${aTargetPlatformExt}" "r"]
|
||||
set anEnvTmpl [read $anEnvTmplFile]
|
||||
close $anEnvTmplFile
|
||||
|
||||
set aCasRoot ""
|
||||
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
|
||||
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
|
||||
if { [file normalize "$anOsRootPath"] != "$aBox" } {
|
||||
set aCasRoot [relativePath "$aBox" "$anOsRootPath"]
|
||||
}
|
||||
set anOsIncPath [relativePath "$aBox" "$anOsRootPath"]
|
||||
|
||||
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
|
||||
|
||||
set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
|
||||
set anEnvFile [open "$aBox/env.${aTargetPlatformExt}" "w"]
|
||||
puts $anEnvFile $anEnvTmpl
|
||||
close $anEnvFile
|
||||
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||
file copy -force -- "$path/adm/templates/draw.${aTargetPlatformExt}" "$aBox/draw.${aTargetPlatformExt}"
|
||||
}
|
||||
|
||||
if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||
file copy -force -- "$path/adm/templates/msvc.bat" "$aBox/msvc.bat"
|
||||
} else {
|
||||
switch -exact -- "$theIDE" {
|
||||
"cbp" { file copy -force -- "$::THE_CASROOT/adm/templates/codeblocks.sh" "$::path/codeblocks.sh" }
|
||||
"xcd" { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh" "$::path/xcode.sh" }
|
||||
"cbp" { file copy -force -- "$path/adm/templates/codeblocks.sh" "$aBox/codeblocks.sh" }
|
||||
"xcd" { file copy -force -- "$path/adm/templates/xcode.sh" "$aBox/xcode.sh" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,39 +380,43 @@ proc OS:MKVC { theOutDir {theModules {}} {theAllSolution ""} {theVcVer "vc8"} }
|
||||
}
|
||||
|
||||
proc OS:init {{os {}}} {
|
||||
set askplat $os
|
||||
set aModules {}
|
||||
if { "$os" == "" } {
|
||||
set os $::tcl_platform(os)
|
||||
}
|
||||
|
||||
if [file exists "$::path/src/VAS/Products.tcl"] {
|
||||
source "$::path/src/VAS/Products.tcl"
|
||||
foreach aModuleIter [VAS:Products] {
|
||||
set aFileTcl "$::path/src/VAS/${aModuleIter}.tcl"
|
||||
if [file exists $aFileTcl] {
|
||||
source $aFileTcl
|
||||
lappend aModules $aModuleIter
|
||||
} else {
|
||||
puts stderr "Definition file for module $aModuleIter is not found in unit VAS"
|
||||
}
|
||||
global path
|
||||
global env
|
||||
global tcl_platform
|
||||
|
||||
set askplat $os
|
||||
if { "$os" == "" } {
|
||||
set os $tcl_platform(os)
|
||||
}
|
||||
return $aModules
|
||||
}
|
||||
|
||||
# Load list of OCCT modules and their definitions
|
||||
source "$::path/src/OS/Modules.tcl"
|
||||
foreach aModuleIter [OS:Modules] {
|
||||
set aFileTcl "$::path/src/OS/${aModuleIter}.tcl"
|
||||
if [file exists $aFileTcl] {
|
||||
source $aFileTcl
|
||||
lappend aModules $aModuleIter
|
||||
} else {
|
||||
puts stderr "Definition file for module $aModuleIter is not found in unit OS"
|
||||
;# Load list of OCCT modules and their definitions
|
||||
source "$path/src/OS/Modules.tcl"
|
||||
set Modules {}
|
||||
foreach module [OS:Modules] {
|
||||
set f "$path/src/OS/${module}.tcl"
|
||||
if [file exists $f] {
|
||||
source $f
|
||||
lappend Modules $module
|
||||
} else {
|
||||
puts stderr "Definition file for module $module is not found in unit OS"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $aModules
|
||||
# Load list of products and their definitions
|
||||
# set Products [woklocate -p VAS:source:Products.tcl]
|
||||
#if { "$Products" != "" } {
|
||||
#source "$Products"
|
||||
#foreach product [VAS:Products] {
|
||||
#set f [woklocate -p VAS:source:${product}.tcl]
|
||||
#if [file exists $f] {
|
||||
#source $f
|
||||
#} else {
|
||||
#puts stderr "Definition file for product $product is not found in unit VAS"
|
||||
#}
|
||||
#}
|
||||
#}
|
||||
|
||||
return $Modules
|
||||
}
|
||||
|
||||
# topological sort. returns a list { {a h} {b g} {c f} {c h} {d i} } => { d a b c i g f h }
|
||||
@@ -565,14 +560,13 @@ proc osutils:tk:close { ltk } {
|
||||
set recurse {}
|
||||
foreach dir $ltk {
|
||||
set ids [LibToLink $dir]
|
||||
# puts "osutils:tk:close($ltk) ids='$ids'"
|
||||
set eated [osutils:tk:eatpk $ids]
|
||||
set result [concat $result $eated]
|
||||
set ids [LibToLink $dir]
|
||||
set result [concat $result $ids]
|
||||
|
||||
foreach file $eated {
|
||||
set kds [osutils:findSrcSubPath "$file/EXTERNLIB"]
|
||||
set kds "$path/src/$file/EXTERNLIB"
|
||||
if { [osutils:tk:eatpk $kds] != {} } {
|
||||
lappend recurse $file
|
||||
}
|
||||
@@ -604,7 +598,7 @@ proc LibToLink {theTKit} {
|
||||
return
|
||||
}
|
||||
set aToolkits {}
|
||||
set anExtLibList [osutils:tk:eatpk [osutils:findSrcSubPath "$theTKit/EXTERNLIB"]]
|
||||
set anExtLibList [osutils:tk:eatpk "$path/src/$theTKit/EXTERNLIB"]
|
||||
foreach anExtLib $anExtLibList {
|
||||
set aFullPath [LocateRecur $anExtLib]
|
||||
if { "$aFullPath" != "" && [_get_type $anExtLib] == "t" } {
|
||||
@@ -616,7 +610,8 @@ proc LibToLink {theTKit} {
|
||||
# Search unit recursively
|
||||
|
||||
proc LocateRecur {theName} {
|
||||
set theNamePath [osutils:findSrcSubPath "$theName"]
|
||||
global path
|
||||
set theNamePath "$path/src/$theName"
|
||||
if {[file isdirectory $theNamePath]} {
|
||||
return $theNamePath
|
||||
}
|
||||
@@ -682,11 +677,11 @@ proc osutils:collectinc {theModules theIncPath theTargetStation} {
|
||||
if { [info exists ::env(SHORTCUT_HEADERS)] &&
|
||||
$::env(SHORTCUT_HEADERS) == "true" } {
|
||||
# template preparation
|
||||
if { ![file exists $::THE_CASROOT/adm/templates/header.in] } {
|
||||
puts "template file does not exist: $::THE_CASROOT/adm/templates/header.in"
|
||||
if { ![file exists $aCasRoot/adm/templates/header.in] } {
|
||||
puts "template file does not exist: $aCasRoot/adm/templates/header.in"
|
||||
return
|
||||
}
|
||||
set aHeaderTmpl [wokUtils:FILES:FileToString $::THE_CASROOT/adm/templates/header.in]
|
||||
set aHeaderTmpl [wokUtils:FILES:FileToString $aCasRoot/adm/templates/header.in]
|
||||
|
||||
# relative anIncPath in connection with aCasRoot/src
|
||||
set aFromBuildIncToSrcPath [relativePath "$anIncPath" "$aCasRoot/src"]
|
||||
@@ -1028,7 +1023,9 @@ proc osutils:vcproj:readtemplate {theVcVer isexec} {
|
||||
}
|
||||
|
||||
proc osutils:readtemplate {ext what} {
|
||||
set loc "$::THE_CASROOT/adm/templates/template.$ext"
|
||||
global env
|
||||
global path
|
||||
set loc "$path/adm/templates/template.$ext"
|
||||
return [wokUtils:FILES:FileToString $loc]
|
||||
}
|
||||
# Read a file in a string as is.
|
||||
@@ -1054,6 +1051,7 @@ proc osutils:compilable { } {
|
||||
}
|
||||
|
||||
proc osutils:commonUsedTK { theToolKit } {
|
||||
global path
|
||||
set anUsedToolKits [list]
|
||||
set aDepToolkits [LibToLink $theToolKit]
|
||||
foreach tkx $aDepToolkits {
|
||||
@@ -1091,11 +1089,12 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
set aLibsMap(CSF_advapi32) "advapi32.lib"
|
||||
set aLibsMap(CSF_gdi32) "gdi32.lib"
|
||||
set aLibsMap(CSF_user32) "user32.lib"
|
||||
set aLibsMap(CSF_glu32) "glu32.lib"
|
||||
set aLibsMap(CSF_opengl32) "opengl32.lib"
|
||||
set aLibsMap(CSF_wsock32) "wsock32.lib"
|
||||
set aLibsMap(CSF_netapi32) "netapi32.lib"
|
||||
set aLibsMap(CSF_AviLibs) "ws2_32.lib vfw32.lib"
|
||||
set aLibsMap(CSF_OpenGlLibs) "opengl32.lib"
|
||||
set aLibsMap(CSF_OpenGlLibs) "opengl32.lib glu32.lib"
|
||||
|
||||
set aLibsMap(CSF_QT) "QtCore4.lib QtGui4.lib"
|
||||
|
||||
@@ -1111,19 +1110,12 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
||||
set aFrmsMap(CSF_TclLibs) "Tcl"
|
||||
set aFrmsMap(CSF_TclTkLibs) "Tk"
|
||||
} else {
|
||||
if { "$theOS" == "qnx" } {
|
||||
# CSF_ThreadLibs - pthread API is part og libc on QNX
|
||||
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
|
||||
set aLibsMap(CSF_TclLibs) "tcl8.6"
|
||||
set aLibsMap(CSF_TclTkLibs) "tk8.6"
|
||||
} else {
|
||||
set aLibsMap(CSF_ThreadLibs) "pthread rt"
|
||||
set aLibsMap(CSF_OpenGlLibs) "GL"
|
||||
set aLibsMap(CSF_TclLibs) "tcl8.6"
|
||||
set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
|
||||
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
|
||||
set aLibsMap(CSF_MotifLibs) "X11"
|
||||
}
|
||||
set aLibsMap(CSF_ThreadLibs) "pthread rt"
|
||||
set aLibsMap(CSF_OpenGlLibs) "GLU GL"
|
||||
set aLibsMap(CSF_TclLibs) "tcl8.6"
|
||||
set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
|
||||
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
|
||||
set aLibsMap(CSF_MotifLibs) "X11"
|
||||
}
|
||||
|
||||
# optional 3rd-parties
|
||||
@@ -1425,7 +1417,8 @@ proc osutils:vcx1proj:filters { dir proj theFilesMap } {
|
||||
|
||||
# Generate RC file content for ToolKit from template
|
||||
proc osutils:readtemplate:rc {theOutDir theToolKit} {
|
||||
set aLoc "$::THE_CASROOT/adm/templates/template_dll.rc"
|
||||
global path
|
||||
set aLoc "$path/adm/templates/template_dll.rc"
|
||||
set aBody [wokUtils:FILES:FileToString $aLoc]
|
||||
regsub -all -- {__TKNAM__} $aBody $theToolKit aBody
|
||||
|
||||
@@ -1593,6 +1586,7 @@ proc osutils:tk:loadunit { loc map } {
|
||||
# Call unit filter on units name to accept or reject a unit
|
||||
# Tfiles lists for each unit the type of file that can be compiled.
|
||||
proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} } {
|
||||
global path
|
||||
set Tfiles(source,nocdlpack) {source pubinclude}
|
||||
set Tfiles(source,toolkit) {}
|
||||
set Tfiles(source,executable) {source pubinclude}
|
||||
@@ -1649,6 +1643,7 @@ proc osutils:tk:files { tkloc {l_compilable {} } {justail 1} {unitfilter {}} }
|
||||
|
||||
# Generate Visual Studio project file for executable
|
||||
proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {} } } {
|
||||
global path
|
||||
set aVcFiles {}
|
||||
foreach f [osutils:tk:files $theToolKit osutils:compilable 0] {
|
||||
if { $theProjTmpl == {} } {
|
||||
@@ -1731,9 +1726,9 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
|
||||
if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } {
|
||||
# nothing
|
||||
} elseif { "$theVcVer" == "vc9" } {
|
||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"]
|
||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$path/adm/templates/vcproj.user.vc9x"]
|
||||
} else {
|
||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"]
|
||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$path/adm/templates/vcxproj.user.vc10x"]
|
||||
}
|
||||
if { "$aCommonSettingsFileTmpl" != "" } {
|
||||
regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $theVcVer aCommonSettingsFileTmpl
|
||||
@@ -2011,9 +2006,14 @@ proc osutils:cbpx { theOutDir theToolKit } {
|
||||
lappend anIncPaths "../../../inc"
|
||||
|
||||
# extra macros
|
||||
lappend aTKDefines "CSFDB"
|
||||
if { "$aWokStation" == "wnt" } {
|
||||
lappend aTKDefines "WNT"
|
||||
lappend aTKDefines "_CRT_SECURE_NO_DEPRECATE"
|
||||
} else {
|
||||
if { "$aWokStation" == "lin" } {
|
||||
lappend aTKDefines "LIN"
|
||||
}
|
||||
lappend aTKDefines "OCC_CONVERT_SIGNALS"
|
||||
#lappend aTKDefines "_GNU_SOURCE=1"
|
||||
}
|
||||
@@ -2060,13 +2060,13 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
# Release target configuration
|
||||
puts $aFile "\t\t\t<Target title=\"Release\">"
|
||||
if { "$theIsExe" == "true" } {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bin/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bin/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
||||
} else {
|
||||
if { "$aWokStation" == "wnt" } {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
} else {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/lib${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
||||
}
|
||||
@@ -2076,8 +2076,8 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
} else {
|
||||
puts $aFile "\t\t\t\t<Option compiler=\"gcc\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option createStaticLib=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option createDefFile=\"1\" />"
|
||||
puts $aFile "\t\t\t\t<Option createStaticLib=\"1\" />"
|
||||
|
||||
# compiler options per TARGET (including defines)
|
||||
puts $aFile "\t\t\t\t<Compiler>"
|
||||
@@ -2091,20 +2091,15 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
} else {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-O2\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-std=c++0x\" />"
|
||||
if { "$aWokStation" != "qnx" } {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
|
||||
}
|
||||
foreach aMacro $theDefines {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-D${aMacro}\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-DNDEBUG\" />"
|
||||
if { "$aWokStation" == "qnx" } {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-D_QNX_SOURCE\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-DNo_Exception\" />"
|
||||
|
||||
puts $aFile "\t\t\t\t</Compiler>"
|
||||
@@ -2122,13 +2117,13 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
# Debug target configuration
|
||||
puts $aFile "\t\t\t<Target title=\"Debug\">"
|
||||
if { "$theIsExe" == "true" } {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bind/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bind/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
puts $aFile "\t\t\t\t<Option type=\"1\" />"
|
||||
} else {
|
||||
if { "$aWokStation" == "wnt" } {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
} else {
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/lib${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t<Option type=\"3\" />"
|
||||
}
|
||||
@@ -2138,8 +2133,8 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
} else {
|
||||
puts $aFile "\t\t\t\t<Option compiler=\"gcc\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option createStaticLib=\"0\" />"
|
||||
puts $aFile "\t\t\t\t<Option createDefFile=\"1\" />"
|
||||
puts $aFile "\t\t\t\t<Option createStaticLib=\"1\" />"
|
||||
|
||||
# compiler options per TARGET (including defines)
|
||||
puts $aFile "\t\t\t\t<Compiler>"
|
||||
@@ -2155,20 +2150,15 @@ proc osutils:cbp { theOutDir theProjName theSrcFiles theLibsList theFrameworks t
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-O0\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-std=c++0x\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-g\" />"
|
||||
if { "$aWokStation" != "qnx" } {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
|
||||
}
|
||||
foreach aMacro $theDefines {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-D${aMacro}\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-D_DEBUG\" />"
|
||||
if { "$aWokStation" == "qnx" } {
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-D_QNX_SOURCE\" />"
|
||||
}
|
||||
puts $aFile "\t\t\t\t\t<Add option=\"-DDEB\" />"
|
||||
puts $aFile "\t\t\t\t</Compiler>"
|
||||
|
||||
@@ -2292,9 +2282,14 @@ proc osutils:tkinfo { theRelativePath theToolKit theUsedLib theFrameworks theInc
|
||||
}
|
||||
|
||||
# extra macros
|
||||
lappend aTKDefines "CSFDB"
|
||||
if { "$aWokStation" == "wnt" } {
|
||||
lappend aTKDefines "WNT"
|
||||
lappend aTKDefines "_CRT_SECURE_NO_DEPRECATE"
|
||||
} else {
|
||||
if { "$aWokStation" == "lin" } {
|
||||
lappend aTKDefines "LIN"
|
||||
}
|
||||
lappend aTKDefines "OCC_CONVERT_SIGNALS"
|
||||
#lappend aTKDefines "_GNU_SOURCE=1"
|
||||
}
|
||||
@@ -2425,6 +2420,7 @@ proc OS:xcodeproj { theModules theOutDir theGuidsMap theLibType thePlatform} {
|
||||
|
||||
# Generates dependencies section for Xcode project files.
|
||||
proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids theIsStatic} {
|
||||
global path
|
||||
upvar $theGuidsMap aGuidsMap
|
||||
upvar $theFileRefSection aFileRefSection
|
||||
upvar $theDepsGuids aDepsGuids
|
||||
@@ -2556,7 +2552,7 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {t
|
||||
set anExecExtension "\t\t\t\tEXECUTABLE_EXTENSION = dylib;"
|
||||
set anExecPrefix "\t\t\t\tEXECUTABLE_PREFIX = lib;"
|
||||
set aWrapperExtension "\t\t\t\tWRAPPER_EXTENSION = dylib;"
|
||||
set aTKDefines [list "OCC_CONVERT_SIGNALS"]
|
||||
set aTKDefines [list "CSFDB" "OCC_CONVERT_SIGNALS"]
|
||||
|
||||
if { "$theTargetType" == "executable" } {
|
||||
set aPBXBuildPhase "CopyFiles"
|
||||
|
@@ -5,20 +5,17 @@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -3,7 +3,6 @@ echo off
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
|
||||
set "TK_DIR=@3RDPARTY_TK_DLL_DIR@"
|
||||
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@3RDPARTY_FREEIMAGEPLUS_DLL_DIR@"
|
||||
|
@@ -3,7 +3,6 @@
|
||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
||||
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
|
||||
export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@"
|
||||
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
|
||||
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@"
|
||||
export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@"
|
||||
|
@@ -3,7 +3,6 @@ echo off
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
|
||||
set "TK_DIR=@USED_3RDPARTY_TK_DIR@"
|
||||
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@USED_3RDPARTY_FREEIMAGEPLUS_DIR@"
|
||||
|
@@ -1,40 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "@COMPILER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
|
||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
||||
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
||||
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
||||
|
||||
export BIN_PATH="@INSTALL_BIN_DIR@"
|
||||
if [ "$BIN_PATH" != "" ]; then
|
||||
export PATH="${BIN_PATH}:${PATH}"
|
||||
fi
|
||||
|
||||
export LIB_PATH="@INSTALL_LIB_DIR@"
|
||||
if [ "$LIB_PATH" != "" ]; then
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${LIB_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${LIB_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
export OCCT_RESOURCE_PATH="${CASROOT}/src"
|
||||
if [ "@INSTALL_OCCT_RESOURCE_DIR@" != "" ]; then
|
||||
export OCCT_RESOURCE_PATH="@INSTALL_OCCT_RESOURCE_DIR@"
|
||||
fi
|
||||
|
||||
# required for set default testing environment
|
||||
# and "Samples" window creation in DRAW
|
||||
export OCCT_SHARE_PATH="${CASROOT}"
|
||||
if [ "@INSTALL_SHARE_DIR@" != "" ]; then
|
||||
export OCCT_SHARE_PATH="@INSTALL_SHARE_DIR@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh" "$1"
|
||||
source "${aScriptPath}/env.sh" "$1" "$2"
|
||||
|
||||
echo 'Hint: use "pload ALL" command to load standard commands'
|
||||
DRAWEXE
|
||||
|
@@ -9,9 +9,11 @@ rem vc8 win32 Release
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
set "CASROOT=__CASROOT__"
|
||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
rem ----- Reset values to defaults -----
|
||||
set "CASROOT=__CASROOT__"
|
||||
set "CASDEB="
|
||||
set "VCVER=vc8"
|
||||
set "ARCH=32"
|
||||
@@ -20,8 +22,8 @@ set "HAVE_TBB=false"
|
||||
set "HAVE_OPENCL=false"
|
||||
set "HAVE_FREEIMAGE=false"
|
||||
set "HAVE_GL2PS=false"
|
||||
set "HAVE_OPENCL=false"
|
||||
set "HAVE_VTK=false"
|
||||
set "HAVE_D3D=false"
|
||||
set "CSF_OPT_INC="
|
||||
set "CSF_OPT_LIB32="
|
||||
set "CSF_OPT_LIB64="
|
||||
@@ -29,16 +31,10 @@ set "CSF_OPT_BIN32="
|
||||
set "CSF_OPT_BIN64="
|
||||
|
||||
rem ----- Load local settings -----
|
||||
if not ["%CASROOT%"] == [""] if exist "%CASROOT%\custom.bat" (
|
||||
call "%CASROOT%\custom.bat" %1 %2 %3 %4 %5
|
||||
)
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3 %4 %5
|
||||
)
|
||||
|
||||
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
rem ----- Read script arguments (override local settings) -----
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
@@ -71,13 +67,11 @@ if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D"
|
||||
if ["%HAVE_TBB%"] == ["true"] set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "CSF_DEFINES=HAVE_GL2PS;%CSF_DEFINES%"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
|
||||
|
||||
rem Eliminate VS warning
|
||||
if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
|
||||
|
@@ -28,7 +28,6 @@ set "PRODROOT="
|
||||
set "ORIGIN_PATH=%PATH%"
|
||||
|
||||
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
|
||||
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
|
||||
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
|
||||
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
|
||||
if not ["%FREEIMAGEPLUS_DIR%"] == [""] set "PATH=%FREEIMAGEPLUS_DIR%;%PATH%"
|
||||
@@ -39,10 +38,6 @@ if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
|
||||
set "PATH=@CMAKE_BINARY_DIR@/%BIN_TAIL%;%PATH%"
|
||||
if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
|
||||
if not ["%TK_DIR%"] == [""] set "TK_LIBRARY=%TK_DIR%/../lib/tk@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
)
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
|
@@ -45,10 +45,6 @@ if [ "$TCL_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TK_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$FREETYPE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
@@ -69,15 +65,6 @@ if [ "$VTK_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TK_DIR" != "$TCL_DIR" ]; then
|
||||
if [ "$TK_DIR" != "" ]; then
|
||||
export TK_LIBRARY="${TK_DIR}/../lib/tk@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
fi
|
||||
if [ "$TCL_DIR" != "" ]; then
|
||||
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
fi
|
||||
fi
|
||||
|
||||
BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
|
||||
LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
|
||||
|
||||
|
@@ -5,7 +5,7 @@ set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@CURRENT_BUILD_LETTER@"
|
||||
set "CASDEB=@BUILD_LETTER@"
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
@@ -26,7 +26,6 @@ set "PRODROOT="
|
||||
set "ORIGIN_PATH=%PATH%"
|
||||
|
||||
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
|
||||
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
|
||||
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
|
||||
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
|
||||
if not ["%FREEIMAGEPLUS_DIR%"] == [""] set "PATH=%FREEIMAGEPLUS_DIR%;%PATH%"
|
||||
@@ -37,10 +36,6 @@ if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
|
||||
set "PATH=%CASROOT%/%BIN_TAIL%;%PATH%"
|
||||
if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
|
||||
if not ["%TK_DIR%"] == [""] set "TK_LIBRARY=%TK_DIR%/../lib/tk@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
)
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
|
@@ -35,7 +35,7 @@ fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${ARCH}"
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
@@ -43,10 +43,6 @@ if [ "$TCL_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TK_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$FREETYPE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
@@ -67,19 +63,15 @@ if [ "$VTK_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TK_DIR" != "$TCL_DIR" ]; then
|
||||
if [ "$TK_DIR" != "" ]; then
|
||||
export TK_LIBRARY="${TK_DIR}/../lib/tk@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
fi
|
||||
if [ "$TCL_DIR" != "" ]; then
|
||||
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
fi
|
||||
fi
|
||||
BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
|
||||
LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
|
||||
|
||||
export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
|
||||
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
@@ -94,34 +86,34 @@ fi
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
export CSF_SHMessage="${OCCT_RESOURCE_PATH}/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${OCCT_RESOURCE_PATH}/Textures"
|
||||
export CSF_ShadersDirectory="${OCCT_RESOURCE_PATH}/Shaders"
|
||||
export CSF_XSMessage="${OCCT_RESOURCE_PATH}/XSMessage"
|
||||
export CSF_TObjMessage="${OCCT_RESOURCE_PATH}/TObj"
|
||||
export CSF_StandardDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_PluginDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_XCAFDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_TObjDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_StandardLiteDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||
export CSF_UnitsLexicon="${OCCT_RESOURCE_PATH}/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${OCCT_RESOURCE_PATH}/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||
export CSF_STEPDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${OCCT_RESOURCE_PATH}/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${OCCT_RESOURCE_PATH}/StdResource/MigrationSheet.txt"
|
||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
||||
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
||||
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
||||
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
||||
|
||||
# Draw Harness special stuff
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources" ]; then
|
||||
export DRAWHOME="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault"
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${OCCT_RESOURCE_PATH}/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${OCCT_RESOURCE_PATH}/DrawResourcesProducts"
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
||||
|
@@ -3,8 +3,16 @@
|
||||
# go to the script directory
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
# Reset values
|
||||
export CASROOT="__CASROOT__"
|
||||
|
||||
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
||||
export CASROOT="${aScriptPath}/${CASROOT}"
|
||||
fi
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Reset values
|
||||
export CASDEB=""
|
||||
export TARGET="";
|
||||
export HAVE_TBB="false";
|
||||
@@ -20,16 +28,8 @@ export CSF_OPT_BIN32=""
|
||||
export CSF_OPT_BIN64=""
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ "${CASROOT}" != "" ] && [ -e "${CASROOT}/custom.sh" ]; then source "${CASROOT}/custom.sh"; fi
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi
|
||||
|
||||
if [ "${CASROOT}" != "" ] && [ -d "${aScriptPath}/${CASROOT}" ]; then
|
||||
export CASROOT="${aScriptPath}/${CASROOT}"
|
||||
fi
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
for i in $*
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <Standard_Version.hxx>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
|
||||
PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#endif
|
||||
FILEOS VOS_NT
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4)
|
||||
BEGIN
|
||||
VALUE "FileDescription", "@PROJECT_NAME@ Toolkit\000"
|
||||
VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000"
|
||||
VALUE "ProductName", "@PROJECT_NAME@\000"
|
||||
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "OfficialSite", "www.opencascade.org\000"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04E4
|
||||
END
|
||||
END
|
@@ -85,7 +85,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -100,7 +100,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -128,7 +128,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -144,7 +144,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -173,7 +173,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -188,7 +188,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -216,7 +216,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -232,7 +232,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@@ -85,7 +85,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -100,7 +100,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -127,7 +127,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -143,7 +143,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -171,7 +171,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -186,7 +186,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@@ -213,7 +213,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -229,7 +229,7 @@
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -62,7 +62,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
@@ -89,8 +89,8 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
BasicRuntimeChecks="3"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderFile=".\..\..\..\win32\vc7\objd\__TKNAM__\__TKNAM__.pch"
|
||||
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__TKNAM__/"
|
||||
@@ -131,7 +131,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN32;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
|
||||
@@ -61,7 +61,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN32;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
@@ -86,7 +86,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -124,7 +124,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -71,7 +71,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -149,7 +149,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -172,7 +172,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -251,7 +251,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -271,7 +271,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
@@ -350,7 +350,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -372,7 +372,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
|
@@ -49,7 +49,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="WIN32;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -69,7 +69,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="WIN32;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -146,7 +146,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -166,7 +166,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__;"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -242,7 +242,7 @@
|
||||
AdditionalOptions="/favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -261,7 +261,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
@@ -340,7 +340,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -359,7 +359,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
|
@@ -52,7 +52,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -73,7 +73,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -150,7 +150,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -173,7 +173,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -248,7 +248,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -268,7 +268,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN64;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -343,7 +343,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -365,7 +365,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN64;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
|
@@ -52,7 +52,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -72,7 +72,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WNT;No_Exception;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -144,7 +144,7 @@
|
||||
AdditionalOptions="-MP"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -164,7 +164,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="DEB;_DEBUG;WIN32;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -238,7 +238,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -257,7 +257,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;NDEBUG;No_Exception;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
@@ -330,7 +330,7 @@
|
||||
AdditionalOptions="-MP -favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -349,7 +349,7 @@
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="WIN64;DEB;_DEBUG;_WINDOWS;WNT;CSFDB;$(CSF_DEFINES)__TKDEFS__"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
|
@@ -3,21 +3,17 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerEnvironment>PATH=..\..\..\win32\__VCVER__\bind;$(CSF_OPT_BIN32D);$(PATH)</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\..\..</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerEnvironment>PATH=..\..\..\win32\__VCVER__\bin;$(CSF_OPT_BIN32);$(PATH)</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\..\..</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerEnvironment>PATH=..\..\..\win64\__VCVER__\bin;$(CSF_OPT_BIN64);$(PATH)</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\..\..</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerEnvironment>PATH=..\..\..\win64\__VCVER__\bind;$(CSF_OPT_BIN64D);$(PATH)</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)\..\..\..\..</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
148
adm/upgrade.tcl
@@ -477,77 +477,6 @@ proc ConvertTColFwd {thePackagePath theHeaderExtensions} {
|
||||
}
|
||||
}
|
||||
|
||||
# try to find source file corresponding to the specified header and either
|
||||
# inject macro IMPLEMENT_STANDARD_RTTIEXT in it, or check it already present,
|
||||
# and depending on this, return suffix to be used for corresponding macro
|
||||
# DEFINE_STANDARD_RTTI... (either inline or out-of-line variant)
|
||||
proc DefineExplicitRtti {hxxfile class base theSourceExtensions} {
|
||||
# if current file is not a header (by extension), exit with "inline" variant
|
||||
# (there is no need to bother with out-of-line instantiations for local class)
|
||||
set ext [string range [file extension $hxxfile] 1 end]
|
||||
if { [lsearch -exact [split $theSourceExtensions ,] $ext] >=0 } {
|
||||
return "_INLINE"
|
||||
}
|
||||
|
||||
# try to find source file with the same name but source-type extension
|
||||
# in the same folder
|
||||
set filename [file rootname $hxxfile]
|
||||
foreach ext [split $theSourceExtensions ,] {
|
||||
# puts "Checking ${filename}.$ext"
|
||||
if { ! [file readable ${filename}.$ext] } { continue }
|
||||
|
||||
# check the file content
|
||||
set aFileContent [ReadFileToList ${filename}.$ext aFileRawContent aEOL]
|
||||
|
||||
# try to find existing macro IMPLEMENT_STANDARD_RTTIEXT and check that
|
||||
# it is consistent
|
||||
foreach line $aFileContent {
|
||||
if { [regexp "^\\s*IMPLEMENT_STANDARD_RTTIEXT\\s*\\(\\s*$class\\s*,\\s*(\[A-Za-z0-9_\]+)\\s*\\)" $line res impl_base] } {
|
||||
# implementation is in place, just report warning if second argument
|
||||
# is different
|
||||
if { $base != $impl_base } {
|
||||
logwarn "Warning in ${filename}.$ext: second argument of macro"
|
||||
logwarn " IMPLEMENT_STANDARD_RTTIEXT($class,$impl_base)"
|
||||
logwarn " is not the same as detected base class, $base"
|
||||
}
|
||||
return "EXT"
|
||||
}
|
||||
}
|
||||
|
||||
# inject a new macro before the first non-empty, non-comment, and
|
||||
# non-preprocessor line
|
||||
set aNewFileContent {}
|
||||
set injected 0
|
||||
set inc_found 0
|
||||
foreach line $aFileContent {
|
||||
if { ! $injected } {
|
||||
# add macro before first non-empty line after #includes
|
||||
if { [regexp {^\s*$} $line] } {
|
||||
} elseif { [regexp {^\s*\#\s*include} $line] } {
|
||||
set inc_found 1
|
||||
} elseif { $inc_found } {
|
||||
set injected 1
|
||||
lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)"
|
||||
if { ! [regexp "^IMPLEMENT_" $line] } {
|
||||
lappend aNewFileContent ""
|
||||
}
|
||||
}
|
||||
}
|
||||
lappend aNewFileContent $line
|
||||
}
|
||||
if { ! $injected } {
|
||||
lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)"
|
||||
}
|
||||
SaveListToFile ${filename}.$ext $aNewFileContent $aEOL
|
||||
|
||||
return "EXT"
|
||||
}
|
||||
|
||||
logwarn "Warning in ${hxxfile}: cannot find corresponding source file,"
|
||||
logwarn " will use inline version of DEFINE_STANDARD_RTTI"
|
||||
return "_INLINE"
|
||||
}
|
||||
|
||||
# Parse source files and:
|
||||
#
|
||||
# - add second argument to macro DEFINE_STANDARD_RTTI specifying first base
|
||||
@@ -592,14 +521,13 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all instances of DEFINE_STANDARD_RTTI with single or two arguments
|
||||
set index 0
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)([_A-Z]+)?\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI\s*)\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_rtti \
|
||||
$aProcessedFileContent location start suffix clist] } {
|
||||
$aProcessedFileContent location start clist] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set suffix [eval string range \$aProcessedFileContent $suffix]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
|
||||
if { [llength $clist] == 1 } {
|
||||
set class [string trim [lindex $clist 0]]
|
||||
@@ -610,8 +538,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!"
|
||||
}
|
||||
set change_flag 1
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}EXT($class,$inherits($class))" index
|
||||
ReplaceSubString aProcessedFileContent $location "${start}($class, $inherits($class))" index
|
||||
}
|
||||
} else {
|
||||
logwarn "Error in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file, cannot fix"
|
||||
@@ -621,19 +548,12 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
set base [string trim [lindex $clist 1]]
|
||||
if { ! [info exists inherits($class)] } {
|
||||
logwarn "Warning in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file"
|
||||
} elseif { $base != $inherits($class) && ! [info exists inherits($class,multiple)] } {
|
||||
} elseif { $base != $inherits($class) } {
|
||||
logwarn "Warning in $aProcessedFile: Second argument in macro DEFINE_STANDARD_RTTI for class $class is $base while $class seems to inherit from $inherits($class)"
|
||||
}
|
||||
# convert intermediate version of macro DEFINE_STANDARD_RTTI
|
||||
# with two arguments to either _INLINE or EXT variant
|
||||
if { ! $theCheckMode && "$suffix" == "" } {
|
||||
set change_flag 1
|
||||
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
|
||||
# corresponding source file (or check it already present),
|
||||
# and depending on this, use either inline or out-of-line variant
|
||||
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $base $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}${rtti_suffix}($class,$base)" index
|
||||
if { ! $theCheckMode && ! [info exists inherits($class,multiple)] } {
|
||||
set change_flag 1
|
||||
ReplaceSubString aProcessedFileContent $location "${start}($class, $inherits($class))" index
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -658,12 +578,8 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
set index 0
|
||||
set first_newline \n\n
|
||||
set pattern_implement {\\?\n\s*IMPLEMENT_(DOWNCAST|STANDARD_[A-Z_]+|HARRAY1|HARRAY2|HUBTREE|HEBTREE|HSEQUENCE)\s*\([A-Za-z0-9_ ,]*\)\s*;?}
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_implement $aProcessedFileContent location macro] } {
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_implement $aProcessedFileContent location] } {
|
||||
set index [lindex $location 1]
|
||||
# macro IMPLEMENT_STANDARD_RTTIEXT is retained
|
||||
if { [eval string range \$aProcessedFileContent $macro] == "STANDARD_RTTIEXT" } {
|
||||
continue
|
||||
}
|
||||
if { ! $theCheckMode } {
|
||||
set change_flag 1
|
||||
ReplaceSubString aProcessedFileContent $location $first_newline index
|
||||
@@ -678,7 +594,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all uses of macro STANDARD_TYPE and method DownCast and ensure that
|
||||
# argument class is explicitly included
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*([A-Za-z0-9_/]*/)?}
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*}
|
||||
set pattern_incend {[.][a-zA-Z]+\s*[\">]}
|
||||
set index 0
|
||||
set addtype {}
|
||||
@@ -706,9 +622,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
if { ! $theCheckMode } {
|
||||
set addinc ""
|
||||
foreach type $addtype {
|
||||
if { "$aProcessedFileName" != "$type.hxx" } {
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
}
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
}
|
||||
if { [regexp -indices ".*\n${pattern_incbeg}\[A-Za-z0-9_/\]+${pattern_incend}" $aProcessedFileContent location] } {
|
||||
set change_flag 1
|
||||
@@ -735,7 +649,6 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
|
||||
# iterate by header files
|
||||
foreach aHeader [glob -nocomplain -type f -directory $theTargetPath *.{$theExtensions}] {
|
||||
set aCurrentHeaderName [file tail $aHeader]
|
||||
|
||||
# skip gxx files, as names Handle_xxx used there are in most cases
|
||||
# placeholders of the argument types substituted by #define
|
||||
@@ -769,9 +682,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
set anUpdatedHeaderContent {}
|
||||
set pattern_handle {\mHandle_([A-Za-z0-9_]+)}
|
||||
foreach line $aHeaderContent {
|
||||
# do not touch typedefs, #include, and #if... statements
|
||||
if { [regexp {^\s*typedef} $line] ||
|
||||
[regexp {^\s*\#\s*include} $line] || [regexp {^\s*\#\s*if} $line] } {
|
||||
# do not touch #include and #if... statements
|
||||
if { [regexp {\s*\#\s*include} $line] || [regexp {\s*\#\s*if} $line] } {
|
||||
lappend anUpdatedHeaderContent $line
|
||||
continue
|
||||
}
|
||||
@@ -851,8 +763,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
} else {
|
||||
# replace by forward declaration of a class or its include unless
|
||||
# it is already declared or included
|
||||
if { ! [regexp "\#\\s*include\\s*\[\<\"\]\\s*(\[A-Za-z0-9_/\]*/)?$aForwardDeclHandledClass\[.\]hxx\\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject && "$aCurrentHeaderName" != "${aForwardDeclHandledClass}.hxx" } {
|
||||
if { ! [regexp "^\s*\#\s*include\s*\[\<\"\]\s*$aForwardDeclHandledClass\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject } {
|
||||
lappend anUpdatedHeaderContent "#include <${aForwardDeclHandledClass}.hxx>"
|
||||
if { ! [SearchForFile $theIncPaths ${aForwardDeclHandledClass}.hxx] } {
|
||||
loginfo "Warning: include ${aForwardDeclHandledClass}.hxx added in $aHeader, assuming it exists and defines Handle_$aForwardDeclHandledClass"
|
||||
@@ -1034,10 +946,7 @@ proc ConvertCStyleHandleCast {pkpath theExtensions theCheckMode} {
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_refcast0 $hxx location class var] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
set var [eval string range \$hxx $var]
|
||||
if { "$var" != "const" && "$var" != "Standard_OVERRIDE" } {
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
}
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
}
|
||||
|
||||
# replace const Handle(A)& a = Handle(B)::DownCast (b); by
|
||||
@@ -1160,14 +1069,21 @@ proc ReadFileToList {theFilePath theFileContent theFileEOL} {
|
||||
set aFileContent [read $aFile]
|
||||
close $aFile
|
||||
|
||||
# detect DOS end-of-lines
|
||||
if { [regexp "\r\n" $aFileContent] } {
|
||||
set aFileEOL "\r"
|
||||
if [regexp "\r\n" $aFileContent] {
|
||||
set aFileEOL "\r\n"
|
||||
set aList [split [regsub -all "\r\n" $aFileContent "\n"] "\r\n"]
|
||||
} else {
|
||||
# standard UNIX end-of-lines
|
||||
} elseif [regexp "\n" $aFileContent] {
|
||||
set aFileEOL "\n"
|
||||
set aList [split $aFileContent "\n"]
|
||||
}
|
||||
|
||||
# convert to unix eol
|
||||
if {"$aFileEOL" != "\n"} {
|
||||
regsub -all {$aFileEOL} $aFileContent "\n" aFileContent
|
||||
}
|
||||
|
||||
set aList {}
|
||||
foreach aLine [split $aFileContent "\n"] {
|
||||
lappend aList [string trimright $aLine]
|
||||
}
|
||||
|
||||
return $aList
|
||||
@@ -1238,8 +1154,6 @@ proc SaveListToFile {theFilePath theData {theEOL "auto"}} {
|
||||
fconfigure $aFile -translation binary
|
||||
puts -nonewline $aFile [join $theData $anUsedEol]
|
||||
close $aFile
|
||||
|
||||
loginfo "File $theFilePath modified"
|
||||
}
|
||||
|
||||
# collect all subdirs of theBaseDir
|
||||
|
@@ -1,67 +0,0 @@
|
||||
// This is sample C++ file intended for testing and verifyig automatic upgrade
|
||||
// script. Copy it with extension .cxx and apply upgrade procedure to see
|
||||
// the result, as follows:
|
||||
// > upgrade.bat -src=./adm -inc=./src -recurse -all
|
||||
|
||||
// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
|
||||
#include <gp.hxx>
|
||||
|
||||
//========================================================================
|
||||
// OCCT 7.0
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -rtti
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Should be replaced by <Standard_Type.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
|
||||
class A_0
|
||||
{
|
||||
}
|
||||
|
||||
class B_1 :
|
||||
public A_0
|
||||
{
|
||||
// second argument "A_0" should be added
|
||||
DEFINE_STANDARD_RTTI(B_1)
|
||||
};
|
||||
|
||||
class C_2 : public Standard_Transient, B_1
|
||||
{
|
||||
// second argument "Standard_Transient" should be added
|
||||
DEFINE_STANDARD_RTTI(C_2)
|
||||
};
|
||||
|
||||
void for_rtti ()
|
||||
{
|
||||
Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
|
||||
}
|
||||
|
||||
// should be removed
|
||||
IMPLEMENT_DOWNCAST(A)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(A, B)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -fwd
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// force safe mode used for Qt objects
|
||||
Q_OBJECT
|
||||
slots:
|
||||
|
||||
// these includes should be recognized as corresponding to forward declarations
|
||||
#include <occt/TColStd_HArray1OfReal.hxx>
|
||||
|
||||
// these declarations should be just removed
|
||||
class Handle(TColStd_HArray1OfReal);
|
||||
|
||||
// should be replaced by include of corresponding header
|
||||
class TColStd_Array1OfReal;
|
||||
class Handle(Geom_Curve);
|
||||
|
||||
// check that trailing spaces at the following line are preserved
|
||||
void ff();
|
||||
|
@@ -37,10 +37,12 @@ set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
|
||||
|
||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "http://cdn.mathjax.org/mathjax/latest")
|
||||
|
||||
OCCT_VERSION (OCCT_SOURCE_VERSION)
|
||||
|
||||
configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CONFIG_FOR_DOXYGEN}" COPYONLY)
|
||||
|
||||
# Add common options for generation of Overview and User Guides
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCCT_SOURCE_VERSION}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
|
||||
|
||||
|
@@ -32,6 +32,10 @@ user_guides/ocaf/ocaf.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/brep_wp/brep_wp.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/voxels_wp/voxels_wp.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
dev_guides/dev_guides.md
|
||||
|
@@ -12,10 +12,14 @@ user_guides/modeling_algos/modeling_algos.md
|
||||
user_guides/boolean_operations/boolean_operations.md
|
||||
user_guides/shape_healing/shape_healing.md
|
||||
user_guides/ocaf/ocaf.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/step/step.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/visualization/visualization.md
|
||||
user_guides/voxels_wp/voxels_wp.md
|
||||
user_guides/xde/xde.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
|
@@ -11,12 +11,12 @@ You need to use the same version of MS Visual Studio for building all third-part
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/. There are two types of third-party products used by OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 -- 8.6;
|
||||
* FreeType 2.4.10 -- 2.5.3.
|
||||
* Tcl/Tk 8.5 - 8.6;
|
||||
* FreeType 2.4.10 - 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x -- 4.x;
|
||||
* gl2ps 1.3.5 -- 1.3.8;
|
||||
* FreeImage 3.14.1 -- 3.16.0;
|
||||
* TBB 3.x - 4.x;
|
||||
* gl2ps 1.3.5 - 1.3.8;
|
||||
* FreeImage 3.14.1 -3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
@@ -168,9 +168,9 @@ You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
As a result, you will get a folder named, for example, *3rdparty\\gl2ps-1.3.5-source*.
|
||||
|
||||
Rename it into <i>gl2ps-platform-compiler-building mode</i>, where
|
||||
* **platform** -- *win32* or *win64*;
|
||||
* **compiler** -- *vc8*, *vc9* or *vc10*;
|
||||
* **building mode** -- *opt* (for release) or *deb* (for debug).
|
||||
* **platform** is *win32* or *win64*;
|
||||
* **compiler** is *vc8*, *vc9* or *vc10*;
|
||||
* **building mode** - *opt* (for release) or *deb* (for debug).
|
||||
|
||||
For example, <i>gl2ps-win64-vc10-deb</i>
|
||||
|
||||
@@ -208,7 +208,7 @@ You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
|
||||
* Select the generator (the compiler and the target platform -- 32 or 64 bit) in the pop-up window.
|
||||
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
|
@@ -1,21 +1,19 @@
|
||||
Building with CMake for Android {#occt_dev_guides__building_android}
|
||||
Building with CMake and ADT for Android {#occt_dev_guides__building_android}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This article describes the steps to build OCCT libraries for Android from a complete source package
|
||||
with GNU make (makefiles) on Windows 7 and Ubuntu 15.10.
|
||||
This file describes the steps to build OCCT libraries from a complete source package
|
||||
with following tools:
|
||||
- Generation of eclipse project files
|
||||
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- Make: MinGW v4.82+ for Windows, GNU Make vXX for Linux. http://sourceforge.net/projects/mingw/files/
|
||||
- Building eclipse project files of OCCT
|
||||
- Android Developer Tools (ADT) v22+ https://developer.android.com/sdk/index.html
|
||||
|
||||
The steps on Windows and Ubuntu are similar. There is the only one difference: makefiles are built with mingw32-make
|
||||
on Windows and native GNU make on Ubuntu.
|
||||
|
||||
Required tools (download and install if it is required):
|
||||
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu.
|
||||
|
||||
## Generation of makefiles
|
||||
## Generation of eclipse project files
|
||||
Run GUI tool provided by CMake: cmake-gui
|
||||
|
||||
### Tools configuration
|
||||
@@ -24,23 +22,21 @@ Run GUI tool provided by CMake: cmake-gui
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. -
|
||||
|
||||
Select "MinGW MakeFiles" item from the list
|
||||
Select "Eclipse CDT4 - MinGW MakeFiles" item from the list
|
||||
- Choose "Specify toolchain file for cross-compiling"
|
||||
- Click "Next"
|
||||
@figure{/dev_guides/building/android/images/android_image002.png}
|
||||
|
||||
- Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation toolchain for CMake
|
||||
- Specify the Toolchain file at next dialog by android.toolchain.cmake is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) -- path to the NDK folder ("Add Entry" button)
|
||||
Add cache entry ANDROID_NDK - path (entry type is PATH) to the NDK folder ("Add Entry" button)
|
||||
@figure{/dev_guides/building/android/images/android_image004.png}
|
||||
|
||||
If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
|
||||
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.",
|
||||
specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
|
||||
if there is message "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."
|
||||
Define CMAKE_MAKE_PROGRAM variable with the file path to mingw32-make executable.
|
||||
@figure{/dev_guides/building/android/images/android_image005.png}
|
||||
|
||||
### OCCT Configuration
|
||||
@@ -49,36 +45,27 @@ How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides_
|
||||
taking into account the specific configuration variables for android:
|
||||
- ANDROID_ABI = armeabi-v7a
|
||||
- ANDROID_NATIVE_API_LEVEL = 15
|
||||
- ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable
|
||||
- **BUILD_MODULE_Draw = OFF**
|
||||
- ANDROID_NDK_LAYOUT is equal to BUILD_CONFIGURATION variable
|
||||
- CMAKE_ECLIPSE_VERSION is equal to installed eclipse version (e.g., 4.2)
|
||||
|
||||
Configure parallel building:
|
||||
- CMAKE_ECLIPSE_MAKE_ARGUMENTS = -jN where N = your numbers of CPU cores (threads)
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
### Generation of makefiles
|
||||
### Generation of eclipse projects files
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
|
||||
Then the eclipse project files will appear in the build folder (e.g. <i> D:/android-build-eclipse-api-15 </i>).
|
||||
|
||||
## Building makefiles of OCCT
|
||||
## Building eclipse project files of OCCT
|
||||
|
||||
Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process.
|
||||
|
||||
> mingw32-make
|
||||
or
|
||||
> make
|
||||
|
||||
|
||||
Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of building threads.
|
||||
|
||||
> mingw32-make -j4
|
||||
or
|
||||
> make -j4
|
||||
|
||||
## Install built OCCT libraries
|
||||
|
||||
Type "mingw32-make/make" with argument "install" to place the libraries
|
||||
to the install folder (see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake")
|
||||
|
||||
> mingw32-make install
|
||||
or
|
||||
> make install
|
||||
- Open eclipse (downloaded ADT bundle contains it)
|
||||
@figure{/dev_guides/building/android/images/android_image007.png}
|
||||
- Import "Existing project into Workspace"
|
||||
@figure{/dev_guides/building/android/images/android_image008.png}
|
||||
@figure{/dev_guides/building/android/images/android_image009.png}
|
||||
- Build ALL
|
||||
@figure{/dev_guides/building/android/images/android_image010.png}
|
||||
|
||||
When the building process has finished, libraries are located in \<build folder\>/out (e.g. <i> D:/android-build-eclipse-api-15/out </i>).
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 70 KiB |
BIN
dox/dev_guides/building/android/images/android_image007.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
dox/dev_guides/building/android/images/android_image008.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
dox/dev_guides/building/android/images/android_image009.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
dox/dev_guides/building/android/images/android_image010.png
Normal file
After Width: | Height: | Size: 46 KiB |
@@ -60,7 +60,7 @@ To prevent this, it is suggested to make links:
|
||||
Example:
|
||||
|
||||
|
||||
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 -with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
|
||||
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 -–with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 –with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
|
||||
|
||||
|
||||
3.If configure exits successfully, you can build OCCT with *make* command.
|
||||
|
@@ -17,7 +17,7 @@ you need to:
|
||||
2. Build using your preferred build tool.
|
||||
- \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
|
||||
- \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_android "Building with CMake and ADT for Android (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
|
||||
- \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
|
||||
- \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"
|
||||
|
@@ -3,7 +3,7 @@ Building with CMake {#occt_dev_guides__building_cmake}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
|
||||
This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 3.0 or later*.
|
||||
|
||||
**Note**: Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
|
||||
|
||||
@@ -35,7 +35,7 @@ The bare sources distribution contains not only the sources of Open CASCADE Tech
|
||||
|
||||
Now it is time to run a CMake tool which will generate the actual project files for the target IDE (e.g., Visual Studio 2010 solution).
|
||||
|
||||
It is recommended to use *cmake-gui* -- cross-platform GUI tool provided by CMake on Windows, Mac and Linux. As a command-line alternative, *ccmake* also can be used.
|
||||
It is recommended to use *cmake-gui* - cross-platform GUI tool provided by CMake on Windows, Mac and Linux. As a command-line alternative, *ccmake* also can be used.
|
||||
|
||||
CMake deals with three directories: source, build or binary and install.
|
||||
|
||||
@@ -47,11 +47,11 @@ CMake deals with three directories: source, build or binary and install.
|
||||
|
||||
**Note**: The good practice is not to mix up different build configurations in a single directory and not to use the source directory as a build one, for example:
|
||||
|
||||
d:/occt/ -- the source directory
|
||||
d:/tmp/occt-build-vc10-x64 -- the build directory with the generated
|
||||
solution and other intermediate files created during a CMake tool working
|
||||
d:/occt-install -- the installation directory that is
|
||||
able to contain several OCCT configuratoion
|
||||
d:/occt/ - the source directory
|
||||
d:/tmp/occt-build-vc10-x64 - the build directory with the generated
|
||||
solution and other intermediate files created during a CMake tool working
|
||||
d:/occt-install - the installation directory that is
|
||||
able to contain several OCCT configuratoion
|
||||
|
||||
## Configuration process
|
||||
|
||||
@@ -93,23 +93,22 @@ The following table enumerates the full list of environment variables used at co
|
||||
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (sush as make). Possible values are Debug, Release and RelWithDebInfo |
|
||||
| USE_FREEIMAGE | Boolean flag | Indicates whether Freeimage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP etc) |
|
||||
| USE_GL2PS | Boolean flag | Indicates whether GL2PS product should be used in OCCT visualization module for support of vector image formats (PS, EPS etc) |
|
||||
| USE_TBB | Boolean flag | Indicates whether TBB 3rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. The official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
|
||||
| USE_TBB | Boolean flag | Indicates whether TBB 3-rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product |
|
||||
| USE_VTK | Boolean flag | Indicates whether VTK 3-rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3-rd party unless you are planning to use VTK visualization for OCCT geometry. The official documentation @ref occt_user_guides__vis for the details on VIS |
|
||||
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3-rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
|
||||
| 3RDPARTY_FREETYPE_* | Path | Path to Freetype binaries |
|
||||
| 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries |
|
||||
| 3RDPARTY_FREEIMAGE* | Path | Path to Freeimage binaries |
|
||||
| 3RDPARTY_GL2PS_* | Path | Path to GL2PS binaries |
|
||||
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
|
||||
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref occt_user_guides |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files for use when linking other targets |
|
||||
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
|
||||
| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| REBUILD_PLATFORM_DEPENDENT_CODE | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_OcctMfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this options leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command to generate the documentation in HTML format |
|
||||
| BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing etc |
|
||||
| APPLY_OCCT_PATH_DIR | Boolean flag | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution |
|
||||
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
|
||||
| INSTALL_DIR | Path | Points to the installation directory |
|
||||
| INSTALL_FREETYPE | Boolean flag | Indicates whether Freetype binaries should be installed into the installation directory |
|
||||
@@ -118,24 +117,24 @@ The following table enumerates the full list of environment variables used at co
|
||||
| INSTALL_TBB | Boolean flag | Indicates whether TBB binaries should be installed into the installation directory |
|
||||
| INSTALL_VTK | Boolean flag | Indicates whether VTK binaries should be installed into the installation directory |
|
||||
| INSTALL_TCL | Boolean flag | Indicates whether TCL binaries should be installed into the installation directory |
|
||||
| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_OCCT_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_OCCT_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory |
|
||||
|
||||
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
|
||||
|
||||
### 3rd party search mechanism (The variables with <i>3RDPARTY_</i> prefix)
|
||||
### 3rd-party search mechanism (The variables with <i>3RDPARTY_</i> prefix)
|
||||
|
||||
If *3RDPARTY_DIR* directory is defined, required 3rd party binaries are sought in it, default system folders are ignored.
|
||||
If *3RDPARTY_DIR* directory is defined, required 3rd-party binaries are sought in it, default system folders are ignored.
|
||||
|
||||
The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
|
||||
The procedure expects to find binary and header files of each 3rd-party product in its own sub-directory: *bin*, *lib* and *include*.
|
||||
|
||||
The result of the search (achived on the next pass of the configuration process) are recorded in the corresponding variables:
|
||||
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* -- path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* -- path to the directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* -- path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* -- path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is only relevant to Windows platforms.
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* - path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* - path to directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* - path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* - path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is only relevant to Windows platforms
|
||||
|
||||
Note: each library and include directory should be the children of product directory if the last one is defined.
|
||||
|
||||
@@ -193,14 +192,14 @@ Normally you use the installation directory of OCCT to link against your specifi
|
||||
|
||||
the directory structure is follow:
|
||||
|
||||
data -- data files for OCCT (brep, iges, stp)
|
||||
doc -- OCCT overview documentation in HTML format
|
||||
inc -- header files
|
||||
samples -- samples
|
||||
src -- all required source files for OCCT
|
||||
tests -- OCCT test suite
|
||||
win32\vc10\bind -- binary files (installed 3rdparties and occt)
|
||||
\libd -- libraries (installed 3rdparties and occt)
|
||||
data - data files for OCCT (brep, iges, stp)
|
||||
doc - OCCT overview documentation in HTML format
|
||||
inc - header files
|
||||
samples - samples
|
||||
src - all required source files for OCCT
|
||||
tests - OCCT test suite
|
||||
win32\vc10\bind - binary files (installed 3rdparties and occt)
|
||||
\libd - libraries (installed 3rdparties and occt)
|
||||
|
||||
**Note:** The above example is given for debug configuration. However, it is generally safe to use the same installation directory for the release build. In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration. In particular, the binaries directory win64 will be expanded as
|
||||
follows:
|
||||
@@ -210,6 +209,6 @@ follows:
|
||||
\bin
|
||||
\lib
|
||||
|
||||
If CMake installation flags are enabled for the 3rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories)
|
||||
If CMake installation flags are enabled for the 3-rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3-rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories)
|
||||
|
||||
The installation folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*), samples (if its were installed) and overview.html (short-cut for installed OCCT overview documentation).
|
||||
|
@@ -13,11 +13,11 @@ paragraph 1 of \ref occt_dev_guides__building for instructions.
|
||||
|
||||
1. Edit file *custom.bat* to define the environment:
|
||||
|
||||
- *VCVER* -- version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
|
||||
- *VCVER* - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
|
||||
and relevant *VCVARS* path
|
||||
- *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
|
||||
- <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
|
||||
- CSF_OPT_* -- paths to search for includes and binaries of all used
|
||||
- *ARCH* - architecture (32 or 64), affects only *PATH* variable for execution
|
||||
- <i>HAVE_*</i> - flags to enable or disable use of optional third-party products
|
||||
- CSF_OPT_* - paths to search for includes and binaries of all used
|
||||
third-party products
|
||||
|
||||
2. Launch *msvc.bat* to start Visual Studio with all necessary environment
|
||||
|
@@ -3,9 +3,9 @@ Using WOK {#occt_dev_guides__building_wok}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
WOK is a legacy build environment for Open CASCADE Technology.
|
||||
\ref occt_dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
|
||||
It is required for generation of header files for classes defined with
|
||||
CDL ("Cascade Definition Language").
|
||||
@ref occt_dev_guides__cdl "CDL" ("Cascade Definition Language").
|
||||
Also tools for generation of project files for other build systems, and OCCT
|
||||
documentation, are integrated to WOK.
|
||||
|
||||
@@ -105,7 +105,7 @@ and third-party components required for building OCCT.
|
||||
|
||||
Note that <i>$CASROOT</i> is equal to *D:/occt* now.
|
||||
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.; see @ref occt_dev_guides__wok "WOK User's Guide" for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
|
||||
@section wok3 Generation of building projects
|
||||
|
||||
@@ -115,14 +115,14 @@ and third-party components required for building OCCT.
|
||||
LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
TARGET:
|
||||
* *vc8* -- Visual Studio 2005;
|
||||
* *vc9* -- Visual Studio 2008;
|
||||
* *vc10* -- Visual Studio 2010;
|
||||
* *vc11* -- Visual Studio 2012;
|
||||
* *cbp* -- CodeBlocks;
|
||||
* *cmake* -- CMake;
|
||||
* *amk* -- AutoMake;
|
||||
* *xcd* -- Xcode;
|
||||
* *vc8* - Visual Studio 2005;
|
||||
* *vc9* - Visual Studio 2008;
|
||||
* *vc10* - Visual Studio 2010;
|
||||
* *vc11* - Visual Studio 2012;
|
||||
* *cbp* - CodeBlocks;
|
||||
* *cmake* - CMake;
|
||||
* *amk* - AutoMake;
|
||||
* *xcd* - Xcode;
|
||||
* <i>-no_wprocess</i> option skips generation of derived headers and source files.
|
||||
|
||||
Note that this command takes several minutes to complete at the first call.
|
||||
@@ -135,14 +135,14 @@ To regenerate derived headers and source files without regeneration of projects
|
||||
LOC:dev:occt> wprocess -DGroups=Src,Xcpp
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The generated building project has been placed into <i>$CASROOT/adm</i> folder:
|
||||
* for vc8 -- <i>$CASROOT/adm/msvc/vc8</i>;
|
||||
* for vc9 -- <i>$CASROOT/adm/msvc/vc9</i>;
|
||||
* for vc10 -- <i>$CASROOT/adm/msvc/vc10</i>;
|
||||
* for vc11 -- <i>$CASROOT/adm/msvc/vc11</i>;
|
||||
* for cbp -- <i>$CASROOT/adm/\<OS\>/cbp</i>;
|
||||
* for cmake -- <i>$CASROOT/adm/cmake</i>;
|
||||
* for amk -- <i>$CASROOT/adm/lin/amk</i>;
|
||||
* xcd -- <i>$CASROOT/adm/\<OS\>/xcd</i>
|
||||
* for vc8 - <i>$CASROOT/adm/msvc/vc8</i>;
|
||||
* for vc9 - <i>$CASROOT/adm/msvc/vc9</i>;
|
||||
* for vc10 - <i>$CASROOT/adm/msvc/vc10</i>;
|
||||
* for vc11 - <i>$CASROOT/adm/msvc/vc11</i>;
|
||||
* for cbp - <i>$CASROOT/adm/\<OS\>/cbp</i>;
|
||||
* for cmake - <i>$CASROOT/adm/cmake</i>;
|
||||
* for amk - <i>$CASROOT/adm/lin/amk</i>;
|
||||
* xcd - <i>$CASROOT/adm/\<OS\>/xcd</i>
|
||||
|
||||
@section wok4 Generation of documentation
|
||||
|
||||
@@ -152,11 +152,11 @@ The generated building project has been placed into <i>$CASROOT/adm</i> folder:
|
||||
:LOC:dev:occt> wgendoc
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The following options can be used:
|
||||
* <i>-wb=\<workbench name\></i> -- the name of OCCT workbench (the current one by default);
|
||||
* <i>-m=\<list of modules\></i> -- the list of modules that will be contained in the documentation;
|
||||
* <i>-outdir=\<path\></i> -- the output directory for the documentation;
|
||||
* <i>-chm</i> -- the option to generate CHM file;
|
||||
* <i>-hhc=\<path\></i> -- the path to HTML Help Compiler *hhc.exe* or equivalent;
|
||||
* <i>-qthelp=\<path\></i> -- the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
|
||||
* <i>-doxygen=\<path\></i> -- the path to Doxygen executable;
|
||||
* <i>-dot=\<path\></i> -- the path to GraphViz dot executable.
|
||||
* <i>-wb=\<workbench name\></i> the name of OCCT workbench (the current one by default);
|
||||
* <i>-m=\<list of modules\></i> the list of modules that will be contained in the documentation;
|
||||
* <i>-outdir=\<path\></i> the output directory for the documentation;
|
||||
* <i>-chm</i> the option to generate CHM file;
|
||||
* <i>-hhc=\<path\></i> the path to HTML Help Compiler *hhc.exe* or equivalent;
|
||||
* <i>-qthelp=\<path\></i> the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
|
||||
* <i>-doxygen=\<path\></i> the path to Doxygen executable;
|
||||
* <i>-dot=\<path\></i> the path to GraphViz dot executable.
|
||||
|
@@ -67,10 +67,10 @@ Names of units should not contain underscores, unless the use of underscores is
|
||||
|
||||
The following extensions should be used for source files, depending on their type:
|
||||
|
||||
* <i>.cdl</i> -- CDL declaration files
|
||||
* <i>.cxx</i> -- C++ source files
|
||||
* <i>.hxx</i> -- C++ header files
|
||||
* <i>.lxx</i> -- headers with definitions of inline methods (CDL packages)
|
||||
* <i>.cdl</i> - CDL declaration files
|
||||
* <i>.cxx</i> - C++ source files
|
||||
* <i>.hxx</i> - C++ header files
|
||||
* <i>.lxx</i> - headers with definitions of inline methods (CDL packages)
|
||||
|
||||
### Prefix for toolkit names [MANDATORY]
|
||||
|
||||
@@ -452,7 +452,7 @@ The source code is one of the most important references for documentation.
|
||||
The comments in the source code should be complete enough to allow understanding the corresponding code and to serve as basis for other documents.
|
||||
|
||||
The main reasons why the comments are regarded as documentation and should be maintained are:
|
||||
- The comments are easy to reach -- they are always together with the source code;
|
||||
- The comments are easy to reach - they are always together with the source code;
|
||||
- It is easy to update a description in the comment when the source is modified;
|
||||
- The source by itself is a good context to describe various details that would require much more explanations in a separate document;
|
||||
- As a summary, this is the most cost-effective documentation.
|
||||
@@ -486,7 +486,7 @@ They should be detailed enough to allow any person to understand what each part
|
||||
|
||||
It is recommended to comment all static functions (like methods in headers), and to insert at least one comment per each 10-100 lines in the function body.
|
||||
|
||||
There are also some rules that define how comments should be formatted, see @ref occt_coding_rules_3 "Formatting Rules".
|
||||
There are also some rules that define how comments should be formatted, see <a href="#occt_coding_rules_3">Formatting Rules</a>.
|
||||
|
||||
Following these rules is important for good comprehension of the comments. Moreover, this approach allows automatically generating user-oriented documentation directly from the commented sources.
|
||||
|
||||
@@ -950,7 +950,7 @@ Command should warn the user about unknown arguments, including cases when extra
|
||||
|
||||
### Message printing
|
||||
|
||||
Informative messages should be printed into standard output *std::cout*, whilst command results (if any) -- into Draw Interpreter.
|
||||
Informative messages should be printed into standard output *std::cout*, whilst command results (if any) - into Draw Interpreter.
|
||||
|
||||
Information printed into Draw Interpreter should be well-structured to allow usage in TCL script.
|
||||
|
||||
|
@@ -2,464 +2,282 @@ Contribution Workflow {#occt_dev_guides__contribution_workflow}
|
||||
====================================
|
||||
@tableofcontents
|
||||
|
||||
@section occt_contribution_intro Introduction
|
||||
@section occt_contribution_workflow_1 Introduction
|
||||
|
||||
The purpose of this document is to describe standard workflow for processing contributions to certified version of OCCT.
|
||||
|
||||
@subsection occt_contribution_intro_tracker Use of issue tracker system
|
||||
@subsection occt_contribution_workflow_1_1 Use of issue tracker system
|
||||
|
||||
Each contribution should have corresponding issue (bug, or feature, or integration request)
|
||||
registered in the MantisBT issue tracker system accessible by URL
|
||||
http://tracker.dev.opencascade.org.
|
||||
The issue is processed according to the described workflow.
|
||||
The issue is processed further according to the described workflow.
|
||||
|
||||
@subsection occt_contribution_intro_access Access levels
|
||||
@subsection occt_contribution_workflow_1_2 Access Levels
|
||||
|
||||
Access level defines the permissions of the user to view, register and modify issues in the issue tracker.
|
||||
The correspondence of access level and user permissions is defined in the table below.
|
||||
Access level defines the permissions of the user to view,
|
||||
register and modify issues in a Mantis bugtracker.
|
||||
The correspondence of access level and user permissions
|
||||
is defined in accordance with the table below.
|
||||
|
||||
| Access level | Granted to | Permissions | Can set statuses |
|
||||
|:------------- | :--------- | :-------------- | :----------------------- |
|
||||
| Viewer | Everyone (anonymous access) | View public issues only | None |
|
||||
| Updater | Users registered on dev.opencascade.org, in Open CASCADE project | View and comment issues | None |
|
||||
| Reporter | Users registered on dev.opencascade.org, in Community project | View, report, and comment issues | New, Resolved, Feedback |
|
||||
| Developer | OCC developers and (in Community project) external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed, Feedback |
|
||||
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested, Feedback |
|
||||
| Maintainer | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed, Feedback |
|
||||
| Bugmaster | Person responsible for Mantis issue tracker, integrations, certification, and releases | Full access | All statuses |
|
||||
| Viewer | Everyone (anonymous access) | View public issues only | No |
|
||||
| Reporter | Users registered on dev.opencascade.com | View, report, and comment issues | New, Resolved |
|
||||
| Updater | Users of dev.opencascade.com in publicly visible projects | View and comment issues | New, Resolved |
|
||||
| Developer | OCC developers and external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed |
|
||||
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested |
|
||||
| Manager | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed |
|
||||
|
||||
According to his access level, the user can participate in the issue handling process under different roles, as described below.
|
||||
|
||||
@section occt_contribution_workflow Standard workflow for an issue
|
||||
@section occt_contribution_workflow_2 Typical workflow for an issue
|
||||
|
||||
@subsection occt_contribution_workflow_general General scheme
|
||||
@subsection occt_contribution_workflow_2_1 General scheme
|
||||
|
||||
<center>
|
||||
@image html OCCT_ContributionWorkflow_V3_image001.svg "Standard life cycle of an issue"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image001.svg "Standard life cycle of an issue"
|
||||
</center>
|
||||
@image html OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
|
||||
@subsection occt_contribution_workflow_issue Issue registration
|
||||
@subsection occt_contribution_workflow_2_2 Issue registration
|
||||
|
||||
An issue is registered in Mantis bugtracker by the **Reporter** with definition of the necessary attributes (see also @ref occt_contribution_app):
|
||||
An issue is registered in Mantis bugtracker by the Reporter with definition of the necessary attributes.
|
||||
The definition of the following attributes is obligatory:
|
||||
|
||||
**Category** -- indicates the OCCT component, to which the issue relates.
|
||||
(If in doubt, assign to OCCT:Foundation Classes.)
|
||||
|
||||
**Severity** -- indicates the impact of the issue in the context where it was discovered.
|
||||
|
||||
**Profile** -- specifies the configuration, on which the problem was detected.
|
||||
For specific configurations it is possible to specify separately platform, OS, and version.
|
||||
These fields can be left empty if the issue is not configuration-specific.
|
||||
Additional details relevant for the environment where the issue is reproduced (such as compiler version, bitness, etc.) can be provided in the **Description**.
|
||||
|
||||
**Products Version** -- defines the OCCT version, on which the problem has been detected.
|
||||
|
||||
It is preferable to indicate the version of the earliest known official release where the problem can be reproduced.
|
||||
If the issue is reported on the current development version of OCCT, the current development version should be used (for convenience, this version is marked by asterisk in Mantis).
|
||||
|
||||
@note OCCT version number can be consulted in the file Standard_Version.hxx (value of OCC_VERSION_COMPLETE macro).
|
||||
|
||||
**Assign to** -- developer to whom the issue will be assigned.
|
||||
By default, it is set to **Maintainer** of the OCCT component selected in **Category** field.
|
||||
|
||||
**Target Version** -- defines the target version for the fix to be provided.
|
||||
By default, it is set to the current version under development.
|
||||
|
||||
**Summary** -- a short, one sentence description of the issue.
|
||||
* **Category** - indicates component of OCCT to which the issue relates. If in doubt, assign OCCT:Foundation Classes.
|
||||
* **Reproducibility**
|
||||
* **Severity**
|
||||
* **Priority**
|
||||
* **Profile** - allows defining the platform on which the problem was detected from the list of predefined platforms. If a platform is absent in the list of predefined platforms it is possible to use Or Fill In option to define the platform manually.
|
||||
* **Platform**
|
||||
* **OS**
|
||||
* **OS Version**
|
||||
* **Products Version** - defines the version of Open CASCADE on which the problem has been detected.
|
||||
* **Summary** - a short, one sentence description of the issue. It has a limit of 128 characters. It should be informative and useful for the developers. It is advisable to avoid vague or misleading phrases, such as "it doesn't work" or "it crashed". It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
|
||||
* **Description** - should contain a detailed definition of the nature of the registered issue depending on its type. For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if possible at this stage) or any inputs from the originator. For a feature or integration request it is recommended to describe the proposed feature in details (as possible at that stage), including the changes required for its implementation and the main features of the new functionality. Filling the bug description is obligatory.
|
||||
* **Steps To Reproduce** - in this field it is possible to describe in detail how to reproduce the issue. This field considerably helps to find the cause of the problem, to eliminate it and to create the test case.
|
||||
* *Upload File* field allows attaching the shapes, scripts or modified source files of OCCT. It is recommended to attach a prototype test case in form of a Tcl script for DRAW, using either existing DRAW commands, or a C++ code which can be organized in DRAW commands, as well as sample shapes or other input data (if applicable), immediately after the issue registration.
|
||||
|
||||
The **Summary** has a limit of 128 characters.
|
||||
It should be informative and useful for the developers.
|
||||
It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
|
||||
The newly registered issue gets status **NEW** and is assigned to the developer responsible for the OCCT component indicated in the Category field (Maintainer).
|
||||
|
||||
A good practice is to start the issue with indication of the relevant component (OCCT module, package, class etc.) to better represent its context.
|
||||
@subsection occt_contribution_workflow_2_3 Assigning the issue
|
||||
|
||||
The summary should be given in imperative mood when it can be formulated as goal to be achieved or action to be done.
|
||||
In particular, this applies to feature requests and improvements, for instance:
|
||||
|
||||
> *Visualization - provide a support of zoom persistent selection*
|
||||
|
||||
If the issue reports a problem, the summary should be given in Present Simple.
|
||||
If reported problem is believed to be a regression, it is recommended to indicate this in the summary, like this:
|
||||
|
||||
> [Regression in 6.9.0] *IGES - Export of a reversed face leads to wrong data*
|
||||
|
||||
**Description** -- should contain a detailed definition of the nature of the registered issue depending on its type.
|
||||
|
||||
For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if known at this stage), and details on the context where the issue has been detected.
|
||||
|
||||
For a feature or integration request it is necessary to describe the proposed feature in details (as much as possible at that stage), including the changes required for its implementation and the main features of the new functionality.
|
||||
|
||||
Example:
|
||||
|
||||
> *Currently selection does not work correctly for non-zoomable objects (those defined using transform persistence). To provide correct selection for such objects, first-level (object) BVH structures must be updated on each camera change, and frustum must be rebuilt accordingly.*
|
||||
|
||||
@note In the description and notes to the issues you can refer to another issue by its ID prefixed by number sign (e.g.: #12345), and refer to a note by its ID prefixed by tilde (e.g.: ~20123).
|
||||
These references will be expanded by Mantis into links to the corresponding issue or note.
|
||||
When the number sign or the tilde followed by digits are a part of a normal text, add a space before digits (e.g.: "face # 12345 contains ~ 1000 edges") to avoid this conversion.
|
||||
|
||||
**Steps To Reproduce** -- allows describing in detail how to reproduce the issue.
|
||||
|
||||
This information is crucial for the developer to investigate the cause of the problem and to create the test case.
|
||||
The optimal approach is to give a sequence of @ref occt_user_guides__test_harness "DRAW Test Harness" commands to reproduce the problem in DRAW.
|
||||
This information can also be provided as a DRAW Tcl script attached to the issue (in **Upload File** field).
|
||||
|
||||
**Additional information and documentation updates** -- any additional information, remarks to be taken into account in Release Notes, etc..
|
||||
|
||||
**Upload File** -- allows attaching the shapes, snapshots, scripts, documents, or modified source files of OCCT.
|
||||
|
||||
This field can be used to attach a prototype test case in form of a Tcl script for DRAW, a C++ code which can be organized in DRAW commands, sample shapes, documents describing proposed change or analysis of the problem, or other data required for reproduction of the issue.
|
||||
Where applicable, pictures demonstrating a problem and/or desired result can be attached.
|
||||
The description of the new issue is checked by the **Maintainer** and if it is feasible,
|
||||
he may assign the issue to a **Developer**. Alternatively, any user with **Developer** access level
|
||||
or higher can assign the issue to himself if he wants to provide a solution.
|
||||
|
||||
The newly registered issue gets status **NEW** and is assigned to the person indicated in the **Assign to** field.
|
||||
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
|
||||
|
||||
@subsection occt_contribution_workflow_assign Assigning the issue
|
||||
The **Maintainer, Technical Project Manager,** or **Bugmaster** can close or reassign the issue
|
||||
(in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the purpose of the new feature.
|
||||
That decision shall be documented in the comments to the issue in the Bugtracker.
|
||||
|
||||
The description of the new issue is checked by the **Maintainer** and if it is feasible, he may assign the issue to a **Developer**.
|
||||
Alternatively, any user with **Developer** access level or higher can assign the issue to himself if he wants to provide a solution.
|
||||
The assigned issue should have state **ASSIGNED**.
|
||||
|
||||
@subsection occt_contribution_workflow_2_4 Resolving the issue
|
||||
|
||||
The **Developer** responsible for the issue assigned to him provides a solution
|
||||
as a change on the version of OCCT indicated in the issue attributes, or the last development version.
|
||||
|
||||
The modified sources should be submitted for review and testing to the dedicated branch of the official OCCT Git repository:
|
||||
|
||||
* Branch should be created for the issue with name composed of letters ‘CR’ followed by issue ID number (without leading zeroes).
|
||||
Optional suffix can be added to the branch name after issue ID,
|
||||
e.g. to distinguish between several version of the fix.
|
||||
* The branch should be based on recent version of the master branch
|
||||
(not later than commit tagged as last OCCT release).
|
||||
* The first line of the first commit message should contain
|
||||
the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug TDataXtd_PatternStd").
|
||||
The consequent lines should contain a description of the changes made.
|
||||
If more than one commit has been made, the commit messages should contain description of the changes made.
|
||||
* The amount of the code affected by the change should be limited
|
||||
to only the changes required for the bug fix or improvement.
|
||||
Change of layout or re-formatting of the existing code is allowed
|
||||
only in the parts where meaningful changes related to the issue have been made.
|
||||
* The name of the branch where the fix is submitted should be given
|
||||
in the note to the Mantis issue
|
||||
(providing the direct link to relevant branch view in GitWeb is encouraged).
|
||||
* The description of the changes made should be put to the field
|
||||
"Additional information and documentation updates" of the Mantis issue.
|
||||
|
||||
In some cases (if Git is not accessible for the contributor),
|
||||
external contributions can be submitted as patch (diff) files or sources
|
||||
attached to the Mantis issue, with indication of OCCT version on which the fix is made.
|
||||
Such contributions should be put to Git for processing by someone else,
|
||||
and hence they have less priority in processing than the ones submitted directly through Git.
|
||||
|
||||
The issue for which solution is provided should be switched to **RESOLVED** state
|
||||
and assigned to the developer who is expected to make a code review
|
||||
(the **Reviewer**; by default, can be set to the **Maintainer** of the component).
|
||||
|
||||
@subsection occt_contribution_workflow_2_5 Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT Code reviewing rules and examines all changes in the sources to detect obvious and possible errors, misprints, conformity to coding style.
|
||||
|
||||
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
|
||||
* If Reviewer detects some problems, he can either:
|
||||
* Fix these issues and provide new solution, reassigning the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
|
||||
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developer’s forum if necessary).
|
||||
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
|
||||
* If Reviewer does not detect any problems, he changes status to **REVIEWED**.
|
||||
|
||||
The **Maintainer** or **Bugmaster** can close or reassign the issue (in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the need of the new feature.
|
||||
That decision shall be documented in the comments to the issue in the Bugtracker.
|
||||
|
||||
The assigned issue has status **ASSIGNED**.
|
||||
|
||||
@subsection occt_contribution_workflow_fix Resolving the issue
|
||||
|
||||
The **Developer** responsible for the issue assigned to him provides a solution including:
|
||||
|
||||
* Changes in the code, with appropriate comments;
|
||||
* Test case (when applicable) and data necessary for its execution;
|
||||
* Changes in the user and developer guides (when necessary).
|
||||
|
||||
The change is integrated to branch named CRxxxxx (where **xxxxx** is issue number) in the OCCT Git repository, based on current master, and containing a single commit with the appropriate description.
|
||||
Then the issue is switched to **RESOLVED** for further review and testing.
|
||||
|
||||
The following sub-sections describe this process, relevant requirements and options, in more details.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_code Requirements to the code modification
|
||||
|
||||
The amount of code affected by the change should be limited to the changes required for the bug fix or improvement.
|
||||
Change of layout or re-formatting of the existing code is allowed only in the parts where meaningful changes related to the issue have been made.
|
||||
|
||||
@note If deemed useful, re-formatting or cosmetic changes affecting considerable parts of the code can be made within a dedicated issue.
|
||||
|
||||
The changes should comply with the OCCT @ref occt_dev_guides__coding_rules "Codng Rules".
|
||||
It is especially important to comment the code properly so that other people can understand it easier.
|
||||
|
||||
The modification should be tested by running OCCT tests (on the platform and scope available to **Developer**) and ensuring absence of regressions.
|
||||
In case if modification affects results of some existing test case and the new result is correct, such test case should be updated to report OK (or BAD), as descibed in @ref testmanual_details_results "Automated Test System / Interpretation of Test Results".
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_test Providing a test case
|
||||
|
||||
For modifications affecting OCCT functionality, a test case should be created (unless already exists) and included in the commit or patch.
|
||||
See @ref testmanual_intro_quick_create "Automated Test System / Creating a New Test" for relevant instructions.
|
||||
|
||||
The data files required for a test case should be attached to the corresponding issue in Mantis (i.e. not included in the commit).
|
||||
|
||||
When the test case cannot be provided for any reason, the maximum possible information on how the problem can be reproduced and how to check the fix should be provided in the **Steps to Reproduce** field of an issue.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_doc Updating user and developer guides
|
||||
|
||||
If the change affects a functionality described in @ref user_guides "User Guides", the corresponding user guide should be updated to reflect the change.
|
||||
|
||||
If the change affects OCCT test system, build environment, or development tools described in @ref dev_guides "Developer Guides", the corresponding guide should be updated.
|
||||
|
||||
The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document @ref occt_dev_guides__upgrade "Upgrade from previous OCCT versions".
|
||||
It is recommended to add a sub-section for each change described.
|
||||
The description should provide the explanation of the incompatibility introduced by the change, and describe how it can be resolved (at least, in known situations).
|
||||
When feasible, the automatic upgrade procedure (adm/upgrade.tcl) can be extended by a new option to perform the required upgrade of the dependent code automatically.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_git Submission of change as a Git branch
|
||||
|
||||
The modification of sources should be provided in the dedicated branch of the official OCCT Git repository.
|
||||
|
||||
The branch should contain a single commit, with the appropriate commit message (see @ref occt_contribution_workflow_fix_commit "Requirements to the commit message" below).
|
||||
|
||||
In general, this branch should be based on the recent version of the master branch.
|
||||
It is highly preferable to submit changes basing on the current master.
|
||||
In case if the fix is implemented on the previous release of OCCT, the branch can be based on the corresponding tag in Git, instead of the master.
|
||||
|
||||
The branch name should be composed of letters **CR** (abbreviation of "Change Request") followed by the issue ID number (without leading zeros).
|
||||
It is possible to add an optional suffix to the branch name after the issue ID, e.g. to distinguish between several versions of the fix (see @ref occt_contribution_nonstd_rebase).
|
||||
|
||||
See @ref occt_dev_guides__git_guide "Guide to using GIT" for help.
|
||||
|
||||
@note When a branch with the name given according to the above rule is pushed to Git, a note is automatically added to the corresponding issue in Mantis, indicating the person who has made the push, the commit hash, and (for new commits) the description.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_commit Requirements to the commit message
|
||||
|
||||
The commit message posted in Git constitutes an integral part of both the fix and the release documentation.
|
||||
|
||||
The first line of the commit message should contain the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug in TDataXtd_PatternStd"), followed by an empty line.
|
||||
|
||||
The following lines should provide a description of the context and details on the changes made.
|
||||
The contents and the recommended structure of the description depend on the nature of the bug.
|
||||
|
||||
In a general case, the following elements should be present:
|
||||
* **Problem** -- a description of the unwanted behavior;
|
||||
* **Change** -- a description of the implemented changes, including the names of involved classes / methods / enumerations etc.;
|
||||
* **Result** -- a description of the current behavior (after the implementation).
|
||||
|
||||
Example:
|
||||
|
||||
> *0026330: BRepOffsetAPI_ThruSections creates invalid shape.*
|
||||
>
|
||||
> *Methods BRep_Tool::CurveOnSurface() and BRepCheck_Edge::InContext() now properly handle parametric range on a 3D curve when it is used to generate a p-curve dynamically (on a planar surface) and both the surface and the 3D curve have non-null locations.*
|
||||
|
||||
Provide sufficient context so that potential user of the affected functionality can understand what has been changed and how the algorithm works now.
|
||||
Describe reason and essence of the changes made, but do not go too deep into implementation details -- these should be reflected in comments in the code.
|
||||
|
||||
@subsubsection occt_contribution_workflow_fix_resolve Marking issue as resolved
|
||||
|
||||
To mark the change as ready for review and testing, the corresponding issue should be switched to **RESOLVED** state.
|
||||
By default, the issue gets assigned to the **Maintainer** of the component, who is thus responsible for its review.
|
||||
Alternatively, another person can be selected as a reviewer at this step.
|
||||
|
||||
When the issue is switched to **RESOLVED**, it is required to update or fill the field **Steps to reproduce**.
|
||||
The possible variants are:
|
||||
|
||||
* The name of an existing or new test case (preferred variant);
|
||||
* A sequence of DRAW commands;
|
||||
* N/A (Not required / Not possible / Not applicable);
|
||||
* Reference to an issue in the bug tracker of another project.
|
||||
|
||||
@subsection occt_contribution_workflow_review Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT @ref occt_dev_guides__coding_rules "Coding Rules" and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
|
||||
|
||||
If the Reviewer detects some problems, he can either:
|
||||
|
||||
* Fix these issues and provide a new solution.
|
||||
The issue can then be switched to **REVIEWED**.
|
||||
|
||||
In case of doubt or possible disagreement the **Reviewer** can reassign the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
|
||||
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developer’s forum if necessary).
|
||||
|
||||
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
|
||||
|
||||
If Reviewer does not detect any problems, or provides a corrected version, he changes status to **REVIEWED**.
|
||||
The issue gets assigned to the **Bugmaster**.
|
||||
|
||||
@subsection occt_contribution_workflow_test Testing
|
||||
@subsection occt_contribution_workflow_2_6 Testing
|
||||
|
||||
The issues that are in **REVIEWED** state are subject of certification (non-regression) testing.
|
||||
The issue is assigned to an OCCT **Tester** when he starts processing it.
|
||||
The issue is assigned to OCC **Tester** when he starts processing it.
|
||||
The results of tests are checked by the **Tester**:
|
||||
* If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problem. The **Developer** should produce a new solution.
|
||||
* If the **Tester** does not detect build problems or regressions, he changes the status to **TESTED** for further integration.
|
||||
|
||||
If the branch submitted for testing is based on obsolete status of the master branch, **Tester** @ref occt_contribution_nonstd_rebase "rebases" it on master HEAD.
|
||||
In case of conflicts, the issue is assigned back to **Developer** in **FEEDBACK** status, requesting for a rebase.
|
||||
@subsection occt_contribution_workflow_2_7 Integration of a solution
|
||||
|
||||
Certification testing includes:
|
||||
* Addition of new data models (if required for a new test case) to the data base;
|
||||
* Revision of the new test case(s) added by developer, and changes in the existing test cases included in commit.
|
||||
The **Tester** can amend tests to ensure their correct behavior in the certification environment.
|
||||
* Building OCCT on a sub-set of supported configurations (OS and compiler), watching for errors and warnings;
|
||||
* Execution of tests on sub-set of supported platforms (at least, one Windows and one Linux configuration), watching for regressions;
|
||||
* Building OCCT samples, watching for errors;
|
||||
* Building and testing of OCC products based on OCCT.
|
||||
|
||||
If the **Tester** does not detect problems or regressions, he changes the status to **TESTED** for further integration.
|
||||
|
||||
If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problems.
|
||||
The **Developer** should analyze the reported problems and, depending on results of this analysis, either:
|
||||
* Confirm that the detected problems are expected changes and they should be accepted as a new status of the code. Then the issue should be switched to **FEEDBACK** and assigned to the **Bugmaster**.
|
||||
* Produce a new solution (see @ref occt_contribution_workflow_fix, and also @ref occt_contribution_nonstd_minor).
|
||||
|
||||
@subsection occt_contribution_workflow_integrate Integration of a solution
|
||||
|
||||
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
|
||||
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
|
||||
* the change has been reviewed;
|
||||
* the change has been tested without regressions (or with regressions treated properly);
|
||||
* the test case has been created for this issue (when applicable), and the change has been rechecked on this test case;
|
||||
* "Additional information and documentation updates" field is filled by the developer;
|
||||
* the change does not conflict with other changes integrated previously.
|
||||
|
||||
If the result of check is successful the Integrator integrates the solution into the branch.
|
||||
The integrations are performed weekly; integration branches are named following the pattern IR-YYYY-MM-DD.
|
||||
|
||||
Each change is integrated as a single commit without preserving the history of changes made in the branch (by rebase, squashing all intermediate commits if any), however, preserving the author when possible.
|
||||
This is done to have the master branch history plain and clean.
|
||||
The following picture illustrates the process:
|
||||
If the result of check is successful the Integrator integrates solution
|
||||
into the master branch of the repository. Each change is integrated into the master branch
|
||||
as a single commit without preserving the history of changes made in the branch
|
||||
(by rebase, squashing all intermediate commits), however, preserving the author when possible.
|
||||
This is done to have the master branch history plain and clean.
|
||||
The following picture illustrates the process:
|
||||
|
||||
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches" width=\textwidth
|
||||
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches" width=\textwidth
|
||||
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
|
||||
The new integration branch is tested against possible regressions that might appear due to interference between separate changes.
|
||||
When the tests are OK, the integration branch is pushed as the new master to the official repository.
|
||||
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as integrated.
|
||||
The new master branch is tested against possible regressions that might appear due to interference between separate changes. When the tests are Ok, the new master is pushed to the official repository
|
||||
and the original branches are removed from it.
|
||||
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as-integrated.
|
||||
|
||||
The branches corresponding to the integrated fixes are removed from the repository by the **Bugmaster**.
|
||||
@subsection occt_contribution_workflow_2_8 Closing a bug
|
||||
|
||||
@subsection occt_contribution_workflow_close Closing an issue
|
||||
The **Bugmaster** closes the issue after regular OCCT Release provided that the issue status is **VERIFIED** and that issue was really solved in that release, by rechecking the corresponding test case. The final issue state is **CLOSED**.
|
||||
|
||||
When possible, the **Reporter** should check whether the problem is actually resolved in the environment where it has been discovered, after the fix is integrated to master.
|
||||
If the fix does not actually resolve the original problem, the issue in **VERIFIED** status can be reopened and assigned back to the **Developer** for rework.
|
||||
The details on how to check that the issue is still reproducible should be provided.
|
||||
However, if the issue does resolve the problem as described in the original report, but a similar problem is discovered for another input data or configuration, or the fix has caused a regression, that problem should be registered as a separate (@ref occt_contribution_nonstd_relate "related") issue.
|
||||
@subsection occt_contribution_workflow_2_9 Reopening a bug
|
||||
|
||||
If the fix integrated to master causes regressions, **Bugmaster** can revert it and reopen the issue.
|
||||
If a regression is detected, the **Bugmaster** may reopen and reassign the **CLOSED** issue to the appropriate developer with comprehensive comments about the reason of reopening. The issue then becomes **ASSIGNED** again.
|
||||
|
||||
The **Bugmaster** closes the issue after the regular OCCT Release, provided that the issue status is **VERIFIED** and the change was actually included in the release.
|
||||
The final issue state is **CLOSED**.
|
||||
@section occt_contribution_workflow_3 Appendix
|
||||
|
||||
The field **Fixed in Version** of the issue is set to the OCCT version where it is fixed.
|
||||
@subsection occt_contribution_workflow_3_1 Issue attributes
|
||||
|
||||
@section occt_contribution_nonstd Additional workflow elements
|
||||
|
||||
@subsection occt_contribution_nonstd_feedback Requesting more information or specific action
|
||||
|
||||
If, at any step of the issue lifetime, the person responsible for it cannot process it due to absence of required information, expertise, or rights, he can switch it to status **FEEDBACK** and assign to the person who is (presumably) able to resolve the block. Some examples of typical situations where **FEEDBACK** is used are:
|
||||
|
||||
* The **Maintainer** or the **Developer** requests for more information from the **Reporter** to reproduce the issue;
|
||||
* The **Tester** requests the **Developer** or the **Maintainer** to help him in the interpretation of testing results;
|
||||
* The **Developer** or the **Maintainer** asks the **Bugmaster** to close the issue that is found irrelevant or already fixed (see @ref occt_contribution_nonstd_autofix).
|
||||
|
||||
In general, issues with status **FEEDBACK** should be processed as fast as possible, to avoid unjustified delays.
|
||||
|
||||
@subsection occt_contribution_nonstd_relate Defining relationships between issues
|
||||
|
||||
When two or more issues are related to each other, this relationship should be reflected in the issue tracker.
|
||||
It is also highly recommended to add a note to explain the relationship.
|
||||
Typical cases of relationships are:
|
||||
|
||||
* Issue A is caused by previous fix made for issue B (A is a child of B);
|
||||
* Issue A describes the same problem as issue B (A is a duplicate of B);
|
||||
* Issues A and B relate to the same piece of code, functionality etc., in the sense that the fix for one of these issues will affect the other (A is related to B)
|
||||
|
||||
When the fix made for one issue also resolves another one, these issues should be marked as related or duplicate.
|
||||
In general, the duplicate issue should have the same status, and, when closed, be marked as fixed in the same OCCT version, as the main one.
|
||||
|
||||
@subsection occt_contribution_nonstd_patch Submission of a change as a patch
|
||||
|
||||
In some cases (if Git is not accessible for the contributor), external contributions can be submitted as a patch file (generated by *diff* command) or as modified sources attached to the Mantis issue.
|
||||
The OCCT version, for which the patch is generated, should be clearly specified (e.g. as hash code of Git commit if the patch is based on an intermediate state of the master).
|
||||
|
||||
@note Such contributions should be put to Git by someone else (e.g. the **Reviewer**), this may cause delay in their processing.
|
||||
|
||||
@subsection occt_contribution_nonstd_rebase Updating branches in Git
|
||||
|
||||
Updates of the existing branch (e.g. taking into account the remarks of the **Reviewer**, or fixing regressions) should be provided as new commits on top of previous state of the branch.
|
||||
|
||||
It is allowed to rebase the branch on the new state of the master and push it to the repository under the same name (with <i>--force</i> option) provided that the original sequence of commits is preserved.
|
||||
|
||||
When a change is squashed into a single commit (e.g. to be submitted for review), it should be pushed into a branch a with different name.
|
||||
|
||||
The recommended approach is to add a numeric suffix (index) indicating the version of the change, e.g. "CR12345_5".
|
||||
Usually it is worth keeping a non-squashed branch in Git for reference.
|
||||
|
||||
To avoid confusions, the branch corresponding to the latest version of the change should have a greater index.
|
||||
|
||||
@note Make sure to revise the commit message after squashing a branch, to keep it meaningful and comprehensive.
|
||||
|
||||
@subsection occt_contribution_nonstd_minor Minor corrections
|
||||
|
||||
In some cases review remarks or results of testing require only minor corrections to be done in the branch containing a change.
|
||||
"Minor" implies that the correction does not impact the functionality and does not affect the description of the previously committed change.
|
||||
|
||||
As an exception to general @ref occt_contribution_workflow_fix_git "single-commit rule", it is allowed to put such minor corrections on top of the existing branch as a separate commit, and re-submit it for further processing in the same branch, without squashing.
|
||||
|
||||
Minor commits should have a single-line message starting with //.
|
||||
These messages will be ignored when the branch is squashed at integration.
|
||||
|
||||
Typical cases of minor corrections are:
|
||||
|
||||
* Amendments of test cases (including those made by the **Tester** to adjust a test script to a specific platform);
|
||||
* Trivial corrections of compilation warnings (such as removal of an unused variable);
|
||||
* Addition or correction of comments or documentation;
|
||||
* Corrections of code formatting (e.g. reversion of irrelevant formatting changes made in the main commit).
|
||||
|
||||
@subsection occt_contribution_nonstd_autofix Handling non-reproducible issues
|
||||
|
||||
Investigation of each issue starts with reproducing it on current development version (master).
|
||||
|
||||
If it cannot be reproduced on the current master, but can be reproduced on one of previous releases (or previous state of the master), it is considered as solved by a change made for another issue.
|
||||
If that "fixing" issue can be identified (e.g. by parsing Git log), it should be set as related to that issue.
|
||||
The issue should be switched to **FEEDBACK** and assigned to the **Bugmaster** for further processing.
|
||||
|
||||
The **Bugmaster** decides whether it is necessary to create a test case for that issue, and if so may assign it to the **Developer** or the **Tester** to create a test.
|
||||
The issue then follows the standard workflow.
|
||||
|
||||
Otherwise, if the issue is fixed in one of previous releases, the **Bugmaster** closes it setting the appropriate value in **Fixed in Version** field, or, if the issue is fixed after the last release, switches it to **VERIFIED** status.
|
||||
|
||||
If the issue cannot be reproduced due to an unclear description, missing data, etc., it should be assigned back to the **Reporter** in **FEEDBACK** status, requesting for more information.
|
||||
The **Reporter** should provide additional information within one month; after that time, if no new information is provided, the issue should be closed by the **Bugmaster** with resolution **Unable to reproduce**.
|
||||
|
||||
@section occt_contribution_app Appendix: Issue attributes
|
||||
|
||||
@subsection occt_contribution_app_category Category
|
||||
|
||||
The category corresponds to the component of OCCT where the issue is found:
|
||||
|
||||
| Category | Component |
|
||||
| :--------------------------- | :----------------------------------------------------- |
|
||||
| OCCT:Foundation Classes | Foundation Classes module |
|
||||
| OCCT:Modeling Data | Modeling Data classes |
|
||||
| OCCT:Modeling Algorithms | Modeling Algorithms, except shape healing and meshing |
|
||||
| OCCT:Shape Healing | Shape Healing component (TKShapeHealing) |
|
||||
| OCCT:Mesh | BRepMesh algorithm |
|
||||
| OCCT:Data Exchange | Data Exchange module |
|
||||
| OCCT:Visualization | Visualization module |
|
||||
| OCCT:Application Framework | OCAF |
|
||||
| OCCT:DRAW | DRAW Test Harness |
|
||||
| OCCT:Tests | Automatic Test System |
|
||||
| OCCT:Documentation | Documentation |
|
||||
| OCCT:Coding | General code quality |
|
||||
| OCCT:Configuration | Configuration, build system, etc. |
|
||||
| OCCT:Releases | Official OCCT releases |
|
||||
| Website:Tracker | OCCT Mantis issue tracker, tracker.dev.opencascade.org |
|
||||
| Website:Portal | OCCT development portal, dev.opencascade.org |
|
||||
| Website:Git | OCCT Git repository, git.dev.opencascade.org |
|
||||
|
||||
|
||||
@subsection occt_contribution_app_severity Severity
|
||||
@subsubsection occt_contribution_workflow_3_1_1 Severity
|
||||
|
||||
Severity shows at which extent the issue affects the product.
|
||||
The list of used severities is given in the table below in the descending order.
|
||||
|
||||
| Severity | Description |
|
||||
| :---------- | :------------------------------------------------ |
|
||||
| crash | Crash of the application or OS, loss of data |
|
||||
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. |
|
||||
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. |
|
||||
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. |
|
||||
| tweak | Ergonomic inconvenience, need of light updates. |
|
||||
| text | Non-conformance of the program code to the Coding Rules, mistakes and non-functional errors in the source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). |
|
||||
| trivial | Cosmetic issues. |
|
||||
| feature | Request for a new feature or improvement. |
|
||||
| integration request | Requested integration of an existing feature into the product. |
|
||||
| just a question | A question to be processed, without need of any changes in the product. |
|
||||
| Severity | Description | Weight for Bug Score |
|
||||
| :---------- | :------------------------------------------------ | :------------------: |
|
||||
| crash | Crash of the application or OS, loss of data | 5 |
|
||||
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. | 4 |
|
||||
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. | 3 |
|
||||
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. | 2 |
|
||||
| tweak | Ergonomic inconvenience, need of light updates. | 1 |
|
||||
| text | Inconsistence of program code to the Coding Standard. Errors in source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). | 1 |
|
||||
| trivial | Cosmetic bugs. | 1 |
|
||||
| feature | Bug fix, new feature, improvement that requires workload estimation and validation. | 1 |
|
||||
| integration request | Requested integration of an existing feature into the product. | 0 |
|
||||
| Just a question | A question to be processed, without need of any changes in the product. | 0 |
|
||||
|
||||
@subsection occt_contribution_app_status Status
|
||||
@subsubsection occt_contribution_workflow_3_1_2 Statuses of issues
|
||||
|
||||
The bug statuses that can be applied to the issues are listed in the table below.
|
||||
|
||||
| Status | Description |
|
||||
| :------------------- | :----------------------------------------- |
|
||||
| New | A new, just registered issue. |
|
||||
| Acknowledged | Can be used to mark the issue as postponed. |
|
||||
| Confirmed | Can be used to mark the issue as postponed. |
|
||||
| Feedback | The issue requires more information or a specific action. |
|
||||
| New | New just registered issue. Testing case should be created by Reporter. |
|
||||
| Feedback | The issue requires more information; the original posters should pay attention. |
|
||||
| Assigned | Assigned to a developer. |
|
||||
| Resolved | The issue has been fixed, and now is waiting for review. |
|
||||
| Reviewed | The issue has been reviewed, and now is waiting for testing (or being tested). |
|
||||
| Resolved + a resolution | The issue has been fixed, and now is waiting for revision. |
|
||||
|Revised + a resolution | The issue has been revised, and now is waiting for testing. |
|
||||
| Tested | The fix has been internally tested by the tester with success on the full non-regression database or its part and a test case has been created for this issue. |
|
||||
| Verified | The fix has been integrated into the master of the corresponding repository |
|
||||
| Closed + resolution | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
|
||||
| Closed | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
|
||||
|
||||
@subsection occt_contribution_app_resolution Resolution
|
||||
@subsubsection occt_contribution_workflow_3_1_3 Resolutions
|
||||
|
||||
**Resolution** is set when the bug is closed. "Reopen" resolution is added automatically when the bug is reopened.
|
||||
**Resolution** is set when the bug is resolved. "Reopen" resolution is added automatically when the bug is reopened.
|
||||
|
||||
| Resolution | Description |
|
||||
|:--------------------- | :--------------------------------------------------------------------------- |
|
||||
| Open | The issue is pending. |
|
||||
| Open | The issue is being processed. |
|
||||
| Fixed | The issue has been successfully fixed. |
|
||||
| Reopened | The bug has been reopened because of insufficient fix or regression. |
|
||||
| Unable to reproduce | The bug is not reproduced. |
|
||||
| Not fixable | The bug cannot be fixed because e.g. it is a bug of third party software, OS or hardware limitation, etc. |
|
||||
| Unable to reproduce | The bug is not reproduced. |
|
||||
| Not fixable | The bug cannot be fixed because it is a bug of third party software, or because it requires more workload than it can be allowed. |
|
||||
| Duplicate | The bug for the same issue already exists in the tracker. |
|
||||
| Not a bug | It is a normal behavior in accordance with the specification of the product. |
|
||||
| No change required | The issue didn’t require any change of the product, such as a question issue.|
|
||||
| Suspended | The issue is postponed (for Acknowledged status). |
|
||||
| Documentation updated | The documentation has been updated to resolve a misunderstanding causing the issue. |
|
||||
| Won’t fix | It is decided to keep the existing behavior. |
|
||||
| Not a bug | It is a normal behavior in accordance with the specification of the product |
|
||||
| No change required | The issue didn’t require any change of the product, such as a question issue |
|
||||
| Suspended | This resolution is set for Acknowledged status only. It means that the issue is waiting for fix until a special administrative decision is taken (e.g. a budget is not yet set in accordance with the contract) |
|
||||
| Documentation updated | The issue was a normal behavior of the product, but the actions of the user were wrong. The specification and the user manual have been updated to reflect this issue. |
|
||||
| Won’t fix | An administrative/contractual decision has been taken to not fix the bug |
|
||||
|
||||
@subsection occt_contribution_workflow_3_2 Update and evolution of documentation
|
||||
|
||||
The documentation on Open CASCADE Technology currently exists in three forms:
|
||||
|
||||
* OCCT Technical Documentation generated automatically with Doxygen tool on the basis of comments in CDL or HXX files.
|
||||
* User’s Reference Documentation on OCCT packages and Products supplied in the form of PDF User’s guides
|
||||
* OCCT Release Documentation supplied in the form of Release Notes with each release.
|
||||
|
||||
It is strictly required to properly report the improvements and changes introduced in OCCT in all three forms of Documentation.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_1 Maintenance of CDL files
|
||||
|
||||
Every developer providing a contribution to the source code of OCC
|
||||
should make a relevant change in the corresponding header file, including CDL.
|
||||
|
||||
Making the appropriate comments is mandatory in the following cases:
|
||||
|
||||
* Development of a new package / class / method / enumeration;
|
||||
* Modification of an existing package / class / method / enumeration that changes its behavior;
|
||||
* Modification / new development impacts at other packages / classes / methods / enumerations, the documentation which of should be modified correspondingly.
|
||||
|
||||
The only case when the comments may be not required is introducing
|
||||
a modification that does not change the existing behavior in any noticeable way
|
||||
or brings the behavior in accordance with the existing description.
|
||||
|
||||
CDL description must be in good English, containing as much relevant
|
||||
information and as clear as possible. If the developer is unable to properly formulate
|
||||
his ideas in English or suspects that his description can be misunderstood,
|
||||
he should address to the Documentation Engineer for language assistance.
|
||||
Such action is completely subject to the discretion of the developer; however,
|
||||
the Documentation Engineer can require that the developer should provide a relevant
|
||||
technical documentation and reopen a bug until all documentation satisfies the requirements above.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_2 Maintenance of the User’s Reference Documentation
|
||||
|
||||
The User’s Reference Documentation is distributed among a number of User’s Guides,
|
||||
each describing a certain module of OCCT.
|
||||
The User's Guides do not cover the entire functionality of OCCT;
|
||||
however, they describe most widely used and important packages.
|
||||
|
||||
In most aspects the User's Guides present the information that is contained in CDL descriptions for methods, classes, etc., only from a different point of view. Thus, it is required that any developer who implements a new or modifies an existing package / class / method / enumeration and adds a description of new development or changes in the corresponding CDL file should also check if this class package / class / method / enumeration or the package / class, to which the added class / method belongs is already described in the documentation and update the User’s Reference Documentation correspondingly.
|
||||
|
||||
3.2.3. Preparation of the Release Documentation
|
||||
|
||||
Before changing the bug Status to RESOLVED, the developer should provide a description of the implemented work using the "Additional information and documentation updates" field of Mantis bugtracker.
|
||||
|
||||
This description is used for the Release Documentation and has the following purposes:
|
||||
|
||||
* to inform the OCCT users about the main features and improvements implemented in the platform in the release;
|
||||
* to give a complete and useable list of changes introduced into the OCCT since the latest version.
|
||||
|
||||
The changes should be described from the user’s viewpoint so that the text
|
||||
could be comprehensible even for beginners having a very vague idea about OCCT.
|
||||
If the developer is unable to properly formulate his ideas in English or suspects
|
||||
that his description can be misunderstood, he should address to the Documentation Engineer
|
||||
for language assistance. Such action is completely subject to the discretion of the developer;
|
||||
however, the Documentation Engineer can require that the developer
|
||||
should provide a relevant technical documentation and reopen a bug
|
||||
until all documentation satisfies the requirements.
|
||||
|
||||
**Note**, that it is required to single out the changes in the OCCT behavior as compared to the previous versions and especially the changes to be considered when porting from the previous version of OCCT.
|
||||
|
||||
For example:
|
||||
* If global macros XXX() was used in the code of your application, revise it for direct use of the argument stream object.
|
||||
* You might need to revise the code related to text display in 3d viewer to take into account new approach of using system fonts via XXX library.
|
||||
|
||||
The **Documentation Engineer** is responsible for preparation of the version Release Notes
|
||||
and update of the User’s Guides. If the **Documentation Engineer** considers that the description currently provided by the **Developer** is somehow inadequate or unsatisfactory he can demand the **Developer** to rewrite the documentation with the **Documentation Engineer’s** assistance.
|
||||
|
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 73 KiB |
@@ -59,8 +59,8 @@ const char* DBRep_Set (const char* theNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified shape as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* -- the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr)
|
||||
@@ -69,10 +69,10 @@ const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified geometric object as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* -- the DRAW interpreter variable name to set.
|
||||
- *theHandlePtr* -- a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *thePntPtr* -- a pointer to the variable of type *gp_Pnt* to be set.
|
||||
- *thePnt2dPtr* -- a pointer to the variable of type *gp_Pnt2d* to be set.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *thePntPtr* - a pointer to the variable of type *gp_Pnt* to be set.
|
||||
- *thePnt2dPtr* - a pointer to the variable of type *gp_Pnt2d* to be set.
|
||||
|
||||
All these functions are defined in *TKDraw* toolkit and return a string indicating the result of execution.
|
||||
|
||||
@@ -85,8 +85,8 @@ const char* BRepTools_Write (const char* theFileNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Saves the specified shape to a file with the given name.
|
||||
- *theFileNameStr* -- the name of the file where the shape is saved.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theFileNameStr* - the name of the file where the shape is saved.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* BRepTools_Dump (void* theShapePtr)
|
||||
@@ -94,7 +94,7 @@ const char* BRepTools_DumpLoc (void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Dumps shape or its location to cout.
|
||||
- *theShapePtr* -- a pointer to *TopoDS_Shape* variable.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
The following function is provided by *TKMesh* toolkit:
|
||||
|
||||
@@ -103,8 +103,8 @@ const char* BRepMesh_Dump (void* theMeshHandlePtr, const char* theFileNameStr)
|
||||
~~~~~
|
||||
|
||||
Stores mesh produced in parametric space to BREP file.
|
||||
- *theMeshHandlePtr* -- a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
|
||||
- *theFileNameStr* -- the name of the file where the mesh is stored.
|
||||
- *theMeshHandlePtr* - a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
|
||||
- *theFileNameStr* - the name of the file where the mesh is stored.
|
||||
|
||||
The following additional function is provided by *TKGeomBase* toolkit:
|
||||
|
||||
@@ -113,7 +113,7 @@ const char* GeomTools_Dump (void* theHandlePtr)
|
||||
~~~~~
|
||||
|
||||
Dump geometric object to cout.
|
||||
- *theHandlePtr* -- a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
|
||||
@section occt_debug_vstudio Using Visual Studio debugger
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="gp_XY">
|
||||
<Type Name="gp_XY">
|
||||
<DisplayString>[{(float)x} {(float)y}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Pnt2d">
|
||||
@@ -40,25 +40,18 @@
|
||||
</Type>
|
||||
<Type Name="Handle_Standard_Transient">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[cnt={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*((NCollection_Handle<$T1>::Ptr*)entity)->myPtr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="opencascade::handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count} {*entity}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>(opencascade::handle<$T1>::element_type*)entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TCollection_AsciiString">
|
||||
<DisplayString>{mylength}: {mystring,s}</DisplayString>
|
||||
</Type>
|
||||
@@ -108,17 +101,6 @@
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Sequence<*>">
|
||||
<DisplayString>NCollection_Sequence [{mySize}]</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<Size>mySize</Size>
|
||||
<HeadPointer>myFirstItem</HeadPointer>
|
||||
<NextPointer>myNext</NextPointer>
|
||||
<ValueNode>*($T1*)(sizeof(NCollection_SeqNode) + ((char *)this))</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Bnd_B2f">
|
||||
<AlternativeType Name="Bnd_B2d"></AlternativeType>
|
||||
<DisplayString Condition="myCenter[0] > 1000000000000000000.">VOID</DisplayString>
|
||||
@@ -161,97 +143,4 @@
|
||||
<Type Name="OpenGl_Context">
|
||||
<DisplayString>[{myGlVerMajor}.{myGlVerMinor}]</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!--ArrayItems Expansion-->
|
||||
<Type Name="TColStd_Array1OfInteger">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Integer*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_Array1OfReal">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Real*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!--Multi-dimensional Arrays-->
|
||||
<Type Name="TColStd_Array2OfInteger">
|
||||
<DisplayString Condition="(myUpperColumn == myLowerColumn) && (myUpperRow == myLowerRow)">empty</DisplayString>
|
||||
<DisplayString>extent = {(myUpperColumn-myLowerColumn+1) * (myUpperRow-myLowerRow+1)}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!--LinkedListItems Expansion-->
|
||||
<Type Name="TColStd_ListNodeOfListOfInteger">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfInteger*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfInteger">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfInteger*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListNodeOfListOfReal">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfReal*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfReal">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfReal*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="BRep_ListOfCurveRepresentation">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(BRep_ListNodeOfListOfCurveRepresentation*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_Shape">
|
||||
<DisplayString>{myOrient} {myTShape} loc={myLocation}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_TShape">
|
||||
<DisplayString>subshapes={myShapes} flags={myFlags}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_Pave">
|
||||
<DisplayString>{{{myIndex} {myParameter}}}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_PaveBlock">
|
||||
<DisplayString>edge={myEdge} orig={myOriginalEdge} pave1={myPave1} pave2={myPave2} extpaves={myExtPaves}</DisplayString>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
|
@@ -117,16 +117,16 @@ If you want to use the same image for several documents, you can place it in *do
|
||||
|
||||
|
||||
The documentation is generated in subfolder *doc* :
|
||||
* *html* -- a directory for generated HTML pages;
|
||||
* *pdf* -- a directory for generated PDF files.
|
||||
* *html* - a directory for generated HTML pages;
|
||||
* *pdf* - a directory for generated PDF files.
|
||||
|
||||
@section OCCT_DM_SECTION_4 Adding a New Document
|
||||
|
||||
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into <i>/dox/dev_guides/</i>.
|
||||
|
||||
If there are images in the document, it should be placed in its own folder containing a subfolder for images. For instance:
|
||||
* <i> /dox/dev_guides/svn/ </i> -- for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> -- for images.
|
||||
* <i> /dox/dev_guides/svn/ </i> - for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> - for images.
|
||||
|
||||
Add a relative path to *svn.md* in file <i>dox/FILES.txt</i>. For instance
|
||||
|
||||
@@ -136,12 +136,11 @@ dev_guides/svn/svn.md
|
||||
|
||||
**Note** that the order of paths to documents in *FILES.txt* is reproduced in the Table of Contents in the HTML output. Please, place them logically.
|
||||
|
||||
**Note** that you should specify a file tag, not the document name. See @ref OCCT_DM_SECTION_A_1 "Header and hierarchic document structure" section for details.
|
||||
**Note** that you should specify a file tag, not the document name. See <a href="#OCCT_DM_SECTION_A_1">Header section</a> for details.
|
||||
|
||||
@section OCCT_DOC_SECTION_5 Additional Resources
|
||||
|
||||
More information about OCCT can be found at http://www.opencascade.com and http://dev.opencascade.org sites.
|
||||
|
||||
More information about OCCT can be found at http://www.opencascade.org
|
||||
|
||||
The information on formula syntax can be found at:
|
||||
http://en.wikipedia.org/wiki/Help:Displaying_a_formula
|
||||
@@ -168,9 +167,9 @@ The table of contents, page numbers (in PDF), and figure numbers (in PDF) are ge
|
||||
@subsection OCCT_DM_SECTION_A_1 Headers and hierarchic document structure
|
||||
|
||||
Headers of different levels can be specified with the following tags:
|
||||
* <i>\@section</i> -- for the first-level headers;
|
||||
* <i>\@subsection</i> -- for the second level headers;
|
||||
* <i>\@subsubsection</i> -- for the third level headers.
|
||||
* <i>\@section</i> - for the first-level headers;
|
||||
* <i>\@subsection</i> - for the second level headers;
|
||||
* <i>\@subsubsection</i> - for the third level headers.
|
||||
|
||||
For example:
|
||||
|
||||
|
@@ -66,7 +66,7 @@ The official repository contains:
|
||||
Integration of contributions that have passed certification testing is made exclusively by the Bugmaster.
|
||||
Normally this is made by rebasing the contribution branch on the current master
|
||||
and squashing it into a single commit. This is made to have the master branch history plain and clean,
|
||||
following the general rule “one issue -- one commit”.
|
||||
following the general rule “one issue – one commit”.
|
||||
The description of the commit integrated to the master branch is taken from the Mantis issue
|
||||
(ID, 'Summary', followed by the information from 'Documentation' field if present).
|
||||
|
||||
@@ -97,14 +97,25 @@ The official repository contains:
|
||||
|
||||
@subsubsection occt_gitguide_2_1_1 Installation of Git for Windows
|
||||
|
||||
Download Git for Windows distributive from https://git-for-windows.github.io/
|
||||
Download Git for Windows distributive from http://code.google.com/p/msysgit/downloads/list.
|
||||
During the installation:
|
||||
|
||||
* Check-in "Windows Explorer integration" options:
|
||||
* "Git Bash Here";
|
||||
* "Git GUI Here".
|
||||
* To avoid a mess in your PATH, we recommend selecting "Run Git from Windows Prompt" in the environment settings dialog:
|
||||
* Select Windows Explorer integration options:
|
||||
* Git Bash Here
|
||||
* Git GUI Here
|
||||
|
||||
@image html OCCT_GitGuide_V2_image001.png
|
||||
@image latex OCCT_GitGuide_V2_image001.png
|
||||
|
||||
* To avoid a mess in your PATH, we recommend selecting ‘Run Git from Windows Prompt’ in the environment settings dialog:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image002.png
|
||||
@image latex OCCT_GitGuide_V2_image002.png
|
||||
|
||||
* In "Configuring the line ending conversions" dialog, select "Checkout Windows-style, commit Unix style endings".
|
||||
|
||||
@image html OCCT_GitGuide_V2_image003.png
|
||||
@image latex OCCT_GitGuide_V2_image003.png
|
||||
|
||||
Note that by default Git user interface is localized to the system default language.
|
||||
If you prefer to work with the English interface, remove or rename .msg localization file
|
||||
@@ -117,12 +128,15 @@ The official repository contains:
|
||||
Download TortoiseGit distributive from http://code.google.com/p/tortoisegit/downloads/list.
|
||||
Launch the installation.
|
||||
|
||||
* Select your SSH client. Choose option
|
||||
* "OpenSSH, Git default SSH Client" if you prefer to use command-line tools for SSH keys generation, or
|
||||
* "TortoisePLink, coming from Putty, integrates with Windows better" if you prefer to use GUI tool (PuttyGen, see 3.2).
|
||||
* Complete the installation.
|
||||
* Select your SSH client. Choose OpenSSH if you prefer to use command-line tools
|
||||
for SSH keys generation, or TortoisePLink if you prefer to use GUI tool (PuttyGen, see 3.2):
|
||||
|
||||
@image html OCCT_GitGuide_V2_image004.png
|
||||
@image latex OCCT_GitGuide_V2_image004.png
|
||||
|
||||
* Complete the installation.
|
||||
|
||||
TortoiseGit integrates into Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
TortoiseGit integrates to Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image005.png
|
||||
@image latex OCCT_GitGuide_V2_image005.png
|
||||
@@ -222,8 +236,8 @@ The official repository contains:
|
||||
|
||||
On Windows, make sure to note the complete path to the generated files (the location of your $HOME might be not obvious). Two key files will be created in the specified location (by default in $HOME/.ssh/):
|
||||
|
||||
* *id_rsa* -- private key
|
||||
* *id_rsa.pub* -- public key
|
||||
* *id_rsa* - private key
|
||||
* *id_rsa.pub* - public key
|
||||
|
||||
The content of the public key file (one text line) is the key to be added to the user account on the site (see below).
|
||||
|
||||
@@ -236,10 +250,11 @@ The official repository contains:
|
||||
@subsection occt_gitguide_3_3 Adding public key in your account
|
||||
|
||||
Log in on the portal http://dev.opencascade.org and click on **My account** link to the right. If you have a Contributor status, you will see **SSH keys** tab to the right.
|
||||
|
||||
Click on that tab, then click **Add a public key**, and paste the text of the public key (see above sections on how to generate the key) into the text box.
|
||||
|
||||
Click **Save** to input the key to the system.
|
||||
Click **Save** to input the key to the system.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image008.png
|
||||
@image latex OCCT_GitGuide_V2_image008.png
|
||||
|
||||
Note that a user can have several SSH keys.
|
||||
You can distinguish between these keys by the Title field ID; by default it is taken from SSH key comment.
|
||||
@@ -320,6 +335,10 @@ In the console:
|
||||
In TortoiseGit:
|
||||
* Go to the local copy of the repository.
|
||||
* Right-click in the Explorer window, then choose **Git Create Branch**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image011.png
|
||||
@image latex OCCT_GitGuide_V2_image011.png
|
||||
|
||||
* Select **Base On** Branch *remotes/origin/master*.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image012.png
|
||||
@@ -358,7 +377,7 @@ In TortoiseGit:
|
||||
> git commit -a -m "Write meaningful commit message here"
|
||||
~~~~~
|
||||
|
||||
Option -a tells the command to automatically include (stage) files
|
||||
Option –a tells the command to automatically include (stage) files
|
||||
that have been modified or deleted, but it will omit the new files that might have been added by you.
|
||||
To commit such new files, you must add (stage) them before commit command.
|
||||
|
||||
@@ -437,7 +456,7 @@ Note that Git forbids pushing a branch if the corresponding remote branch alread
|
||||
@image html OCCT_GitGuide_V2_image019.png
|
||||
@image latex OCCT_GitGuide_V2_image019.png
|
||||
|
||||
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration -- that repository should not be used for long-term storage of incomplete changes.
|
||||
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration - that repository should not be used for long-term storage of incomplete changes.
|
||||
|
||||
Remove the local branches that you do not need any more. Note that you cannot delete the current branch. It means that you need to switch to another one (e.g. master) if the branch you are going to delete is the current one.
|
||||
|
||||
@@ -520,7 +539,7 @@ To rebase your branch into a single commit, you need to do the following:
|
||||
|
||||
Use of TortoiseGit is recommended for convenient code review:
|
||||
|
||||
* Fetch the changes from the remote repository as described in @ref occt_gitguide_4_7 "Synchronizing with remote repository" section.
|
||||
* Fetch the changes from the remote repository as described in <a href="#occt_gitguide_4_7">Synchronizing with remote repository</a> section.
|
||||
* Right-click on the repository, choose **TortoiseGit** -> **Show** log;
|
||||
* Locate the remote branch you need to review;
|
||||
* To review commits one-by-one, select each commit in the log. The list of changed files is shown at the bottom of the window; double-click on the file will open visual compare tool.
|
||||
|
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image001.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image002.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image003.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image004.png
Normal file
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image008.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.8 KiB |
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_image011.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -3,15 +3,15 @@
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section testmanual_intro Introduction
|
||||
@section testmanual_1 Introduction
|
||||
|
||||
This document provides OCCT developers and contributors with an overview and practical guidelines for work with OCCT automatic testing system.
|
||||
|
||||
Reading the Introduction should be sufficient for developers to use the test system to control non-regression of the modifications they implement in OCCT. Other sections provide a more in-depth description of the test system, required for modifying the tests and adding new test cases.
|
||||
Reading the Introduction is sufficient for OCCT developers to use the test system to control non-regression of the modifications they implement in OCCT. Other sections provide a more in-depth description of the test system, required for modifying the tests and adding new test cases.
|
||||
|
||||
@subsection testmanual_intro_basic Basic Information
|
||||
@subsection testmanual_1_1 Basic Information
|
||||
|
||||
OCCT automatic testing system is organized around @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
OCCT automatic testing system is organized around DRAW Test Harness @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
|
||||
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests* of the OCCT root folder. Other test folders can be included in the test system, e.g. for testing applications based on OCCT.
|
||||
|
||||
@@ -21,18 +21,17 @@ The tests are organized in three levels:
|
||||
* Grid: a set of test cases within a group, usually aimed at testing some particular aspect or mode of execution of the relevant functionality (e.g. buildevol);
|
||||
* Test case: a script implementing an individual test (e.g. K4).
|
||||
|
||||
See @ref testmanual_5_1 "Test Groups" chapter for the current list of available test groups and grids.
|
||||
See <a href="#testmanual_5_1">Test Groups</a> for the current list of available test groups and grids.
|
||||
|
||||
Some tests involve data files (typically CAD models) which are located separately and are not included with OCCT code. The archive with publicly available test data files should be downloaded and installed independently on OCCT sources (see http://dev.opencascade.org).
|
||||
|
||||
@subsection testmanual_1_2 Intended Use of Automatic Tests
|
||||
|
||||
Each modification made in OCCT code must be checked for non-regression
|
||||
by running the whole set of tests. The developer who makes the modification
|
||||
by running the whole set of tests. The developer who does the modification
|
||||
is responsible for running and ensuring non-regression for the tests available to him.
|
||||
|
||||
Note that many tests are based on data files that are confidential and thus available only at OPEN CASCADE.
|
||||
The official certification testing of each change before its integration to master branch of official OCCT Git repository (and finally to the official release) is performed by OPEN CASCADE to ensure non-regression on all existing test cases and supported platforms.
|
||||
Note that many tests are based on data files that are confidential and thus available only at OPEN CASCADE. Thus official certification testing of the changes before integration to master branch of official OCCT Git repository (and finally to the official release) is performed by OPEN CASCADE in any case.
|
||||
|
||||
Each new non-trivial modification (improvement, bug fix, new feature) in OCCT should be accompanied by a relevant test case suitable for verifying that modification. This test case is to be added by the developer who provides the modification.
|
||||
|
||||
@@ -50,10 +49,11 @@ For this it is recommended to add a file *DrawAppliInit* in the directory which
|
||||
|
||||
Example (Windows)
|
||||
|
||||
~~~~~{.tcl}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
set env(CSF_TestDataPath) $env(CSF_TestDataPath)\;d:/occt/test-data
|
||||
~~~~~
|
||||
return ;# this is to avoid an echo of the last command above in cout
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Note that variable *CSF_TestDataPath* is set to default value at DRAW start, pointing at the folder <i>$CASROOT/data</i>.
|
||||
In this example, subdirectory <i>d:/occt/test-data</i> is added to this path. Similar code could be used on Linux and Mac OS X except that on non-Windows platforms colon ":" should be used as path separator instead of semicolon ";".
|
||||
|
||||
@@ -98,10 +98,10 @@ Example:
|
||||
Detailed logs are saved in D:/occt/results_2012-06-04T0919
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The tests are considered as non-regressive if only OK, BAD (i.e. known problem), and SKIPPED (i.e. not executed, typically because of lack of a data file) statuses are reported. See @ref testmanual_details_results "Interpretation of test results" for details.
|
||||
The tests are considered as non-regressive if only OK, BAD (i.e. known problem), and SKIPPED (i.e. not executed, typically because of lack of a data file) statuses are reported. See <a href="#testmanual_3_5">Interpretation of test results</a> for details.
|
||||
|
||||
The results and detailed logs of the tests are saved by default to a new subdirectory of the subdirectory *results* in the current folder, whose name is generated automatically using the current date and time, prefixed by Git branch name (if Git is available and current sources are managed by Git).
|
||||
If necessary, a non-default output directory can be specified using option <i> -outdir</i> followed by a path to the directory. This directory should be new or empty; use option <i>-overwrite</i> to allow writing results in the existing non-empty directory.
|
||||
If necessary, a non-default output directory can be specified using option <i> –outdir</i> followed by a path to the directory. This directory should be new or empty; use option <i>–overwrite</i> to allow writing results in the existing non-empty directory.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -109,14 +109,6 @@ Draw[]> testgrid -outdir d:/occt/last_results -overwrite
|
||||
~~~~~
|
||||
In the output directory, a cumulative HTML report <i>summary.html</i> provides links to reports on each test case. An additional report in JUnit-style XML format can be output for use in Jenkins or other continuous integration system.
|
||||
|
||||
To re-run test cases which were detected as regressions on previous run, option <i>-regress dirname</i> should be used.
|
||||
<i>dirname</i> is path to directory containing results of previous run. Only test cases with *FAILED* and *IMPROVEMENT* statuses will be tested.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
Draw[]> testgrid -regress d:/occt/last_results
|
||||
~~~~~
|
||||
|
||||
Type <i>help testgrid</i> in DRAW prompt to get help on options supported by *testgrid* command:
|
||||
|
||||
~~~~~
|
||||
@@ -130,8 +122,6 @@ testgrid: Run all tests, or specified group, or one grid
|
||||
-overwrite: force writing logs in existing non-empty directory
|
||||
-xml filename: write XML report for Jenkins (in JUnit-like format)
|
||||
-beep: play sound signal at the end of the tests
|
||||
-regress dirname: re-run only a set of tests that have been detected as regressions on some previous run.
|
||||
Here "dirname" is path to directory containing results of previous run.
|
||||
Groups, grids, and test cases to be executed can be specified by list of file
|
||||
masks, separated by spaces or comma; default is all (*).
|
||||
~~~~~
|
||||
@@ -175,23 +165,21 @@ test: Run specified test case
|
||||
This key will be ignored if the "-echo" key is already set.
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_intro_quick_create Creating a New Test
|
||||
@subsubsection testmanual_1_3_4 Creating a New Test
|
||||
|
||||
The detailed rules of creation of new tests are given in @ref testmanual_3 "Creation and modification of tests" chapter. The following short description covers the most typical situations:
|
||||
The detailed rules of creation of new tests are given in <a href="#testmanual_3">section 3</a>. The following short description covers the most typical situations:
|
||||
|
||||
Use prefix <i>bug</i> followed by Mantis issue ID and, if necessary, additional suffixes, for naming the test script, data files, and DRAW commands specific for this test case.
|
||||
Use prefix <i>bug</i> followed by Mantis issue ID and, if necessary, additional suffixes, for naming the test script and DRAW commands specific for this test case.
|
||||
|
||||
1. If the test requires C++ code, add it as new DRAW command(s) in one of files in *QABugs* package.
|
||||
2. Add script(s) for the test case in the subfolder corresponding to the relevant OCCT module of the group *bugs* <i>($CASROOT/tests/bugs)</i>. See @ref testmanual_5_2 "the correspondence map".
|
||||
1. If the test requires C++ code, add it as new DRAW command(s) in one of files in *QABugs* package. Note that this package defines macros *QVERIFY* and *QCOMPARE*, thus code created for QTest or GoogleTest frameworks can be used with minimal modifications.
|
||||
2. Add script(s) for the test case in the subfolder corresponding to the relevant OCCT module of the group bugs <i>($CASROOT/tests/bugs)</i>. See <a href="#testmanual_5_2">the correspondence map</a>.
|
||||
3. In the test script:
|
||||
* Load all necessary DRAW modules by command *pload*.
|
||||
* Use command *locate_data_file* to get a path to data files used by test script. (Make sure to have this command not inside catch statement if it is used.)
|
||||
* Use DRAW commands to reproduce the situation being tested.
|
||||
* Make sure that in case of failure the test produces message containing word "Error" or other recognized by test system as error (add new error patterns in file parse.rules if necessary).
|
||||
* If test case reports error due to existing problem and the fix is not available, add @ref testmanual_3_6 "TODO" statement for each error to mark it as known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
|
||||
* To check expected output which should be obtained as a result of a test, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
|
||||
* If test case produces error messages (contained in parse.rules) which are expected in that test and should not be considered as its failure (e.g. test for checkshape command), add REQUIRED statement for each error to mark it as required output.
|
||||
4. If the test uses data file(s) not yet present in the test database, these can be put to (sub)directory pointed out by *CSF_TestDataPath* variable for running test. The files should be attached to Mantis issue corresponding to the modification being tested.
|
||||
* If test case is added to describe existing problem and the fix is not available, add TODO message for each error to mark it as known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
|
||||
* Make sure that in case of failure the test produces message containing word "Error" or other recognized by test system as error (see files parse.rules).
|
||||
4. If the test case uses data file(s) not yet present in the test database, these can be put to subfolder data of the test grid, and integrated to Git along with the test case.
|
||||
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate to Git branch created for the issue.
|
||||
|
||||
Example:
|
||||
@@ -199,19 +187,19 @@ Example:
|
||||
* Added files:
|
||||
|
||||
~~~~~
|
||||
git status -short
|
||||
A tests/bugs/heal/data/bug210_a.brep
|
||||
A tests/bugs/heal/data/bug210_b.brep
|
||||
git status –short
|
||||
A tests/bugs/heal/data/OCC210a.brep
|
||||
A tests/bugs/heal/data/OCC210a.brep
|
||||
A tests/bugs/heal/bug210_1
|
||||
A tests/bugs/heal/bug210_2
|
||||
~~~~~
|
||||
|
||||
* Test script
|
||||
|
||||
~~~~~{.tcl}
|
||||
~~~~~
|
||||
puts "OCC210 (case 1): Improve FixShape for touching wires"
|
||||
|
||||
restore [locate_data_file bug210_a.brep] a
|
||||
restore [locate_data_file OCC210a.brep] a
|
||||
|
||||
fixshape result a 0.01 0.01
|
||||
checkshape result
|
||||
@@ -224,10 +212,10 @@ checkshape result
|
||||
Standard OCCT tests are located in subdirectory tests of the OCCT root folder ($CASROOT).
|
||||
|
||||
Additional test folders can be added to the test system by defining environment variable *CSF_TestScriptsPath*. This should be list of paths separated by semicolons (*;*) on Windows
|
||||
or colons (*:*) on Linux or Mac. Upon DRAW launch, path to *tests* subfolder of OCCT is added at the end of this variable automatically.
|
||||
or colons (*:*) on Linux or Mac. Upon DRAW launch, path to tests subfolder of OCCT is added at the end of this variable automatically.
|
||||
|
||||
Each test folder is expected to contain:
|
||||
* Optional file *parse.rules* defining patterns for interpretation of test results, common for all groups in this folder
|
||||
* Optional file parse.rules defining patterns for interpretation of test results, common for all groups in this folder
|
||||
* One or several test group directories.
|
||||
|
||||
Each group directory contains:
|
||||
@@ -298,7 +286,7 @@ This file is a TCL script. It is executed after every test in the current group.
|
||||
|
||||
Note: *TEST COMPLETED* string should be present in the output to indicate that the test is finished without crash.
|
||||
|
||||
See @ref testmanual_3 "Creation and modification of tests" chapter for more information.
|
||||
See <a href="#testmanual_3">section 3</a> for more information.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -316,22 +304,22 @@ The test group may contain *parse.rules* file. This file defines patterns used f
|
||||
|
||||
Each line in the file should specify a status (single word), followed by a regular expression delimited by slashes (*/*) that will be matched against lines in the test output log to check if it corresponds to this status.
|
||||
|
||||
The regular expressions should follow <a href="http://www.tcl.tk/man/tcl/TclCmd/re_syntax.htm">Tcl syntax</a>, with special exception that "\b" is considered as word limit (Perl-style), in addition to "\y" used in Tcl.
|
||||
The regular expressions support a subset of the Perl *re* syntax. See also <a href="http://perldoc.perl.org/perlre.html">Perl regular expressions</a>.
|
||||
|
||||
The rest of the line can contain a comment message, which will be added to the test report when this status is detected.
|
||||
|
||||
Example:
|
||||
|
||||
~~~~~
|
||||
FAILED /\b[Ee]xception\b/ exception
|
||||
FAILED /\bError\b/ error
|
||||
FAILED /\\b[Ee]xception\\b/ exception
|
||||
FAILED /\\bError\\b/ error
|
||||
SKIPPED /Cannot open file for reading/ data file is missing
|
||||
SKIPPED /Could not read file .*, abandon/ data file is missing
|
||||
~~~~~
|
||||
|
||||
Lines starting with a *#* character and blank lines are ignored to allow comments and spacing.
|
||||
|
||||
See @ref testmanual_details_results "Interpretation of test results" chapter for details.
|
||||
See <a href="#testmanual_3_5">Interpretation of test results</a> chapter for details.
|
||||
|
||||
If a line matches several rules, the first one applies. Rules defined in the grid are checked first, then rules in the group, then rules in the test root directory. This allows defining some rules on the grid level with status *IGNORE* to ignore messages that would otherwise be treated as errors due to the group level rules.
|
||||
|
||||
@@ -344,7 +332,7 @@ Example:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsubsection testmanual_2_2_6 Directory "data"
|
||||
The test group may contain subdirectory *data*, where test scripts shared by different test grids can be put. See also @ref testmanual_2_3_5 "Directory data".
|
||||
The test group may contain subdirectory *data*, where test scripts shared by different test grids can be put. See also <a href="#testmanual_2_3_5">Directory *data*</a>.
|
||||
|
||||
@subsection testmanual_2_3 Test Grids
|
||||
|
||||
@@ -450,7 +438,7 @@ This section describes how to add new tests and update existing ones.
|
||||
|
||||
The new tests are usually added in the frame of processing issues in OCCT Mantis tracker.
|
||||
Such tests in general should be added to group bugs, in the grid
|
||||
corresponding to the affected OCCT functionality. See @ref testmanual_5_2 "Mapping of OCCT functionality to grid names in group bugs".
|
||||
corresponding to the affected OCCT functionality. See <a href="#testmanual_5_2">Mapping of OCCT functionality to grid names in group *bugs*</a>.
|
||||
|
||||
New grids can be added as necessary to contain tests for the functionality not yet covered by existing test grids.
|
||||
The test case name in the bugs group should be prefixed by the ID of the corresponding issue in Mantis (without leading zeroes) with prefix *bug*. It is recommended to add a suffix providing a hint on the tested situation. If more than one test is added for a bug, they should be distinguished by suffixes; either meaningful or just ordinal numbers.
|
||||
@@ -570,17 +558,16 @@ Other Tcl variables defined during the test execution are:
|
||||
|
||||
In order to ensure that the test works as expected in different environments, observe the following additional rules:
|
||||
* Avoid using external commands such as *grep, rm,* etc., as these commands can be absent on another system (e.g. on Windows); use facilities provided by Tcl instead.
|
||||
* Do not put call to *locate_data_file* in catch statement -- this can prevent correct interpretation of the missing data file by the test system.
|
||||
* Do not use commands *decho* and *dlog* in the test script, to avoid interference with use of these commands by the test system.
|
||||
* Do not put call to *locate_data_file* in catch statement – this can prevent correct interpretation of the missing data file by the test system.
|
||||
|
||||
@subsection testmanual_details_results Interpretation of test results
|
||||
@subsection testmanual_3_5 Interpretation of test results
|
||||
|
||||
The result of the test is evaluated by checking its output against patterns defined in the files *parse.rules* of the grid and group.
|
||||
|
||||
The OCCT test system recognizes five statuses of the test execution:
|
||||
* SKIPPED: reported if a line matching SKIPPED pattern is found (prior to any FAILED pattern). This indicates that the test cannot be run in the current environment; the most typical case is the absence of the required data file.
|
||||
* FAILED: reported if a line matching pattern with status FAILED is found (unless it is masked by the preceding IGNORE pattern or a TODO or REQUIRED statement), or if message TEST COMPLETED or at least one of REQUIRED patterns is not found. This indicates that the test has produced a bad or unexpected result, and usually means a regression.
|
||||
* BAD: reported if the test script output contains one or several TODO statements and the corresponding number of matching lines in the log. This indicates a known problem. The lines matching TODO statements are not checked against other patterns and thus will not cause a FAILED status.
|
||||
* FAILED: reported if a line matching pattern with status FAILED is found (unless it is masked by the preceding IGNORE pattern or a TODO statement), or if message TEST COMPLETED is not found at the end. This indicates that the test has produced a bad or unexpected result, and usually means a regression.
|
||||
* BAD: reported if the test script output contains one or several TODO statements and the corresponding number of matching lines in the log. This indicates a known problem . The lines matching TODO statements are not checked against other patterns and thus will not cause a FAILED status.
|
||||
* IMPROVEMENT: reported if the test script output contains a TODO statement for which no corresponding line is found. This is a possible indication of improvement (a known problem has disappeared).
|
||||
* OK: reported if none of the above statuses have been assigned. This means that the test has passed without problems.
|
||||
|
||||
@@ -600,7 +587,7 @@ puts "TODO BugNumber ListOfPlatforms: RegularExpression"
|
||||
|
||||
Here:
|
||||
* *BugNumber* is the bug ID in the tracker. For example: #12345.
|
||||
* *ListOfPlatforms* is a list of platforms, at which the bug is reproduced (Linux, Windows, MacOS, or All). Note that the platform name is custom for the OCCT test system; it corresponds to the value of environment variable *os_type* defined in DRAW.
|
||||
* *ListOfPlatforms* is a list of platforms, at which the bug is reproduced (e.g. Mandriva2008, Windows or All). Note that the platform name is custom for the OCCT test system; it corresponds to the value of environment variable *os_type* defined in DRAW.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -629,27 +616,7 @@ puts "TODO OCC22817 All: \\*\\* Exception \\*\\*"
|
||||
puts "TODO OCC22817 All: TEST INCOMPLETE"
|
||||
~~~~~
|
||||
|
||||
@subsection testmanual_3_7 Marking required output
|
||||
|
||||
To check expected output which must be obtained as a result of a test for it to be considered correct, add REQUIRED statement for each specific message.
|
||||
For that, the following statement should be added to such a test script:
|
||||
|
||||
~~~~~
|
||||
puts "REQUIRED ListOfPlatforms: RegularExpression"
|
||||
~~~~~
|
||||
|
||||
Here *ListOfPlatforms* and *RegularExpression* have the same meaning as in TODO statements described above.
|
||||
|
||||
The REQUIRED statement can also be used to mask message that would normally be interpreted as error (according to rules defined in *parse.rules*) but should not be considered as such within current test.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
puts "REQUIRED Linux: Faulty shapes in variables faulty_1 to faulty_5"
|
||||
~~~~~
|
||||
|
||||
This statement notifies test system that errors reported by *checkshape* command are expected in that test case, and test should be considered as OK if this message appears, despite of presence of general rule stating that 'Faulty' signals failure.
|
||||
|
||||
If output does not contain required statement, test case will be marked as FAILED.
|
||||
|
||||
@section testmanual_4 Advanced Use
|
||||
|
||||
@@ -705,15 +672,15 @@ testdiff dir1 dir2 [groupname [gridname]] [options...]
|
||||
Here *dir1* and *dir2* are directories containing logs of two test runs.
|
||||
|
||||
Possible options are:
|
||||
* <i>-save \<filename\> </i> -- saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
|
||||
* <i>-status {same|ok|all}</i> -- allows filtering compared cases by their status:
|
||||
* *same* -- only cases with same status are compared (default);
|
||||
* *ok* -- only cases with OK status in both logs are compared;
|
||||
* *all* -- results are compared regardless of status;
|
||||
* <i>-verbose \<level\> </i> -- defines the scope of output data:
|
||||
* 1 -- outputs only differences;
|
||||
* 2 -- additionally outputs the list of logs and directories present in one of directories only;
|
||||
* 3 -- (by default) additionally outputs progress messages;
|
||||
* <i>-save \<filename\> </i> - saves the resulting log in a specified file (<i>$dir1/diff-$dir2.log</i> by default). HTML log is saved with the same name and extension .html;
|
||||
* <i>-status {same|ok|all}</i> - allows filtering compared cases by their status:
|
||||
* *same* - only cases with same status are compared (default);
|
||||
* *ok* - only cases with OK status in both logs are compared;
|
||||
* *all* - results are compared regardless of status;
|
||||
* <i>-verbose \<level\> </i> - defines the scope of output data:
|
||||
* 1 - outputs only differences;
|
||||
* 2 - additionally outputs the list of logs and directories present in one of directories only;
|
||||
* 3 - (by default) additionally outputs progress messages;
|
||||
|
||||
Example:
|
||||
|
||||
@@ -760,9 +727,9 @@ This group allows testing Boolean operations.
|
||||
DRAW module: MODELING (packages *BOPTest* and *BRepTest*).
|
||||
|
||||
Grids names are based on name of the command used, with suffixes:
|
||||
* <i>_2d</i> -- for tests operating with 2d objects (wires, wires, 3d objects, etc.);
|
||||
* <i>_simple</i> -- for tests operating on simple shapes (boxes, cylinders, toruses, etc.);
|
||||
* <i>_complex</i> -- for tests dealing with complex shapes.
|
||||
* <i>_2d</i> – for tests operating with 2d objects (wires, wires, 3d objects, etc.);
|
||||
* <i>_simple</i> – for tests operating on simple shapes (boxes, cylinders, toruses, etc.);
|
||||
* <i>_complex</i> – for tests dealing with complex shapes.
|
||||
|
||||
| Grid | Commands | Functionality |
|
||||
| :---- | :----- | :------- |
|
||||
@@ -796,7 +763,7 @@ Grids names are based on name of the command used, with suffixes:
|
||||
This group allows testing cases coming from Mantis issues.
|
||||
|
||||
The grids are organized following OCCT module and category set for the issue in the Mantis tracker.
|
||||
See @ref testmanual_5_2 "Mapping of OCCT functionality to grid names in group bugs" chapter for details.
|
||||
See <a href="#testmanual_5_2">Mapping of OCCT functionality to grid names in group *bugs*</a> for details.
|
||||
|
||||
@subsubsection testmanual_5_1_5 caf
|
||||
|
||||
@@ -1020,7 +987,7 @@ This group allows testing extended data exchange packages.
|
||||
| Foundation Classes | TKernel, TKMath | fclasses |
|
||||
| Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg |
|
||||
| Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata |
|
||||
| Visualization | TKService, TKV2d, TKV3d, TKOpenGl, TKMeshVS, TKNIS | vis |
|
||||
| Visualization | TKService, TKV2d, TKV3d, TKOpenGl, TKMeshVS, TKNIS, TKVoxel | vis |
|
||||
|
||||
|
||||
@subsection testmanual_5_3 Recommended approaches to checking test results
|
||||
@@ -1156,50 +1123,6 @@ vdump $imagedir/${casename}_shading.png
|
||||
|
||||
This image will be included in the HTML log produced by *testgrid* command and will be checked for non-regression through comparison of images by command *testdiff*.
|
||||
|
||||
Also it is possible to use command *checkview* to make a snapshot of the viewer.
|
||||
|
||||
Use: checkview [options...]
|
||||
Allowed options are:
|
||||
* -display shapename: display shape with name 'shapename'
|
||||
* -3d: display shape in 3d viewer
|
||||
* -2d [ v2d / smallview ]: display shape in 2d viewer (default viewer is a 'smallview')
|
||||
* -path PATH: location of saved screenshot of viewer
|
||||
* -vdispmode N: it is possible to set vdispmode for 3d viewer (default value is 1)
|
||||
* -screenshot: procedure will try to make screenshot of already created viewer
|
||||
* Procedure can check some property of shape (length, area or volume) and compare it with some value N:
|
||||
* -l [N]
|
||||
* -s [N]
|
||||
* -v [N]
|
||||
* If current property is equal to value N, shape is marked as valid in procedure.
|
||||
* If value N is not given procedure will mark shape as valid if current property is non-zero.
|
||||
* -with {a b c}: display shapes 'a' 'b' 'c' together with 'shape' (if shape is valid)
|
||||
* -otherwise {d e f}: display shapes 'd' 'e' 'f' instead of 'shape' (if shape is NOT valid)
|
||||
|
||||
Note that one of two options -2d/-3d is required.
|
||||
|
||||
Examples:
|
||||
~~~~~
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
checkview -display result_2d -2d v2d -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
~~~~~
|
||||
box a 10 10 10
|
||||
box b 5 5 5 10 10 10
|
||||
bcut result b a
|
||||
set result_vertices [explode result v]
|
||||
checkview -display result -2d -with ${result_vertices} -otherwise { a b } -l -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
~~~~~
|
||||
box a 10 10 10
|
||||
box b 5 5 5 10 10 10
|
||||
bcut result b a
|
||||
vinit
|
||||
vdisplay a b
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_6 Number of free edges
|
||||
|
||||
To check the number of free edges run the command *checkfreebounds*.
|
||||
@@ -1267,9 +1190,9 @@ To check pixel color command *checkcolor* can be used.
|
||||
|
||||
Use: checkcolor x y red green blue
|
||||
|
||||
x, y -- pixel coordinates
|
||||
x y - pixel coordinates
|
||||
|
||||
red green blue -- expected pixel color (values from 0 to 1)
|
||||
red green blue - expected pixel color (values from 0 to 1)
|
||||
|
||||
This procedure checks color with tolerance (5x5 area)
|
||||
|
||||
@@ -1278,115 +1201,3 @@ If colors are not equal, procedure will check the nearest ones points (5x5 area)
|
||||
~~~~~
|
||||
checkcolor 100 100 1 0 0
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_10 Compute length, area and volume of input shape
|
||||
|
||||
Procedure *checkprops* computes length, area and volume of input shape.
|
||||
|
||||
Use: checkprops shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* -l LENGTH: command lprops, computes the mass properties of all edges in the shape with a linear density of 1
|
||||
* -s AREA: command sprops, computes the mass properties of all faces with a surface density of 1
|
||||
* -v VOLUME: command vprops, computes the mass properties of all solids with a density of 1
|
||||
* -eps EPSILON: the epsilon defines relative precision of computation
|
||||
* -equal SHAPE: compare area\volume\length of input shapes. Puts error if its are not equal
|
||||
* -notequal SHAPE: compare area\volume\length of input shapes. Puts error if its are equal
|
||||
|
||||
Options -l, -s and -v are independent and can be used in any order. Tolerance epsilon is the same for all options.
|
||||
|
||||
~~~~~
|
||||
checkprops result -s 6265.68
|
||||
checkprops result -s -equal FaceBrep
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_11 Parse output dump and compare it with reference values
|
||||
|
||||
Procedure *checkdump* is used to parse output dump and compare it with reference values.
|
||||
|
||||
Use: checkdump shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* -name NAME: list of parsing parameters (e.g. Center, Axis, etc)
|
||||
* -ref VALUE: list of reference values for each parameter in NAME
|
||||
* -eps EPSILON: the epsilon defines relative precision of computation
|
||||
|
||||
~~~~~
|
||||
checkdump result -name {Center Axis XAxis YAxis Radii} -ref {{-70 0} {-1 -0} {-1 -0} {0 -1} {20 10}} -eps 0.01
|
||||
~~~~~
|
||||
|
||||
@subsubsection testmanual_5_3_12 Compute length of input curve
|
||||
|
||||
Procedure *checklength* computes length of input curve.
|
||||
|
||||
Use: checklength curvename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* -l LENGTH: command length, computes the length of input curve with precision of computation
|
||||
* -eps EPSILON: the epsilon defines relative precision of computation
|
||||
* -equal CURVE: compare length of input curves. Puts error if its are not equal
|
||||
* -notequal CURVE: compare length of input curves. Puts error if its are equal
|
||||
|
||||
~~~~~
|
||||
checklength cp1 -l 7.278
|
||||
checklength res -l -equal ext_1
|
||||
~~~~~
|
||||
@subsubsection testmanual_5_3_13 Check maximum deflection, number of triangles and nodes in mesh
|
||||
|
||||
To check maximum deflection, number of nodes and triangles in mesh command *checktrinfo* can be used.
|
||||
|
||||
Use: checktrinfo shapename [options...]
|
||||
|
||||
Allowed options are:
|
||||
* -tri [N]: compare current number of triangles in "shapename" mesh with given reference data.
|
||||
If reference value N is not given and current number of triangles is equal to 0
|
||||
procedure checktrinfo will print an error.
|
||||
* -nod [N]: compare current number of nodes in "shapename" mesh with given reference data.
|
||||
If reference value N is not givenand current number of nodes is equal to 0
|
||||
procedure checktrinfo will print an error.
|
||||
* -defl [N]: compare current value of maximum deflection in "shapename" mesh with given reference data
|
||||
If reference value N is not given and current maximum deflection is equal to 0
|
||||
procedure checktrinfo will print an error.
|
||||
* -max_defl N: compare current value of maximum deflection in "shapename" mesh with max possible value
|
||||
* -tol_abs_tri N: absolute tolerance for comparison of number of triangles (default value 0)
|
||||
* -tol_rel_tri N: relative tolerance for comparison of number of triangles (default value 0)
|
||||
* -tol_abs_nod N: absolute tolerance for comparison of number of nodes (default value 0)
|
||||
* -tol_rel_nod N: relative tolerance for comparison of number of nodes (default value 0)
|
||||
* -tol_abs_defl N: absolute tolerance for deflection comparison (default value 0)
|
||||
* -tol_rel_defl N: relative tolerance for deflection comparison (default value 0)
|
||||
* -ref [trinfo a]: compare deflection, number of triangles and nodes in "shapename" and in "a"
|
||||
|
||||
Note that options -tri, -nod, -defl do not work together with option -ref.
|
||||
|
||||
Examples:
|
||||
|
||||
comparison with some reference values
|
||||
~~~~~
|
||||
checktrinfo result -tri 129 -nod 131 -defl 0.01
|
||||
~~~~~
|
||||
|
||||
comparison with another mesh
|
||||
~~~~~
|
||||
checktrinfo result -ref [tringo a]
|
||||
~~~~~
|
||||
|
||||
comparison of deflection with max possible value
|
||||
~~~~~
|
||||
checktrinfo result -max_defl 1
|
||||
~~~~~
|
||||
|
||||
to make sure that current values are not equal to zero
|
||||
~~~~~
|
||||
checktrinfo result -tri -nod -defl
|
||||
~~~~~
|
||||
|
||||
to make sure that number of triangles and number of nodes are not equal to some specific values
|
||||
~~~~~
|
||||
checktrinfo result -tri !10 -nod !8
|
||||
~~~~~
|
||||
|
||||
it is possible to compare current values with reference values with some tolerances.
|
||||
Use options -tol_\* for that.
|
||||
~~~~~
|
||||
checktrinfo result -defl 1 -tol_abs_defl 0.001
|
||||
~~~~~
|
||||
|
@@ -5,53 +5,53 @@ Upgrade from older OCCT versions {#occt_dev_guides__upgrade}
|
||||
|
||||
@section upgrade_intro Introduction
|
||||
|
||||
This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones.
|
||||
This document provides technical details on changes made in particular versions of OCCT, and is aimed to help upgrading user applications based on previous versions of OCCT to newer ones.
|
||||
|
||||
@subsection upgrade_intro_precautions Precautions
|
||||
|
||||
Back-up your code before the upgrade.
|
||||
We strongly recommend using version control system during the upgrade process and saving one or several commits at each step of upgrade, until the overall result is verified.
|
||||
This will facilitate identification and correction of possible problems that can occur at the intermediate steps of upgrade.
|
||||
It is advisable to document each step carefully to be able to repeat it if necessary.
|
||||
Back-up your code before upgrade.
|
||||
We strongly recommend using version control system during upgrade process, saving one or several commits for each step of upgrade, until overall result is verified.
|
||||
This will facilitate identification and correction of possible problems that can occur on intermediate steps of upgrade.
|
||||
Carefully document each step to be able to repeat it if necessary.
|
||||
|
||||
@subsection upgrade_intro_disclaim Disclaimer
|
||||
|
||||
This document describes known issues that have been encountered during porting of OCCT and some applications and approaches that have helped to resolve these issues in known cases.
|
||||
This document describes known issues that have been encountered in porting of OCCT and some applications, and approaches that helped to resolve these issues in known cases.
|
||||
It does not pretend to cover all possible migration issues that can appear in your application.
|
||||
Take this document with discretion; apply your expertise and knowledge of your application to ensure the correct result.
|
||||
Please take this document with discretion; apply your expertise and knowledge of your application to ensure correct result.
|
||||
|
||||
The automatic upgrade tool is provided as is, without warranty of any kind, and we explicitly disclaim any liability for possible errors that may appear due to use of this tool.
|
||||
The automatic upgrade tool is provided as-is, without warranty of any kind, and we explicitly disclaim any liability for possible errors that may appear due to use of this tool.
|
||||
It is your responsibility to ensure that the changes you made in your code are correct.
|
||||
When you upgrade the code by an automatic script, make sure to carefully review the introduced changes at each step before committing them.
|
||||
When upgrading your code by automatic script, make sure to carefully review the changes made by it, on each step, before committing them.
|
||||
|
||||
@section upgrade_700 Upgrade to OCCT 7.0.0
|
||||
|
||||
@subsection upgrade_700_persist Removal of legacy persistence
|
||||
|
||||
Legacy persistence for shapes and OCAF data based on *Storage_Schema* (toolkits *TKShapeShcema, TLStdLSchema, TKStdSchema* and *TKXCAFSchema*) has been removed in OCCT 7.0.0.
|
||||
The applications that used these data persistence tools need to be updated to use other persistence mechanisms.
|
||||
Legacy persistence for shapes and OCAF data based on Storage_Schema (toolkits TKShapeShcema, TLStdLSchema, TKStdSchema, TKXCAFSchema) has been removed in OCCT 7.0.0.
|
||||
Applications that used these persistence tools for their data need to be updated to use other persistence mechanisms.
|
||||
|
||||
The existing data files in standard formats can be converted using OCCT 6.9.0 or a previous version, as follows.
|
||||
The existing data files in standard formats can be converted using OCCT 6.9.0 or previous version, as follows.
|
||||
|
||||
#### CSFDB files
|
||||
|
||||
Files in CSFDB format (usually with extension .csfdb) contain OCCT shape data that can be converted to BRep format.
|
||||
The easiest way to do that is to use ImportExport sample provided with OCCT 6.9.0 (or earlier):
|
||||
|
||||
- Start ImportExport sample;
|
||||
- Select File / New;
|
||||
- Select File / Import / CSFDB... and specify the file to be converted;
|
||||
- Drag the mouse with the right button pressed across the view to select all shapes by the rectangle;
|
||||
- Select File / Export / BREP... and specify the location and name for the resulting file
|
||||
- Start ImportExport sample
|
||||
- Select File / New
|
||||
- Select File / Import / CSFDB... and specify the file to be converted
|
||||
- Drag mouse with right button pressed across the view to select all shapes by rectangle
|
||||
- Select File / Export / BREP... and specify location and name for the resulting file
|
||||
|
||||
#### OCAF and XCAF documents
|
||||
|
||||
Files containing OCAF data saved in the old format usually have extensions <i>.std, .sgd</i> or <i>.dxc</i> (XDE documents).
|
||||
Files containing OCAF data saved in old format usually have extensions .std or .sgd or .dxc (XDE documents).
|
||||
These files can be converted to XML or binary OCAF formats using DRAW Test Harness commands available in OCCT 6.9.0 or earlier.
|
||||
|
||||
For that, start *DRAWEXE* and perform the following commands:
|
||||
|
||||
* To convert <i>*.std</i> and <i>*.sgd</i> file formats to binary format <i>*.cbf</i> (The created document should be in *BinOcaf* format instead of *MDTV-Standard*):
|
||||
* for the conversion of the "*.std" and "*.sgd" file formats to the binary format "*.cbf" (Created document should be in **BinOcaf** format instead of **MDTV-Standard**):
|
||||
|
||||
@code
|
||||
Draw[]> pload ALL
|
||||
@@ -60,7 +60,7 @@ For that, start *DRAWEXE* and perform the following commands:
|
||||
Draw[]> SaveAs Doc [path to the new file]
|
||||
@endcode
|
||||
|
||||
* To convert <i>*.dxc</i> file format to binary format <i>*.xbf</i> (The created document should be in *BinXCAF* format instead of *MDTV-XCAF*):
|
||||
* for the conversion of the "*.dxc" file format to the binary format "*.xbf" (Created document should be in **BinXCAF** format instead of **MDTV-XCAF**):
|
||||
|
||||
@code
|
||||
Draw[]> pload ALL
|
||||
@@ -69,26 +69,24 @@ For that, start *DRAWEXE* and perform the following commands:
|
||||
Draw[]> XSave Doc [path to the new file]
|
||||
@endcode
|
||||
|
||||
On Windows, it is necessary to replace back slashes in the file path by direct slashes or pairs of back slashes.
|
||||
|
||||
Use *XmlOcaf* or *XmlXCAF* instead of *BinOcaf* and *BinXCAF*, respectively, to save in XML format instead of binary one.
|
||||
On Windows, be careful to replace back slashes in the file path by either direct slash or pairs of back slashes.
|
||||
Use "XmlOcaf" or "XmlXCAF" instead of "BinOcaf" and "BinXCAF", respectively, to save in XML format instead of binary one.
|
||||
|
||||
@subsection upgrade_occt700_cdl Removal of CDL and WOK
|
||||
|
||||
OCCT code has been completely refactored in version 7.0 to get rid of obsolete technologies used since its inception: CDL (Cas.Cade Definition Language) and WOK (Workshop Organization Kit).
|
||||
|
||||
C++ code previously generated by WOK from CDL declarations is now included directly in OCCT sources.
|
||||
|
||||
This modification did not change names, API, and behavior of existing OCCT classes, thus in general the code based on OCCT 6.x should compile and work fine with OCCT 7.0.
|
||||
However, due to redesign of basic mechanisms (CDL generic classes, Handles and RTTI) using C++ templates, some changes may be necessary in the code when porting to OCCT 7.0, as described below.
|
||||
|
||||
WOK is not necessary anymore for building OCCT from sources, though it still can be used in a traditional way -- auxiliary files required for that are preserved.
|
||||
WOK is not necessary anymore for building OCCT from sources, though it still can be used in traditional way -- auxiliary files required for that are preserved.
|
||||
The recommended method for building OCCT 7.x is CMake, see @ref occt_dev_guides__building_cmake.
|
||||
The alternative solution is to use legacy generator of project files (extracted from WOK), see @ref occt_dev_guides__building_wok.
|
||||
Alternative solution is to use legacy generator of project files (extracted from WOK), see @ref occt_dev_guides__building_wok.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_auto Automatic upgrade
|
||||
|
||||
Most of typical changes required for upgrading code for OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
Most of typical changes required for upgrading code to use OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
This tool is a Tcl script, thus Tcl should be available on your workstation to run it.
|
||||
|
||||
Example:
|
||||
@@ -98,54 +96,49 @@ Example:
|
||||
% upgrade -recurse -all -src=<path_to_your_sources>
|
||||
~~~~~
|
||||
|
||||
On Windows, the helper batch script *upgrade.bat* can be used, provided that Tcl is either available in *PATH*, or configured via *custom.bat* script (for instance, if you use OCCT installed from Windows installer package). Start it from the command prompt:
|
||||
On Windows, helper batch script upgrade.bat can be used, provided that Tcl is either available in PATH, or configured via custom.bat script (for instance, if you use OCCT installed from Windows installer package). Start it from command prompt:
|
||||
|
||||
~~~~~
|
||||
cmd> <path_to_occt>\upgrade.bat -recurse -all -inc=<path_to_occt>\inc -src=<path_to_your_sources> [options]
|
||||
~~~~~
|
||||
|
||||
Run the upgrade tool without arguments to see the list of available options.
|
||||
Run upgrade tool without arguments to see the list of available options.
|
||||
|
||||
The upgrade tool performs the following changes in the code.
|
||||
Upgrade tool performs the following changes in the code.
|
||||
|
||||
1. Replaces macro *DEFINE_STANDARD_RTTI* by *DEFINE_STANDARD_RTTIEXT*, with second argument indicating base class for the main argument class (if inheritance is recognized by the script):
|
||||
1. Adds second argument to macro DEFINE_STANDARD_RTTI indicating base class for its argument class (if inheritance is recognized by the script):
|
||||
~~~~~
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTIEXT(Class, Base)
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTI(Class, Base)
|
||||
~~~~~
|
||||
|
||||
@note If macro *DEFINE_STANDARD_RTTI* with two arguments (used in intermediate development versions of OCCT 7.0) is found, the script will convert it to either *DEFINE_STANDARD_RTTIEXT* or *DEFINE_STANDARD_RTTI_INLINE*.
|
||||
The former case is used if current file is header and source file with the same name is found in the same folder.
|
||||
In this case, macro *IMPLEMENT_STANDARD_RTTI* is injected in the corresponding source file.
|
||||
The latter variant defines all methods for RTTI as inline, and does not require *IMPLEMENT_STANDARD_RTTIEXT* macro.
|
||||
|
||||
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in *TCollection* package) by inclusion of the corresponding header:
|
||||
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in TCollection package) by \#include of corresponding header:
|
||||
~~~~~
|
||||
class TColStd_Array1OfReal; -> #include <TColStd_Array1OfReal.hxx>
|
||||
~~~~~
|
||||
|
||||
3. Replaces underscored names of *Handle* classes by usage of a macro:
|
||||
3. Replaces underscored names of Handle classes by usage of a macro:
|
||||
~~~~~
|
||||
Handle_Class -> Handle(Class)
|
||||
~~~~~
|
||||
This change is not applied if the source or header file is recognized as containing the definition of Qt class with signals or slots, to avoid possible compilation errors of MOC files caused by inability of MOC to recognize macros (see http://doc.qt.io/qt-4.8/signalsandslots.html).
|
||||
The file is considered as defining a Qt object if it contains strings *Q_OBJECT* and either *slots:* or *signals:*.
|
||||
This change is not applied if source or header file is recognized as containing definition of Qt class with signals or slots, to avoid possible compilation errors of MOC files caused by inability of MOC to recognize macros (see http://doc.qt.io/qt-4.8/signalsandslots.html).
|
||||
The file is considered as defining Qt object if it contains strings "Q_OBJECT" and either "slots:" or "signals".
|
||||
|
||||
4. Removes forward declarations of classes with names <i>Handle(C)</i> or *Handle_C*, replacing them either by forward declaration of its argument class, or (for files defining Qt objects) <i>\#include</i> statement for a header with the name of the argument class and extension .hxx:
|
||||
4. Removes forward declarations of classes with names Handle(C) or Handle_C, replacing these either by forward declaration of its argument class, or (for files defining Qt objects) \#include statement for header with name of the argument class and extension .hxx:
|
||||
~~~~~
|
||||
class Handle(TColStd_HArray1OfReal); -> #include <TColStd_HArray1OfReal.hxx>
|
||||
~~~~~
|
||||
|
||||
5. Removes <i> \#includes </i> of files <i>Handle_...hxx</i> that have disappeared in OCCT 7.0:
|
||||
5. Removes \#includes of files Handle_...hxx disappeared in OCCT 7.0:
|
||||
~~~~~
|
||||
#include <Handle_Geom_Curve.hxx> ->
|
||||
~~~~~
|
||||
|
||||
6. Removes *typedef* statements that use *Handle* macro to generate the name:
|
||||
6. Removes typedef statements that use Handle macro to generate name:
|
||||
~~~~~
|
||||
typedef NCollection_Handle<Message_Msg> Handle(Message_Msg); ->
|
||||
~~~~~
|
||||
|
||||
7. Converts C-style casts applied to Handles into calls to <i>DownCast()</i> method:
|
||||
7. Converts C-style casts applied to Handles to calls to DownCast() method:
|
||||
~~~~~
|
||||
((Handle(A)&)b) -> Handle(A)::DownCast(b)
|
||||
(Handle(A)&)b -> Handle(A)::DownCast(b)
|
||||
@@ -154,23 +147,21 @@ typedef NCollection_Handle<Message_Msg> Handle(Message_Msg); ->
|
||||
(*(Handle(A)*)&b) -> Handle(A)::DownCast(b)
|
||||
~~~~~
|
||||
|
||||
8. Moves <i>Handle()</i> macro out of namespace scope:
|
||||
8. Moves Handle() macro out of namespace scope:
|
||||
~~~~~
|
||||
Namespace::Handle(Class) -> Handle(Namespace::Class)
|
||||
~~~~~
|
||||
|
||||
9. Converts local variables of reference type, which are initialized by a temporary object returned by call to <i>DownCast()</i>, to the variables of non-reference type (to avoid using references to destroyed memory):
|
||||
9. Converts local variables of reference type initialized by temporary object returned by call to DownCast(), to non-references (to avoid using reference to destroyed memory):
|
||||
~~~~~
|
||||
const Handle(A)& a = Handle(B)::DownCast (b); -> Handle(A) a (Handle(B)::DownCast (b));
|
||||
~~~~~
|
||||
|
||||
10. Adds <i>\#include</i> for all classes used as argument to macro <i>STANDARD_TYPE()</i>, except for already included ones;
|
||||
10. Adds \#include for all classes used as argument to macro STANDARD_TYPE(), except of already included ones;
|
||||
|
||||
11. Removes uses of obsolete macros *IMPLEMENT_DOWNCAST* and *IMPLEMENT_STANDARD_*..., except *IMPLEMENT_STANDARD_RTTIEXT*.
|
||||
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*().
|
||||
|
||||
@note If you plan to keep compatibility of your code with older versions of OCCT, add option <i>-compat</i> to avoid this change. See also @ref upgrade_occt700_cdl_compat.
|
||||
|
||||
.
|
||||
> If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
|
||||
|
||||
As long as the upgrade routine runs, some information messages are sent to the standard output.
|
||||
In some cases the warnings or errors like the following may appear:
|
||||
@@ -179,20 +170,20 @@ In some cases the warnings or errors like the following may appear:
|
||||
Error in {HEADER_FILE}: Macro DEFINE_STANDARD_RTTI used for class {CLASS_NAME} whose declaration is not found in this file, cannot fix
|
||||
~~~~~
|
||||
|
||||
Be sure to check carefully all reported errors and warnings, as the corresponding code will likely require manual corrections.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where *DEFINE_STANDARD_RTTI* macro is used with incorrect class name as an argument.
|
||||
Be sure to check carefully all reported errors and warnings, as corresponding places likely will require manual corrections.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro passes invalid class name as an argument.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_compiler Possible compiler errors
|
||||
|
||||
Some situations requiring upgrade cannot be detected and / or handled by the automatic procedure.
|
||||
If you get compiler errors or warnings when trying to build the upgraded code, you will need to fix them manually.
|
||||
Some situations requiring upgrade cannot be detected and / or handled by automatic procedure.
|
||||
If you get compiler errors or warnings when trying to build upgraded code, you will need to fix them manually.
|
||||
The following paragraphs list known situations of this kind.
|
||||
|
||||
#### Missing header files
|
||||
|
||||
The use of handle objects (construction, comparison using operators == or !=, use of function <i>STANDRAD_TYPE()</i> and method <i>DownCast()</i>) now requires the type of the object pointed by Handle to be completely known at compile time. Thus it may be necessary to include header of the corresponding class to make the code compilable.
|
||||
Use of handle objects (construction, comparison using operators == or !=, use of function STANDRAD_TYPE() and method DownCast()) now requires the type of the object pointed by Handle to be completely known at compile time. Thus it may be necessary to include header of the corresponding class to make the code compilable.
|
||||
|
||||
For example, the following lines will fail to compile if *Geom_Line.hxx* is not included:
|
||||
For example, the following lines will fail to compile if Geom_Line.hxx is not included:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Line) aLine = 0;
|
||||
@@ -207,8 +198,8 @@ This will eliminate the need to include the header *A* in each source file where
|
||||
|
||||
#### Ambiguity of calls to overloaded functions
|
||||
|
||||
This issue appears in the compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): the compiler reports an ambiguity error if a handle is used in the argument of a call to the function that has two or move overloaded versions, accepting handles to different types.
|
||||
The problem is that operator <i> const handle<T2>& </i> is defined for any type *T2*, thus the compiler cannot make the right choice.
|
||||
This issue appears in compilers that do not support default arguments in template functions (known cases are Visual C++ 10 and 11): compiler reports ambiguity error if handle is used in argument of call to function that has two or move overloaded versions, accepting handles to different types.
|
||||
The problem is that operator const handle<T2>& is defined for any type T2, thus compiler cannot make a right choice.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -219,14 +210,14 @@ Handle(Geom_TrimmedCurve) aCurve = new Geom_TrimmedCurve (...);
|
||||
func (aCurve); // ambiguity error in VC++ 10
|
||||
~~~~~
|
||||
|
||||
To resolve this ambiguity, change your code so that argument type should correspond exactly to the function signature.
|
||||
In some cases this can be done by using the relevant type for the corresponding variable, like in the example above:
|
||||
To resolve this ambiguity, change your code so that argument type corresponds exactly to the function signature.
|
||||
In some cases this can be done by using relevant type for the corresponding variable, like in the example above:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Curve) aCurve = new Geom_TrimmedCurve (...);
|
||||
~~~~~
|
||||
|
||||
Other variants consist in assigning the argument to a local variable of the correct type and using the direct cast or constructor:
|
||||
Other variants are assigning the argument to local variable of correct type, using direct cast or constructor:
|
||||
|
||||
~~~~~
|
||||
const Handle(Geom_Curve)& aGCurve (aTrimmedCurve);
|
||||
@@ -235,12 +226,12 @@ func (static_cast(aCurve)); // OK - direct cast
|
||||
func (Handle(Geom_Curve)(aCurve)); // OK - temporary handle is constructed
|
||||
~~~~~
|
||||
|
||||
Another possibility consists in defining additional template variant of the overloaded function causing ambiguity, and using *SFINAE* to resolve the ambiguity.
|
||||
This technique can be illustrated by the definition of the template variant of method <i>IGESData_IGESWriter::Send()</i>.
|
||||
Another possibility is defining additional templated variant of the overloaded function causing ambiguity, and use SFINAE to resolve the ambiguity.
|
||||
For example of this technique, see definition of the template variant of the method IGESData_IGESWriter::Send().
|
||||
|
||||
#### Lack of implicit cast to base type
|
||||
|
||||
As the cast of a handle to the reference to another handle to the base type has become a user-defined operation, the conversions that require this cast together with another user-defined cast will not be resolved automatically by the compiler.
|
||||
Due to the fact that now cast of handle to reference to handle to the base type is user-defined operation, conversions that require this cast combined with other user-defined cast will not be resolved automatically by compiler.
|
||||
|
||||
For example:
|
||||
|
||||
@@ -248,15 +239,15 @@ For example:
|
||||
Handle(Geom_Geometry) aC = GC_MakeLine (p, v); // compiler error
|
||||
~~~~~
|
||||
|
||||
The problem is that the class *GCE2d_MakeSegment* has a user-defined conversion to <i>const Handle(Geom_TrimmedCurve)&,</i> which is not the same as the type of the local variable *aC*.
|
||||
The problem here is that class GCE2d_MakeSegment has user-defined conversion to const Handle(Geom_TrimmedCurve)&, which is not the same as type of the local variable aC.
|
||||
|
||||
To resolve this, use method <i>Value()</i>:
|
||||
To resolve this, use method Value():
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Geometry) aC = GC_MakeLine (p, v).Value(); // ok
|
||||
~~~~~
|
||||
|
||||
or use variable of the appropriate type:
|
||||
or use variable of appropriate type:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_TrimmedCurve) aC = GC_MakeLine (p, v); // ok
|
||||
@@ -266,7 +257,7 @@ Handle(Geom_TrimmedCurve) aC = GC_MakeLine (p, v); // ok
|
||||
|
||||
You might need to clean your code from incorrect use of macros *STANDARD_TYPE*() and *Handle*().
|
||||
|
||||
1. Explicit definitions of static functions with names generated by macro *STANDARD_TYPE()*, which are artifacts of old implementation of RTTI, should be removed.
|
||||
1. Explicit definitions of static functions with names generated by macro STANDARD_TYPE(), which are artifacts of old implementation of RTTI, should be removed.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
@@ -277,7 +268,7 @@ const Handle(Standard_Type)& STANDARD_TYPE(math_GlobOptMin)
|
||||
}
|
||||
~~~~~
|
||||
|
||||
2. Incorrect location of closing parenthesis of *Handle()* macro that was not detectable in OCCT 6.x will cause a compiler error and must be corrected.
|
||||
2. Incorrect location of closing parenthesis of Handle() macro that was not detectable in OCCT 6.x will cause compiler error and must be corrected.
|
||||
|
||||
Example (note misplaced closing parenthesis):
|
||||
~~~~~
|
||||
@@ -286,21 +277,21 @@ aBSpline = Handle( Geom2d_BSplineCurve::DownCast(BS->Copy()) );
|
||||
|
||||
#### Use of class Standard_AncestorIterator
|
||||
|
||||
Class *Standard_AncestorIterator* has been removed; use method *Parent()* of *Standard_Type* class to parse the inheritance chain.
|
||||
Class Standard_AncestorIterator has been removed; use method Parent() of Standard_Type class to parse inheritance chain.
|
||||
|
||||
#### Absence of cast to Standard_Transient*
|
||||
|
||||
Handles in OCCT 7.0 do not have the operator of conversion to <i>Standard_Transient*,</i> which was present in earlier versions.
|
||||
Handles in OCCT 7.0 do not have operator of conversion to Standard_Transient*, which was present in earlier versions.
|
||||
This is done to prevent possible unintended errors like this:
|
||||
|
||||
~~~~~
|
||||
Handle(Geom_Line) aLine = ...;
|
||||
Handle(Geom_Surface) aSurf = ...;
|
||||
...
|
||||
if (aLine == aSurf) {...} // will cause a compiler error in OCCT 7.0, but not OCCT 6.x
|
||||
if (aLine == aSurf) {...} // will cause compiler error in OCCT 7.0, but not OCCT 6.x
|
||||
~~~~~
|
||||
|
||||
The places where this implicit cast has been used should be corrected manually.
|
||||
Places where this implicit cast has been used should be corrected manually.
|
||||
The typical situation is when Handle is passed to stream:
|
||||
|
||||
~~~~~
|
||||
@@ -308,15 +299,15 @@ Handle(Geom_Line) aLine = ...;
|
||||
os << aLine; // in OCCT 6.9.0, resolves to operator << (void*)
|
||||
~~~~~
|
||||
|
||||
Call method <i>get()</i> explicitly to output the address of the Handle.
|
||||
Call method get() explicitly to output address of the Handle.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_runtime Possible runtime problems
|
||||
|
||||
Here is the list of known possible problems at run time after the upgrade to OCCT 7.0.
|
||||
Known situations when problems are possible at run time after upgrade to OCCT 7.0 are listed here.
|
||||
|
||||
#### References to temporary objects
|
||||
|
||||
In previous versions, the compiler was able to detect the situation when a local variable of a "reference to a Handle" type is initialized by temporary object, and ensured that lifetime of that object is longer than that of the variable.
|
||||
In previous versions, compiler was able to detect situation when local variable of reference type to Handle is initialized by temporary object, and ensured that lifetime of that object is longer than that of the variable.
|
||||
Since OCCT 7.0, it will not work if types of the temporary object and variable are different (due to involvement of user-defined type cast), thus such temporary object will be destroyed immediately.
|
||||
|
||||
Example:
|
||||
@@ -330,55 +321,47 @@ aBC->Transform (T); // access violation in OCCT 7.0
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_compat Preserving compatibility with OCCT 6.x
|
||||
|
||||
If you like to preserve the compatibility of your application code with OCCT versions 6.x even after the upgrade to 7.0, consider the following suggestions:
|
||||
If you like to preserve compatibility of your application code with OCCT versions 6.x even after upgrade to 7.0, consider the following suggestions:
|
||||
|
||||
1. If your code used sequences of macros *IMPLEMENT_STANDARD_*... generated by WOK, replace them by single macro *IMPLEMENT_STANDARD_RTTIEXT*
|
||||
1. When running automatic upgrade tool, add option *-compat*.
|
||||
|
||||
2. When running automatic upgrade tool, add option <i>-compat</i>.
|
||||
|
||||
3. Define macros *DEFINE_STANDARD_RTTIEXT* and *DEFINE_STANDARD_RTTI_INLINE* when building with previous versions of OCCT, resolving to *DEFINE_STANDARD_RTTI* with single argument
|
||||
2. In order to overcome incompatibility of macro DEFINE_STANDARD_RTTI which has additional argument in OCCT 7.0, you can replace (after upgrade) its use in your code by your own version-dependent macro, which resolves to either 6.x or 7.x version.
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
#if OCC_VERSION_HEX < 0x070000
|
||||
#define DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#define DEFINE_STANDARD_RTTI_INLINE(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#else
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1,C2)
|
||||
#endif
|
||||
~~~~~
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_wok Applications based on CDL and WOK
|
||||
|
||||
If your application is essentially based on CDL, and you need to upgrade it to OCCT 7.0, you will very likely need to convert your application code to non-CDL form.
|
||||
This is a non-trivial effort; the required actions would depend strongly on the structure of the code and used CDL features.
|
||||
If you have application essentially based on CDL, and need to upgrade it to OCCT 7.0, you will very likely need to convert your application code to non-CDL form.
|
||||
This is non-trivial effort; the required actions would depend strongly on the structure of the code and used features of CDL.
|
||||
|
||||
The upgrade script and sources of a specialized WOK version used for OCCT code upgrade can be found in WOK Git repository in branch [CR0_700_2](http://git.dev.opencascade.org/gitweb/?p=occt-wok.git;a=log;h=refs/heads/CR0_700_2).
|
||||
The upgrade script and sources of specialized version of WOK used for upgrading OCCT code can be found in WOK Git repository in branch [CR0_700_2](http://git.dev.opencascade.org/gitweb/?p=occt-wok.git;a=log;h=refs/heads/CR0_700_2).
|
||||
|
||||
[Contact us](http://www.opencascade.com/contact/) if you need more help.
|
||||
|
||||
@subsection upgrade_occt700_bspline Separation of BSpline cache
|
||||
|
||||
Implementation of NURBS curves and surfaces has been revised: the cache of polynomial coefficients, which is used to accelerate calculate values of B-spline, has been separated from data objects *Geom2d_BSplineCurve, Geom_BSplineCurve* and *Geom_BSplineSurface* into the dedicated classes *BSplCLib_Cache* and *BSplSLib_Cache*.
|
||||
Implementation of NURBS curves and surfaces has been revised: cache of polynomial coefficients, used to accelerate calculate values of B-spline, is separated from data objects (Geom2d_BSplineCurve, Geom_BSplineCurve, Geom_BSplineSurface), into dedicated classes (BSplCLib_Cache and BSplSLib_Cache).
|
||||
|
||||
The benefits of this change are:
|
||||
|
||||
* Reduced memory footprint of OCCT shapes (up to 20% on some cases)
|
||||
* Possibility to evaluate the same B-Spline concurrently in parallel threads without data races and mutex locks
|
||||
|
||||
The drawback is that direct evaluation of B-Splines using methods of curves and surfaces becomes slower due to the absence of cache. The slow-down can be avoided by using adaptor classes *Geom2dAdaptor_Curve, GeomAdaptor_Curve* and *GeomAdaptor_Surface*, which now use cache when the curve or surface is a B-spline.
|
||||
The drawback is that direct evaluation of B-Splines using methods of curves and surfaces becomes slower, due to absence of cache. The way to avoid slow down is to use adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface): they now use cache when the curve or surface is a B-spline.
|
||||
|
||||
OCCT algorithms have been changed to use adaptors for B-spline calculations instead of direct methods for curves and surfaces.
|
||||
The same changes (use of adaptors instead of direct call to curve and surface methods) should be implemented in relevant places in the applications based on OCCT to get the maximum performance.
|
||||
|
||||
@subsection upgrade_occt700_booleanresult Structural result of Boolean operations
|
||||
|
||||
The result of Boolean operations became structured according to the structure of the input shapes. Therefore it may impact old applications that always iterate on direct children of the result compound assuming to obtain solids as iteration items, regardless of the structure of the input shapes. In order to get always solids as iteration items it is recommended to use TopExp_Explorer instead of TopoDS_Iterator.
|
||||
|
||||
@subsection upgrade_occt700_brepextrema BRepExtrema_ExtCC finds one solution only
|
||||
|
||||
Extrema computation between non-analytical curves in shape-shape distance calculation algorithm has been changed in order to return only one solution. So, if e.g. two edges are created on parallel b-spline curves the algorithm BRepExtrema_DistShapeShape will return only one solution instead of enormous number of solutions. There is no way to get algorithm working in old manner.
|
||||
OCCT algorithms are changed to use adaptors for B-spline calculations instead of direct methods of curves and surfaces.
|
||||
The same changes (use of adaptors instead of direct call to curve and surface methods) should be implemented in relevant places in applications based on OCCT in order to get maximum performance.
|
||||
|
||||
@subsection upgrade_occt700_sorttools Removal of SortTools package
|
||||
|
||||
Package *SortTools* has been removed.
|
||||
Package SortTools has been removed.
|
||||
The code that used the tools provided by that package should be corrected manually.
|
||||
The recommended approach is to use sorting algorithms provided by STL.
|
||||
|
||||
@@ -399,29 +382,26 @@ can be replaced by:
|
||||
...
|
||||
TCollection_Array1OfReal aValues = ...;
|
||||
...
|
||||
std::stable_sort (aValues.begin(), aValues.end());
|
||||
std::stable_sort (aValues->begin(), aValues->end());
|
||||
~~~~~
|
||||
|
||||
@subsection upgrade_occt700_2dlayers On-screen objects and ColorScale
|
||||
@subsection upgrade_occt700_2dlayers New implementation of 2d-layers
|
||||
|
||||
The old mechanism for rendering Underlay and Overlay on-screen 2D objects based on *Visual3d_Layer* and immediate drawing model (uncached and thus slow) has been removed.
|
||||
Classes *Aspect_Clayer2d, OpenGl_GraphicDriver_Layer, Visual3d_Layer, Visual3d_LayerItem, V3d_LayerMgr* and *V3d_LayerMgrPointer* have been deleted.
|
||||
In latest OCCT version API that provided old implementation of 2d-layers was removed. Classes Aspect_Clayer2d, OpenGl_GrahpicDriver_Layer, Visual3d_Layer, Visual3d_LayerItem, V3d_LayerMgr, V3d_LayerMgrPointer were deleted.
|
||||
|
||||
General AIS interactive objects with transformation persistence flag *Graphic3d_TMF_2d* can be used as a replacement of *Visual3d_LayerItem*.
|
||||
The anchor point specified for transformation persistence defines the window corner of (or center in case of (0, 0) point).
|
||||
To keep on-screen 2D objects on top of the main screen, they can be assigned to the appropriate Z-layer.
|
||||
Predefined Z-layers *Graphic3d_ZLayerId_TopOSD* and *Graphic3d_ZLayerId_BotOSD* are intended to replace Underlay and Overlay layers within the old API.
|
||||
Now 2d-layers are implemented through Z-layers. In order to create a 2d-object it is necessary to follow several steps:
|
||||
1. Create an AIS interactive object
|
||||
2. Set a Z-layer for it to determine in which layer this object will be displayed (layer system provides order of displaying objects, ones in the lower layer will be displayed behind the others in the higher layer)
|
||||
3. Set transform persistence (flag Graphic3d_TMF_2d or Graphic3d_TMF_2d_IsTopDown and a gp_Pnt point, where X and Y are used to set the coordinates’ origin in 2d space of the view and Z coordinate defines the gap from border of view window, except center position)
|
||||
|
||||
*ColorScale* object previously implemented using *Visual3d_LayerItem* has been moved to a new class *AIS_ColorScale*, with width and height specified explicitly.
|
||||
The property of *V3d_View* storing the global *ColorScale* object has been removed with associated methods *V3d_View::ColorScaleDisplay(), V3d_View::ColorScaleErase(), V3d_View::ColorScaleIsDisplayed()* and *V3d_View::ColorScale()* as well as the classes *V3d_ColorScale, V3d_ColorScaleLayerItem* and *Aspect_ColorScale*.
|
||||
Here is an example of creating *ColorScale* using the updated API:
|
||||
One more feature of new 2d-layers imlementation is a ColorScale based on a new class AIS_ColorScale. Old implementation of ColorScale as a global property of V3d_View has been removed with associated methods V3d_View::ColorScaleDisplay(), V3d_View::ColorScaleErase(), V3d_View::ColorScaleIsDisplayed(), V3d_View::ColorScale() and classes V3d_ColorScale, V3d_ColorScaleLayerItem, Aspect_ColorScale.
|
||||
|
||||
New interactive object AIS_ColorScale provides the same configuration API as previously Aspect_ColorScale and V3d_ColorScale. It should be used in the following way to display a 2D presentation of ColorScale:
|
||||
|
||||
~~~~~
|
||||
Handle(AIS_ColorScale) aCS = new AIS_ColorScale();
|
||||
// configuring
|
||||
Standard_Integer aWidth, aHeight;
|
||||
aView->Window()->Size (aWidth, aHeight);
|
||||
aCS->SetSize (aWidth, aHeight);
|
||||
aCS->SetHeight (0.95);
|
||||
aCS->SetRange (0.0, 10.0);
|
||||
aCS->SetNumberOfIntervals (10);
|
||||
// displaying
|
||||
@@ -431,14 +411,12 @@ aCS->SetToUpdate();
|
||||
theContextAIS->Display (aCS);
|
||||
~~~~~
|
||||
|
||||
To see how 2d objects are implemented in OCCT you can call Draw commands *vcolorscale, vlayerline* or *vdrawtext* (with <i>-2d</i> option).
|
||||
Draw command *vcolorscale* now requires the name of *ColorScale* object as argument.
|
||||
To display this object use command *vdisplay*. For example:
|
||||
To see how 2d objects are realized in OCCT you can call draw commands vcolorscale, vlayerline or vdrawtext (with -2d option). Draw command vcolorscale now requires a name of ColorScale object as an argument. To display this object use command vdisplay. Example:
|
||||
|
||||
~~~~~
|
||||
pload VISUALIZATION
|
||||
vinit
|
||||
vcolorscale cs -demo
|
||||
vcolorscale cs –demo
|
||||
pload MODELING
|
||||
box b 100 100 100
|
||||
vdisplay b
|
||||
@@ -448,150 +426,11 @@ vlayerline 0 300 300 300 10
|
||||
vdrawtext t "2D-TEXT" -2d -pos 0 150 0 -color red
|
||||
~~~~~
|
||||
|
||||
Here is a small example in C++ illustrating how to display a custom AIS object in 2d:
|
||||
Here is a small example in c++ how to display a custom AIS object in 2d:
|
||||
~~~~~
|
||||
Handle(AIS_InteractiveContext) aContext = ...;
|
||||
Handle(AIS_InteractiveObject) anObj =...; // create an AIS object
|
||||
anObj->SetZLayer(Graphic3d_ZLayerId_TopOSD); // display object in overlay
|
||||
anObj->SetTransformPersistence (Graphic3d_TMF_2d, gp_Pnt (-1,-1,0)); // set 2d flag, coordinate origin is set to down-left corner
|
||||
aContext->Display (anObj); // display the object
|
||||
Handle(AIS_InteractiveContext) aContext = ...; //get AIS context
|
||||
Handle(AIS_InteractiveObject) anObj =...; //create an AIS object
|
||||
anObj->SetZLayer(Graphic3d_ZLayerId_TopOSD); //display object in overlay
|
||||
anObj->SetTransformPersistence (Graphic3d_TMF_2d, gp_Pnt (-1,-1,0)); //set 2d flag, coordinate origin is set to down-left corner
|
||||
aContext->Display (anObj); //display the object
|
||||
~~~~~
|
||||
|
||||
@subsection upgrade_occt700_userdraw UserDraw and Visual3d
|
||||
|
||||
#### Visual3d package
|
||||
|
||||
Package *Visual3d* implementing the intermediate layer between high-level *V3d* classes
|
||||
and low-level OpenGl classes for views and graphic structures management has been dropped.
|
||||
|
||||
The *OpenGl_View* inherits from the new class *Graphic3d_CView*.
|
||||
*Graphic3d_CView* is an interface class that declares abstract methods for managing displayed structures,
|
||||
display properties and a base layer code that implements computation
|
||||
and management of HLR (or more broadly speaking view-depended) structures.
|
||||
|
||||
In the new implementation it takes place of the eliminated *Visual3d_View*.
|
||||
As before the instance of *Graphic3d_CView* is still completely managed by *V3d_View* classes.
|
||||
It can be accessed through *V3d_View* interface but normally it should not be required as all its methods are completely wrapped.
|
||||
|
||||
In more details, a concrete specialization of *Graphic3d_CView* is created and returned by the graphical driver on request.
|
||||
Right after the creation the views are directly used for setting rendering properties and adding graphical structures to be displayed.
|
||||
|
||||
The rendering of graphics is possible after mapping a window and activating the view.
|
||||
The direct setting of properties obsoletes the use of intermediate structures with display parameter
|
||||
like *Visual3d_ContextView*, etc. This means that the whole package *Visual3d* becomes redundant.
|
||||
|
||||
The functionality previously provided by *Visual3d* package has been redesigned in the following way :
|
||||
- The management of display of structures has been moved from *Visual3d_ViewManager* into *Graphic3d_StructureManager*.
|
||||
- The class *Visual3d_View* has been removed. The management of computed structures has been moved into the base layer of *Graphi3d_CView*.
|
||||
- All intermediate structures for storing view parameters, e.g. *Visual3d_ContextView*, have been removed.
|
||||
The settings are now kept by instances of *Graphic3d_CView*.
|
||||
- The intermediate class *Visual3d_Light* has been removed. All light properties are stored in *Graphic3d_CLight* structure, which is directly accessed by instances of *V3d_Light* classes.
|
||||
- All necessary enumerations have been moved into *Graphic3d* package.
|
||||
|
||||
#### Custom OpenGL rendering and UserDraw
|
||||
|
||||
Old APIs based on global callback functions for creating *UserDraw* objects and for performing custom OpenGL rendering within the view have been dropped.
|
||||
*UserDraw* callbacks are no more required since *OpenGl_Group* now inherits *Graphic3d_Group* and thus can be accessed directly from *AIS_InteractiveObject*:
|
||||
|
||||
~~~~~
|
||||
//! Class implementing custom OpenGL element.
|
||||
class UserDrawElement : public OpenGl_Element {};
|
||||
|
||||
//! Implementation of virtual method AIS_InteractiveObject::Compute().
|
||||
void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
|
||||
const Handle(Prs3d_Presentation)& thePrs,
|
||||
const Standard_Integer theMode)
|
||||
{
|
||||
Graphic3d_Vec4 aBndMin (myCoords[0], myCoords[1], myCoords[2], 1.0f);
|
||||
Graphic3d_Vec4 aBndMax (myCoords[3], myCoords[4], myCoords[5], 1.0f);
|
||||
|
||||
// casting to OpenGl_Group should be always true as far as application uses OpenGl_GraphicDriver for rendering
|
||||
Handle(OpenGl_Group) aGroup = Handle(OpenGl_Group)::DownCast (thePrs->NewGroup());
|
||||
aGroup->SetMinMaxValues (aBndMin.x(), aBndMin.y(), aBndMin.z(),
|
||||
aBndMax.x(), aBndMax.y(), aBndMax.z());
|
||||
UserDrawElement* anElem = new UserDrawElement (this);
|
||||
aGroup->AddElement(anElem);
|
||||
|
||||
// invalidate bounding box of the scene
|
||||
thePrsMgr->StructureManager()->Update (thePrsMgr->StructureManager()->UpdateMode());
|
||||
}
|
||||
~~~~~
|
||||
|
||||
To perform a custom OpenGL code within the view, it is necessary to inherit from class *OpenGl_View*.
|
||||
See the following code sample:
|
||||
|
||||
~~~~~
|
||||
//! Custom view.
|
||||
class UserView : public OpenGl_View
|
||||
{
|
||||
public:
|
||||
//! Override rendering into the view.
|
||||
virtual void render (Graphic3d_Camera::Projection theProjection,
|
||||
OpenGl_FrameBuffer* theReadDrawFbo,
|
||||
const Standard_Boolean theToDrawImmediate)
|
||||
{
|
||||
OpenGl_View::render (theProjection, theReadDrawFbo, theToDrawImmediate);
|
||||
if (theToDrawImmediate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// perform custom drawing
|
||||
const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext();
|
||||
GLfloat aVerts[3] = { 0.0f, 0,0f, 0,0f };
|
||||
aCtx->core20->glEnableClientState(GL_VERTEX_ARRAY);
|
||||
aCtx->core20->glVertexPointer(3, GL_FLOAT, 0, aVerts);
|
||||
aCtx->core20->glDrawArrays(GL_POINTS, 0, 1);
|
||||
aCtx->core20->glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//! Custom driver for creating UserView.
|
||||
class UserDriver : public OpenGl_GraphicDriver
|
||||
{
|
||||
public:
|
||||
//! Create instance of own view.
|
||||
virtual Handle(Graphic3d_CView) CreateView (const Handle(Graphic3d_StructureManager)& theMgr) Standard_OVERRIDE
|
||||
{
|
||||
Handle(UserView) aView = new UserView (theMgr, this, myCaps, myDeviceLostFlag, &myStateCounter);
|
||||
myMapOfView.Add (aView);
|
||||
for (TColStd_SequenceOfInteger::Iterator aLayerIt (myLayerSeq); aLayerIt.More(); aLayerIt.Next())
|
||||
{
|
||||
const Graphic3d_ZLayerId aLayerID = aLayerIt.Value();
|
||||
const Graphic3d_ZLayerSettings& aSettings = myMapOfZLayerSettings.Find (aLayerID);
|
||||
aView->AddZLayer (aLayerID);
|
||||
aView->SetZLayerSettings (aLayerID, aSettings);
|
||||
}
|
||||
return aView;
|
||||
}
|
||||
};
|
||||
|
||||
~~~~~
|
||||
|
||||
@subsection upgrade_occt700_localcontext Deprecation of Local Context
|
||||
|
||||
The conception of Local Context has been deprecated.
|
||||
The related classes, e.g. *AIS_LocalContext*, and methods ( <i>AIS_InteractiveContext::OpenLocalContext()</i> and others) will be removed in a future OCCT release.
|
||||
|
||||
The main functionality provided by Local Context - selection of object subparts - can be now used within Neutral Point without opening any Local Context.
|
||||
|
||||
@subsection upgrade_occt700_separate_caf_visualisation Separation of visualization part from TKCAF
|
||||
|
||||
Visualization CAF attributes moved into new toolkit TKVCAF.
|
||||
If your application uses the classes from TPrsStd package then add link to TKVCAF library.
|
||||
|
||||
Verson numbers of BinOCAF and XmlOCAF formats are incremented; new files cannot be read by previous versions of OCCT.
|
||||
|
||||
For loading OCAF files saved by previous versions and containing attribute TPrsStd_AISPresentation it is necessary that environment variable CSF_MIGRATION_TYPES should be defined, pointing to file src/StdResources/MigrationSheet.txt.
|
||||
When using documents loaded from a file, make sure to call method TPrsStd_AISViewer::New() prior to accessing TPrsStd_AISPresentation attributes in this document (that method will create them).
|
||||
|
||||
|
||||
@subsection Correction of interpretation of Euler angles in gp_Quaternion
|
||||
|
||||
Conversion of gp_Quaternion to and from intrinsic Tait-Bryan angles (including gp_YawPitchRoll) is fixed.
|
||||
|
||||
Before that fix the sequence of rotation axes was opposite to intended; e.g. gp_YawPitchRoll (equivalent to gp_Intrinsic_ZYX) actually was defining intrinsic rotations around X, then Y, then Z.
|
||||
Now this is fixed, and rotations are made in correct order.
|
||||
|
||||
Applications that use gp_Quaternion to convert Yaw-Pitch-Roll angles (or other intrinsic Tait-Bryan sequences) may need to be updated to take this change into account.
|
||||
|
@@ -3,11 +3,6 @@
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
@image html /resources/occt_logo.png
|
||||
@image latex /resources/occt_logo.png
|
||||
@htmlonly</center>@endhtmlonly
|
||||
|
||||
@section OCCT_OVW_SECTION_1 Welcome
|
||||
|
||||
Welcome to Open CASCADE Technology (OCCT), a software development platform
|
||||
@@ -16,6 +11,12 @@ visualization. Most of OCCT functionality is available in the form of C++
|
||||
libraries. OCCT can be best applied in development of software dealing with 3D
|
||||
modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
http://www.opencascade.org
|
||||
@image html /resources/occt_logo.png
|
||||
@image latex /resources/occt_logo.png
|
||||
@htmlonly</center>@endhtmlonly
|
||||
|
||||
@section OCCT_OVW_SECTION_2 Copyrights
|
||||
|
||||
Open CASCADE Technology and all materials, including this documentation, is
|
||||
@@ -59,8 +60,8 @@ OPEN CASCADE S.A.S.
|
||||
|
||||
**Mac** and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
|
||||
|
||||
Acknowledgments
|
||||
-----------------
|
||||
Acknowledgements
|
||||
------------------
|
||||
|
||||
The following parties are acknowledged for producing tools which are used within
|
||||
Open CASCADE Technology libraries or for release preparation.
|
||||
@@ -115,7 +116,7 @@ implementation of 3D viewer. OpenGL specification is developed by the
|
||||
Khronos group, http://www.khronos.org/opengl/. OCCT code includes header
|
||||
file *glext.h* obtained from Khronos web site.
|
||||
|
||||
**VTK** -- The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
|
||||
**VTK** - The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, please, refer to VTK Homepage http://www.vtk.org/.
|
||||
|
||||
**Doxygen** developed by Dimitri van Heesch is open source documentation system for
|
||||
C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
|
||||
@@ -158,7 +159,7 @@ OCCT documentation is provided in several forms:
|
||||
which is a freeware and can be downloaded from the Adobe site.
|
||||
|
||||
- Full reference documentation covering all OCCT classes generated automatically by Doxygen
|
||||
software is provided in HTML format.
|
||||
software is provided in HTML format, in a separate package.
|
||||
Reference documentation is presented in **Modules --> Toolkits --> Packages --> Classes**
|
||||
logic structure with cross-references to all OCCT classes and complete in-browser search by all classes.
|
||||
|
||||
@@ -169,17 +170,42 @@ See @ref occt_dev_guides__documentation "OCCT Documentation Guide" for details o
|
||||
To generate HTML documentation from sources contained in *dox* subdirectory,
|
||||
you need to have Tcl and Doxygen 1.8.5 (or above) installed on your system.
|
||||
|
||||
Use script **gendoc** (batch file on Windows, shell script on Linux / Mac OSX) to generate documentation.
|
||||
In Tcl prompt, cd to OCCT root folder and run
|
||||
|
||||
To generate Overview documentation:
|
||||
tclsh> source dox/start.tcl
|
||||
|
||||
cmd> gendoc -overview
|
||||
On Windows you can also run batch script **gendoc.bat**.
|
||||
|
||||
To generate Reference manual:
|
||||
|
||||
cmd> gendoc -refman
|
||||
**Generation of reference documentation**
|
||||
|
||||
Run this command without arguments to get help on supported options.
|
||||
Reference documentation can be generated with help of WOK tool that
|
||||
is available for download from www.opencascade.org and dev.opencascade.org sites.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
* Doxygen version 1.8.5 or higher
|
||||
* Graphviz version 2.28.0 or higher
|
||||
|
||||
Run WOK (cd \<WOK_INSTALL_DIR\>/site folder):
|
||||
|
||||
* Using WOK TCL shell:
|
||||
> wok_tclsh.sh
|
||||
|
||||
* Using Emacs editor:
|
||||
> wok_emacs.sh
|
||||
|
||||
In the WOK prompt, step into your workbench:
|
||||
|
||||
> wokcd <your workbench>
|
||||
|
||||
In your workbench, use **wgendoc** command with –h argument to get information about arguments of **wgendoc** command:
|
||||
|
||||
> wgendoc -h
|
||||
|
||||
then run **wgendoc** command with required arguments, for instance:
|
||||
|
||||
> wgendoc -output=d:/occt/doc {-m=Draw Visualization}
|
||||
|
||||
@section OCCT_OVW_SECTION_5 Requirements
|
||||
|
||||
@@ -191,64 +217,90 @@ Linux (x86-64), MAC OS X (x86-64) and Android (4.0.4 armv7) platforms.
|
||||
The tables below describe the recommended hardware and software configurations
|
||||
for which OCCT is certified to work.
|
||||
|
||||
@subsection overview_req_os Operating System
|
||||
@subsection OCCT_OVW_SECTION_5_1 Linux
|
||||
|
||||
| OS | Versions |
|
||||
| --------- | ----------- |
|
||||
| Windows | 10, 8.1, 7 SP1, Vista SP2 |
|
||||
| Linux | Mandriva 2010, CentOS 6.3, Fedora 18, Ubuntu 14.10 - 15.10, Debian 6.0, Debian 7.0 |
|
||||
| OS X | 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion |
|
||||
| Android | 6.x, 5.x, 4.0.4+ |
|
||||
|
||||
@subsection overview_req_cpp C++ Compiler / IDE
|
||||
|
||||
| OS | Compiler |
|
||||
| --------- | ----------- |
|
||||
| Windows | Microsoft Visual Studio: 2010 SP1\*, 2012 Update 4, 2013 Update 5, 2015 <br> Intel C++ Composer XE 2013 SP1 |
|
||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||
| OS X | XCode 6 or newer |
|
||||
| Android | NDK r10, GNU gcc 4.8 or newer |
|
||||
|
||||
* VC++ 10 64-bit is used for regular testing and for building
|
||||
binary package of official release of OCCT on Windows.
|
||||
|
||||
@subsection overview_req_libs Third-party libraries
|
||||
|
||||
| Component | Requirement |
|
||||
| --------- | ----------- |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ <br> Direct3D 9 |
|
||||
| Qt (for samples and demos) | Desktop: Qt 4.8.6+ http://www.qt.io/download/ <br> Android: Qt 5.3.2+ http://www.qt.io/download/ |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.6.3+ http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Freetype (for text rendering) | freetype-2.5.3+ http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.16.0+ http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (optional, for export contents of OCCT viewer to vector formats) | gl2ps-1.3.8+ http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 4.x or 5.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1+ http://www.vtk.org/VTK/resources/software.html |
|
||||
|
||||
@subsection overview_req_hw Hardware
|
||||
|
||||
| Component | Requirement |
|
||||
| --------- | ----------- |
|
||||
| Operating System | Mandriva 2010, CentOS 5.5, CentOS 6.3, Fedora 17, Fedora 18, Ubuntu 13.04, Debian 6.0\* |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| Video card | See \ref overview_req_graphics |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ |
|
||||
| C++ | GNU gcc 4.0. - 4.7.3. |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (optional, for export contents of OCCT viewer to vector graphic files) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
|
||||
|
||||
On desktop, 3D viewer for optimal performance requires graphics processing unit (GPU) supporting OpenGL 3.3 or above.
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with GL_ARB_texture_buffer_object_rgb32 extension.
|
||||
Textures within ray tracing will be available only when GL_ARB_bindless_texture extension is provided by driver.
|
||||
* Debian 6.0 64 bit is a platform used for regular testing of contributions
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_2 Windows
|
||||
|
||||
| Operating System | Windows 8.1 / 7 SP1 / Vista SP2 / XP SP3 |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| Video card | See \ref overview_req_graphics |
|
||||
| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ |
|
||||
| C++ | Microsoft Visual Studio: 2005 SP1, 2008 SP1, 2010 SP1 \*, 2012 Update 3, 2013 <br>Intel C++ Composer XE 2013 SP1 |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
| VTK (for VTK Integration Services | VTK 6.1.0 http://www.vtk.org/VTK/resources/software.html |
|
||||
|
||||
* VC++ 10 64-bit is used for certification of contributions and for building
|
||||
binary package of official release of OCCT on Windows.
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_3 MAC OS X
|
||||
|
||||
| Operating System | OS X 10.10 Yosemite / 10.9 Mavericks / 10.8 Mountain Lion / 10.7 Lion / 10.6.8 Snow Leopard |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| Free disk space (complete installation) | 600 MB approx. |
|
||||
| C++ | XCode 3.2 or newer (4.x is recommended) |
|
||||
| TCL (for testing tools) | Tcl/Tk 8.5 or 8.6 http://www.tcl.tk/software/tcltk/download.html |
|
||||
| Qt (for demonstration tools) | Qt 4.8.6 http://qt-project.org/downloads |
|
||||
| Freetype (OCCT Text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
| FreeImage (Support of common graphic formats) | FreeImage 3.16.0 http://sourceforge.net/projects/freeimage/files |
|
||||
| gl2ps (Export contents of OCCT viewer to vector graphic file) | gl2ps-1.3.8 http://geuz.org/gl2ps/ |
|
||||
| Intel TBB (optional, for multithreaded algorithms) | TBB 3.x or 4.x http://www.threadingbuildingblocks.org/ |
|
||||
|
||||
@subsection OCCT_OVW_SECTION_5_4 Android
|
||||
|
||||
| Operating System | Android 4.0.4+ |
|
||||
| ----- | ----- |
|
||||
| Minimum memory | 512 MB, 1 GB recommended |
|
||||
| C++ | NDK r10, GNU gcc 4.8 or newer |
|
||||
| Qt (for demonstration tools) | Qt 5.3.2 http://qt-project.org/downloads |
|
||||
| Freetype (for text rendering) | freetype-2.5.3 http://sourceforge.net/projects/freetype/files/ |
|
||||
|
||||
@subsection overview_req_graphics Graphic cards
|
||||
|
||||
On desktop, 3D viewer requires graphic card or software implementation supporting OpenGL 1.1 or above. OpenGL 2.1+ is highly recommended.
|
||||
Ray tracing requires OpenGL 4.0+ or OpenGL 3.1+ with GL_ARB_texture_buffer_object_rgb32 extension. Textures within ray tracing will be available only when GL_ARB_bindless_texture extension is provided by driver.
|
||||
|
||||
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer. The ray tracing is not yet available on mobile platforms.
|
||||
Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
|
||||
|
||||
The following table lists graphic cards tested to work with OCCT.
|
||||
|
||||
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
|
||||
| Graphic card | Driver | OS | OpenGL (fixed pipeline) | OpenGL (shaders) | OpenGL (ray tracing) |
|
||||
| ---- | ---- | ---- | :----: | :----: | :----: |
|
||||
| NVIDIA GeForce GTX 650 | Driver 340.52, OpenGL 4.4 | Windows 7 64 bit | OK | OK | OK |
|
||||
| AMD/ATI RadeOn HD 7870 | Driver 14.100, OpenGL 4.4 | Windows 7 64-bit | OK | OK | OK |
|
||||
| Intel(R) HD Graphics 2500 | Driver 10.18.10.3621, OpenGL 4.0 | Windows 7 64 bit | OK | OK | limited (no textures) |
|
||||
| RadeOn 9600 | OpenGL 2.1.8454 | Windows XP 32-bit | OK | bad | unsupported by hardware |
|
||||
| NVIDIA GeForce 6600 GT | OpenGL 2.1 | Windows XP 32-bit | OK | OK | unsupported by hardware |
|
||||
| NVIDIA GeForce 320 | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | not yet supported by OCCT |
|
||||
| Apple software OpenGL | N/A | Mac OS X 10.6 / OS X 10.10 | OK | OK | N/A |
|
||||
| Mesa 10.2.4 (software emulator) | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
|
||||
| Mesa 10.2.4 \* | "Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)" OpenGL 3.0 | Windows 7 64 bit | OK | OK | unsupported by software |
|
||||
|
||||
* Mesa implementation of OpenGL is used for certification testing of OCCT
|
||||
|
||||
@section OCCT_OVW_SECTION_4 Installation
|
||||
|
||||
@@ -312,7 +364,7 @@ To run any Open CASCADE Technology application you need to set the environment v
|
||||
|
||||
You can define the environment variables with env.bat script located in the
|
||||
$CASROOT folder. This script accepts two arguments to be used:
|
||||
the version of Visual Studio (vc8 -- vc12) and the architecture (win32 or win64).
|
||||
the version of Visual Studio (vc8 - vc12) and the architecture (win32 or win64).
|
||||
|
||||
The additional environment settings necessary for compiling OCCT libraries and samples
|
||||
by Microsoft Visual Studio can be set using script custom.bat located in the same folder.
|
||||
@@ -530,6 +582,13 @@ The combination of these resources allows creating substantial applications.
|
||||
|
||||
**See also:** @ref occt__tutorial "OCCT Tutorial"
|
||||
|
||||
Voxel
|
||||
------
|
||||
|
||||
This is a demonstration application showing OCCT voxel models. It also includes a set of non-regression tests and other commands for testing this functionality (accessible only through TEST pre-processor definition).
|
||||
|
||||
**See also:** <a href="occt_voxels_wp.html">Voxels User's guide</a>
|
||||
|
||||
**Remarks:**
|
||||
|
||||
* Qt samples are available on all supported platforms;
|
||||
@@ -569,9 +628,9 @@ There are two samples are representing usage OCCT framework on Android mobile pl
|
||||
jniviewer
|
||||
@image html /overview/images/samples_java_android_occt.jpg
|
||||
@image latex /overview/images/samples_java_android_occt.jpg
|
||||
Java -- See \subpage samples_java_android_occt "Readme" for details.
|
||||
Java - See \subpage samples_java_android_occt "Readme" for details.
|
||||
|
||||
AndroidQt
|
||||
@image html /overview/images/samples_qml_android_occt.jpg
|
||||
@image latex /overview/images/samples_qml_android_occt.jpg
|
||||
Qt -- See \subpage samples_qml_android_occt "Readme" for details.
|
||||
Qt - See \subpage samples_qml_android_occt "Readme" for details.
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 40 KiB |