Compare commits
5 Commits
CR26907_2
...
CR0_extern
Author | SHA1 | Date | |
---|---|---|---|
|
2411731d34 | ||
|
40cf53299e | ||
|
c92a1d9864 | ||
|
054fcde1d8 | ||
|
305d92d7bf |
3
.gitattributes
vendored
@@ -37,9 +37,6 @@
|
||||
*.vrml eol=lf
|
||||
*.md eol=lf
|
||||
*.natvis eol=lf
|
||||
*.fs eol=lf
|
||||
*.vs eol=lf
|
||||
*.glsl eol=lf
|
||||
FILES eol=lf
|
||||
PACKAGES eol=lf
|
||||
EXTERNLIB eol=lf
|
||||
|
1
.gitignore
vendored
@@ -49,7 +49,6 @@ Release
|
||||
/*.m4
|
||||
/*.ac
|
||||
/*.sh
|
||||
/codeblocks.bat
|
||||
/custom.bat
|
||||
/autom4te.cache
|
||||
/build_configure
|
||||
|
@@ -1,3 +0,0 @@
|
||||
[bugtraq]
|
||||
url = https://tracker.dev.opencascade.org/view.php?id=%BUGID%
|
||||
logregex = "(\\s)(00|#)\\d+(?!\\w)\n(\\d+)"
|
719
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()
|
||||
@@ -24,48 +24,17 @@ endif()
|
||||
|
||||
if ("${BUILD_LIBRARY_TYPE}" STREQUAL "Shared")
|
||||
set (BUILD_SHARED_LIBS ON)
|
||||
|
||||
if (NOT DEFINED BUILD_SHARED_LIBRARY_NAME_POSTFIX)
|
||||
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX "" CACHE STRING "${BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
unset (BUILD_SHARED_LIBS)
|
||||
message (STATUS "Info: Only 3rdparty's header files are used for building of static OCCT libraries")
|
||||
unset (BUILD_SHARED_LIBRARY_NAME_POSTFIX)
|
||||
endif()
|
||||
|
||||
# the name of the project
|
||||
project (OCCT)
|
||||
|
||||
if (WIN32)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
endif()
|
||||
|
||||
# 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}")
|
||||
|
||||
# Regeneration of OCCT resource files
|
||||
set (BUILD_RESOURCES OFF CACHE BOOL "${BUILD_RESOURCES_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.
|
||||
@@ -73,281 +42,40 @@ if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration ge
|
||||
endif()
|
||||
|
||||
# enable extended messages of many OCCT algorithms
|
||||
if (((SINGLE_GENERATOR AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR NOT SINGLE_GENERATOR) AND (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore"))
|
||||
if (NOT BUILD_WITH_DEBUG)
|
||||
set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_WITH_DEBUG)
|
||||
endif()
|
||||
|
||||
if (BUILD_WITH_DEBUG)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
|
||||
set (OCCT_ALGO_EXTENDED_OUTPUT OFF CACHE BOOL "${OCCT_ALGO_EXTENDED_OUTPUT_DESCR}")
|
||||
if (OCCT_ALGO_EXTENDED_OUTPUT)
|
||||
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 default install directory for Windows
|
||||
if (WIN32 AND NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set (CMAKE_INSTALL_PREFIX "C:/opencascade-${OCC_VERSION_STRING_EXT}")
|
||||
endif()
|
||||
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${INSTALL_DIR}" INSTALL_DIR)
|
||||
set (INSTALL_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
# choose a variant of the layout of the install paths
|
||||
if (NOT INSTALL_DIR_LAYOUT)
|
||||
if (WIN32)
|
||||
set (INSTALL_DIR_LAYOUT "Windows" CACHE STRING "${INSTALL_DIR_LAYOUT_DESCR}" FORCE)
|
||||
else()
|
||||
set (INSTALL_DIR_LAYOUT "Unix" CACHE STRING "${INSTALL_DIR_LAYOUT_DESCR}" FORCE)
|
||||
endif()
|
||||
SET_PROPERTY(CACHE INSTALL_DIR_LAYOUT PROPERTY STRINGS Windows Unix)
|
||||
endif()
|
||||
|
||||
# check INSTALL_DIR_LAYOUT changes and update INSTALL_DIR_* paths if necessary
|
||||
if (NOT DEFINED INSTALL_DIR_LAYOUT_PREV)
|
||||
set (INSTALL_DIR_LAYOUT_PREV "${INSTALL_DIR_LAYOUT}" CACHE INTERNAL "" FORCE)
|
||||
elseif (NOT "${INSTALL_DIR_LAYOUT_PREV}" STREQUAL "${INSTALL_DIR_LAYOUT}")
|
||||
set (INSTALL_DIR_LAYOUT_PREV "${INSTALL_DIR_LAYOUT}" CACHE INTERNAL "" FORCE)
|
||||
# The structure of install folder should be reset due to changed layout
|
||||
OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS ()
|
||||
|
||||
# Unset INSTALL_DIR_WITH_VERSION on windows
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Windows")
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_WITH_VERSION)
|
||||
else()
|
||||
if (NOT DEFINED INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_WITH_VERSION OFF CACHE BOOL "${INSTALL_DIR_WITH_VERSION_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check CMAKE_INSTALL_PREFIX changes and update INSTALL_DIR if necessary
|
||||
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()
|
||||
|
||||
# check INSTALL_DIR changes and update CMAKE_INSTALL_PREFIX if necessary
|
||||
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)
|
||||
endif()
|
||||
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (NOT DEFINED INSTALL_DIR_WITH_VERSION_PREV)
|
||||
set (INSTALL_DIR_WITH_VERSION_PREV "${INSTALL_DIR_WITH_VERSION}" CACHE INTERNAL "" FORCE)
|
||||
elseif (NOT "${INSTALL_DIR_WITH_VERSION_PREV}" STREQUAL "${INSTALL_DIR_WITH_VERSION}")
|
||||
# INSTALL_DIR_WITH_VERSION has been changed at previous step
|
||||
set (INSTALL_DIR_WITH_VERSION_PREV "${INSTALL_DIR_WITH_VERSION}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS ()
|
||||
endif()
|
||||
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_DIR_BIN for win.
|
||||
# Leave library structure for win: <prefix>/win64/vc10/bin(d)
|
||||
if (NOT DEFINED INSTALL_DIR_BIN)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_BIN "bin" CACHE PATH "${INSTALL_DIR_BIN_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_BIN "${OS_WITH_BIT}/${COMPILER}/bin" CACHE PATH "${INSTALL_DIR_BIN_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define folder contaning all shell/batch scripts
|
||||
if (NOT DEFINED INSTALL_DIR_SCRIPT)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_SCRIPT "${INSTALL_DIR_BIN}" CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_SCRIPT "." CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||
if (NOT DEFINED INSTALL_DIR_LIB)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_LIB "lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_LIB "${OS_WITH_BIT}/${COMPILER}/lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT headers: <prefix>/inc for windows,
|
||||
# <prefix>/include/opencascade-7.0.0 for unix
|
||||
if (NOT DEFINED INSTALL_DIR_INCLUDE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_INCLUDE "include/opencascade" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_INCLUDE "include/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_INCLUDE "inc" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT resources: <prefix>/src for windows,
|
||||
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||
if (NOT DEFINED INSTALL_DIR_RESOURCE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_RESOURCE "share/opencascade/resources" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_RESOURCE "share/opencascade-${OCC_VERSION_STRING_EXT}/resources" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_RESOURCE "src" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT data
|
||||
if (NOT DEFINED INSTALL_DIR_DATA)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_DATA "share/opencascade/data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_DATA "share/opencascade-${OCC_VERSION_STRING_EXT}/data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_DATA "data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT samples
|
||||
if (NOT DEFINED INSTALL_DIR_SAMPLES)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_SAMPLES "share/opencascade/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_SAMPLES "share/opencascade-${OCC_VERSION_STRING_EXT}/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_SAMPLES "samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT tests
|
||||
if (NOT DEFINED INSTALL_DIR_TESTS)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_TESTS "share/opencascade/tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_TESTS "share/opencascade-${OCC_VERSION_STRING_EXT}/tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_TESTS "tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OCCT doc
|
||||
if (NOT DEFINED INSTALL_DIR_DOC)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set (INSTALL_DIR_DOC "share/doc/opencascade" CACHE PATH "${INSTALL_DIR_DOC_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_DOC "share/doc/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_DOC_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_DOC "doc" CACHE PATH "${INSTALL_DIR_DOC_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# define folder contaning CMake configuration files
|
||||
if (NOT DEFINED INSTALL_DIR_CMAKE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_CMAKE "lib/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_CMAKE "lib/cmake/opencascade" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
set (INSTALL_DIR_CMAKE "cmake" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_resources")
|
||||
|
||||
# install LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt files
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR_DOC}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR_DOC}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" ".")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" ".")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set (INSTALL_NAME_DIR "" CACHE STRING "install_name library suffix on OS X (e.g. @executable_path/../Frameworks)")
|
||||
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}")
|
||||
separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
|
||||
|
||||
if (MSVC)
|
||||
set (BUILD_MODULE_MfcSamples OFF CACHE BOOL "${BUILD_MODULE_MfcSamples_DESCR}")
|
||||
endif()
|
||||
|
||||
# uwp sample
|
||||
if (MSVC)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
set (BUILD_MODULE_UwpSample OFF CACHE BOOL "${BUILD_MODULE_UwpSample_DESCR}")
|
||||
else()
|
||||
unset (BUILD_MODULE_UwpSample)
|
||||
endif()
|
||||
set (BUILD_MODULE_OcctMfcSamples OFF CACHE BOOL "${BUILD_MODULE_OcctMfcSamples_DESCR}")
|
||||
endif()
|
||||
|
||||
# whether use optional 3rdparty or not
|
||||
if (APPLE)
|
||||
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
||||
endif()
|
||||
|
||||
# Enable/Disable the floating point exceptions (FPE) during runtime.
|
||||
if (NOT BUILD_ENABLE_FPE_SIGNAL_HANDLER)
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER OFF CACHE BOOL "${BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR}" FORCE)
|
||||
endif()
|
||||
set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
|
||||
|
||||
if (BUILD_ENABLE_FPE_SIGNAL_HANDLER)
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 1)
|
||||
else()
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
|
||||
endif()
|
||||
# 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
|
||||
@@ -362,22 +90,13 @@ 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()
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND BUILD_MODULE_Draw)
|
||||
message (STATUS "Info. Draw module is turned off due to it is not supported on UWP")
|
||||
set (BUILD_MODULE_Draw OFF CACHE BOOL "${BUILD_MODULE_Draw_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
# Overview
|
||||
if (NOT DEFINED BUILD_DOC_Overview)
|
||||
set (DO_ONLY_CHECK_FOR_DOXYGEN ON)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||
set (DO_ONLY_CHECK_FOR_DOXYGEN OFF)
|
||||
|
||||
if (CAN_DOXYGEN_BE_USED)
|
||||
message (STATUS "Info. Overview building is turned on")
|
||||
endif()
|
||||
set (BUILD_DOC_OcctOverview OFF CACHE BOOL "${BUILD_DOC_OcctOverview_DESCR}")
|
||||
|
||||
set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
|
||||
if (NOT USE_VTK)
|
||||
list (REMOVE_ITEM Visualization_TOOLKITS TKIVtk)
|
||||
list (REMOVE_ITEM Draw_TOOLKITS TKIVtkDraw)
|
||||
endif()
|
||||
|
||||
if (NOT USE_D3D)
|
||||
@@ -402,7 +121,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()
|
||||
@@ -415,49 +134,23 @@ 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}")
|
||||
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)
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
# search for CSF variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGE)
|
||||
# search for CSF_TclLibs variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_GLES2)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_GL2PS CAN_USE_GL2PS)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
|
||||
|
||||
# define CSF variable
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
|
||||
|
||||
if (USE_TCL)
|
||||
message (STATUS "Info: TCL is used by OCCT")
|
||||
@@ -473,6 +166,9 @@ else()
|
||||
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)
|
||||
message (STATUS "Info: Freetype is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
|
||||
@@ -489,13 +185,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()
|
||||
#OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
|
||||
endif()
|
||||
|
||||
# D3D
|
||||
@@ -513,52 +203,36 @@ if (USE_GLX)
|
||||
endif()
|
||||
|
||||
# FREEIMAGE
|
||||
# search for CSF_FREEIMAGE variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FREEIMAGE CAN_USE_FREEIMAGE)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGEPLUS)
|
||||
|
||||
if (CAN_USE_FREEIMAGE)
|
||||
if (CAN_USE_FREEIMAGE OR CAN_USE_FREEIMAGEPLUS)
|
||||
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
|
||||
|
||||
if (USE_FREEIMAGE)
|
||||
add_definitions (-DHAVE_FREEIMAGE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimage")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimageplus")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_FREEIMAGE")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
endif()
|
||||
|
||||
# OpenGL ES 2.0
|
||||
if (WIN32 AND CAN_USE_GLES2)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
set (USE_GLES2 ON)
|
||||
else()
|
||||
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
|
||||
endif()
|
||||
|
||||
if (USE_GLES2)
|
||||
add_definitions (-DHAVE_GLES2)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_GLES2")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
|
||||
endif()
|
||||
|
||||
# GL2PS
|
||||
# search for CSF_GL2PS variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_GL2PS CAN_USE_GL2PS)
|
||||
|
||||
if (NOT DEFINED ANDROID AND CAN_USE_GL2PS)
|
||||
set (USE_GL2PS OFF CACHE BOOL "${USE_GL2PS_DESCR}")
|
||||
|
||||
@@ -577,6 +251,9 @@ else()
|
||||
endif()
|
||||
|
||||
# TBB
|
||||
# search for CSF_TBB variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
|
||||
|
||||
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
|
||||
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
|
||||
|
||||
@@ -596,54 +273,35 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
|
||||
endif()
|
||||
|
||||
# EIGEN
|
||||
if (CAN_USE_EIGEN)
|
||||
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
|
||||
|
||||
if (USE_EIGEN)
|
||||
add_definitions (-DHAVE_EIGEN)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("USE_EIGEN")
|
||||
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EIGEN")
|
||||
endif()
|
||||
|
||||
# Doxygen
|
||||
if (BUILD_DOC_Overview)
|
||||
if (NOT DEFINED INSTALL_DOC_Overview)
|
||||
set (INSTALL_DOC_Overview OFF CACHE BOOL "${INSTALL_DOC_Overview_DESCR}")
|
||||
if (BUILD_DOC_OcctOverview)
|
||||
if (NOT DEFINED INSTALL_DOC_OcctOverview)
|
||||
set (INSTALL_DOC_OcctOverview OFF CACHE BOOL "${INSTALL_DOC_OcctOverview_DESCR}")
|
||||
endif()
|
||||
|
||||
if (INSTALL_DOC_Overview)
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR_DOC}")
|
||||
if (INSTALL_DOC_OcctOverview)
|
||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/doc")
|
||||
|
||||
# create overview.html only for windows
|
||||
if (WIN32 AND "${INSTALL_DIR_LAYOUT}" STREQUAL "Windows")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR_DOC}/..")
|
||||
endif()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_DOC_Overview")
|
||||
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")
|
||||
@@ -659,30 +317,25 @@ 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: \n\t${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
include_directories (${3RDPARTY_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# include <cmake binary folder>/inc
|
||||
include_directories (${CMAKE_BINARY_DIR}/inc)
|
||||
|
||||
if (3RDPARTY_LIBRARY_DIRS AND BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
|
||||
message (STATUS "Info: The directories of 3rdparty libraries: \n\t${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# build directories
|
||||
if (SINGLE_GENERATOR)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
endif()
|
||||
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")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
@@ -701,6 +354,15 @@ if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
|
||||
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()
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
|
||||
@@ -710,10 +372,15 @@ 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")
|
||||
|
||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
||||
if (${DRAWEXE_INDEX} GREATER -1)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
||||
|
||||
if (INSTALL_OCCT_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (INSTALL_OCCT_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
@@ -722,95 +389,74 @@ else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
# OCCT samples
|
||||
# get absolute path from INSTALL_DIR
|
||||
set (INSTALL_DIR_ABSOLUTE "${INSTALL_DIR}")
|
||||
if(NOT IS_ABSOLUTE "${INSTALL_DIR_ABSOLUTE}")
|
||||
get_filename_component(INSTALL_DIR_ABSOLUTE "${CMAKE_BINARY_DIR}/${INSTALL_DIR}" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
if (INSTALL_SAMPLES)
|
||||
OCCT_CONFIGURE ("adm/templates/env.samples.${SCRIPT_EXT}.in" "env.samples.${SCRIPT_EXT}")
|
||||
if (WIN32)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/xaml" "${INSTALL_DIR_SAMPLES}")
|
||||
endif()
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/CSharp" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/mfc/standard" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
if (INSTALL_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests/" "${INSTALL_DIR_TESTS}")
|
||||
endif()
|
||||
|
||||
list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
|
||||
if (${DRAWEXE_INDEX} GREATER -1)
|
||||
# copy data and samples/tcl folders to install script folder
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
# 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_DIR_SCRIPT}"
|
||||
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_DIR_SCRIPT}"
|
||||
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}")
|
||||
# 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_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
|
||||
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}\" %1 %2 %3 \n)")
|
||||
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_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/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_DIR}/${INSTALL_DIR_SCRIPT}/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_DIR_SCRIPT}")
|
||||
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_DIR_SCRIPT}")
|
||||
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_MfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
|
||||
if (BUILD_MODULE_OcctMfcSamples)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
# env script for draw in building environment
|
||||
OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
|
||||
# install env script
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}")
|
||||
# end script for draw in standalone environment
|
||||
# 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 (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 (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")
|
||||
@@ -823,23 +469,21 @@ 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_DIR_RESOURCE}/${RESOURCE_FOLDER}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src/${RESOURCE_FOLDER}")
|
||||
else()
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR_RESOURCE}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# patch installed DrawDefault file if BUILD_SHARED_LIBRARY_NAME_POSTFIX is changed
|
||||
if (NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
OCCT_UPDATE_DRAW_DEFAULT_FILE()
|
||||
endif()
|
||||
# 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}")
|
||||
endforeach()
|
||||
|
||||
if (BUILD_DOC_Overview)
|
||||
if (BUILD_DOC_OcctOverview)
|
||||
OCCT_ADD_SUBDIRECTORY (dox)
|
||||
endif()
|
||||
|
||||
@@ -865,7 +509,7 @@ if (MSVC AND 3RDPARTY_DLL_DIRS)
|
||||
endif()
|
||||
|
||||
# samples do not support patch usage
|
||||
if (BUILD_MODULE_MfcSamples)
|
||||
if (BUILD_MODULE_OcctMfcSamples)
|
||||
set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
|
||||
set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
|
||||
@@ -883,116 +527,3 @@ if (BUILD_MODULE_MfcSamples)
|
||||
add_subdirectory(samples/mfc/standard/09_Animation)
|
||||
add_subdirectory(samples/mfc/standard/10_Convert)
|
||||
endif()
|
||||
|
||||
if (BUILD_MODULE_UwpSample)
|
||||
add_subdirectory(samples/xaml)
|
||||
endif()
|
||||
|
||||
# Prepare variables for configuration of OpenCASCADE cmake config file
|
||||
set (OCCT_MODULES_ENABLED)
|
||||
set (OCCT_LIBRARIES)
|
||||
set (SET_OpenCASCADE_MODULES_TOOLKITS "\n# List of available OpenCASCADE libraries for each module\n")
|
||||
set (OCCT_COMPILE_DEFINITIONS)
|
||||
|
||||
foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS})
|
||||
if (TARGET ${OCCT_TOOLKIT})
|
||||
|
||||
# get all libraries
|
||||
get_target_property (${OCCT_TOOLKIT}_TYPE ${OCCT_TOOLKIT} "TYPE")
|
||||
if ("${${OCCT_TOOLKIT}_TYPE}" STREQUAL "STATIC_LIBRARY" OR "${${OCCT_TOOLKIT}_TYPE}" STREQUAL "SHARED_LIBRARY" )
|
||||
list (APPEND OCCT_LIBRARIES ${OCCT_TOOLKIT})
|
||||
|
||||
# get all modules
|
||||
get_target_property (${OCCT_TOOLKIT}_MODULE ${OCCT_TOOLKIT} "MODULE")
|
||||
list (APPEND OCCT_MODULES_ENABLED ${${OCCT_TOOLKIT}_MODULE})
|
||||
list (APPEND OpenCASCADE_${${OCCT_TOOLKIT}_MODULE}_TOOLKITS ${OCCT_TOOLKIT})
|
||||
|
||||
# get compile definitions of target directory
|
||||
get_directory_property (COMPILE_DEFINITIONS DIRECTORY "${${OCCT_TOOLKIT}_SOURCE_DIR}" "COMPILE_DEFINITIONS")
|
||||
list (APPEND OCCT_COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED)
|
||||
list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
|
||||
|
||||
# export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
|
||||
foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
|
||||
set (SET_OpenCASCADE_COMPILE_DEFINITIONS)
|
||||
string (TOUPPER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_UPPER)
|
||||
string (TOLOWER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_LOWER)
|
||||
foreach(COMPILE_DEFINITION ${OCCT_COMPILE_DEFINITIONS})
|
||||
string(REPLACE "(" "\\(" COMPILE_DEFINITION "${COMPILE_DEFINITION}")
|
||||
string(REPLACE ")" "\\)" COMPILE_DEFINITION "${COMPILE_DEFINITION}")
|
||||
set (SET_OpenCASCADE_COMPILE_DEFINITIONS "${SET_OpenCASCADE_COMPILE_DEFINITIONS}set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${OCCT_CONFIGURATION}>:${COMPILE_DEFINITION}>)\n")
|
||||
endforeach()
|
||||
set (SET_OpenCASCADE_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
||||
set (SET_OpenCASCADE_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY)
|
||||
endforeach()
|
||||
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
|
||||
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
||||
install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
|
||||
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
if (BUILD_MODULE_${OCCT_MODULE})
|
||||
set (SET_OpenCASCADE_MODULES_TOOLKITS "${SET_OpenCASCADE_MODULES_TOOLKITS}set (OpenCASCADE_${OCCT_MODULE}_LIBRARIES ${OpenCASCADE_${OCCT_MODULE}_TOOLKITS})\n")
|
||||
endif()
|
||||
|
||||
# sort enabled modules for correct work of OpenCASCADE config file
|
||||
list(FIND OCCT_MODULES_ENABLED "${OCCT_MODULE}" OCCT_MODULE_INDEX)
|
||||
if (NOT ${OCCT_MODULE_INDEX} EQUAL -1)
|
||||
list (APPEND OCCT_MODULES_ENABLED_SORTED ${OCCT_MODULE})
|
||||
endif()
|
||||
endforeach()
|
||||
set (OCCT_MODULES_ENABLED ${OCCT_MODULES_ENABLED_SORTED})
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
export (TARGETS ${OCCT_LIBRARIES} FILE "${CMAKE_BINARY_DIR}/OpenCASCADETargets.cmake")
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
export(PACKAGE OpenCASCADE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set (SET_OpenCASCADE_BUILD_TYPE "set (OpenCASCADE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (SET_OpenCASCADE_LINKER_FLAGS "set (OpenCASCADE_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS}\")")
|
||||
else()
|
||||
set (SET_OpenCASCADE_LINKER_FLAGS "set (OpenCASCADE_LINKER_FLAGS \"${CMAKE_STATIC_LINKER_FLAGS}\")")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (SET_OpenCASCADE_WITH_D3D "set (OpenCASCADE_WITH_D3D ${USE_D3D})")
|
||||
endif()
|
||||
if (APPLE)
|
||||
set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX ${USE_GLX})")
|
||||
endif()
|
||||
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
OCCT_INSERT_CODE_FOR_TARGET()
|
||||
endif()
|
||||
|
||||
# Configure and install cmake config file
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Configure cmake version file
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file( ${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake
|
||||
VERSION ${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}
|
||||
COMPATIBILITY ExactVersion )
|
||||
|
||||
# Install cmake version file
|
||||
install (FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfigVersion.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Install the export set for use with the install-tree for each configuration
|
||||
foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
|
||||
install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
endforeach()
|
||||
|
||||
# Update generated OpenCASCADETargets-*.cmake files
|
||||
# to have correct paths to libraries depending on the configuration
|
||||
OCCT_UPDATE_TARGET_FILE ()
|
||||
|
0
LICENSE_LGPL_21.txt
Normal file → Executable file
19
README.txt
@@ -29,23 +29,24 @@ Packaging
|
||||
|
||||
You can receive certified version of OCCT code in different packages.
|
||||
|
||||
- Snapshot of Git repository: contains C++ header and source files of OCCT,
|
||||
documentation sources, build scripts, and CMake project files.
|
||||
- Snapshot of Git repository: contains only bare sources of OCCT; many C++
|
||||
files, HTML documentation, and project files / makefiles for building OCCT
|
||||
need to be generated.
|
||||
|
||||
- Complete source archive: contains all sources of OCCT, generated HTML and PDF
|
||||
documentation, and ready-to-use projects for building on all officially
|
||||
supported platforms.
|
||||
- Complete source archive: contains all sources of OCCT, including C++ files
|
||||
generated by WOK, HTML and PDF documentation, and projects / makefiles for
|
||||
building on all officially supported platforms.
|
||||
|
||||
- Binary package (platform-specific): in addition to complete source archive,
|
||||
it includes binaries of OCCT and third-party libraries built on one platform.
|
||||
This package allows using OCCT immediately after installation.
|
||||
|
||||
Certified versions of OCCT can be downloaded from http://www.opencascade.com
|
||||
Certified versions of OCCT can be downloaded from http://www.opencascade.org
|
||||
|
||||
You can also find OCCT pre-installed on your system, or install it from
|
||||
packages provided by a third party. Note that packaging and functionality
|
||||
of such versions can be different from certified releases. Please consult
|
||||
documentation accompanying your version for details.
|
||||
documentation accompanyog your version for details.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
@@ -58,8 +59,8 @@ If HTML documentation is not available in your package, you can:
|
||||
|
||||
You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system.
|
||||
and accessible in your environment (check environment variable PATH).
|
||||
Use batch file *gendoc.bat* on Windows or Bash script *gendoc* on Linux
|
||||
or OS X to (re)generate documentation.
|
||||
Run batch file *gendoc.bat* on Windows or Bash scriot *gendoc.sh* on Linux
|
||||
or Mac OS X to (re)generate documentation.
|
||||
|
||||
- Read documentation in source plain text (MarkDown) format found in
|
||||
subfolder *dox*
|
||||
|
@@ -2,6 +2,6 @@ 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 TKTObj TKBinTObj TKXmlTObj TKVCAF
|
||||
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
|
@@ -6,5 +6,6 @@ Shaders
|
||||
XSMessage
|
||||
XSTEPResource
|
||||
XmlOcafResource
|
||||
UnitsAPI/Lexi_Expr.dat
|
||||
UnitsAPI/Units.dat
|
||||
TObj/TObj.msg
|
21
adm/UDLIST
@@ -5,6 +5,7 @@ n Bnd
|
||||
n BVH
|
||||
n CSLib
|
||||
n Convert
|
||||
n Dico
|
||||
n ElCLib
|
||||
n ElSLib
|
||||
n Expr
|
||||
@@ -236,19 +237,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 StdObject
|
||||
n StdPersistent
|
||||
n StdStorage
|
||||
n ShapePersistent
|
||||
n TDF
|
||||
n TDataStd
|
||||
n TDataXtd
|
||||
@@ -265,9 +260,11 @@ n XmlMDataXtd
|
||||
n XmlMDocStd
|
||||
n XmlMFunction
|
||||
n XmlMNaming
|
||||
n XmlMPrsStd
|
||||
n XmlObjMgt
|
||||
r StdResource
|
||||
r XmlOcafResource
|
||||
t FWOSPlugin
|
||||
|
||||
t TKBin
|
||||
t TKBinL
|
||||
@@ -276,8 +273,6 @@ t TKCAF
|
||||
t TKCDF
|
||||
t TKLCAF
|
||||
|
||||
t TKStdL
|
||||
t TKStd
|
||||
t TKTObj
|
||||
t TKXml
|
||||
t TKXmlL
|
||||
@@ -399,6 +394,9 @@ n HLRTest
|
||||
n MeshTest
|
||||
n SWDRAW
|
||||
n TObjDRAW
|
||||
n TestTopOpe
|
||||
n TestTopOpeDraw
|
||||
n TestTopOpeTools
|
||||
n ViewerTest
|
||||
n XDEDRAW
|
||||
n XSDRAW
|
||||
@@ -433,6 +431,3 @@ n IVtkTools
|
||||
t TKIVtk
|
||||
n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
n XCAFView
|
@@ -6,9 +6,9 @@ endif()
|
||||
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
|
||||
|
||||
|
||||
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME_DEBUG_SUFFIX)
|
||||
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
|
||||
|
||||
if (NOT DEFINED INSTALL_${PRODUCT_NAME} AND BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
|
||||
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
|
||||
endif()
|
||||
|
||||
@@ -37,57 +37,51 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
|
||||
endif()
|
||||
|
||||
separate_arguments (${LIBRARY_CSF_NAME})
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME "${LIBRARY_NAME}")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
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)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME})
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${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")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||
endif()
|
||||
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)
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME})
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
|
||||
endif()
|
||||
endif()
|
||||
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()
|
||||
|
||||
# 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}")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
|
||||
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}_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
else()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||
else()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
|
||||
endif()
|
||||
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} 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")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# header
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
|
||||
@@ -115,179 +109,141 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
|
||||
endif()
|
||||
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
# 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_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${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_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
endif()
|
||||
|
||||
# shared library
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
|
||||
|
||||
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_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "")
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "")
|
||||
endif()
|
||||
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
if (WIN32)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${3RDPARTY_${PRODUCT_NAME}_DLL_DIRS}")
|
||||
else()
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "")
|
||||
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} REALPATH)
|
||||
|
||||
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${GL2PSLIB}.1)
|
||||
else()
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
|
||||
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
|
||||
else()
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
|
||||
if (ANDROID)
|
||||
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# 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}")
|
||||
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}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
|
||||
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
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)
|
||||
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)
|
||||
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()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
|
||||
else()
|
||||
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
endmacro()
|
||||
|
||||
macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
|
||||
@@ -301,52 +257,48 @@ macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# check library
|
||||
# library dir
|
||||
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()
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# check shared library
|
||||
# shared library dir
|
||||
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()
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
endif()
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
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()
|
||||
|
@@ -1,58 +1,42 @@
|
||||
# doxygen
|
||||
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
|
||||
|
||||
if (DO_ONLY_CHECK_FOR_DOXYGEN)
|
||||
message (STATUS "Info. Detecting doxygen")
|
||||
set (DOXYGEN_SKIP_DOT ON)
|
||||
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
|
||||
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "The Path to the doxygen command")
|
||||
endif()
|
||||
|
||||
set (CAN_DOXYGEN_BE_USED OFF)
|
||||
if (DOXYGEN_EXECUTABLE)
|
||||
set (CAN_DOXYGEN_BE_USED ON)
|
||||
message (STATUS "Info. Doxygen is found and can be used")
|
||||
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_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOXYGEN_DOT_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_DOXYGEN_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOXYGEN_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 "The Path to the doxygen command" FORCE)
|
||||
endif()
|
||||
else()
|
||||
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}")
|
||||
|
||||
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()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
|
||||
endif()
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
set (3RDPARTY_SKIP_DOT_EXECUTABLE ON CACHE BOOL "Skip trying to find Dot")
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
|
||||
|
||||
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
|
||||
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
|
||||
|
||||
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
|
||||
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" 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)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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)
|
||||
endif()
|
||||
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()
|
||||
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# EGL
|
||||
|
||||
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlLibs" "")
|
@@ -1,71 +0,0 @@
|
||||
# eigen
|
||||
|
||||
# eigen directory
|
||||
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
|
||||
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
|
||||
endif()
|
||||
|
||||
# search for eigen in user defined directory
|
||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||
if (NOT 3RDPARTY_EIGEN_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" Eigen EIGEN_DIR_NAME)
|
||||
if (EIGEN_DIR_NAME)
|
||||
set (3RDPARTY_EIGEN_DIR "${3RDPARTY_DIR}/${EIGEN_DIR_NAME}" CACHE PATH "The directory containing eigen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_EIGEN_INCLUDE_DIR)
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the EIGEN")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
|
||||
set (HEADER_NAMES Eigen)
|
||||
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "3RDPARTY_EIGEN_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATHS ${3RDPARTY_EIGEN_DIR}
|
||||
PATH_SUFFIXES include eigen3 include/eigen3
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||
PATH_SUFFIXES include eigen3 include/eigen3
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
# use default (CMake) EIGEN search
|
||||
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
# use 3RDPARTY_EIGEN_DIR if it is specified for eigen search
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
set (CACHED_EIGEN_DIR $ENV{Eigen3_DIR})
|
||||
set (ENV{Eigen3_DIR} "${3RDPARTY_EIGEN_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Eigen3 QUIET)
|
||||
|
||||
# restore ENV{Eigen3_DIR}
|
||||
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
|
||||
set (ENV{Eigen3_DIR} ${CACHED_EIGEN_DIR})
|
||||
endif()
|
||||
|
||||
if (${EIGEN3_FOUND})
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
set (3RDPARTY_EIGEN_DIR "${EIGEN3_ROOT_DIR}" CACHE PATH "The directory containing eigen" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)
|
||||
|
||||
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE PATH "the path to Eigen header file" FORCE)
|
||||
endif()
|
||||
|
||||
# unset all redundant variables
|
||||
OCCT_CHECK_AND_UNSET(Eigen3_DIR)
|
@@ -1,3 +1,3 @@
|
||||
#freeimage
|
||||
|
||||
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "CSF_FreeImagePlus" "d")
|
||||
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage" "freeimaged")
|
9
adm/cmake/freeimageplus.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
#freeimageplus
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_FREEIMAGE_DIR AND NOT 3RDPARTY_FREEIMAGEPLUS_DIR)
|
||||
set (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}" CACHE PATH "The directory containing freeimageplus" FORCE)
|
||||
endif()
|
||||
|
||||
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus" "freeimageplusd")
|
||||
endif()
|
@@ -1,6 +1,6 @@
|
||||
# freetype
|
||||
|
||||
if (NOT DEFINED INSTALL_FREETYPE AND BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED INSTALL_FREETYPE)
|
||||
set (INSTALL_FREETYPE OFF CACHE BOOL "${INSTALL_FREETYPE_DESCR}")
|
||||
endif()
|
||||
|
||||
@@ -37,25 +37,23 @@ if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
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)
|
||||
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)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
|
||||
endif()
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "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)
|
||||
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)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -63,25 +61,24 @@ endif()
|
||||
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")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
|
||||
|
||||
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)
|
||||
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_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()
|
||||
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -121,9 +118,7 @@ if (IS_BUILTIN_SEARCH_REQUIRED)
|
||||
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")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
|
||||
endif()
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
|
||||
endif()
|
||||
|
||||
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
|
||||
@@ -139,19 +134,17 @@ if (IS_BUILTIN_SEARCH_REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
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()
|
||||
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()
|
||||
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()
|
||||
|
||||
@@ -218,132 +211,121 @@ else()
|
||||
endif()
|
||||
|
||||
# freetype library
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
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 (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)
|
||||
# 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_LIBRARY ${CSF_FREETYPE}
|
||||
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
NO_DEFAULT_PATH)
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype
|
||||
PATHS "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
|
||||
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype
|
||||
PATH_SUFFIXES bin)
|
||||
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)
|
||||
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_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
|
||||
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# freetype shared library
|
||||
|
||||
# install instructions
|
||||
if (INSTALL_FREETYPE)
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
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)
|
||||
|
||||
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 ${CSF_FREETYPE}
|
||||
PATHS "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
|
||||
PATH_SUFFIXES bin)
|
||||
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)
|
||||
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
endif()
|
||||
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 instructions
|
||||
if (INSTALL_FREETYPE)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
|
||||
endif()
|
||||
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -352,12 +334,4 @@ OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
|
||||
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
|
||||
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL)
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL_DIR)
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
OCCT_CHECK_AND_UNSET(INSTALL_FREETYPE)
|
||||
endif()
|
||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#GL2PS
|
||||
|
||||
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "CSF_GL2PS" "d")
|
||||
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps" "gl2psd")
|
@@ -1,3 +0,0 @@
|
||||
# OpenGL ES 2.0
|
||||
|
||||
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlLibs" "")
|
@@ -1,4 +1,3 @@
|
||||
# glx
|
||||
|
||||
separate_arguments (CSF_OpenGlLibs)
|
||||
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "CSF_OpenGlLibs" "d")
|
||||
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "GL" "GLd")
|
@@ -10,65 +10,48 @@ if (NOT DEFINED USE_TCL)
|
||||
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
|
||||
endif()
|
||||
|
||||
# TBB
|
||||
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_VTK AND NOT 3RDPARTY_VTK_REQUIRED_LIBRARIES)
|
||||
message (WARNING "CSF_VTK specification: VTK libraries are not defined")
|
||||
endif()
|
||||
|
||||
if (USE_TBB)
|
||||
set (CSF_TBB "tbb tbbmalloc")
|
||||
else()
|
||||
set (CSF_TBB)
|
||||
endif()
|
||||
|
||||
# FREETYPE
|
||||
if (USE_FREETYPE)
|
||||
set (CSF_FREETYPE "freetype")
|
||||
else()
|
||||
set (CSF_FREETYPE)
|
||||
endif()
|
||||
|
||||
# FREEIMAGE
|
||||
if (USE_FREEIMAGE)
|
||||
set (CSF_FreeImagePlus "freeimage")
|
||||
else()
|
||||
set (CSF_FreeImagePlus)
|
||||
endif()
|
||||
|
||||
# TCL/TK
|
||||
if (USE_TCL)
|
||||
if (WIN32)
|
||||
set (CSF_TclLibs "tcl86")
|
||||
set (CSF_TclTkLibs "tk86")
|
||||
else()
|
||||
if(APPLE)
|
||||
set (CSF_TclTkLibs Tk)
|
||||
set (CSF_TclLibs Tcl)
|
||||
elseif(UNIX)
|
||||
set (CSF_TclLibs "tcl8.6")
|
||||
set (CSF_TclTkLibs "tk8.6")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# GL2PS
|
||||
if (NOT DEFINED ANDROID)
|
||||
if (USE_GL2PS)
|
||||
set (CSF_GL2PS "gl2ps")
|
||||
else()
|
||||
set (CSF_GL2PS)
|
||||
endif()
|
||||
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_psapi "Psapi.lib")
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
||||
set (CSF_OpenGlLibs "libEGL libGLESv2")
|
||||
else()
|
||||
set (CSF_OpenGlLibs "opengl32.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()
|
||||
|
||||
if (USE_VTK)
|
||||
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
|
||||
else()
|
||||
set (CSF_VTK)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
if (APPLE)
|
||||
set (CSF_objc "objc")
|
||||
@@ -93,13 +76,47 @@ if (WIN32)
|
||||
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 "GL")
|
||||
set (CSF_ThreadLibs "pthread rt")
|
||||
set (CSF_OpenGlLibs "GLU GL")
|
||||
set (CSF_XwLibs "X11 Xext Xmu Xi")
|
||||
set (CSF_dl "dl")
|
||||
|
||||
if (USE_TCL)
|
||||
set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")
|
||||
set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}")
|
||||
endif()
|
||||
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()
|
||||
|
||||
if (USE_VTK)
|
||||
set (CSF_VTK "${3RDPARTY_VTK_REQUIRED_LIBRARIES}")
|
||||
else()
|
||||
set (CSF_VTK)
|
||||
endif()
|
||||
endif()
|
@@ -5,85 +5,78 @@ if(FLAGS_ALREADY_INCLUDED)
|
||||
endif()
|
||||
set(FLAGS_ALREADY_INCLUDED 1)
|
||||
|
||||
# force option /fp:precise for Visual Studio projects.
|
||||
#
|
||||
# Note that while this option is default for MSVC compiler, Visual Studio
|
||||
# project can be switched later to use Intel Compiler (ICC).
|
||||
# Enforcing -fp:precise ensures that in such case ICC will use correct
|
||||
# option instead of its default -fp:fast which is harmful for OCCT.
|
||||
|
||||
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()
|
||||
|
||||
if (WIN32)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
add_definitions (-wd4996)
|
||||
elseif (APPLE)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS)
|
||||
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)
|
||||
endif()
|
||||
|
||||
# enable structured exceptions for MSVC
|
||||
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
|
||||
if (ISFLAG)
|
||||
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
elseif (MSVC)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
|
||||
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")
|
||||
message (STATUS "/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")
|
||||
message (STATUS "/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")
|
||||
message (STATUS "/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")
|
||||
message (STATUS "/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
|
||||
if (MSVC AND NOT MSVC70 AND NOT MSVC80)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
|
||||
endif()
|
||||
|
||||
# generate a single response file which enlist all of the object files
|
||||
@@ -98,38 +91,9 @@ if (MSVC)
|
||||
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")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (APPLE)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
elseif(NOT WIN32)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
# Set default release optimization option to O2 instead of O3, since in
|
||||
# some OCCT related examples, this gives significantly smaller binaries
|
||||
# at comparable performace with MinGW-w64.
|
||||
string (REGEX MATCH "-O3" IS_O3_CXX "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
if (IS_O3_CXX)
|
||||
string (REGEX REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
endif()
|
||||
|
||||
set (CMAKE_CXX_FLAGS "-std=gnu++0x ${CMAKE_CXX_FLAGS}")
|
||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
# workaround bugs in mingw with vtable export
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
|
||||
elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
if (APPLE)
|
||||
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||
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()
|
||||
|
||||
@@ -140,4 +104,4 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
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")
|
@@ -26,18 +26,6 @@ macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_BIN)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_SCRIPT)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_LIB)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_INCLUDE)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_RESOURCE)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DATA)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_SAMPLES)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_TESTS)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_DOC)
|
||||
endmacro()
|
||||
|
||||
# COMPILER_BITNESS variable
|
||||
macro (OCCT_MAKE_COMPILER_BITNESS)
|
||||
math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
|
||||
@@ -103,18 +91,18 @@ 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}")
|
||||
if (NOT APPLY_OCCT_PATCH_DIR OR NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
else()
|
||||
get_filename_component (ORIGIN_FILE_NAME "${ORIGIN_FILE}" NAME)
|
||||
if (NOT EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
if (NOT EXISTS "${APPLY_OCCT_PATCH_DIR}/${RELATIVE_PATH}/${ORIGIN_FILE_NAME}")
|
||||
list (APPEND FOUND_FILES ${ORIGIN_FILE})
|
||||
endif()
|
||||
endif()
|
||||
@@ -132,7 +120,6 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
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]*")
|
||||
|
||||
@@ -160,15 +147,15 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
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}")
|
||||
@@ -180,8 +167,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()
|
||||
@@ -194,8 +181,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
|
||||
# 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})
|
||||
@@ -203,8 +190,8 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS})
|
||||
# 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)
|
||||
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_TOOLKIT_PACKAGES)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES)
|
||||
endif()
|
||||
@@ -219,93 +206,78 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
||||
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...")
|
||||
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")
|
||||
if (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" )
|
||||
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}/*.*")
|
||||
# emit warnings if there is unprocessed headers
|
||||
file (GLOB OCCT_ALL_FILES_IN_DIR "${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}/*.*")
|
||||
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
|
||||
|
||||
# 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}")
|
||||
endforeach()
|
||||
|
||||
foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR})
|
||||
get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME)
|
||||
|
||||
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)
|
||||
|
||||
string (REGEX REPLACE "[^:]+:+" "" OCCT_FILE_NAME "${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
|
||||
set (OCCT_FILE_IN_DIR_STATUS OFF)
|
||||
|
||||
if (${ALL_FILES_NB} LESS 0)
|
||||
break()
|
||||
endif()
|
||||
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")
|
||||
foreach (FILE_INDEX RANGE ${ALL_FILES_NB})
|
||||
list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME)
|
||||
|
||||
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})
|
||||
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()
|
||||
endforeach()
|
||||
|
||||
if (NOT OCCT_FILE_IN_DIR_STATUS)
|
||||
message (STATUS "Warning. ${OCCT_FILE_IN_DIR} is not involved into ${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()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
else()
|
||||
message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/src/${OCCT_PACKAGE}")
|
||||
endif()
|
||||
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...")
|
||||
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)
|
||||
set (OCCT_HEADER_FILE_CONTENT "#include \"${OCCT_HEADER_FILE}\"")
|
||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||
endforeach()
|
||||
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR_INCLUDE}")
|
||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/inc")
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...")
|
||||
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})
|
||||
@@ -344,23 +316,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()
|
||||
@@ -375,8 +347,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()
|
||||
@@ -393,8 +365,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()
|
||||
@@ -424,7 +396,7 @@ function (OCCT_TOOLKIT_DEP TOOLKIT_NAME TOOLKIT_DEPS)
|
||||
set (LOCAL_TOOLKIT_DEPS)
|
||||
foreach (FILE_CONTENT_LINE ${FILE_CONTENT})
|
||||
string (REGEX MATCH "^TK" TK_FOUND ${FILE_CONTENT_LINE})
|
||||
if ("x${FILE_CONTENT_LINE}" STREQUAL "xDRAWEXE" OR NOT "${TK_FOUND}" STREQUAL "")
|
||||
if ("${FILE_CONTENT_LINE}" STREQUAL "DRAWEXE" OR NOT "${TK_FOUND}" STREQUAL "")
|
||||
list (APPEND LOCAL_TOOLKIT_DEPS ${FILE_CONTENT_LINE})
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -485,42 +457,28 @@ 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)
|
||||
@@ -542,63 +500,3 @@ macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
# Adds OCCT_INSTALL_BIN_LETTER variable ("" for Release, "d" for Debug and
|
||||
# "i" for RelWithDebInfo) in OpenCASCADETargets-*.cmake files during
|
||||
# installation process.
|
||||
# This and the following macros are used to overcome limitation of CMake
|
||||
# prior to version 3.3 not supporting per-configuration install paths
|
||||
# for install target files (see https://cmake.org/Bug/view.php?id=14317)
|
||||
macro (OCCT_UPDATE_TARGET_FILE)
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
install (CODE
|
||||
"cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
|
||||
file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
|
||||
foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
|
||||
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
|
||||
file (REMOVE \"\${TARGET_FILENAME}\")
|
||||
foreach (line IN LISTS TARGET_FILE_CONTENT)
|
||||
string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
|
||||
file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
|
||||
endforeach()
|
||||
endforeach()
|
||||
cmake_policy(POP)")
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_INSERT_CODE_FOR_TARGET)
|
||||
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"i\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"d\")
|
||||
endif()")
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
|
||||
install(CODE "cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
|
||||
file (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT)
|
||||
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
|
||||
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
|
||||
string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\")
|
||||
string (REGEX REPLACE \": TK\([a-zA-Z]+\)$\" \": TK\${CMAKE_MATCH_1}${BUILD_SHARED_LIBRARY_NAME_POSTFIX}\" line \"\${line}\")
|
||||
file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\")
|
||||
endforeach()
|
||||
cmake_policy(POP)")
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
|
||||
if (NOT WIN32)
|
||||
install (CODE "if (EXISTS \"${LIBRARY_NAME}\")
|
||||
execute_process (COMMAND ln -s \"${LIBRARY_NAME}\" \"${LINK_NAME}\")
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -1,77 +0,0 @@
|
||||
# OCCT resource files generation
|
||||
|
||||
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
|
||||
set (RESOURCE_FILES)
|
||||
set (isResDirectory FALSE)
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/src/${CurrentResource}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource}/FILES" RESOURCE_FILES)
|
||||
set (CurrentResource_Directory "${CurrentResource}")
|
||||
set (isResDirectory TRUE)
|
||||
else()
|
||||
get_filename_component (CurrentResource_Name "${CurrentResource}" NAME)
|
||||
list (APPEND RESOURCE_FILES "res:::${CurrentResource_Name}")
|
||||
get_filename_component (CurrentResource_Directory "${CurrentResource}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
# Add current toolkit into RESOURCE_TOOLKITS array to copy it to the BUILD directory
|
||||
list (APPEND RESOURCE_TOOLKITS "${CurrentResource_Directory}")
|
||||
list (REMOVE_DUPLICATES RESOURCE_TOOLKITS)
|
||||
|
||||
if (BUILD_RESOURCES)
|
||||
foreach (RESOURCE_FILE ${RESOURCE_FILES})
|
||||
string (REGEX MATCH "^[^:]+:::" IS_RESOURCE "${RESOURCE_FILE}")
|
||||
if (IS_RESOURCE)
|
||||
string (REGEX REPLACE "[^:]+:+" "" RESOURCE_FILE "${RESOURCE_FILE}")
|
||||
|
||||
get_filename_component (CurrentResource_FileName "${RESOURCE_FILE}" NAME)
|
||||
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
|
||||
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
|
||||
|
||||
set (toProcessResFile TRUE)
|
||||
if (isResDirectory)
|
||||
list (FIND RESOURCE_FILES "${HEADER_FILE_NAME}" aResIndex)
|
||||
if ("${aResIndex}" STREQUAL "-1")
|
||||
set (toProcessResFile FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (toProcessResFile)
|
||||
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}")
|
||||
|
||||
# generate content for header file
|
||||
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file src/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
|
||||
|
||||
# read resource file
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
|
||||
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
|
||||
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
|
||||
string (REPLACE "\"" "\\\"" line "${line}")
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}\n \"${line}\\n\"")
|
||||
endforeach()
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};")
|
||||
|
||||
# Save generated content to header file
|
||||
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${HEADER_FILE_NAME}")
|
||||
if (EXISTS "${HEADER_FILE}")
|
||||
file (REMOVE "${HEADER_FILE}")
|
||||
endif()
|
||||
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
|
||||
foreach (CurrentResource ${RESOURCES})
|
||||
get_filename_component (CurrentResource_FileName "${CurrentResource}" NAME)
|
||||
if ("${CurrentResource_FileName}" STREQUAL TObj.msg OR
|
||||
"${CurrentResource_FileName}" STREQUAL Units.dat OR
|
||||
"${CurrentResource}" STREQUAL XSMessage OR
|
||||
"${CurrentResource}" STREQUAL SHMessage OR
|
||||
"${CurrentResource}" STREQUAL Shaders)
|
||||
OCCT_GENERATE_CONTENT_ONLY ("${CurrentResource}")
|
||||
endif()
|
||||
endforeach()
|
@@ -9,10 +9,6 @@ endif()
|
||||
|
||||
set (PRECOMPILED_DEFS)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
|
||||
endif()
|
||||
|
||||
# Get all used packages from toolkit
|
||||
foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
|
||||
@@ -29,7 +25,7 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
set (HEADER_FILES)
|
||||
|
||||
# Generate Flex and Bison files
|
||||
if (${BUILD_YACCLEX})
|
||||
if (${REBUILD_PLATFORM_DEPENDENT_CODE})
|
||||
|
||||
# flex files
|
||||
OCCT_ORIGIN_AND_PATCHED_FILES ("src/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||
@@ -69,14 +65,14 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
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")
|
||||
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 "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
file (STRINGS "${APPLY_OCCT_PATCH_DIR}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
|
||||
if(APPLE)
|
||||
file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
|
||||
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")
|
||||
@@ -96,10 +92,10 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
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}")
|
||||
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}")
|
||||
@@ -107,10 +103,10 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
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}")
|
||||
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}")
|
||||
@@ -120,14 +116,40 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
||||
endforeach()
|
||||
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_RCFILE "")
|
||||
if (MSVC)
|
||||
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
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)
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
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()
|
||||
|
||||
@@ -139,66 +161,11 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT SINGLE_GENERATOR)
|
||||
OCCT_INSERT_CODE_FOR_TARGET ()
|
||||
endif()
|
||||
|
||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
|
||||
if (NOT WIN32)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}")
|
||||
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CURRENT_MODULE)
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Modules/${CURRENT_MODULE}")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
|
||||
if (APPLE)
|
||||
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
set_property (TARGET ${PROJECT_NAME} PROPERTY 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)
|
||||
|
||||
if (ANDROID)
|
||||
# do not append version to the filename
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
else()
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||
endif()
|
||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
||||
|
||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||
@@ -206,53 +173,19 @@ 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 "x${CURRENT_CSF}" STREQUAL "x")
|
||||
set (LIBRARY_FROM_CACHE 0)
|
||||
separate_arguments (CURRENT_CSF)
|
||||
foreach (CSF_LIBRARY ${CURRENT_CSF})
|
||||
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
|
||||
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
|
||||
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
|
||||
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
|
||||
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
|
||||
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
|
||||
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
|
||||
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
|
||||
|
||||
if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
|
||||
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
|
||||
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
|
||||
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
|
||||
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
||||
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
|
||||
NOT "x${IS_ENDING}" STREQUAL "x" OR
|
||||
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}")
|
||||
set (LIBRARY_FROM_CACHE 1)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (NOT ${LIBRARY_FROM_CACHE})
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
endif()
|
||||
endif()
|
||||
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
|
||||
if (NOT "${TK_FOUND}" STREQUAL "")
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
|
||||
else()
|
||||
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
|
||||
if ("${CSF_FOUND}" STREQUAL "")
|
||||
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
|
||||
else() # get CSF_ value
|
||||
set (CURRENT_CSF ${${USED_ITEM}})
|
||||
if (NOT "${CURRENT_CSF}" STREQUAL "")
|
||||
# prepare a list from a string with whitespaces
|
||||
separate_arguments (CURRENT_CSF)
|
||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -263,26 +196,9 @@ if (APPLE)
|
||||
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
||||
find_package (X11 COMPONENTS X11 Xext Xmu Xi)
|
||||
if (NOT X11_FOUND)
|
||||
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
|
||||
message (STATUS "Warning. X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
|
||||
# Add VTK_OPENGL2_BACKEND definition.
|
||||
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
|
||||
add_definitions(-DVTK_OPENGL2_BACKEND)
|
||||
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
|
||||
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
|
||||
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
|
||||
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
|
||||
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
endif()
|
||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# tbb
|
||||
|
||||
if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED INSTALL_TBB)
|
||||
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
|
||||
endif()
|
||||
|
||||
@@ -9,7 +9,7 @@ if (NOT DEFINED 3RDPARTY_TBB_DIR)
|
||||
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
|
||||
endif()
|
||||
|
||||
if (MSVC AND BUILD_SHARED_LIBS)
|
||||
if (MSVC)
|
||||
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
|
||||
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
|
||||
endif()
|
||||
@@ -70,49 +70,49 @@ else()
|
||||
endif()
|
||||
|
||||
# common steps for tbb and tbbmalloc
|
||||
macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
||||
macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
|
||||
|
||||
string (TOUPPER ${PRODUCT_LIBRARY_NAME} upper_PRODUCT_LIBRARY_NAME)
|
||||
string (TOLOWER ${PRODUCT_NAME} lower_PRODUCT_NAME)
|
||||
|
||||
# define required tbb/tbbmalloc variables
|
||||
if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library")
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL OR NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_ paths for consistency with specified 3RDPARTY_TBB_DIR
|
||||
# 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_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} library")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY FILEPATH "the path to ${PRODUCT_NAME} library")
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
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_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library")
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL FILEPATH "the path to ${PRODUCT_NAME} shared library")
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR PATH "The directory containing ${PRODUCT_NAME} shared library")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -121,174 +121,162 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (${COMPILER_BITNESS} EQUAL 32)
|
||||
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME ia32)
|
||||
set (${PRODUCT_NAME}_ARCH_NAME ia32)
|
||||
else()
|
||||
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME intel64)
|
||||
set (${PRODUCT_NAME}_ARCH_NAME intel64)
|
||||
endif()
|
||||
|
||||
# tbb/tbbmalloc library
|
||||
if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME})
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME})
|
||||
|
||||
# set 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
# 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/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}")
|
||||
if (EXISTS "${3RDPARTY_TBB_DIR}/lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}")
|
||||
file (GLOB ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/*")
|
||||
if (${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST)
|
||||
list (GET ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
|
||||
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 ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_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 ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
|
||||
set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME} lib/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
|
||||
PATHS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}"
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${lower_PRODUCT_NAME}
|
||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb/tbbmalloc shared library
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
||||
# 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/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}")
|
||||
if (EXISTS "${3RDPARTY_TBB_DIR}/bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}")
|
||||
file (GLOB ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/*")
|
||||
if (${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST)
|
||||
list (GET ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION)
|
||||
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/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_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/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
|
||||
set (PRODUCT_PATH_SUFFIXES bin bin/${${PRODUCT_NAME}_ARCH_NAME}/${COMPILER})
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
||||
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_NAME}
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_NAME} PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES})
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL ${lower_PRODUCT_NAME} PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES})
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
||||
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_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tbb/tbbmalloc
|
||||
if (INSTALL_TBB)
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
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 (PRODUCT_LIBRARY_NAME ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY} NAME)
|
||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
else()
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d"
|
||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||
endif()
|
||||
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()
|
||||
mark_as_advanced (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL)
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
endmacro()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
separate_arguments (CSF_TBB)
|
||||
foreach (LIB IN LISTS CSF_TBB)
|
||||
TBB_PRODUCT_SEARCH (${LIB})
|
||||
endforeach()
|
||||
|
||||
if (INSTALL_TBB)
|
||||
set (USED_3RDPARTY_TBB_DIR "")
|
||||
TBB_PRODUCT_SEARCH (TBB)
|
||||
TBB_PRODUCT_SEARCH (TBBMALLOC)
|
||||
|
||||
|
||||
if (INSTALL_TBB)
|
||||
set (USED_3RDPARTY_TBB_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
||||
endif()
|
||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# tcl
|
||||
|
||||
if (NOT DEFINED INSTALL_TCL AND BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED INSTALL_TCL)
|
||||
set (INSTALL_TCL OFF CACHE BOOL "${INSTALL_TCL_DESCR}")
|
||||
endif()
|
||||
|
||||
@@ -14,28 +14,26 @@ if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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)
|
||||
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)
|
||||
endif()
|
||||
|
||||
# tcl library directory
|
||||
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
|
||||
endif()
|
||||
# tcl library directory
|
||||
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
|
||||
endif()
|
||||
|
||||
# tcl shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
|
||||
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
|
||||
endif()
|
||||
# tcl shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
|
||||
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tcl shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
|
||||
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
|
||||
endif()
|
||||
# tcl shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
|
||||
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
|
||||
endif()
|
||||
|
||||
# search for tcl in user defined directory
|
||||
@@ -55,7 +53,7 @@ endif()
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
|
||||
|
||||
# use default (CMake) TCL search
|
||||
find_package(TCL QUIET)
|
||||
find_package(TCL)
|
||||
|
||||
# tcl include dir
|
||||
if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
@@ -64,204 +62,190 @@ if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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)
|
||||
# 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)
|
||||
endif()
|
||||
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)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_TCL_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
|
||||
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 ${CSF_TclLibs}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
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)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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 ${CSF_TclLibs}
|
||||
PATHS "${3RDPARTY_TCL_LIBRARY_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
# 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 ${CSF_TclLibs}
|
||||
PATHS "${3RDPARTY_TCL_DIR}/lib"
|
||||
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()
|
||||
if (NOT 3RDPARTY_TCL_LIBRARY OR NOT EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "TCL library" FORCE)
|
||||
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()
|
||||
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()
|
||||
|
||||
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 .a)
|
||||
|
||||
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)
|
||||
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)
|
||||
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()
|
||||
|
||||
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}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tcl
|
||||
if (INSTALL_TCL)
|
||||
# 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)
|
||||
# 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
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${TCL_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}i")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_TCL_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
|
||||
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)
|
||||
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)
|
||||
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()
|
||||
|
||||
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}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# install tcl
|
||||
if (INSTALL_TCL)
|
||||
# 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)
|
||||
# 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
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
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")
|
||||
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")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without)
|
||||
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")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_TCL_DIR "")
|
||||
else()
|
||||
# the library directory for using by the executable
|
||||
if (WIN32)
|
||||
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
|
||||
else()
|
||||
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
|
||||
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)
|
||||
@@ -271,7 +255,7 @@ if (TK_FOUND AND 3RDPARTY_TCL_DIR)
|
||||
|
||||
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}")
|
||||
message (STATUS "Info. TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -284,11 +268,3 @@ OCCT_CHECK_AND_UNSET (TCL_TCLSH)
|
||||
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TK_WISH)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_LIBRARY_DIR)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_DLL)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_DLL_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_TCL)
|
||||
endif()
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# tk
|
||||
|
||||
if (NOT DEFINED INSTALL_TK AND BUILD_SHARED_LIBS)
|
||||
if (NOT DEFINED INSTALL_TK)
|
||||
set (INSTALL_TK OFF CACHE BOOL "${INSTALL_TK_DESCR}")
|
||||
endif()
|
||||
|
||||
@@ -18,28 +18,26 @@ if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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 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 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()
|
||||
# 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()
|
||||
# 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
|
||||
@@ -59,7 +57,7 @@ endif()
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
|
||||
|
||||
# use default (CMake) TCL search
|
||||
find_package(TCL QUIET)
|
||||
find_package(TCL)
|
||||
|
||||
# tk include dir
|
||||
if (NOT 3RDPARTY_TK_INCLUDE_DIR)
|
||||
@@ -68,115 +66,111 @@ if (NOT 3RDPARTY_TK_INCLUDE_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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)
|
||||
# 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" ".a")
|
||||
|
||||
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 ${CSF_TclTkLibs}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# 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 ${CSF_TclTkLibs}
|
||||
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 ${CSF_TclTkLibs}
|
||||
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)
|
||||
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()
|
||||
|
||||
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" ".a")
|
||||
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()
|
||||
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 tk${3RDPARTY_TK_LIBRARY_VERSION}
|
||||
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)
|
||||
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
|
||||
@@ -186,87 +180,75 @@ else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
|
||||
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_LIBRARY_DIR)
|
||||
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)
|
||||
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()
|
||||
# tk 8.6 requires zlib. install all dlls from tk bin folder that may contain zlib also
|
||||
|
||||
# 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 (SINGLE_GENERATOR)
|
||||
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
|
||||
else()
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_BIN}")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_BIN}i")
|
||||
install (FILES ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_BIN}d")
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
|
||||
if (SINGLE_GENERATOR)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR_LIB}/")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR_LIB}/i")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tk is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
|
||||
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 "")
|
||||
# collect and install all dlls from tk dll dirs
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
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")
|
||||
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()
|
||||
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()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TK_LIBRARY 3RDPARTY_TK_DLL)
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tk is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
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)
|
||||
@@ -276,11 +258,3 @@ OCCT_CHECK_AND_UNSET (TCL_TCLSH)
|
||||
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TK_WISH)
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY_DIR)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL)
|
||||
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL_DIR)
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_TK)
|
||||
endif()
|
||||
|
@@ -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,80 +13,37 @@ 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_RESOURCES_DESCR "Enables regeneration of OCCT resource files")
|
||||
|
||||
set (BUILD_WITH_DEBUG_DESCR
|
||||
"Enables extended messages of many OCCT algorithms, usually printed to cout.
|
||||
These include messages on internal errors and special cases encountered, timing etc.
|
||||
Applies only for Debug configuration.")
|
||||
|
||||
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
|
||||
"Append the postfix to names of output libraries")
|
||||
|
||||
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
|
||||
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
|
||||
Corresponding environment variable (CSF_FPE) can be changed manually
|
||||
in custom.bat/sh scripts without regeneration by CMake.")
|
||||
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)")
|
||||
|
||||
set (INSTALL_DIR_WITH_VERSION_DESCR
|
||||
"Use OCCT version number as suffix for names of directories")
|
||||
|
||||
set (INSTALL_DIR_LAYOUT_DESCR
|
||||
"Defines structure of OCCT files (binaries, resources, headers etc.) for the install directory.
|
||||
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
|
||||
If needed, layout can be customized with INSTALL_DIR_* variables.")
|
||||
|
||||
set (INSTALL_DIR_BIN_DESCR
|
||||
"Subdirectory of INSTALL_DIR where binaries will be installed")
|
||||
set (INSTALL_DIR_INCLUDE_DESCR
|
||||
"Subdirectory of INSTALL_DIR where OCCT headers will be installed")
|
||||
set (INSTALL_DIR_DATA_DESCR
|
||||
"Subdirectory of INSTALL_DIR where sample data files will be installed")
|
||||
set (INSTALL_DIR_DOC_DESCR
|
||||
"Subdirectory of INSTALL_DIR where documentation will be installed")
|
||||
set (INSTALL_DIR_LIB_DESCR
|
||||
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
|
||||
set (INSTALL_DIR_RESOURCE_DESCR
|
||||
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
|
||||
set (INSTALL_DIR_SAMPLES_DESCR
|
||||
"Subdirectory of INSTALL_DIR where samples will be installed")
|
||||
set (INSTALL_DIR_TESTS_DESCR
|
||||
"Subdirectory of INSTALL_DIR where test scripts will be installed")
|
||||
set (INSTALL_DIR_SCRIPT_DESCR
|
||||
"Subdirectory of INSTALL_DIR where scripts will be installed")
|
||||
set (INSTALL_DIR_CMAKE_DESCR
|
||||
"Subdirectory of INSTALL_DIR where CMake configuration files will be installed.
|
||||
Must be three levels below INSTALL_DIR")
|
||||
|
||||
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
|
||||
set (${INSTALL_TARGET_VARIABLE}_DESCR
|
||||
"Indicates whether ${INSTALL_TARGET_STRING} should be installed (building INSTALL
|
||||
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_DOC_Overview "OCCT overview documentation (HTML format)")
|
||||
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_EGL "EGL binaries")
|
||||
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
|
||||
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 ")
|
||||
|
||||
# build variables
|
||||
@@ -112,49 +69,38 @@ want to build some particular libraries (toolkits) only, then you may uncheck
|
||||
all modules in the corresponding BUILD_MODUE_* options and provide the list of
|
||||
necessary libraries here. Of course, all dependencies will be resolved automatically")
|
||||
|
||||
set (BUILD_MODULE_MfcSamples_DESCR
|
||||
set (BUILD_MODULE_OcctMfcSamples_DESCR
|
||||
"Indicates whether OCCT MFC samples should be built together with OCCT.
|
||||
These samples show some possibilities of using OCCT and they can be executed
|
||||
with script samples.bat from the installation directory (INSTALL_DIR)")
|
||||
|
||||
set (BUILD_MODULE_UwpSample_DESCR
|
||||
"Indicates whether OCCT UWP sample should be built together with OCCT.")
|
||||
|
||||
set (BUILD_DOC_Overview_DESCR
|
||||
set (BUILD_DOC_OcctOverview_DESCR
|
||||
"Indicates whether OCCT overview documentation project (Markdown format) 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. The documentation will be available in the
|
||||
installation directory (overview.bat script) if INSTALL_DOC_Overview variable is checked")
|
||||
installation directory (overview.bat script) if INSTALL_DOC_OcctOverview variable is checked")
|
||||
|
||||
set (3RDPARTY_DIR_DESCR
|
||||
"The root directory where all required third-party products will be searched. If a
|
||||
third-party product have been found - corresponding CMake variables will be specified
|
||||
"The root directory where all required 3-rd party products will be searched. If a
|
||||
3-rd party product have been found - corresponding CMake variables will be specified
|
||||
(VTK: 3RDPARTY_VTK_DIR, 3RDPARTY_VTK_INCLUDE_DIR, 3RDPARTY_VTK_LIBRARY_DIR)")
|
||||
|
||||
set (USE_FREEIMAGE_DESCR
|
||||
"Indicates whether Freeimage product should be used in OCCT visualization
|
||||
module for support of popular graphics image formats (PNG, BMP etc)")
|
||||
|
||||
set (USE_EGL_DESCR
|
||||
"Indicates whether EGL should be used in OCCT visualization
|
||||
module instead of conventional OpenGL context creation APIs")
|
||||
|
||||
set (USE_GLES2_DESCR
|
||||
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization
|
||||
module instead of desktop OpenGL")
|
||||
|
||||
set (USE_GL2PS_DESCR
|
||||
"Indicates whether GL2PS product should be used in OCCT visualization
|
||||
module for support of vector image formats (PS, EPS etc)")
|
||||
|
||||
set (USE_TBB_DESCR
|
||||
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,
|
||||
"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")
|
||||
|
||||
set (USE_VTK_DESCR
|
||||
"Indicates whether VTK is used or not. VTK stands for Visualization
|
||||
"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).")
|
||||
@@ -164,6 +110,5 @@ 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 (ENABLE_MODULE TRUE)
|
||||
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
|
||||
set (BUILD_MODULE_${MODULE_NAME} ON CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
|
||||
endmacro()
|
||||
|
@@ -9,6 +9,21 @@ if (NOT DEFINED 3RDPARTY_VTK_DIR)
|
||||
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_VTK_REQUIRED_LIBRARIES vtkCommonCore
|
||||
vtkCommonDataModel
|
||||
vtkCommonExecutionModel
|
||||
vtkCommonMath
|
||||
vtkCommonTransforms
|
||||
vtkRenderingCore
|
||||
vtkRenderingFreeType
|
||||
vtkRenderingFreeTypeOpenGL
|
||||
vtkRenderingOpenGL
|
||||
vtkFiltersGeneral
|
||||
vtkIOCore
|
||||
vtkIOImage
|
||||
vtkImagingCore
|
||||
vtkInteractionStyle)
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
@@ -31,27 +46,23 @@ if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# vtk library directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
|
||||
endif()
|
||||
# vtk library directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
|
||||
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")
|
||||
endif()
|
||||
if (WIN32)
|
||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -71,104 +82,81 @@ if (VTK_FOUND)
|
||||
# add compiler flags, preprocessor definitions, include and link dirs
|
||||
include (${VTK_USE_FILE})
|
||||
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND ON)
|
||||
if (VTK_LIBRARIES)
|
||||
|
||||
set (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
set (3RDPARTY_VTK_DLL_DIRS)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
set (3RDPARTY_VTK_DLL_DIRS)
|
||||
endif()
|
||||
|
||||
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
|
||||
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
|
||||
if (IS_VTK_LIBRARY AND TARGET ${VTK_LIBRARY})
|
||||
foreach (VTK_REQUIRED_LIBRARY ${3RDPARTY_VTK_REQUIRED_LIBRARIES})
|
||||
list (FIND VTK_LIBRARIES ${VTK_REQUIRED_LIBRARY} FOUND_INDEX)
|
||||
if (${FOUND_INDEX} EQUAL -1)
|
||||
message (WARNING "VTK: required ${VTK_REQUIRED_LIBRARY} library is not found")
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
|
||||
else()
|
||||
# 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}")
|
||||
if (${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_INCLUDE_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_REQUIRED_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}")
|
||||
if (${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_LIBRARY_DIRS}")
|
||||
endif()
|
||||
|
||||
if (${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
if (NOT WIN32)
|
||||
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_REQUIRED_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# get paths from corresponding properties
|
||||
get_property (TARGET_VTK_IMPORT_CONFS TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY 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_property (TARGET_PROPERTY_IMP_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY 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()
|
||||
|
||||
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_property (TARGET_PROPERTY_LOCATION_PATH TARGET ${VTK_REQUIRED_LIBRARY} PROPERTY 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)
|
||||
|
||||
# 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()
|
||||
|
||||
# Work-around against link failure in case if VTK contains dependency
|
||||
# on DirectX: its run-time is always present on Windows, but SDK can
|
||||
# be absent on current workstation, while not actually needed for
|
||||
# OCCT linking.
|
||||
# VTK 6.1 for VC 10
|
||||
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)
|
||||
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
|
||||
if (HARDCODED_D3D9_LIB)
|
||||
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
|
||||
|
||||
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
|
||||
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
# VTK 6.1 for VC 12, 14
|
||||
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} INTERFACE_LINK_LIBRARIES)
|
||||
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
|
||||
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
|
||||
if (HARDCODED_D3D9_LIB)
|
||||
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
|
||||
|
||||
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
|
||||
set_target_properties (${VTK_LIBRARY} PROPERTIES INTERFACE_LINK_LIBRARIES "${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()
|
||||
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()
|
||||
else()
|
||||
set (ALL_REQUIRED_VTK_LIBRARIES_FOUND OFF)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
|
||||
if (ALL_REQUIRED_VTK_LIBRARIES_FOUND)
|
||||
|
||||
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_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 (BUILD_SHARED_LIBS)
|
||||
if (3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
|
||||
@@ -187,6 +175,7 @@ if (VTK_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
|
||||
@@ -194,19 +183,17 @@ else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
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 (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 (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_DLL_DIR)
|
||||
endif()
|
||||
if (WIN32)
|
||||
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -217,6 +204,4 @@ 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)
|
||||
|
191
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 {}
|
||||
@@ -127,46 +123,21 @@ proc wokdep:gui:UpdateList {} {
|
||||
wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
if { "$::HAVE_GLES2" == "true" } {
|
||||
if { "$::HAVE_GL2PS" == "true" } {
|
||||
lappend anIncErrs "Error: gl2ps can not be used within OpenGL ES"
|
||||
}
|
||||
if { "$::HAVE_D3D" == "true" } {
|
||||
lappend anIncErrs "Error: Direct3D can not be used within OpenGL ES"
|
||||
}
|
||||
wokdep:SearchEGL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
wokdep:SearchGLES anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_FREEIMAGE" == "true" } {
|
||||
wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_FFMPEG" == "true" } {
|
||||
wokdep:SearchFFmpeg anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_GL2PS" == "true" } {
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "gl2ps" "gl2ps.h" "gl2ps" {"gl2ps"}
|
||||
wokdep:SearchGL2PS anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_TBB" == "true" } {
|
||||
wokdep:SearchTBB anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
# if { "$::HAVE_OPENCL" == "true" } {
|
||||
# wokdep:SearchOpenCL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
# }
|
||||
if { "$::HAVE_OPENCL" == "true" } {
|
||||
wokdep:SearchOpenCL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
if { "$::HAVE_VTK" == "true" } {
|
||||
wokdep:SearchVTK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
|
||||
if { "$::HAVE_ZLIB" == "true" } {
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "zlib" {"zlib"}
|
||||
}
|
||||
if { "$::HAVE_LIBLZMA" == "true" } {
|
||||
set aCheckLib "lzma"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aCheckLib "liblzma"
|
||||
}
|
||||
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
|
||||
}
|
||||
|
||||
if { "$::CHECK_QT4" == "true" } {
|
||||
wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
|
||||
}
|
||||
@@ -388,56 +359,41 @@ proc wokdep:gui:Show64Bitness { theRowIter } {
|
||||
}
|
||||
|
||||
# Header
|
||||
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -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::combobox .myFrame.myHxxChecks.myScutsCombo -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12
|
||||
ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling headers folder 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:" -padding {5 5 80 5}
|
||||
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"
|
||||
if { "$::tcl_platform(os)" != "Darwin" } {
|
||||
checkbutton .myFrame.myChecks.myGlesCheck -offvalue "false" -onvalue "true" -variable HAVE_GLES2 -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myGlesLbl -text "Use OpenGL ES"
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
checkbutton .myFrame.myChecks.myD3dCheck -offvalue "false" -onvalue "true" -variable HAVE_D3D -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myD3dLbl -text "Use Direct3D"
|
||||
}
|
||||
checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
|
||||
#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.myZLibCheck -offvalue "false" -onvalue "true" -variable HAVE_ZLIB -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib"
|
||||
checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList
|
||||
ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma"
|
||||
|
||||
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:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myIncLbl -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview"
|
||||
listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
|
||||
ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath
|
||||
@@ -447,7 +403,7 @@ ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncP
|
||||
ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional libraries (32-bit) search paths
|
||||
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview"
|
||||
listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
|
||||
ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path
|
||||
@@ -457,7 +413,7 @@ ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLi
|
||||
ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional libraries (64-bit) search paths
|
||||
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview"
|
||||
listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
|
||||
ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path
|
||||
@@ -467,7 +423,7 @@ ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLi
|
||||
ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional executables (32-bit) search paths
|
||||
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview"
|
||||
listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
|
||||
ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path
|
||||
@@ -477,7 +433,7 @@ ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBi
|
||||
ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
|
||||
|
||||
# Additional executables (64-bit) search paths
|
||||
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
|
||||
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths" -relief solid -padding {5 5 80 5}
|
||||
scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview"
|
||||
listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
|
||||
ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path
|
||||
@@ -493,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
|
||||
@@ -505,9 +461,10 @@ if { "$tcl_platform(platform)" == "windows" } {
|
||||
}
|
||||
|
||||
#
|
||||
grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
|
||||
grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 0
|
||||
grid .myFrame.myHxxChecks.myScutsCombo -row 0 -column 1
|
||||
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
|
||||
@@ -515,47 +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
|
||||
if { "$::tcl_platform(os)" != "Darwin" } {
|
||||
grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myGlesLbl -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
|
||||
grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
|
||||
grid .myFrame.myChecks.myGl2psCheck -row $aCheckRowIter -column 8 -sticky e
|
||||
grid .myFrame.myChecks.myGl2psLbl -row $aCheckRowIter -column 9 -sticky w
|
||||
|
||||
grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 10 -sticky e
|
||||
grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 11 -sticky w
|
||||
|
||||
incr aCheckRowIter
|
||||
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
|
||||
grid .myFrame.myChecks.myFFmpegLbl -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
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
|
||||
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
|
||||
}
|
||||
grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
|
||||
grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
|
||||
grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 10 -sticky e
|
||||
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 11 -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
|
||||
@@ -589,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
|
||||
}
|
||||
|
||||
|
@@ -41,8 +41,16 @@ if { "$tcl_platform(platform)" == "unix" } {
|
||||
set VCVARS ""
|
||||
}
|
||||
|
||||
set SHORTCUT_HEADERS "ShortCut"
|
||||
set SHORTCUT_HEADERS "true"
|
||||
|
||||
set HAVE_FREEIMAGE "false"
|
||||
set HAVE_GL2PS "false"
|
||||
set HAVE_TBB "false"
|
||||
set HAVE_OPENCL "false"
|
||||
set HAVE_VTK "false"
|
||||
set MACOSX_USE_GLX "false"
|
||||
set CHECK_QT4 "false"
|
||||
set CHECK_JDK "false"
|
||||
set PRODUCTS_PATH ""
|
||||
set CSF_OPT_INC [list]
|
||||
set CSF_OPT_LIB32 [list]
|
||||
@@ -56,37 +64,42 @@ if { "$tcl_platform(pointerSize)" == "4" } {
|
||||
if { [info exists ::env(ARCH)] } {
|
||||
set ARCH "$::env(ARCH)"
|
||||
}
|
||||
|
||||
if { [info exists ::env(VCVER)] } {
|
||||
set VCVER "$::env(VCVER)"
|
||||
}
|
||||
if { [info exists ::env(VCVARS)] } {
|
||||
set VCVARS "$::env(VCVARS)"
|
||||
}
|
||||
if { [info exists ::env(SHORTCUT_HEADERS)] } {
|
||||
set SHORTCUT_HEADERS "$::env(SHORTCUT_HEADERS)"
|
||||
if { $SHORTCUT_HEADERS == "true" } {
|
||||
set SHORTCUT_HEADERS "ShortCut"
|
||||
}
|
||||
}
|
||||
|
||||
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
|
||||
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_GL2PS HAVE_ZLIB HAVE_LIBLZMA HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX}
|
||||
foreach anEnvIter $THE_ENV_VARIABLES {
|
||||
set ${anEnvIter} "false"
|
||||
if { [info exists ::env(${anEnvIter})] } {
|
||||
set ${anEnvIter} "$::env(${anEnvIter})"
|
||||
}
|
||||
if { [info exists ::env(HAVE_FREEIMAGE)] } {
|
||||
set HAVE_FREEIMAGE "$::env(HAVE_FREEIMAGE)"
|
||||
}
|
||||
# do not export platform-specific variables
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
set HAVE_GLES2 ""
|
||||
} else {
|
||||
set MACOSX_USE_GLX ""
|
||||
if { "$tcl_platform(platform)" != "windows" } {
|
||||
set HAVE_D3D ""
|
||||
}
|
||||
if { [info exists ::env(HAVE_GL2PS)] } {
|
||||
set HAVE_GL2PS "$::env(HAVE_GL2PS)"
|
||||
}
|
||||
foreach anEnvIter {ARCH VCVER VCVARS PRODUCTS_PATH} {
|
||||
if { [info exists ::env(${anEnvIter})] } {
|
||||
set ${anEnvIter} "$::env(${anEnvIter})"
|
||||
}
|
||||
if { [info exists ::env(HAVE_TBB)] } {
|
||||
set HAVE_TBB "$::env(HAVE_TBB)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_OPENCL)] } {
|
||||
set HAVE_OPENCL "$::env(HAVE_OPENCL)"
|
||||
}
|
||||
if { [info exists ::env(HAVE_VTK)] } {
|
||||
set HAVE_VTK "$::env(HAVE_VTK)"
|
||||
}
|
||||
if { [info exists ::env(MACOSX_USE_GLX)] } {
|
||||
set MACOSX_USE_GLX "$::env(MACOSX_USE_GLX)"
|
||||
}
|
||||
if { [info exists ::env(CHECK_QT4)] } {
|
||||
set CHECK_QT4 "$::env(CHECK_QT4)"
|
||||
}
|
||||
if { [info exists ::env(CHECK_JDK)] } {
|
||||
set CHECK_JDK "$::env(CHECK_JDK)"
|
||||
}
|
||||
if { [info exists ::env(PRODUCTS_PATH)] } {
|
||||
set PRODUCTS_PATH "$::env(PRODUCTS_PATH)"
|
||||
}
|
||||
|
||||
if { [info exists ::env(CSF_OPT_INC)] } {
|
||||
set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER]
|
||||
}
|
||||
@@ -228,83 +241,6 @@ proc wokdep:Preferred {theList theCmpl theArch} {
|
||||
return [lindex [lsort -decreasing $aVeryShortList] 0]
|
||||
}
|
||||
|
||||
# Search library placement
|
||||
proc wokdep:SearchStandardLibrary {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64 theName theCheckHeader theCheckLib theCheckFolders} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
upvar $theErrBin32 anErrBin32
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aHeaderPath [wokdep:SearchHeader "$theCheckHeader"]
|
||||
if { "$aHeaderPath" == "" } {
|
||||
set hasHeader false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/$theCheckHeader"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
set hasHeader true
|
||||
break
|
||||
}
|
||||
}
|
||||
if { !$hasHeader } {
|
||||
lappend anErrInc "Error: '$theCheckHeader' not found ($theName)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set hasLib false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
set hasLib true
|
||||
break
|
||||
}
|
||||
}
|
||||
if { !$hasLib } {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}$theCheckLib.${::SYS_LIB_SUFFIX}' not found ($theName)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set hasDll false
|
||||
foreach aFolderIter $theCheckFolders {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
set hasDll true
|
||||
break
|
||||
} else {
|
||||
set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib"
|
||||
set hasDll true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if { !$hasDll } {
|
||||
lappend anErrBin$anArchIter "Error: '$theCheckLib.dll' not found ($theName)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search Tcl/Tk libraries placement
|
||||
proc wokdep:SearchTclTk {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
@@ -487,6 +423,7 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
|
||||
# binary distribution has another layout
|
||||
set aFImageDist "Dist"
|
||||
set aFImagePlusDist "Wrapper/FreeImagePlus/dist"
|
||||
|
||||
set isFound "true"
|
||||
set aFImageHPath [wokdep:SearchHeader "FreeImage.h"]
|
||||
@@ -496,12 +433,21 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} elseif { "$aPath" != "" && [file exists "$aPath/$aFImageDist/FreeImage.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/$aFImageDist"
|
||||
if { [file exists "$aPath/$aFImagePlusDist/FreeImagePlus.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/$aFImagePlusDist"
|
||||
}
|
||||
} else {
|
||||
lappend anErrInc "Error: 'FreeImage.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" == "" } {
|
||||
@@ -513,6 +459,10 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/$aFImageDist"]
|
||||
if { "$aFImageLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImageDist"
|
||||
set aFImagePlusLibPath [wokdep:SearchLib "freeimageplus" "$anArchIter" "$aPath/$aFImagePlusDist"]
|
||||
if { "$aFImagePlusLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImagePlusDist"
|
||||
}
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freeimage.${::SYS_LIB_SUFFIX}' not found (FreeImage)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
@@ -520,18 +470,28 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
}
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter"]
|
||||
if { "$aFImageDllPath" == "" } {
|
||||
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" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$anArchIter" ]
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aFImageDllPath" != "" } {
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/bin"]
|
||||
set aFImagePlusDllPath [wokdep:SearchBin "freeimageplus.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aFImageDllPath" != "" && "$aFImagePlusDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/$aFImageDist"]
|
||||
if { "$aFImageDllPath" != "" } {
|
||||
set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/$aFImageDist"]
|
||||
set aFImagePlusDllPath [wokdep:SearchBin "freeimageplus.dll" "$anArchIter" "$aPath/$aFImagePlusDist"]
|
||||
if { "$aFImageDllPath" != "" && "$aFImagePlusDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/$aFImageDist"
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/$aFImagePlusDist"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'freeimage.dll' is not found (FreeImage)"
|
||||
lappend anErrBin$anArchIter "Error: 'freeimage.dll' or 'freeimageplus.dll' not found (FreeImage)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
@@ -542,8 +502,8 @@ proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theEr
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search FFmpeg framework placement
|
||||
proc wokdep:SearchFFmpeg {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
# Search GL2PS library placement
|
||||
proc wokdep:SearchGL2PS {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
@@ -551,30 +511,47 @@ proc wokdep:SearchFFmpeg {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBi
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aFFmpegHPath [wokdep:SearchHeader "libavutil/avutil.h"]
|
||||
if { "$aFFmpegHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/libavutil/avutil.h"] } {
|
||||
set aGl2psHPath [wokdep:SearchHeader "gl2ps.h"]
|
||||
if { "$aGl2psHPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/gl2ps.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'libavutil/avutil.h' not found (FFmpeg)"
|
||||
lappend anErrInc "Error: 'gl2ps.h' not found (GL2PS)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter"]
|
||||
if { "$aFFmpegLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$anArchIter" ]
|
||||
set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aFFmpegLibPath" != "" } {
|
||||
set aGl2psLibPath [wokdep:SearchLib "gl2ps" "$anArchIter"]
|
||||
if { "$aGl2psLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$anArchIter" ]
|
||||
set aGl2psLibPath [wokdep:SearchLib "gl2ps" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aGl2psLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}avutil.${::SYS_LIB_SUFFIX}' not found (FFmpeg)"
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}gl2ps.${::SYS_LIB_SUFFIX}' not found (GL2PS)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter"]
|
||||
if { "$aGl2psDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{gl2ps}*] "$::VCVER" "$anArchIter" ]
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aGl2psDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
set aGl2psDllPath [wokdep:SearchBin "gl2ps.dll" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aGl2psDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'gl2ps.dll' not found (GL2PS)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
@@ -687,148 +664,6 @@ proc wokdep:SearchOpenCL {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBi
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search EGL library placement
|
||||
proc wokdep:SearchEGL {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
upvar $theErrBin32 anErrBin32
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aHeaderPath [wokdep:SearchHeader "EGL/egl.h"]
|
||||
if { "$aHeaderPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" == "" || ![file exists "$aPath/include/EGL/egl.h"] } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$::ARCH" ]
|
||||
}
|
||||
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/EGL/egl.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'EGL/egl.h' not found (EGL)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
set aLibName "EGL"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
# awkward exception
|
||||
set aLibName "libEGL"
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"]
|
||||
}
|
||||
|
||||
if { "$aLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aLibName}.${::SYS_LIB_SUFFIX}' not found (EGL)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter" "$aPath/bin"]
|
||||
}
|
||||
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'libEGL.dll' not found (EGL)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Search OpenGL ES 2.0 library placement
|
||||
proc wokdep:SearchGLES {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
|
||||
upvar $theErrInc anErrInc
|
||||
upvar $theErrLib32 anErrLib32
|
||||
upvar $theErrLib64 anErrLib64
|
||||
upvar $theErrBin32 anErrBin32
|
||||
upvar $theErrBin64 anErrBin64
|
||||
|
||||
set isFound "true"
|
||||
set aHeaderPath [wokdep:SearchHeader "GLES2/gl2.h"]
|
||||
if { "$aHeaderPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GLES}*] "$::VCVER" "$::ARCH" ]
|
||||
if { "$aPath" == "" || ![file exists "$aPath/include/GLES2/gl2.h"] } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$::ARCH" ]
|
||||
}
|
||||
|
||||
if { "$aPath" != "" && [file exists "$aPath/include/GLES2/gl2.h"] } {
|
||||
lappend ::CSF_OPT_INC "$aPath/include"
|
||||
} else {
|
||||
lappend anErrInc "Error: 'GLES2/gl2.h' not found (OpenGL ES 2.0)"
|
||||
set isFound "false"
|
||||
}
|
||||
}
|
||||
|
||||
set aLibName "GLESv2"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
# awkward exception
|
||||
set aLibName "libGLESv2"
|
||||
}
|
||||
|
||||
foreach anArchIter {64 32} {
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GLES}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"]
|
||||
if { "$aLibPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ]
|
||||
set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"]
|
||||
}
|
||||
|
||||
if { "$aLibPath" != "" } {
|
||||
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
|
||||
} else {
|
||||
lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aLibName}.${::SYS_LIB_SUFFIX}' not found (OpenGL ES 2.0)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter" "$aPath/bin"]
|
||||
if { "$aDllPath" == "" } {
|
||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ]
|
||||
set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter" "$aPath/bin"]
|
||||
}
|
||||
|
||||
if { "$aDllPath" != "" } {
|
||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
|
||||
} else {
|
||||
lappend anErrBin$anArchIter "Error: 'libGLESv2.dll' not found (OpenGL ES 2.0)"
|
||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "$isFound"
|
||||
}
|
||||
|
||||
# Auxiliary function, gets VTK version to set default search directory
|
||||
proc wokdep:VtkVersion { thePath } {
|
||||
set aResult "6.1"
|
||||
@@ -935,10 +770,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"
|
||||
@@ -1111,13 +946,13 @@ proc wokdep:SaveCustom {} {
|
||||
|
||||
puts $aFile ""
|
||||
puts $aFile "rem Optional 3rd-parties switches"
|
||||
foreach anEnvIter $::THE_ENV_VARIABLES {
|
||||
set aName ${anEnvIter}
|
||||
set aValue [set ::${anEnvIter}]
|
||||
if { "$aValue" != "" } {
|
||||
puts $aFile "set ${aName}=$aValue"
|
||||
}
|
||||
}
|
||||
puts $aFile "set HAVE_FREEIMAGE=$::HAVE_FREEIMAGE"
|
||||
puts $aFile "set HAVE_GL2PS=$::HAVE_GL2PS"
|
||||
puts $aFile "set HAVE_TBB=$::HAVE_TBB"
|
||||
puts $aFile "set HAVE_OPENCL=$::HAVE_OPENCL"
|
||||
puts $aFile "set HAVE_VTK=$::HAVE_VTK"
|
||||
puts $aFile "set CHECK_QT4=$::CHECK_QT4"
|
||||
puts $aFile "set CHECK_JDK=$::CHECK_JDK"
|
||||
|
||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||
puts $aFile ""
|
||||
@@ -1160,13 +995,16 @@ proc wokdep:SaveCustom {} {
|
||||
|
||||
puts $aFile ""
|
||||
puts $aFile "# Optional 3rd-parties switches"
|
||||
foreach anEnvIter $::THE_ENV_VARIABLES {
|
||||
set aName ${anEnvIter}
|
||||
set aValue [set ::${anEnvIter}]
|
||||
if { "$aValue" != "" } {
|
||||
puts $aFile "export ${aName}=${aValue}"
|
||||
}
|
||||
puts $aFile "export HAVE_FREEIMAGE=$::HAVE_FREEIMAGE"
|
||||
puts $aFile "export HAVE_GL2PS=$::HAVE_GL2PS"
|
||||
puts $aFile "export HAVE_TBB=$::HAVE_TBB"
|
||||
puts $aFile "export HAVE_OPENCL=$::HAVE_OPENCL"
|
||||
puts $aFile "export HAVE_VTK=$::HAVE_VTK"
|
||||
if { "$::tcl_platform(os)" == "Darwin" } {
|
||||
puts $aFile "export MACOSX_USE_GLX=$::MACOSX_USE_GLX"
|
||||
}
|
||||
puts $aFile "export CHECK_QT4=$::CHECK_QT4"
|
||||
puts $aFile "export CHECK_JDK=$::CHECK_JDK"
|
||||
|
||||
set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER]
|
||||
puts $aFile ""
|
||||
|
152
adm/gendoc.tcl
@@ -29,7 +29,7 @@ source [file join [file dirname [info script]] occaux.tcl]
|
||||
|
||||
# Prints help message
|
||||
proc OCCDoc_PrintHelpMessage {} {
|
||||
puts "\nUsage: gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\] \[-update_images_size\]"
|
||||
puts "\nUsage: gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]"
|
||||
puts ""
|
||||
puts "Options are:"
|
||||
puts ""
|
||||
@@ -56,8 +56,7 @@ proc OCCDoc_PrintHelpMessage {} {
|
||||
puts " -s=<search_mode> : Specifies the Search mode of HTML documents"
|
||||
puts " Can be: none | local | server | external"
|
||||
puts " -h : Prints this help message"
|
||||
puts " -v : Enables more verbose output"
|
||||
puts " -update_images_size: Updates width of images in *.md files during pdf generation for @figure alias. It takes actual size of image."
|
||||
puts " -v : Enables more verbose output"
|
||||
}
|
||||
|
||||
# A command for User Documentation compilation
|
||||
@@ -70,9 +69,8 @@ proc gendoc {args} {
|
||||
set MODULES {}
|
||||
set DOCLABEL ""
|
||||
set VERB_MODE "NO"
|
||||
set UPDATE_IMAGES_SIZE "NO"
|
||||
set SEARCH_MODE "none"
|
||||
set MATHJAX_LOCATION "https://cdn.mathjax.org/mathjax/latest"
|
||||
set MATHJAX_LOCATION "http://cdn.mathjax.org/mathjax/latest"
|
||||
set mathjax_js_name "MathJax.js"
|
||||
set DOCTYPE_COMBO_FLAG 0
|
||||
set GENMODE_COMBO_FLAG 0
|
||||
@@ -173,7 +171,7 @@ proc gendoc {args} {
|
||||
if { $DOCTYPE_COMBO_FLAG != 1 } {
|
||||
set DOC_TYPE "REFMAN"
|
||||
set DOCTYPE_COMBO_FLAG 1
|
||||
if { [file exists [OCCDoc_GetProdRootDir]/src/VAS/Products.tcl] } {
|
||||
if { [info exists env(PRODROOT)] && [file exists $::env(PRODROOT)/src/VAS/Products.tcl] } {
|
||||
set GENERATE_PRODUCTS_REFMAN "YES"
|
||||
}
|
||||
} else {
|
||||
@@ -199,8 +197,6 @@ proc gendoc {args} {
|
||||
|
||||
} elseif {$arg_n == "v"} {
|
||||
set VERB_MODE "YES"
|
||||
} elseif {$arg_n == "update_images_size"} {
|
||||
set UPDATE_IMAGES_SIZE "YES"
|
||||
} elseif {$arg_n == "ug"} {
|
||||
if { ([ lsearch $args_names "refman" ] != -1) } {
|
||||
continue
|
||||
@@ -316,23 +312,7 @@ proc gendoc {args} {
|
||||
|
||||
# Start main activities
|
||||
if { $GEN_MODE != "PDF_ONLY" } {
|
||||
if { [OCCDoc_GetProdRootDir] == ""} {
|
||||
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $UPDATE_IMAGES_SIZE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
} else {
|
||||
if { $DOC_TYPE == "REFMAN" } {
|
||||
if { $MODULES != "" } {
|
||||
foreach module $MODULES {
|
||||
OCCDoc_Main $DOC_TYPE $DOCFILES $module $GEN_MODE $VERB_MODE $UPDATE_IMAGES_SIZE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
}
|
||||
} else {
|
||||
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $UPDATE_IMAGES_SIZE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
}
|
||||
} else {
|
||||
foreach md $DOCFILES {
|
||||
OCCDoc_Main $DOC_TYPE $md $MODULES $GEN_MODE $VERB_MODE $UPDATE_IMAGES_SIZE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
}
|
||||
}
|
||||
}
|
||||
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
} else {
|
||||
puts "Generating OCCT User Guides in PDF format...\n"
|
||||
foreach pdf $DOCFILES {
|
||||
@@ -340,19 +320,25 @@ proc gendoc {args} {
|
||||
puts "Info: Processing file $pdf\n"
|
||||
|
||||
# Some values are hardcoded because they are related only to PDF generation
|
||||
OCCDoc_Main "OVERVIEW" [list $pdf] {} "PDF_ONLY" $VERB_MODE $UPDATE_IMAGES_SIZE "none" $MATHJAX_LOCATION "NO" $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
OCCDoc_Main "OVERVIEW" [list $pdf] {} "PDF_ONLY" $VERB_MODE "none" $MATHJAX_LOCATION "NO" $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
}
|
||||
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
|
||||
puts "\nPDF files are generated in \n[file normalize [OCCDoc_GetRootDir]/doc/pdf]"
|
||||
}
|
||||
}
|
||||
|
||||
# Main procedure for documents compilation
|
||||
proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode updateImagesSize searchMode mathjaxLocation generateProductsRefman DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH} {
|
||||
proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode searchMode mathjaxLocation generateProductsRefman DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH} {
|
||||
|
||||
global available_docfiles
|
||||
global available_pdf
|
||||
|
||||
set ROOTDIR [OCCDoc_GetRootDir [OCCDoc_GetProdRootDir]]
|
||||
set PRODPATH ""
|
||||
if { [string compare -nocase $generateProductsRefman "YES"] == 0 } {
|
||||
set PRODPATH "$::env(PRODROOT)"
|
||||
}
|
||||
|
||||
set ROOTDIR [OCCDoc_GetRootDir $PRODPATH]
|
||||
set INDIR [OCCDoc_GetDoxDir]
|
||||
set OUTDIR $ROOTDIR/doc
|
||||
set PDFDIR $OUTDIR/pdf
|
||||
@@ -362,29 +348,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
set HTMLDIR $OUTDIR/overview/html
|
||||
set LATEXDIR $OUTDIR/overview/latex
|
||||
set DOXYFILE $OUTDIR/OCCT.cfg
|
||||
|
||||
# OUTDIR for products documentation should be separate directories for each components
|
||||
if { [OCCDoc_GetProdRootDir] != ""} {
|
||||
if { $docType == "REFMAN" } {
|
||||
if { "$modules" != "" } {
|
||||
source "[OCCDoc_GetSourceDir [OCCDoc_GetProdRootDir]]/VAS/${modules}.tcl"
|
||||
set doc_component_name [${modules}:documentation_name]
|
||||
set OUTDIR $OUTDIR/$doc_component_name
|
||||
}
|
||||
} else {
|
||||
if {[regexp {([^/]+)/([^/]+)/([^/]+)} $docfiles dump doc_type doc_component doc_name]} {
|
||||
set PDFNAME [file rootname $doc_name]
|
||||
set OUTDIR $OUTDIR/$doc_component
|
||||
} else {
|
||||
error "Could not parse input path to *.md file: \"${docfiles}\""
|
||||
}
|
||||
}
|
||||
set HTMLDIR $OUTDIR/html
|
||||
set LATEXDIR $OUTDIR/latex
|
||||
set DOXYFILE $OUTDIR/OCCT.cfg
|
||||
set TAGFILEDIR $OUTDIR/refman
|
||||
}
|
||||
|
||||
|
||||
# Create or cleanup the output folders
|
||||
if { [string compare -nocase $generateProductsRefman "YES"] != 0 } {
|
||||
if { ![file exists $OUTDIR] } {
|
||||
@@ -393,24 +357,19 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
if { ![file exists $HTMLDIR] } {
|
||||
file mkdir $HTMLDIR
|
||||
}
|
||||
if { [OCCDoc_GetProdRootDir] == ""} {
|
||||
if { ![file exists $PDFDIR] } {
|
||||
file mkdir $PDFDIR
|
||||
}
|
||||
if { ![file exists $UGDIR] } {
|
||||
file mkdir $UGDIR
|
||||
}
|
||||
if { ![file exists $DGDIR] } {
|
||||
file mkdir $DGDIR
|
||||
}
|
||||
if { ![file exists $PDFDIR] } {
|
||||
file mkdir $PDFDIR
|
||||
}
|
||||
|
||||
if { $generatorMode == "PDF_ONLY" } {
|
||||
if { [file exists $LATEXDIR] } {
|
||||
file delete -force $LATEXDIR
|
||||
}
|
||||
file mkdir $LATEXDIR
|
||||
if { ![file exists $UGDIR] } {
|
||||
file mkdir $UGDIR
|
||||
}
|
||||
if { ![file exists $DGDIR] } {
|
||||
file mkdir $DGDIR
|
||||
}
|
||||
if { [file exists $LATEXDIR] } {
|
||||
file delete -force $LATEXDIR
|
||||
}
|
||||
file mkdir $LATEXDIR
|
||||
}
|
||||
if { $docType == "REFMAN" } {
|
||||
if { ![file exists $TAGFILEDIR] } {
|
||||
@@ -438,11 +397,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
set DOCDIR "$OUTDIR/refman"
|
||||
puts "\nGenerating Open CASCADE Reference Manual\n"
|
||||
} elseif { $docType == "OVERVIEW" } {
|
||||
if { [OCCDoc_GetProdRootDir] == ""} {
|
||||
set DOCDIR "$OUTDIR/overview"
|
||||
} else {
|
||||
set DOCDIR "$OUTDIR"
|
||||
}
|
||||
set DOCDIR "$OUTDIR/overview"
|
||||
set FORMAT ""
|
||||
if { ($generatorMode == "HTML_ONLY") || ($generatorMode == "CHM_ONLY") } {
|
||||
if { $generatorMode == "HTML_ONLY" } {
|
||||
@@ -461,18 +416,10 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
# Generate Doxyfile
|
||||
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating Doxyfile..."
|
||||
|
||||
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH [OCCDoc_GetProdRootDir]] == -1 } {
|
||||
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH $PRODPATH] == -1 } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# update image sizes in *.md files if necessary
|
||||
if { ("$::tcl_platform(platform)" == "windows") &&
|
||||
($updateImagesSize == "YES") } {
|
||||
if { [OCCDoc_UpdateImagesSize $docfiles [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]] $verboseMode] == -1 } {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
# Run doxygen tool
|
||||
set starttimestamp [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
|
||||
|
||||
@@ -617,29 +564,21 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
|
||||
set destFolder $PDFDIR
|
||||
set parsed_string [split $TEX "_"]
|
||||
if { [OCCDoc_GetProdRootDir] == ""} {
|
||||
if { [lsearch $parsed_string "tutorial"] != -1 } {
|
||||
set TEX [string map [list occt__ occt_] $TEX]
|
||||
set destFolder $PDFDIR
|
||||
} elseif { [lsearch $parsed_string "user"] != -1 } {
|
||||
set TEX [string map [list user_guides__ ""] $TEX]
|
||||
set destFolder $UGDIR
|
||||
} elseif { [lsearch $parsed_string "dev"] != -1 } {
|
||||
set TEX [string map [list dev_guides__ ""] $TEX]
|
||||
set destFolder $DGDIR
|
||||
}
|
||||
} else {
|
||||
set destFolder $OUTDIR
|
||||
set TEX "$PDFNAME"
|
||||
if { [lsearch $parsed_string "tutorial"] != -1 } {
|
||||
set TEX [string map [list occt__ occt_] $TEX]
|
||||
set destFolder $PDFDIR
|
||||
} elseif { [lsearch $parsed_string "user"] != -1 } {
|
||||
set TEX [string map [list user_guides__ ""] $TEX]
|
||||
set destFolder $UGDIR
|
||||
} elseif { [lsearch $parsed_string "dev"] != -1 } {
|
||||
set TEX [string map [list dev_guides__ ""] $TEX]
|
||||
set destFolder $DGDIR
|
||||
}
|
||||
file rename -force $LATEXDIR/refman.pdf "$destFolder/$TEX.pdf"
|
||||
|
||||
}
|
||||
} elseif { $generatorMode == "CHM_ONLY" } {
|
||||
if { [OCCDoc_GetProdRootDir] == ""} {
|
||||
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
|
||||
} else {
|
||||
file rename -force $ROOTDIR/doc/overview.chm $OUTDIR/occt_overview.chm
|
||||
}
|
||||
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
|
||||
}
|
||||
cd $INDIR
|
||||
|
||||
@@ -658,17 +597,14 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode u
|
||||
foreach file $deleteList {
|
||||
file delete $file
|
||||
}
|
||||
|
||||
puts "\nPDF files are generated in \n[file normalize $OUTDIR]"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Generates Doxygen configuration file for Overview documentation
|
||||
proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMode ""} {DocFilesList {}} {ModulesList {}} verboseMode searchMode hhcPath mathjaxLocation graphvizPath productsPath} {
|
||||
set inputDir [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
|
||||
|
||||
set TEMPLATES_DIR [OCCDoc_GetDoxDir]/resources
|
||||
set inputDir [OCCDoc_GetDoxDir]
|
||||
set TEMPLATES_DIR $inputDir/resources
|
||||
set occt_version [OCCDoc_DetectCasVersion]
|
||||
|
||||
# Delete existent doxyfile
|
||||
@@ -795,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]
|
||||
@@ -815,10 +751,10 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
|
||||
# Add common options for generation of Overview and User Guides
|
||||
puts $doxyFile "PROJECT_NUMBER = $occt_version"
|
||||
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
|
||||
puts $doxyFile "PROJECT_LOGO = [OCCDoc_GetDoxDir]/resources/occ_logo.png"
|
||||
puts $doxyFile "PROJECT_LOGO = $inputDir/resources/occ_logo.png"
|
||||
|
||||
set PARAM_INPUT "INPUT ="
|
||||
set PARAM_IMAGEPATH "IMAGE_PATH = [OCCDoc_GetDoxDir]/resources/ "
|
||||
set PARAM_IMAGEPATH "IMAGE_PATH = $inputDir/resources/ "
|
||||
foreach docFile $DocFilesList {
|
||||
set NEW_IMG_PATH "$inputDir/$docFile"
|
||||
if { [string compare $NEW_IMG_PATH [OCCDoc_GetRootDir $productsPath]] != 0 } {
|
||||
|
1300
adm/genproj.tcl
141
adm/occaux.tcl
@@ -32,12 +32,12 @@ proc OCCDoc_ParseArguments {arguments} {
|
||||
array set args_values {}
|
||||
|
||||
foreach arg $arguments {
|
||||
if {[regexp {^(-)[a-z_]+$} $arg] == 1} {
|
||||
if {[regexp {^(-)[a-z]+$} $arg] == 1} {
|
||||
set name [string range $arg 1 [string length $arg]-1]
|
||||
lappend args_names $name
|
||||
set args_values($name) "NULL"
|
||||
continue
|
||||
} elseif {[regexp {^(-)[a-z_]+=.+$} $arg] == 1} {
|
||||
} elseif {[regexp {^(-)[a-z]+=.+$} $arg] == 1} {
|
||||
set equal_symbol_position [string first "=" $arg]
|
||||
set name [string range $arg 1 $equal_symbol_position-1]
|
||||
lappend args_names $name
|
||||
@@ -59,19 +59,8 @@ proc OCCDoc_ParseArguments {arguments} {
|
||||
}
|
||||
|
||||
# Returns script parent folder
|
||||
proc OCCDoc_GetDoxDir { {theProductsPath ""} } {
|
||||
if { $theProductsPath == "" } {
|
||||
return [file normalize [file dirname [info script]]/../dox]
|
||||
} else {
|
||||
return [file normalize $theProductsPath]/dox
|
||||
}
|
||||
}
|
||||
|
||||
# Returns products root folder
|
||||
proc OCCDoc_GetProdRootDir {} {
|
||||
if {[info exists ::env(PRODROOT)]} {
|
||||
return [file normalize $::env(PRODROOT)]
|
||||
}
|
||||
proc OCCDoc_GetDoxDir {} {
|
||||
return [file normalize [file dirname [info script]]/../dox]
|
||||
}
|
||||
|
||||
# Returns OCCT root dir
|
||||
@@ -82,6 +71,7 @@ proc OCCDoc_GetOCCTRootDir {} {
|
||||
|
||||
# Returns root dir
|
||||
proc OCCDoc_GetRootDir { {theProductsPath ""} } {
|
||||
|
||||
if { $theProductsPath == "" } {
|
||||
return [OCCDoc_GetOCCTRootDir]
|
||||
} else {
|
||||
@@ -746,7 +736,8 @@ proc OCCDoc_PostProcessor {outDir} {
|
||||
|
||||
# Loads a list of docfiles from file FILES.txt
|
||||
proc OCCDoc_LoadFilesList {} {
|
||||
set INPUTDIR [OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]
|
||||
|
||||
set INPUTDIR [OCCDoc_GetDoxDir]
|
||||
|
||||
global available_docfiles
|
||||
set available_docfiles {}
|
||||
@@ -808,11 +799,7 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
|
||||
}
|
||||
|
||||
# Copy template file to latex folder
|
||||
if { "[OCCDoc_GetProdRootDir]" != "" } {
|
||||
file copy "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/resources/prod_pdf_template.tex" $DOCNAME
|
||||
} else {
|
||||
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
|
||||
}
|
||||
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
|
||||
|
||||
# Get templatized data
|
||||
set texfile [open $DOCNAME "r"]
|
||||
@@ -821,7 +808,6 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
|
||||
|
||||
# Replace dummy values
|
||||
set year [clock format [clock seconds] -format {%Y}]
|
||||
set month [clock format [clock seconds] -format {%B}]
|
||||
set texfile [open $DOCNAME "w"]
|
||||
set casVersion [OCCDoc_DetectCasVersion]
|
||||
|
||||
@@ -829,23 +815,23 @@ proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
|
||||
set docLabel ""
|
||||
foreach aFileName $latexFilesList {
|
||||
# Find the file in FILES_PDF.txt
|
||||
set parsedFileName [file rootname [lindex [split $aFileName "/" ] end]]
|
||||
if { [regexp "${parsedFileName}$" $fileName] } {
|
||||
set filepath "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/$aFileName"
|
||||
set parsedFileName [split $aFileName "/" ]
|
||||
set newfileName [string range $fileName [expr [string first "__" $fileName] + 2] end]
|
||||
|
||||
if { [lsearch -nocase $parsedFileName "$newfileName.md" ] != -1 } {
|
||||
set filepath "[OCCDoc_GetDoxDir]/$aFileName"
|
||||
if { [file exists $filepath] } {
|
||||
set MDFile [open $filepath "r"]
|
||||
set label [split [gets $MDFile] "\{"]
|
||||
set docLabel [lindex $label 0]
|
||||
close $MDFile
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set occtlogo_path "[OCCDoc_GetDoxDir]/resources/occt_logo.png"
|
||||
set occlogo_path "[OCCDoc_GetDoxDir]/resources/occ_logo.png"
|
||||
set copyright_path "[OCCDoc_GetDoxDir [OCCDoc_GetProdRootDir]]/resources/prod_pdf_template.tex"
|
||||
set texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year" DEFMONTH "$month" DEFCOPYRIGHT "$copyright_path" DEFLOGO "$occtlogo_path" DEFOCCLOGO "$occlogo_path" DEFTITLE ""] $texfile_loaded]
|
||||
set texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year"] $texfile_loaded]
|
||||
|
||||
# Get data
|
||||
puts $texfile $texfile_loaded
|
||||
@@ -900,100 +886,3 @@ proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
|
||||
file rename $TMPFILENAME $TEX
|
||||
}
|
||||
}
|
||||
|
||||
# update image sizes in *.md files for PDF documentation if necessary
|
||||
proc OCCDoc_UpdateImagesSize {{DocFilesList {}} DoxDir verboseMode} {
|
||||
|
||||
foreach DocFile $DocFilesList {
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Updating image sizes for file $DocFile..."
|
||||
}
|
||||
|
||||
if {![file exists $DoxDir/$DocFile]} {
|
||||
puts "Error: file $DoxDir/$DocFile does not exist."
|
||||
return -1
|
||||
}
|
||||
|
||||
if { [catch {set aFile [open $DoxDir/$DocFile r]} aReason] } {
|
||||
puts "Error: cannot open file \"$DoxDir/$DocFile\" for reading: $aReason"
|
||||
return -1
|
||||
}
|
||||
|
||||
set aFileContent [read $aFile]
|
||||
close $aFile
|
||||
|
||||
set aNumberOfImages [regexp -all -line {@figure\s*\{[^\}]+\}} $aFileContent]
|
||||
set aLastImageIndex 0
|
||||
|
||||
if {!$aNumberOfImages} {
|
||||
continue
|
||||
}
|
||||
|
||||
while { $aNumberOfImages } {
|
||||
set currentFigureIndex [string first "@figure" $aFileContent ${aLastImageIndex}]
|
||||
set first_figure_inclusion [string range $aFileContent $currentFigureIndex end]
|
||||
set line ""
|
||||
set path ""
|
||||
set name ""
|
||||
set width ""
|
||||
set dump ""
|
||||
if [regexp {^(@figure[\s\t]*\{[^\}]+\})} $first_figure_inclusion dump line] {
|
||||
if { [regexp {@figure[\s\t]*\{([^,\}]+)[\s\t]*\}} $line dump aPath] } {
|
||||
set path "${aPath}"
|
||||
} elseif { [regexp {@figure[\s\t]*\{([^,\}]+)[\s\t]*,[\s\t]*\"(.*)\"\}} $line dump aPath aName] } {
|
||||
set path "${aPath}"
|
||||
set name "\"${aName}\""
|
||||
} elseif { [regexp {@figure[\s\t]*\{([^,\}]+)[\s\t]*,[\s\t]*\"(.*)\"[\s\t]*,[\s\t]*([0-9]+)\}} $line dump aPath aName aWidth] } {
|
||||
set path "${aPath}"
|
||||
set name "\"${aName}\""
|
||||
set width "${aWidth}"
|
||||
}
|
||||
|
||||
if {$name == ""} {
|
||||
set name "\"\""
|
||||
}
|
||||
# find image
|
||||
set anImagePath ""
|
||||
if {[file exists "$DoxDir/$path"]} {
|
||||
set anImagePath "$DoxDir/$path"
|
||||
} elseif {[file exists "[OCCDoc_GetDoxDir]/$path"]} {
|
||||
set anImagePath "[OCCDoc_GetDoxDir]/$path"
|
||||
} elseif {[file exists "[OCCDoc_GetDoxDir]/resources/$path"]} {
|
||||
set anImagePath "[OCCDoc_GetDoxDir]/resources/$path"
|
||||
} elseif {[file exists "$DoxDir/[file dirname ${DocFile}]/images/$path"]} {
|
||||
set anImagePath "$DoxDir/[file dirname ${DocFile}]/images/$path"
|
||||
}
|
||||
if { ![file exists "$anImagePath"] } {
|
||||
puts "Warning: Could not find \"$DoxDir/$path\" file"
|
||||
incr aNumberOfImages -1
|
||||
set aLastImageIndex [expr $currentFigureIndex + [string length $dump]]
|
||||
continue
|
||||
}
|
||||
# get image width
|
||||
if [catch {exec identify "$anImagePath"} res] {
|
||||
puts "Error: identify returns \"${identify_error}\""
|
||||
incr aNumberOfImages -1
|
||||
set aLastImageIndex [expr $currentFigureIndex + [string length $dump]]
|
||||
continue
|
||||
} else {
|
||||
if [regexp {([0-9]+)x[0-9]+} $res dump2 loc_width] {
|
||||
set width $loc_width
|
||||
}
|
||||
}
|
||||
|
||||
set newInfo "@figure{$path,$name,$width}"
|
||||
set aFileContent "[string replace $aFileContent $currentFigureIndex [expr $currentFigureIndex + [string length $dump] - 1] $newInfo]"
|
||||
set aLastImageIndex [expr $currentFigureIndex + [string length $newInfo]]
|
||||
}
|
||||
incr aNumberOfImages -1
|
||||
}
|
||||
|
||||
if { [catch {set aFile [open $DoxDir/$DocFile w]} aReason] } {
|
||||
puts "Error: cannot open file \"$DoxDir/$DocFile\" for writting: $aReason"
|
||||
return -1
|
||||
}
|
||||
|
||||
puts $aFile "${aFileContent}"
|
||||
close $aFile
|
||||
}
|
||||
}
|
||||
|
@@ -1,39 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
<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)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
<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@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
|
@@ -1,14 +0,0 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# OpenCASCADECompileDefinitionsAndFlags-@OCCT_CONFIGURATION_LOWER@.cmake - OpenCASCADE CMake file
|
||||
# with compile definitions and C/C++ flags for @OCCT_CONFIGURATION@ configuration.
|
||||
#
|
||||
# This file is configured by OpenCASCADE.
|
||||
#
|
||||
|
||||
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
|
||||
set (OpenCASCADE_C_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_C_FLAGS@")
|
||||
set (OpenCASCADE_CXX_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_CXX_FLAGS@")
|
||||
|
||||
# The compile definitions used by OpenCASCADE.
|
||||
@SET_OpenCASCADE_COMPILE_DEFINITIONS@
|
@@ -1,89 +0,0 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects.
|
||||
#
|
||||
# This file is configured by OpenCASCADE.
|
||||
#
|
||||
|
||||
if(OpenCASCADE_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(OpenCASCADE_ALREADY_INCLUDED 1)
|
||||
|
||||
# The OpenCASCADE version number
|
||||
set (OpenCASCADE_MAJOR_VERSION "@OCC_VERSION_MAJOR@")
|
||||
set (OpenCASCADE_MINOR_VERSION "@OCC_VERSION_MINOR@")
|
||||
set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@")
|
||||
set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
|
||||
|
||||
# Compute the installation prefix from this OpenCASCADEConfig.cmake file
|
||||
# location, by going up one level + one level if "cmake" + one level if "lib".
|
||||
# This is made to support different locations of CMake files:
|
||||
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
|
||||
# - in Windows style: $INSTALL_DIR/cmake
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
endif()
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
endif()
|
||||
|
||||
# Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
|
||||
set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_BIN@")
|
||||
set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_LIB@")
|
||||
set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_SCRIPT@")
|
||||
set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_INCLUDE@")
|
||||
set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_RESOURCE@")
|
||||
|
||||
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
|
||||
set (OpenCASCADE_C_FLAGS "@CMAKE_C_FLAGS@")
|
||||
set (OpenCASCADE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
|
||||
@SET_OpenCASCADE_LINKER_FLAGS@
|
||||
|
||||
# List of available OpenCASCADE modules.
|
||||
set (OpenCASCADE_MODULES @OCCT_MODULES_ENABLED@)
|
||||
@SET_OpenCASCADE_MODULES_TOOLKITS@
|
||||
# List of available OpenCASCADE libraries.
|
||||
set (OpenCASCADE_LIBRARIES @OCCT_LIBRARIES@)
|
||||
|
||||
# OpenCASCADE global configuration options.
|
||||
set (OpenCASCADE_COMPILER "@COMPILER@")
|
||||
set (OpenCASCADE_BUILD_WITH_DEBUG @BUILD_WITH_DEBUG@)
|
||||
set (OpenCASCADE_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
||||
@SET_OpenCASCADE_BUILD_TYPE@
|
||||
|
||||
# Use of third-party libraries.
|
||||
set (OpenCASCADE_WITH_TCL @USE_TCL@)
|
||||
set (OpenCASCADE_WITH_FREETYPE @USE_FREETYPE@)
|
||||
set (OpenCASCADE_WITH_FREEIMAGE @USE_FREEIMAGE@)
|
||||
set (OpenCASCADE_WITH_GL2PS @USE_GL2PS@)
|
||||
set (OpenCASCADE_WITH_TBB @USE_TBB@)
|
||||
set (OpenCASCADE_WITH_VTK @USE_VTK@)
|
||||
set (OpenCASCADE_WITH_GLES2 @USE_GLES2@)
|
||||
@SET_OpenCASCADE_WITH_D3D@
|
||||
@SET_OpenCASCADE_WITH_GLX@
|
||||
|
||||
# Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
|
||||
file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
|
||||
foreach(f ${CONFIG_FILES})
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
if (NOT OpenCASCADE_FIND_COMPONENTS)
|
||||
set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES})
|
||||
endif ()
|
||||
|
||||
# Import OpenCASCADE targets.
|
||||
foreach(_comp ${OpenCASCADE_FIND_COMPONENTS})
|
||||
if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}")
|
||||
set(OpenCASCADE_FOUND False)
|
||||
set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}")
|
||||
if (NOT OpenCASCADE_FIND_QUIETLY)
|
||||
message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}")
|
||||
endif()
|
||||
else()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake")
|
||||
endif()
|
||||
endforeach()
|
@@ -1,8 +0,0 @@
|
||||
# A toolchain file to configure a Makefile Generators or the Ninja generator to target Android for cross-compiling.
|
||||
# Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
|
||||
|
||||
set (CMAKE_SYSTEM_NAME Android)
|
||||
set (CMAKE_SYSTEM_VERSION 15) # API level
|
||||
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
|
||||
set (CMAKE_ANDROID_NDK "")
|
||||
set (CMAKE_ANDROID_STL_TYPE gnustl_shared)
|
@@ -1,20 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem Setup environment
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
rem Define path to project file
|
||||
set "PRJFILE=%~dp0\adm\wnt\cbp\OCCT.workspace"
|
||||
if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\wnt\cbp\Products.workspace"
|
||||
if not "%4" == "" (
|
||||
set "PRJFILE=%4"
|
||||
)
|
||||
|
||||
if "%CB_PATH%"=="" if exist "%PROGRAMFILES%\CodeBlocks" set "CB_PATH=%PROGRAMFILES%\CodeBlocks\codeblocks.exe"
|
||||
if "%CB_PATH%"=="" if exist "%PROGRAMFILES(x86)%\CodeBlocks" set "CB_PATH=%PROGRAMFILES(x86)%\CodeBlocks\codeblocks.exe"
|
||||
if "%CB_PATH%"=="" set "CB_PATH=codeblocks.exe"
|
||||
|
||||
set "CASBIN=wnt\cbp"
|
||||
set "PATH=%~dp0%CASBIN%\bin%CASDEB%;%PATH%"
|
||||
|
||||
start "" "%CB_PATH%" "%PRJFILE%"
|
@@ -1,5 +1,14 @@
|
||||
echo off
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
|
||||
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
|
||||
if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
rem include other custom.bat files with specific 3rdparty paths
|
||||
@ADDITIONAL_CUSTOM_CONTENT@
|
||||
|
||||
|
@@ -1,42 +1,15 @@
|
||||
echo off
|
||||
|
||||
if /I "%VCVER%" == "@COMPILER@" (
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
rem set environment variables used by OCCT
|
||||
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
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_DIRS@"
|
||||
set "EGL_DIR=@3RDPARTY_EGL_DLL_DIRS@"
|
||||
set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIRS@"
|
||||
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIRS@"
|
||||
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@3RDPARTY_FREEIMAGEPLUS_DLL_DIR@"
|
||||
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
|
||||
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
||||
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
|
||||
|
||||
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
rem CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
|
||||
rem multiple and single configuration builds
|
||||
set "CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
if ["@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"] == [""] (
|
||||
set "CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/bin%3"
|
||||
)
|
||||
set "CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
if ["@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"] == [""] (
|
||||
set "CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/lib%3"
|
||||
)
|
||||
|
||||
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/inc"
|
||||
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src"
|
||||
set "CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data"
|
||||
set "CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples"
|
||||
set "CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests"
|
||||
set "CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc"
|
||||
|
||||
rem for compatability with external application using CASROOT
|
||||
set "CASROOT=@CMAKE_SOURCE_DIR@"
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -1,32 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
# set environment variables used by OCCT
|
||||
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
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_DIRS@"
|
||||
export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIRS@"
|
||||
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@"
|
||||
export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@"
|
||||
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
|
||||
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
|
||||
|
||||
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/inc"
|
||||
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/src"
|
||||
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
|
||||
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
|
||||
export CSF_OCCTTestsPath="@CMAKE_SOURCE_DIR@/tests"
|
||||
export CSF_OCCTDocPath="@CMAKE_SOURCE_DIR@/doc"
|
||||
|
||||
# for compatability with external application using CASROOT
|
||||
export CASROOT="@CMAKE_SOURCE_DIR@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -1,37 +1,15 @@
|
||||
echo off
|
||||
|
||||
rem CASDEB comes as third argument
|
||||
|
||||
if /I "%VCVER%" == "@COMPILER@" (
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
rem set environment variables used by OCCT
|
||||
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
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_DIRS@"
|
||||
set "EGL_DIR=@USED_3RDPARTY_EGL_DIRS@"
|
||||
set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIRS@"
|
||||
set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIRS@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@USED_3RDPARTY_FREEIMAGEPLUS_DIR@"
|
||||
set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIR@"
|
||||
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
||||
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
||||
|
||||
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
set "CSF_OCCTBinPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@%3"
|
||||
set "CSF_OCCTLibPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@%3"
|
||||
|
||||
set "CSF_OCCTIncludePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
|
||||
set "CSF_OCCTResourcePath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
|
||||
set "CSF_OCCTDataPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
|
||||
set "CSF_OCCTSamplesPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
|
||||
set "CSF_OCCTTestsPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
|
||||
set "CSF_OCCTDocPath=@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
|
||||
|
||||
rem for compatability with external application using CASROOT
|
||||
set "CASROOT=@INSTALL_DIR_ABSOLUTE@"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -1,32 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||
# set environment variables used by OCCT
|
||||
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
|
||||
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_DIRS@"
|
||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIRS@"
|
||||
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 TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
export CSF_OCCTBinPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_BIN@"
|
||||
export CSF_OCCTLibPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_LIB@"
|
||||
export CSF_OCCTIncludePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_RESOURCE@"
|
||||
export CSF_OCCTDataPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DATA@"
|
||||
export CSF_OCCTSamplesPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SAMPLES@"
|
||||
export CSF_OCCTTestsPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_TESTS@"
|
||||
export CSF_OCCTDocPath="@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_DOC@"
|
||||
|
||||
# for compatability with external application using CASROOT
|
||||
export CASROOT="@INSTALL_DIR_ABSOLUTE@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
aCurrentPath="$PWD"
|
||||
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'
|
||||
cd ${aCurrentPath}
|
||||
DRAWEXE
|
||||
|
@@ -9,22 +9,21 @@ 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 "CASDEB="
|
||||
set "VCVER=vc10"
|
||||
set "ARCH=64"
|
||||
set "VCVER=vc8"
|
||||
set "ARCH=32"
|
||||
set "VCVARS="
|
||||
set "HAVE_TBB=false"
|
||||
set "HAVE_OPENCL=false"
|
||||
set "HAVE_FREEIMAGE=false"
|
||||
set "HAVE_FFMPEG=false"
|
||||
set "HAVE_GL2PS=false"
|
||||
set "HAVE_VTK=false"
|
||||
set "HAVE_GLES2=false"
|
||||
set "HAVE_D3D=false"
|
||||
set "HAVE_ZLIB=false"
|
||||
set "HAVE_LIBLZMA=false"
|
||||
set "CSF_OPT_INC="
|
||||
set "CSF_OPT_LIB32="
|
||||
set "CSF_OPT_LIB64="
|
||||
@@ -36,9 +35,6 @@ 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"
|
||||
@@ -49,28 +45,35 @@ if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%"
|
||||
set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%"
|
||||
set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%"
|
||||
set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%"
|
||||
set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%"
|
||||
set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%"
|
||||
set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%"
|
||||
set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
|
||||
set "CSF_OPT_INC=%CSF_OPT_INC%;%CASROOT%\inc"
|
||||
set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libd"
|
||||
set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libd"
|
||||
set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bind"
|
||||
set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bind"
|
||||
set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libi"
|
||||
set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libi"
|
||||
set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bini"
|
||||
set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bini"
|
||||
set "CSF_OPT_LIB32=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\lib"
|
||||
set "CSF_OPT_LIB64=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\lib"
|
||||
set "CSF_OPT_BIN32=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bin"
|
||||
set "CSF_OPT_BIN64=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bin"
|
||||
|
||||
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
|
||||
set "CSF_OPT_CMPL="
|
||||
set "PRODUCTS_DEFINES="
|
||||
if ["%HAVE_TBB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TBB" & set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL" & set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
|
||||
if ["%HAVE_GL2PS%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS" & set "CSF_DEFINES=HAVE_GL2PS;%CSF_DEFINES%"
|
||||
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
|
||||
if ["%HAVE_FFMPEG%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FFMPEG" & set "CSF_DEFINES=HAVE_FFMPEG;%CSF_DEFINES%"
|
||||
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK" & set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
|
||||
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2" & set "CSF_DEFINES=HAVE_GLES2;%CSF_DEFINES%"
|
||||
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D" & set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
|
||||
if ["%HAVE_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%"
|
||||
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"
|
||||
if ["%HAVE_TBB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TBB"
|
||||
if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL"
|
||||
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=;"
|
||||
@@ -105,50 +108,47 @@ set "CSF_OPT_LNK64D=%CSF_OPT_LNK64D% %OPT_LIB64%"
|
||||
set "CSF_OPT_LNK32I=%CSF_OPT_LNK32I% %OPT_LIB32%"
|
||||
set "CSF_OPT_LNK64I=%CSF_OPT_LNK64I% %OPT_LIB64%"
|
||||
|
||||
rem ----- Default paths to sub-folders (can be different in install env) -----
|
||||
if "%CSF_OCCTIncludePath%" == "" set "CSF_OCCTIncludePath=%CASROOT%\inc"
|
||||
if "%CSF_OCCTResourcePath%" == "" set "CSF_OCCTResourcePath=%CASROOT%\src"
|
||||
if "%CSF_OCCTSamplesPath%" == "" set "CSF_OCCTSamplesPath=%CASROOT%\samples"
|
||||
if "%CSF_OCCTDataPath%" == "" set "CSF_OCCTDataPath=%CASROOT%\data"
|
||||
if "%CSF_OCCTTestsPath%" == "" set "CSF_OCCTTestsPath=%CASROOT%\tests"
|
||||
if "%CSF_OCCTBinPath%" == "" set "CSF_OCCTBinPath=%CASROOT%\win%ARCH%\%VCVER%\bin%CASDEB%"
|
||||
if "%CSF_OCCTLibPath%" == "" set "CSF_OCCTLibPath=%CASROOT%\win%ARCH%\%VCVER%\lib%CASDEB%"
|
||||
set "CASBIN=win%ARCH%\%VCVER%"
|
||||
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
set "PATH=%CSF_OCCTBinPath%;%PATH%"
|
||||
set "PATH=%SCRIPTROOT%\%CASBIN%\bin%CASDEB%;%PATH%"
|
||||
if ["%CASDEB%"] == [""] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32%;%PATH%"
|
||||
if ["%CASDEB%"] == [""] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64%;%PATH%"
|
||||
if ["%CASDEB%"] == ["d"] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32D%;%PATH%"
|
||||
if ["%CASDEB%"] == ["d"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64D%;%PATH%"
|
||||
|
||||
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32I%;%PATH%"
|
||||
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64I%;%PATH%"
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
set MMGT_CLEAR=1
|
||||
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CSF_OCCTResourcePath%\Textures"
|
||||
set "CSF_ShadersDirectory=%CSF_OCCTResourcePath%\Shaders"
|
||||
set "CSF_XSMessage=%CSF_OCCTResourcePath%\XSMessage"
|
||||
set "CSF_TObjMessage=%CSF_OCCTResourcePath%\TObj"
|
||||
set "CSF_StandardDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CSF_OCCTResourcePath%\StdResource\MigrationSheet.txt"
|
||||
set CSF_EXCEPTION_PROMPT=1
|
||||
set "CSF_SHMessage=%CASROOT%\src\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
|
||||
set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
|
||||
set "CSF_XSMessage=%CASROOT%\src\XSMessage"
|
||||
set "CSF_TObjMessage=%CASROOT%\src\TObj"
|
||||
set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CSF_OCCTResourcePath%\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CSF_OCCTResourcePath%\DrawResources\DrawDefault"
|
||||
)
|
||||
if exist "%CSF_OCCTResourcePath%\DrawResources" (
|
||||
set "DRAWHOME=%CSF_OCCTResourcePath%\DrawResources"
|
||||
if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%DRAWHOME%"
|
||||
)
|
||||
if exist "%SCRIPTROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%SCRIPTROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:concatCmplInc
|
||||
@@ -156,13 +156,9 @@ set "CSF_OPT_CMPL=%CSF_OPT_CMPL% -I%1"
|
||||
goto :eof
|
||||
|
||||
:concatLib32
|
||||
rem Compiler options for Code::Blocks: -L for gcc/mingw and /LIBPATH for msvc
|
||||
rem set "OPT_LIB32=%OPT_LIB32% /LIBPATH:%1"
|
||||
set "OPT_LIB32=%OPT_LIB32% -L%1"
|
||||
set "OPT_LIB32=%OPT_LIB32% /LIBPATH:%1"
|
||||
goto :eof
|
||||
|
||||
:concatLib64
|
||||
rem Compiler options for Code::Blocks: -L for gcc/mingw and /LIBPATH for msvc
|
||||
rem set "OPT_LIB64=%OPT_LIB64% /LIBPATH:%1"
|
||||
set "OPT_LIB64=%OPT_LIB64% -L%1"
|
||||
set "OPT_LIB64=%OPT_LIB64% /LIBPATH:%1"
|
||||
goto :eof
|
||||
|
@@ -1,74 +0,0 @@
|
||||
echo off
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
rem ----- Reset values to defaults -----
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB="
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
|
||||
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
|
||||
if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %VCVER% %ARCH% %CASDEB%
|
||||
)
|
||||
|
||||
rem for compatability with external application using CASROOT
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
set "PRODROOT="
|
||||
|
||||
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 ["%EGL_DIR%"] == [""] set "PATH=%EGL_DIR%;%PATH%"
|
||||
if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%"
|
||||
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
if not "%CSF_OCCTBinPath%" == "" (
|
||||
set "PATH=%CSF_OCCTBinPath%;%PATH%"
|
||||
)
|
||||
|
||||
if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
|
||||
if not ["%TK_DIR%"] == [""] set "TK_LIBRARY=%TK_DIR%/../lib/tk%TK_VERSION_WITH_DOT%"
|
||||
if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl%TCL_VERSION_WITH_DOT%"
|
||||
)
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
set MMGT_CLEAR=1
|
||||
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CSF_OCCTResourcePath%\Textures"
|
||||
set "CSF_ShadersDirectory=%CSF_OCCTResourcePath%\Shaders"
|
||||
set "CSF_XSMessage=%CSF_OCCTResourcePath%\XSMessage"
|
||||
set "CSF_TObjMessage=%CSF_OCCTResourcePath%\TObj"
|
||||
set "CSF_StandardDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
|
||||
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CSF_OCCTResourcePath%\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CSF_OCCTResourcePath%\DrawResources" (
|
||||
set "DRAWHOME=%CSF_OCCTResourcePath%\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%CSF_OCCTResourcePath%\DrawResources"
|
||||
|
||||
if exist "%CSF_OCCTResourcePath%\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CSF_OCCTResourcePath%\DrawResources\DrawDefault"
|
||||
)
|
||||
)
|
81
adm/templates/env.build.bat.in
Normal file
@@ -0,0 +1,81 @@
|
||||
echo off
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "CASROOT=@CMAKE_SOURCE_DIR@"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB="
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
|
||||
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
|
||||
if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3
|
||||
)
|
||||
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
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%"
|
||||
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
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
|
||||
set MMGT_CLEAR=1
|
||||
set CSF_EXCEPTION_PROMPT=1
|
||||
set "CSF_SHMessage=%CASROOT%\src\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
|
||||
set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
|
||||
set "CSF_XSMessage=%CASROOT%\src\XSMessage"
|
||||
set "CSF_TObjMessage=%CASROOT%\src\TObj"
|
||||
set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
|
||||
|
||||
if exist "%CASROOT%\src\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%CASROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
|
134
adm/templates/env.build.sh.in
Normal file
@@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
export CASROOT="@CMAKE_SOURCE_DIR@"
|
||||
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
|
||||
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
|
||||
shopt -u nocasematch
|
||||
|
||||
export COMPILER="@COMPILER@"
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
fi
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
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
|
||||
|
||||
if [ "$FREEIMAGE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$GL2PS_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
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="@CMAKE_BINARY_DIR@/${BIN_PATH}:${PATH}"
|
||||
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="@CMAKE_BINARY_DIR@/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="@CMAKE_BINARY_DIR@/${LIBS_PATH}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
||||
else
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----- Set envoronment variables used by OCCT -----
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
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 "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
79
adm/templates/env.install.bat.in
Normal file
@@ -0,0 +1,79 @@
|
||||
echo off
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@BUILD_LETTER@"
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
|
||||
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
|
||||
if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["i"] set "CASDEB=i"
|
||||
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
|
||||
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %VCVER% %ARCH% %CASDEB%
|
||||
)
|
||||
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
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%"
|
||||
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
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
|
||||
set MMGT_CLEAR=1
|
||||
set CSF_EXCEPTION_PROMPT=1
|
||||
set "CSF_SHMessage=%CASROOT%\src\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
|
||||
set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
|
||||
set "CSF_XSMessage=%CASROOT%\src\XSMessage"
|
||||
set "CSF_TObjMessage=%CASROOT%\src\TObj"
|
||||
set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
|
||||
|
||||
if exist "%CASROOT%\src\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%CASROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
|
132
adm/templates/env.install.sh.in
Normal file
@@ -0,0 +1,132 @@
|
||||
#!/bin/bash
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
|
||||
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
|
||||
shopt -u nocasematch
|
||||
|
||||
export COMPILER="@COMPILER@"
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
fi
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
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
|
||||
|
||||
if [ "$FREEIMAGE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$GL2PS_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
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="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
||||
else
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----- Set envoronment variables used by OCCT -----
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
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 "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
@@ -1,28 +0,0 @@
|
||||
@echo off
|
||||
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3
|
||||
)
|
||||
|
||||
call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
|
||||
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
|
||||
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
|
||||
|
||||
if ["%CASDEB%"] == [""] (
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
|
||||
set "LIB_DIR=win%ARCH%\%VCVER%\lib"
|
||||
)
|
||||
|
||||
set "PATH=%~dp0%BIN_DIR%;%PATH%"
|
||||
|
||||
if not "%QTDIR%" == "" (
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
|
||||
set "CSF_ResourcesDefaults=!RES_DIR!"
|
||||
set "CSF_TutorialResourcesDefaults=!RES_DIR!"
|
||||
set "CSF_IEResourcesDefaults=!RES_DIR!"
|
||||
|
||||
set "PATH=%QTDIR%/bin;%PATH%"
|
||||
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
|
||||
)
|
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
fi
|
||||
|
||||
if [ -e "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
|
||||
source "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh";
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
@@ -3,19 +3,23 @@
|
||||
# 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";
|
||||
export HAVE_OPENCL="false";
|
||||
export HAVE_FREEIMAGE="false";
|
||||
export HAVE_FFMPEG="false";
|
||||
export HAVE_GL2PS="false";
|
||||
export HAVE_VTK="false";
|
||||
export HAVE_GLES2="false";
|
||||
export HAVE_ZLIB="false";
|
||||
export HAVE_LIBLZMA="false";
|
||||
export MACOSX_USE_GLX="false";
|
||||
export CSF_OPT_INC=""
|
||||
export CSF_OPT_LIB32=""
|
||||
@@ -24,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 $*
|
||||
@@ -94,17 +90,25 @@ fi
|
||||
export CSF_OPT_CMPL=""
|
||||
|
||||
# Optiona 3rd-parties should be enabled by HAVE macros
|
||||
if [ "$HAVE_TBB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"; fi
|
||||
if [ "$HAVE_OPENCL" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"; fi
|
||||
if [ "$HAVE_FREEIMAGE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"; fi
|
||||
if [ "$HAVE_FFMPEG" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FFMPEG"; fi
|
||||
if [ "$HAVE_GL2PS" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"; fi
|
||||
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2"; fi
|
||||
if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"; fi
|
||||
if [ "$HAVE_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi
|
||||
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi
|
||||
if [ "$HAVE_TBB" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"
|
||||
fi
|
||||
if [ "$HAVE_OPENCL" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"
|
||||
fi
|
||||
if [ "$HAVE_FREEIMAGE" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"
|
||||
fi
|
||||
if [ "$HAVE_GL2PS" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"
|
||||
fi
|
||||
if [ "$HAVE_VTK" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"
|
||||
fi
|
||||
# Option to compile OCCT with X11 libs on Mac OS X
|
||||
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi
|
||||
if [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"
|
||||
fi
|
||||
|
||||
# To split string into array
|
||||
aDelimBack=$IFS
|
||||
@@ -171,27 +175,16 @@ else
|
||||
export CSF_OPT_LNK32I="$OPT_LINKER_OPTIONS_REL_WITH_DEB_INFO"
|
||||
fi
|
||||
|
||||
# ----- Default paths to sub-folders (can be different in install env) -----
|
||||
export CSF_OCCTIncludePath="${CSF_OCCTIncludePath:-$CASROOT/inc}"
|
||||
export CSF_OCCTResourcePath="${CSF_OCCTResourcePath:-$CASROOT/src}"
|
||||
export CSF_OCCTSamplesPath="${CSF_OCCTSamplesPath:-$CASROOT/samples}"
|
||||
export CSF_OCCTDataPath="${CSF_OCCTDataPath:-$CASROOT/data}"
|
||||
export CSF_OCCTTestsPath="${CSF_OCCTTestsPath:-$CASROOT/tests}"
|
||||
|
||||
BIN_PATH="${CASBIN}/bin${CASDEB}"
|
||||
LIBS_PATH="${CASBIN}/lib${CASDEB}"
|
||||
if [ "${TARGET}" == "xcd" ]; then
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
export CSF_OCCTBinPath="${CSF_OCCTBinPath:-$CASROOT/$CASBIN/Debug}"
|
||||
else
|
||||
export CSF_OCCTBinPath="${CSF_OCCTBinPath:-$CASROOT/$CASBIN/Release}"
|
||||
fi
|
||||
export CSF_OCCTLibPath="${CSF_OCCTLibPath:-$CSF_OCCTBinPath}"
|
||||
else
|
||||
export CSF_OCCTBinPath="${CSF_OCCTBinPath:-$CASROOT/$CASBIN/bin$CASDEB}"
|
||||
export CSF_OCCTLibPath="${CSF_OCCTLibPath:-$CASROOT/$CASBIN/lib$CASDEB}"
|
||||
[[ "${CASDEB}" == "d" ]] && BIN_PATH="${CASBIN}/Debug" || BIN_PATH="${CASBIN}/Release"
|
||||
LIBS_PATH="$BIN_PATH"
|
||||
fi
|
||||
|
||||
export PATH="${CSF_OCCTBinPath}:${PATH}"
|
||||
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
|
||||
export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${LD_LIBRARY_PATH}"
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
||||
fi
|
||||
@@ -199,6 +192,7 @@ fi
|
||||
# Set envoronment variables used by OCCT
|
||||
export CSF_LANGUAGE="us"
|
||||
export MMGT_CLEAR="1"
|
||||
export CSF_EXCEPTION_PROMPT="1"
|
||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
||||
@@ -209,6 +203,8 @@ 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"
|
||||
@@ -219,3 +215,6 @@ if [ -e "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${DRAWHOME}"
|
||||
fi
|
||||
if [ -e "${aScriptPath}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${aScriptPath}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
@@ -1,130 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
# ----- for compatability with external application using CASROOT -----
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
|
||||
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
|
||||
shopt -u nocasematch
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
fi
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${CASDEB}" "${ARCH}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
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
|
||||
|
||||
if [ "$FREEIMAGE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$GL2PS_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
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${TK_VERSION_WITH_DOT}"
|
||||
fi
|
||||
if [ "$TCL_DIR" != "" ]; then
|
||||
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$CSF_OCCTBinPath" != "" ]; then
|
||||
export PATH="${CSF_OCCTBinPath}:${PATH}"
|
||||
fi
|
||||
|
||||
if [ "$CSF_OCCTLibPath" != "" ]; then
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
||||
else
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----- Set envoronment variables used by OCCT -----
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
|
||||
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
|
||||
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
|
||||
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
|
||||
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
|
||||
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
|
||||
|
||||
# Draw Harness special stuff
|
||||
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
|
||||
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
|
||||
|
||||
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
@@ -1 +1 @@
|
||||
@OCCT_HEADER_FILE_CONTENT@
|
||||
#include "@OCCT_HEADER_FILE@"
|
||||
|
@@ -12,23 +12,21 @@ if not "%4" == "" (
|
||||
|
||||
set "VisualStudioExpressName=VCExpress"
|
||||
|
||||
if /I "%VCVER%" == "vc8" (
|
||||
if "%VCVER%" == "vc8" (
|
||||
set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
|
||||
) else if /I "%VCVER%" == "vc9" (
|
||||
) else if "%VCVER%" == "vc9" (
|
||||
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
|
||||
) else if /I "%VCVER%" == "vc10" (
|
||||
) else if "%VCVER%" == "vc10" (
|
||||
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
|
||||
) else if /I "%VCVER%" == "vc11" (
|
||||
) else if "%VCVER%" == "vc11" (
|
||||
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
|
||||
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
|
||||
rem and has a new name for executable - WDExpress
|
||||
set "VisualStudioExpressName=WDExpress"
|
||||
) else if /I "%VCVER%" == "vc12" (
|
||||
) else if "%VCVER%" == "vc12" (
|
||||
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
|
||||
set "VisualStudioExpressName=WDExpress"
|
||||
) else if /I "%VCVER%" == "vc14" (
|
||||
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
|
||||
) else if /I "%VCVER%" == "vc14-uwp" (
|
||||
) else if "%VCVER%" == "vc14" (
|
||||
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
|
||||
) else (
|
||||
echo Error: wrong VS identifier
|
||||
|
@@ -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", "Open CASCADE Technology\000"
|
||||
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "OfficialSite", "www.opencascade.com\000"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04E4
|
||||
END
|
||||
END
|
@@ -16,19 +16,16 @@ if ["%1"] == [""] (
|
||||
echo HLR
|
||||
echo Animation
|
||||
echo Convert
|
||||
PAUSE
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0env.bat" %2 %3 %4
|
||||
set "EXE_PATH=%CSF_OCCTBinPath%/%1.exe"
|
||||
|
||||
if not exist "%EXE_PATH%" (
|
||||
echo Executable %EXE_PATH% not found.
|
||||
if not exist "%~dp0/%BIN_TAIL%/%1.exe" (
|
||||
echo Executable %~dp0/%BIN_TAIL%/%1.exe not found.
|
||||
echo Probably you didn't compile the application.
|
||||
PAUSE
|
||||
exit /B
|
||||
)
|
||||
|
||||
"%EXE_PATH%"
|
||||
"%~dp0/%BIN_TAIL%/%1.exe"
|
||||
|
||||
|
@@ -20,28 +20,23 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
|
||||
__UWP_PROPERTIES__
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>__VCVEREXT__</PlatformToolset>
|
||||
<CharacterSet>__VCCHARSET__</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -90,7 +85,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -100,25 +95,21 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL32__
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -137,7 +128,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -147,18 +138,16 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL32__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -166,7 +155,6 @@
|
||||
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -185,7 +173,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -195,25 +183,21 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL64__
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -232,7 +216,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
|
||||
@@ -242,18 +226,16 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
__VCMPL64__
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>__TKDEP__;ws2_32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -261,7 +243,6 @@
|
||||
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
|
||||
__UWP_GENERATE_METADATA__
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -85,7 +85,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -95,7 +95,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -106,7 +106,6 @@
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
|
||||
@@ -128,7 +127,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -138,7 +137,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||
</ClCompile>
|
||||
@@ -172,7 +171,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -182,7 +181,7 @@
|
||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
@@ -193,7 +192,6 @@
|
||||
<AdditionalDependencies>__TKDEP__;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
|
||||
@@ -215,7 +213,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
|
||||
@@ -225,7 +223,7 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||
</ClCompile>
|
||||
|
@@ -36,7 +36,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc7\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
@@ -105,7 +105,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc7\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
|
@@ -50,7 +50,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -62,6 +62,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -78,7 +79,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc8\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -148,7 +149,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -162,6 +163,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -178,7 +180,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc8\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -249,7 +251,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -261,6 +263,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -276,7 +279,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc8\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -347,7 +350,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -361,6 +364,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -376,7 +380,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
|
||||
AdditionalDependencies="__TKDEP__ opengl32.lib glu32.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc8\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@@ -49,7 +49,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__;"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -60,6 +60,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -145,7 +146,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -156,6 +157,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
/>
|
||||
<Tool
|
||||
@@ -240,7 +242,7 @@
|
||||
AdditionalOptions="/favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -251,6 +253,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -337,7 +340,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -348,6 +351,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -52,7 +52,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -65,6 +65,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -79,7 +80,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc9\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -149,7 +150,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -164,6 +165,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -178,7 +180,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
OutputFile=".\..\..\..\win32\vc9\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -246,7 +248,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -258,6 +260,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__TKNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -272,7 +275,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc9\bin\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -340,7 +343,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -354,6 +357,7 @@
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -368,7 +372,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib"
|
||||
AdditionalDependencies="__TKDEP__ ws2_32.lib vfw32.lib"
|
||||
OutputFile=".\..\..\..\win64\vc9\bind\__TKNAM__.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@@ -52,7 +52,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -64,6 +64,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -143,7 +144,7 @@
|
||||
AdditionalOptions="-MP"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -155,6 +156,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -236,7 +238,7 @@
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="2"
|
||||
RuntimeLibrary="2"
|
||||
@@ -247,6 +249,7 @@
|
||||
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__XQTNAM__/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -327,7 +330,7 @@
|
||||
AdditionalOptions="-MP -favor:blend"
|
||||
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
|
||||
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@@ -338,6 +341,7 @@
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
@@ -18,9 +18,9 @@ BEGIN
|
||||
VALUE "FileDescription", "__TKNAM__ Toolkit\000"
|
||||
VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000"
|
||||
VALUE "ProductName", "Open CASCADE Technology\000"
|
||||
VALUE "ProductName", "__TKNAM__\000"
|
||||
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
|
||||
VALUE "OfficialSite", "www.opencascade.com\000"
|
||||
VALUE "OfficialSite", "www.opencascade.org\000"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@@ -1,5 +0,0 @@
|
||||
# A toolchain file to configure a Visual Studio generator for a Windows 10 Universal Application (UWP)
|
||||
# Specify the CMAKE_SYSTEM_VERSION variable to be 10.0 to build with the latest available Windows 10 SDK.
|
||||
|
||||
set (CMAKE_SYSTEM_NAME WindowsStore)
|
||||
set (CMAKE_SYSTEM_VERSION 10.0)
|
@@ -1,8 +1,5 @@
|
||||
[rename]
|
||||
BRepExtrema_OverlappedSubShapes BRepExtrema_MapOfIntegerPackedMapOfInteger
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve2d Convert_CompBezierCurves2dToBSplineCurve2d
|
||||
ShapeConstruct_CompBezierCurves2dToBSplineCurve Convert_CompBezierCurves2dToBSplineCurve
|
||||
Image_PixMap::Img Image_Format_
|
||||
|
||||
[tcollection]
|
||||
AdvApp2Var_SequenceOfNode
|
||||
@@ -801,6 +798,13 @@ TDF_LabelSequence
|
||||
TDocStd_LabelIDMapDataMap
|
||||
TDocStd_SequenceOfApplicationDelta
|
||||
TDocStd_SequenceOfDocument
|
||||
TestTopOpeDraw_Array1OfDrawableMesure
|
||||
TestTopOpeDraw_Array1OfDrawableP3D
|
||||
TestTopOpeDraw_HArray1OfDrawableMesure
|
||||
TestTopOpeDraw_HArray1OfDrawableP3D
|
||||
TestTopOpeDraw_ListOfPnt2d
|
||||
TestTopOpeTools_Array1OfMesure
|
||||
TestTopOpeTools_HArray1OfMesure
|
||||
TFunction_Array1OfDataMapOfGUIDDriver
|
||||
TFunction_DataMapOfGUIDDriver
|
||||
TFunction_DataMapOfLabelListOfLabel
|
||||
|
@@ -502,7 +502,7 @@ proc DefineExplicitRtti {hxxfile class base theSourceExtensions} {
|
||||
# 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] } {
|
||||
if { [regexp {^\s*IMPLEMENT_STANDARD_RTTIEXT\s*\(\s*$class\s*,\s*([A-Za-z]+)\s*\)} $line res impl_base] } {
|
||||
# implementation is in place, just report warning if second argument
|
||||
# is different
|
||||
if { $base != $impl_base } {
|
||||
@@ -592,14 +592,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 +609,12 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!"
|
||||
}
|
||||
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 $inherits($class) $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}EXT($class,$inherits($class))" index
|
||||
"${start}${rtti_suffix}($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,16 +624,14 @@ 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)"
|
||||
if { ! [info exists inherits($class,multiple)] } {
|
||||
set base $inherits($class)
|
||||
}
|
||||
}
|
||||
# convert intermediate version of macro DEFINE_STANDARD_RTTI
|
||||
# with two arguments to either _INLINE or EXT variant
|
||||
if { ! $theCheckMode && "$suffix" == "" } {
|
||||
if { ! $theCheckMode } {
|
||||
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
|
||||
@@ -678,7 +679,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 +707,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 +734,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 +767,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 +848,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 +1031,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,16 +1154,24 @@ 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 [split $aFileContent "\n"]
|
||||
# set aList {}
|
||||
# foreach aLine [split $aFileContent "\n"] {
|
||||
# lappend aList [string trimright $aLine]
|
||||
# }
|
||||
|
||||
return $aList
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
BIN
data/images/Image.xwd
Executable file
BIN
data/images/hlr.xwd
Normal file
Before Width: | Height: | Size: 1.0 KiB |
1131
data/occ/Ball.brep
@@ -35,12 +35,14 @@ endif()
|
||||
# configuration file for doxygen
|
||||
set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
|
||||
|
||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "https://cdn.mathjax.org/mathjax/latest")
|
||||
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")
|
||||
|
||||
@@ -92,22 +94,11 @@ file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nMATHJAX_RELPATH = ${3RDPARTY_M
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file(COPY "${OCCT_OVERVIEW_RESOURCE_DIR}/index.html" DESTINATION "${OCCT_GENERATED_OVERVIEW_DIR}")
|
||||
|
||||
# get relative paths to documentation source files
|
||||
file (GLOB_RECURSE OCCT_OVERVIEW_FILES "${OCCT_OVERVIEW_DIR}/*")
|
||||
add_custom_target (${PROJECT_NAME}
|
||||
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
|
||||
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
|
||||
COMMENT "Generating OCCT overview documentation with Doxygen"
|
||||
SOURCES ${OCCT_ARTICLES_ABSPATH}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_command(OUTPUT "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png"
|
||||
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
|
||||
DEPENDS ${OCCT_OVERVIEW_FILES}
|
||||
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
|
||||
COMMENT "Generating OCCT overview documentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(${PROJECT_NAME} ALL
|
||||
DEPENDS "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png" ${OCCT_OVERVIEW_FILES}
|
||||
SOURCES ${OCCT_ARTICLES_ABSPATH}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Create Documentation folder in solution view
|
||||
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Documentation")
|
||||
|
@@ -32,6 +32,9 @@ 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/vis/vis.md
|
||||
|
||||
dev_guides/dev_guides.md
|
||||
@@ -47,6 +50,8 @@ dev_guides/building/building.md
|
||||
dev_guides/building/3rdparty/3rdparty_windows.md
|
||||
dev_guides/building/3rdparty/3rdparty_linux.md
|
||||
dev_guides/building/3rdparty/3rdparty_osx.md
|
||||
dev_guides/building/wok/wok.md
|
||||
dev_guides/building/automake.md
|
||||
dev_guides/building/cmake/cmake.md
|
||||
dev_guides/building/android/android.md
|
||||
dev_guides/building/code_blocks.md
|
||||
|
@@ -12,6 +12,9 @@ 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
|
||||
|
521
dox/LICENSE.md
Executable file
@@ -0,0 +1,521 @@
|
||||
License {#occt_public_license}
|
||||
=======
|
||||
|
||||
Open CASCADE Technology is available under GNU Lesser General Public License
|
||||
(LGPL) version 2.1 with additional exception.
|
||||
|
||||
@section license_lgpl_21 GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
### Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
- 0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
1. The modified work must itself be a software library.
|
||||
|
||||
2. You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
3. You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
4. If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
1. Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
2. Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
3. Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
4. If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
5. Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
1. Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
2. Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
**NO** **WARRANTY**
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
### END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
@section occt_lgpl_exception OPEN CASCADE EXCEPTION
|
||||
|
||||
### Open CASCADE Exception (version 1.0) to GNU LGPL version 2.1.
|
||||
|
||||
The object code (i.e. not a source) form of a "work that uses the Library"
|
||||
can incorporate material from a header file that is part of the Library.
|
||||
As a special exception to the GNU Lesser General Public License version 2.1,
|
||||
you may distribute such object code incorporating material from header files
|
||||
provided with the Open CASCADE Technology libraries (including code of CDL
|
||||
generic classes) under terms of your choice, provided that you give
|
||||
prominent notice in supporting documentation to this code that it makes use
|
||||
of or is based on facilities provided by the Open CASCADE Technology software.
|
@@ -10,7 +10,7 @@ products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at
|
||||
http://www.opencascade.com/content/3rd-party-components.
|
||||
http://www.opencascade.org/getocc/require/.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
|
@@ -8,7 +8,8 @@ This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available
|
||||
on the web site of OPEN CASCADE SAS at http://www.opencascade.com/content/3rd-party-components.
|
||||
on the web site of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/</a>.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
|
@@ -8,17 +8,15 @@ This document presents guidelines for building third-party products used by Open
|
||||
|
||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.com/content/3rd-party-components.
|
||||
|
||||
There are two types of third-party products used by OCCT:
|
||||
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*).
|
||||
@@ -112,11 +110,13 @@ FreeType is required for text display in a 3D viewer. You can download its sourc
|
||||
|
||||
5. If you build FreeType for a 64 bit platform, select in the main menu **Build - Configuration Manager** and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image001.png}
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
|
||||
Update the value of the Output File for x64 configuration:
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image003.png}
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
|
||||
Build the *freetype* project.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -205,20 +205,24 @@ You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
|
||||
* Press **Configure** button.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image004.png}
|
||||
@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.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image005.png}
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
|
||||
* Press **Finish** button to return to the main CMake window.
|
||||
Expand the ENABLE group and uncheck ENABLE_PNG and ENABLE_ZLIB check boxes.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image006.png}
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
|
||||
* Expand the CMAKE group and define *CMAKE_INSTALL_PREFIX* which is the path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps-1.3.5*.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/3rdparty_image007.png}
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
|
||||
* Press **Configure** button again, then press **Generate** button to generate Visual Studio projects. After completion, close CMake application.
|
||||
|
||||
|
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 60 KiB |
@@ -10,40 +10,32 @@ The steps on Windows and Ubuntu are similar. There is the only one difference: m
|
||||
on Windows and native GNU make on Ubuntu.
|
||||
|
||||
Required tools (download and install if it is required):
|
||||
- CMake v3.7+ http://www.cmake.org/cmake/resources/software.html
|
||||
- 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.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In toolchain file <i>$CASROOT/adm/templates/android.toolchain.config.cmake</i>:
|
||||
|
||||
- Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
|
||||
- Set CMAKE_ANDROID_STL_TYPE variable to specify which C++ standard library to use.
|
||||
|
||||
The default value of CMAKE_ANDROID_STL_TYPE is <i>gnustl_shared</i> (GNU libstdc++ Shared)
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
|
||||
## Generation of makefiles using CMake GUI tool
|
||||
|
||||
## Generation of makefiles
|
||||
Run GUI tool provided by CMake: cmake-gui
|
||||
|
||||
### Tools configuration
|
||||
- Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
|
||||
- Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image002.png}
|
||||
@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.
|
||||
|
||||
Select "MinGW Makefiles" item from the list
|
||||
Select "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
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
- Specify a toolchain file at the next dialog by <i>android.toolchain.config.cmake</i> . It is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
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)
|
||||
@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"
|
||||
@@ -54,19 +46,18 @@ specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
|
||||
### OCCT Configuration
|
||||
|
||||
How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake"
|
||||
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**
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
### Generation of makefiles
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/occt/build-android </i>).
|
||||
|
||||
## Generation of makefiles using CMake from the command line
|
||||
|
||||
Alternatively one may specify the values without a toolchain file:
|
||||
|
||||
> cmake -G "MinGW Makefiles" -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=D:/DevTools/android-ndk-r13b -DCMAKE_ANDROID_STL_TYPE=gnustl_shared -DCMAKE_SYSTEM_VERSION=15 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_MAKE_PROGRAM=D:/DevTools/MinGW/bin/mingw32-make.exe -D3RDPARTY_DIR=D:/occt-3rdparty D:/occt
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
|
||||
|
||||
## Building makefiles of OCCT
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 80 KiB |
72
dox/dev_guides/building/automake.md
Normal file
@@ -0,0 +1,72 @@
|
||||
Building with Automake {#occt_dev_guides__building_automake}
|
||||
======================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Linux with **Autotools** GNU build system.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See paragraph 1 \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of
|
||||
\ref occt_dev_guides__building for instructions.
|
||||
|
||||
Note that during compilation by makefiles on Linux station with
|
||||
NVIDIA video card you may experience problems because the installation
|
||||
procedure of NVIDIA video driver removes library *libGL.so* included in package
|
||||
*libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in
|
||||
directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory
|
||||
<i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>).
|
||||
|
||||
To prevent this, it is suggested to make links:
|
||||
|
||||
|
||||
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
|
||||
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
|
||||
|
||||
|
||||
1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system.
|
||||
|
||||
2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles.
|
||||
|
||||
|
||||
$CASROOT/configure \<FLAGS\>
|
||||
|
||||
Where <i> \<FLAGS\> </i> is a set of options.
|
||||
The following flags are mandatory:
|
||||
|
||||
* <i> --with-tcl= </i> defines the location of *tclConfig.sh*;
|
||||
* <i> --with-tk= </i> defines location of *tkConfig.sh*;
|
||||
* <i> --with-freetype= </i> defines location of installed **FreeType** product
|
||||
* <i> --prefix= </i> defines the location for installation of OCCT binaries
|
||||
|
||||
Additional flags:
|
||||
|
||||
* <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product;
|
||||
* <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
|
||||
* <i> --with-tbb-include= </i> defines the location of *tbb.h*;
|
||||
* <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
|
||||
* <i> --with-vtk-include= </i> defines the location of VTK includes;
|
||||
* <i> --with-vtk-library= </i> defines the location of VTK libraries;
|
||||
* <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information;
|
||||
* <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization;
|
||||
* <i> --disable-draw </i> allows OCCT building without Draw.
|
||||
|
||||
If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
|
||||
|
||||
|
||||
Attention: 64-bit platforms are detected automatically.
|
||||
|
||||
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
|
||||
|
||||
|
||||
3.If configure exits successfully, you can build OCCT with *make* command.
|
||||
|
||||
\> make -j8 install
|
||||
|
||||
4.To start *DRAW*, launch
|
||||
|
||||
\> draw.sh
|
@@ -1,24 +1,25 @@
|
||||
Building OCCT from sources {#occt_dev_guides__building}
|
||||
=========
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
The list of required libraries depends on what OCCT modules will be used, and your preferences.
|
||||
The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW Test Harness).
|
||||
See "Third-party libraries" section in \ref OCCT_OVW_SECTION_5 "Overview" for a full list.
|
||||
In order to build OCCT libraries from these sources for use in your program,
|
||||
you need to:
|
||||
|
||||
On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from http://www.opencascade.com/content/3rd-party-components.
|
||||
On Linux and OS X, it is recommended to use the version installed in the system natively.
|
||||
1. Make sure you have all required third-party libraries installed (check
|
||||
software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
|
||||
|
||||
You can also build third-party libraries from their sources:
|
||||
* \subpage occt_dev_guides__building_3rdparty_windows
|
||||
* \subpage occt_dev_guides__building_3rdparty_linux
|
||||
* \subpage occt_dev_guides__building_3rdparty_osx
|
||||
See the following documents for short guide to installation of
|
||||
third-party libraries on different platforms:
|
||||
- \subpage occt_dev_guides__building_3rdparty_windows
|
||||
- \subpage occt_dev_guides__building_3rdparty_linux
|
||||
- \subpage occt_dev_guides__building_3rdparty_osx
|
||||
|
||||
Build OCCT using your preferred build tool.
|
||||
* \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_msvc "Building on Windows with MS Visual Studio projects"
|
||||
* \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks projects"
|
||||
* \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode projects"
|
||||
|
||||
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_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"
|
||||
|
||||
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
|
@@ -3,41 +3,57 @@ Building with CMake {#occt_dev_guides__building_cmake}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section build_cmake_intro General
|
||||
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*.
|
||||
|
||||
This article describes the **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*.
|
||||
**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.
|
||||
|
||||
@note Compared to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.x has 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.
|
||||
**Note**: We discuss the build procedure on example of Windows platform. However, the workflow is almost the same for *nix and Mac operating systems.
|
||||
|
||||
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
|
||||
However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.
|
||||
All the examples in the article will be based on Windows x64 platform and Visual Studio 2010 solution will be the target IDE. The solution will be generated by CMake from the OCCT sources, the one will be built by an user and ready-to-go OCCT binaries will be deployed into a user specified directory by building *INSTALL* project.
|
||||
|
||||
@note Before you start, make sure to have installed all 3-rd party products that you are going to use with OCCT; see @ref occt_dev_guides__building.
|
||||
You can get all the required 3-rd party products visiting [the official download page](http://www.opencascade.org/getocc/download/loadocc); see @ref occt_dev_guides__building for more detailed information also.
|
||||
|
||||
@section build_cmake_start Start CMake
|
||||
## Get sources
|
||||
|
||||
CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010).
|
||||
The sources of OCCT can be obtained from [the official development web-site](http://dev.opencascade.org) by either downloading the universal source package (available at [the official download page](http://www.opencascade.org/getocc/download/loadocc)) or by cloning the Git repository:
|
||||
|
||||
For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
|
||||
A command-line alternative, *ccmake* can also be used.
|
||||
git clone ssh://gitolite@git.dev.opencascade.org/occt occt
|
||||
|
||||
CMake deals with three directories: source, build or binary and installation.
|
||||
As a result, you obtain the following directory structure in your filesystem (d:\ name is used for example):
|
||||
|
||||
d:\occt\adm
|
||||
\data
|
||||
\dox
|
||||
\samples
|
||||
\src
|
||||
\tests
|
||||
...
|
||||
|
||||
* The source directory is where the sources of OCCT are located in your file system;
|
||||
* The build or binary directory is where all files created during CMake configuration and generation process will be located. The mentioned process will be described below.
|
||||
* The installation directory is where binaries will be installed after building the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications.
|
||||
The bare sources distribution contains not only the sources of Open CASCADE Technology, but also documentation, samples and non-regression test scripts.
|
||||
|
||||
The good practice is not to use the source directory as a build one.
|
||||
Different configurations should be built in different build directories to avoid conflicts.
|
||||
It is however possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type), for example:
|
||||
## The usage of CMake
|
||||
|
||||
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.
|
||||
|
||||
CMake deals with three directories: source, build or binary and install.
|
||||
|
||||
* The source directory is where the sources of OCCT are located in your filesystem
|
||||
* The build or binary directory is where all the files created during CMake configuration and generation process will be located. The mentioned process will be described below.
|
||||
* The installation directory is where binaries will be installed after build the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications.
|
||||
|
||||
**Note**: It is possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type).
|
||||
|
||||
**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 configurations
|
||||
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
|
||||
|
||||
@section build_cmake_conf Configuration process
|
||||
## Configuration process
|
||||
|
||||
If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory:
|
||||
|
||||
@@ -48,9 +64,9 @@ If the command-line tool is used, run the tool from the build directory with a s
|
||||
|
||||
Press *c* to configure.
|
||||
|
||||
All actions required in the configuration process with the GUI tool will be described below.
|
||||
All required actions in the configuration process will be described with using the GUI tool below.
|
||||
|
||||
If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**.
|
||||
If the gui-tool is used, run the tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**.
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image001.png}
|
||||
|
||||
@@ -60,84 +76,67 @@ Once the source and build directories are selected, "Configure" button should be
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
|
||||
|
||||
To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling <i>d:/occt/adm/templates/uwp.toolchain.config.cmake</i>.
|
||||
|
||||
Alternatively, if you are using CMake from the command line add options -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 .
|
||||
|
||||
**Note**: Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". File <i>d:/occt/samples/xaml/ReadMe.md</i> describes the building procedure of XAML (UWP) sample.
|
||||
|
||||
Once "Finish" button is pressed, the first pass of the configuration process is executed. At the end of the process, CMake outputs the list of environment variables, which have to be properly specified for successful configuration.
|
||||
Once "Finish" button is pressed, the first pass the configuration process is executed. At the end of the process, CMake outputs the list of environment variables which have to be properly specified for successful configuration.
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image003.png}
|
||||
|
||||
The error message provides some information about these variables. This message will appear after each pass of the process until all required variables are specified correctly.
|
||||
The error message provides an information about these variables. This message will appear after each pass of the process until all required variables are specified correctly.
|
||||
|
||||
The change of the state of some variables can lead to the appearance of new variables. The new variables appeared after the pass of the configuration process are highlighted with red color by CMake GUI tool.
|
||||
The change of the state of some variables can lead to a new variable appearance. The new variables appeared after the pass of the configuration process is notified with red color by CMake GUI tool.
|
||||
|
||||
Note: There is "grouped" option, which groups variables with a common prefix.
|
||||
Note: There is "grouped" option which groups variables with a common prefix.
|
||||
|
||||
The following table gives the full list of environment variables used at the configuration stage:
|
||||
The following table enumerates the full list of environment variables used at configuration stage:
|
||||
|
||||
| Variable | Type | Purpose |
|
||||
|----------|------|---------|
|
||||
| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (such 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. See 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|
|
||||
| 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 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_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 used when linking other targets |
|
||||
| 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 option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
| BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |
|
||||
| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls 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. |
|
||||
| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean flag | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. |
|
||||
| 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 |
|
||||
| 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_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* |
|
||||
| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
|
||||
| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) |
|
||||
| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_LIB}) |
|
||||
| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) |
|
||||
| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
|
||||
| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables |
|
||||
| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
|
||||
| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) |
|
||||
| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
|
||||
| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) |
|
||||
| INSTALL_DIR | Path | Points to the installation directory |
|
||||
| INSTALL_FREETYPE | Boolean flag | Indicates whether Freetype binaries should be installed into the installation directory |
|
||||
| INSTALL_FREEIMAGE* | Boolean flag | Indicates whether Freeimage binaries should be installed into the installation directory |
|
||||
| INSTALL_GL2PS | Boolean flag | Indicates whether GL2PS binaries should be installed into the installation directory |
|
||||
| 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_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation 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:** Only the forward slashes ("/") are acceptable in the CMake options defining paths.
|
||||
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
|
||||
|
||||
@section build_cmake_3rdparty 3rd party search mechanism
|
||||
### 3rd-party search mechanism (The variables with <i>3RDPARTY_</i> prefix)
|
||||
|
||||
If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sought in it, and 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 results of the search (achieved on the next pass of the configuration process) are recorded in the corresponding variables:
|
||||
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 children of the product directory if the last one is defined.
|
||||
Note: each library and include directory should be the children of product directory if the last one is defined.
|
||||
|
||||
The search process is as follows:
|
||||
|
||||
@@ -148,7 +147,7 @@ The search process is as follows:
|
||||
2. *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR*
|
||||
3. *3RDPARTY_\<PRODUCT\>_DLL_DIR*
|
||||
|
||||
If a variable of any level is not defined (empty or <i> \<variable name\>-NOTFOUND </i>) and the upper level variable is defined, the content of the non-defined variable will be sought at the next configuration step. If the search process at level 3 does not find the required files, it seeks in default places.
|
||||
If a variable of any level is not defined (empty or <i> \<variable name\>-NOTFOUND </i>) and the upper level variable is defined, the content of the non-defined variable will be sought at the next configuration step. If search process at level 3 does not find the required files, it seeks in default places.
|
||||
|
||||
If a search result (include path, or library path, or dll path) does not meet your expectations, you can change *3RDPARTY_\<PRODUCT\>_*_DIR variable*, clear (if they are not empty) *3RDPARTY_\<PRODUCT\>_DLL_DIR, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* and 3RDPARTY_\<PRODUCT\>_LIBRARY_DIR variables (or clear one of them) and run the configuration process again.
|
||||
|
||||
@@ -163,15 +162,15 @@ can be changed to
|
||||
|
||||
d:/3rdparty/freetype-2.5.3
|
||||
|
||||
During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_DIR*, *3RDPARTY_FREETYPE_INCLUDE_DIR* and *3RDPARTY_FREETYPE_LIBRARY_DIR*) will be filled with new found values.
|
||||
During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_DIR*, *3RDPARTY_FREETYPE_INCLUDE_DIR* and *3RDPARTY_FREETYPE_LIBRARY_DIR*) will be filled with new found values
|
||||
|
||||
**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
|
||||
|
||||
@section build_cmake_gen Projects generation
|
||||
### OCCT Generation
|
||||
|
||||
Once the configuration process is done, the "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
|
||||
Once the configuration process is done, "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
|
||||
|
||||
@section build_cmake_build Building
|
||||
### OCCT Building
|
||||
|
||||
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
|
||||
|
||||
@@ -180,27 +179,27 @@ Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it
|
||||
By default the build solution process skips the building of the INSTALL and Overview project.
|
||||
|
||||
When the building process is finished build:
|
||||
* Overview project to generate OCCT overview documentation (if BUILD_DOC_Overview variable is checked)
|
||||
* Overview project to generate OCCT overview documentation (if BUILD_DOC_OcctOverview variable is checked)
|
||||
* the *INSTALL* project to run **the installation process**
|
||||
|
||||
For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer.
|
||||
|
||||
@section build_cmake_install Installation
|
||||
## Installation process
|
||||
|
||||
Installation is a process of extracting redistributable resources (binaries, include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines.
|
||||
Installation is a process of extracting redistributable resources (binaries,include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines.
|
||||
|
||||
Normally you use the installation directory of OCCT to link against your specific application.
|
||||
|
||||
The directory structure is as follows:
|
||||
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 they were installed) and overview.html (short-cut for installed OCCT overview documentation).
|
||||
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).
|
||||
|
@@ -1,61 +1,70 @@
|
||||
Building with Code::Blocks {#occt_dev_guides__building_code_blocks}
|
||||
==========================
|
||||
Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
|
||||
======================================
|
||||
|
||||
@tableofcontents
|
||||
This file describes steps to build OCCT libraries from a complete source package
|
||||
on Mac OS X with **Code::Blocks**.
|
||||
|
||||
@section build_codeblocks_intro General
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
|
||||
It can be used as an alternative to CMake build system (see @ref occt_dev_guides__building_cmake) for all supported platforms.
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for details.
|
||||
|
||||
@section build_codeblocks_3rdparty Third-party libraries
|
||||
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file
|
||||
*custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
|
||||
|
||||
Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref occt_dev_guides__building.
|
||||
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
|
||||
|
||||
@section build_codeblocks_conf Configuration
|
||||
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
|
||||
|
||||
All paths should be separated by ":" symbol.
|
||||
|
||||
Before building it is necessary to set up build environment.
|
||||
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
|
||||
in the aforementioned environment variables *CSF_OPT_INC* and
|
||||
*CSF_OPT_LIB64* from file *custom.sh*.
|
||||
|
||||
The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
|
||||
If you want to build OCCT without the optional libraries perform the
|
||||
following steps:
|
||||
|
||||
* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
|
||||
* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
|
||||
* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
2.1 Disable unnecessary library in custom.sh by setting the corresponding
|
||||
variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*.
|
||||
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
|
||||
Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
|
||||
2.2 Remove this library from Linker settings in **Code::Blocks** for each project
|
||||
that uses it: right click on the required project, choose **Build options**,
|
||||
go to **Linker settings** tab in the opened window , select unnecessary
|
||||
libraries and click **Delete** button.
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_linux.png}
|
||||
3. Open Terminal application
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
|
||||
|
||||
@section build_codeblocks_gen Projects generation
|
||||
|
||||
Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
|
||||
4. Enter <i> \<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
$ cd /dev/OCCT/opencascade-7.0.0
|
||||
$ ./genproj cbp
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*.
|
||||
5. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
6. To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
|
||||
@section build_codeblocks_build Building
|
||||
|
||||
To start **Code::Blocks**, launch script *codeblocks.sh*.
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform
|
||||
the following steps:
|
||||
|
||||
To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
1.Open Terminal application
|
||||
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
@@ -1,71 +1,35 @@
|
||||
Building with MS Visual C++ {#occt_dev_guides__building_msvc}
|
||||
===========================
|
||||
|
||||
@tableofcontents
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Windows with <b>MS Visual C++</b>.
|
||||
|
||||
@section build_msvc_intro General
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
This page describes steps to build OCCT libraries from a complete source archive on Windows with <b>MS Visual C++</b> using projects generated by **genproj** tool.
|
||||
It is an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake).
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for instructions.
|
||||
|
||||
**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology.
|
||||
These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources.
|
||||
1. Edit file *custom.bat* to define the environment:
|
||||
|
||||
The project files included in official distribution of OCCT are generated by this tool.
|
||||
If you have official distribution with project files included, you can use them directly without a need to call **genproj**.
|
||||
- *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
|
||||
third-party products
|
||||
|
||||
@section build_msvc_3rdparty Third-party libraries
|
||||
2. Launch *msvc.bat* to start Visual Studio with all necessary environment
|
||||
variables defined.
|
||||
|
||||
Before building OCCT, make sure to have all the required third-party libraries installed.
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
|
||||
The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from http://www.opencascade.com/content/3rd-party-components.
|
||||
3. Build with Visual Studio
|
||||
|
||||
You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_windows for instructions.
|
||||
|
||||
@section build_msvc_conf Configuration
|
||||
|
||||
If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment:
|
||||
|
||||
* *VCVER* -- version of Visual Studio (vc10, vc11, vc12, or vc14), 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
|
||||
* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used third-party products
|
||||
* *SHORTCUT_HEADERS* -- defines method for population of folder *inc* by header files. Supported methods are:
|
||||
* *Copy* - headers will be copied from *src*;
|
||||
* *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*;
|
||||
* "HardLink* - hard links to headers located in *src* will be created.
|
||||
|
||||
Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
|
||||
That tool will analyze your environment and propose you to choose available options:
|
||||
|
||||
* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*)
|
||||
* Method to populate folder *inc* (short-cuts by default).
|
||||
* Location of third-party libraries (usually downloaded from OCCT web site, see above).
|
||||
* Path to common directory where third-party libraries are located (optional)
|
||||
* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
|
||||
|
||||
@figure{/dev_guides/building/3rdparty/images/genconf_windows.png}
|
||||
|
||||
Click "Save" to store the specified configuration in *custom.bat* file.
|
||||
|
||||
@section build_msvc_generate Projects generation
|
||||
|
||||
Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
|
||||
|
||||
@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
|
||||
If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found.
|
||||
|
||||
~~~~~
|
||||
$ genproj.bat
|
||||
~~~~~
|
||||
|
||||
Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment.
|
||||
|
||||
@section build_msvc_build Building
|
||||
|
||||
Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits.
|
||||
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc...</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
Note: If VTK was not installed on you computer and you are not interested in usage of
|
||||
OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw
|
||||
projects from process of compilation in the main menu <b>Build / Configuration Manager</b>.
|
||||
|
||||
To start DRAW, launch *draw.bat*.
|
||||
|
BIN
dox/dev_guides/building/wok/images/wok_image001.png
Normal file
After Width: | Height: | Size: 168 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image002.png
Normal file
After Width: | Height: | Size: 270 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image003.png
Normal file
After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |