mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0026916: Configuration, CMake - configure variables to customize installation path separately for executables, libraries and resources
change the structure of binaries for unix OCCT_RESOURCE_PATH env variable is used
This commit is contained in:
parent
3554ea68da
commit
096ef695e1
223
CMakeLists.txt
223
CMakeLists.txt
@ -31,10 +31,27 @@ endif()
|
|||||||
# the name of the project
|
# the name of the project
|
||||||
project (OCCT)
|
project (OCCT)
|
||||||
|
|
||||||
|
# include occt macros
|
||||||
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||||
|
|
||||||
# Solution folder property
|
# Solution folder property
|
||||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
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}")
|
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||||
|
|
||||||
|
# single-configuration generator
|
||||||
|
set (SINGLE_GENERATOR OFF)
|
||||||
|
if (CMAKE_BUILD_TYPE)
|
||||||
|
set (SINGLE_GENERATOR ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
|
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
|
||||||
# check this variable and set if it's required
|
# check this variable and set if it's required
|
||||||
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
|
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
|
||||||
@ -50,10 +67,93 @@ endif()
|
|||||||
# copy samples to install directory
|
# copy samples to install directory
|
||||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
||||||
|
|
||||||
# install dir of the built project
|
# install dir of the project
|
||||||
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
|
if (NOT DEFINED INSTALL_DIR)
|
||||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
|
||||||
|
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)
|
||||||
|
message (STATUS "Info: INSTALL_DIR has been set as ${INSTALL_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# hide CMAKE_INSTALL_PREFIX from a user
|
||||||
|
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||||
|
|
||||||
|
set (BIN_LETTER "")
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||||
|
set (BIN_LETTER "d")
|
||||||
|
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||||
|
set (BIN_LETTER "i")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||||
|
OCCT_MAKE_OS_WITH_BITNESS()
|
||||||
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
|
|
||||||
|
# do not define INSTALL_BIN_DIR for win.
|
||||||
|
# Leave library structure for win: <prefix>/win64/vc10/bin(d)
|
||||||
|
if (NOT DEFINED INSTALL_BIN_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_BIN_DIR "${INSTALL_DIR}/bin" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
if (SINGLE_GENERATOR)
|
||||||
|
set (INSTALL_BIN_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}" CACHE PATH "${INSTALL_BIN_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# define folder contaning all shell/batch scripts
|
||||||
|
if (NOT DEFINED INSTALL_SCRIPT_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_SCRIPT_DIR "${INSTALL_BIN_DIR}/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
set (INSTALL_SCRIPT_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SCRIPT_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||||
|
if (NOT DEFINED INSTALL_LIB_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_LIB_DIR "${INSTALL_DIR}/lib" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
if (SINGLE_GENERATOR)
|
||||||
|
set (INSTALL_LIB_DIR "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}" CACHE PATH "${INSTALL_LIB_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# OCCT headers: <prefix>/inc for windows,
|
||||||
|
# <prefix>/include/opencascade-7.0.0 for unix
|
||||||
|
if (NOT DEFINED INSTALL_INCLUDE_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/include/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
set (INSTALL_INCLUDE_DIR "${INSTALL_DIR}/inc" CACHE PATH "${INSTALL_INCLUDE_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# OCCT resources: <prefix>/src for windows,
|
||||||
|
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||||
|
if (NOT DEFINED INSTALL_OCCT_RESOURCE_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}/resoures" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
set (INSTALL_OCCT_RESOURCE_DIR "${INSTALL_DIR}/src" CACHE PATH "${INSTALL_OCCT_RESOURCE_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# OCCT data
|
||||||
|
if (NOT DEFINED INSTALL_SHARE_DIR)
|
||||||
|
if (UNIX)
|
||||||
|
set (INSTALL_SHARE_DIR "${INSTALL_DIR}/share/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||||
|
else()
|
||||||
|
set (INSTALL_SHARE_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_SHARE_DIR_DESCR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# a directory recognized as a 'patch' for OCCT
|
||||||
set (BUILD_PATCH "" CACHE PATH "${BUILD_PATCH_DESCR}")
|
set (BUILD_PATCH "" CACHE PATH "${BUILD_PATCH_DESCR}")
|
||||||
|
|
||||||
# the list of being built toolkits
|
# the list of being built toolkits
|
||||||
@ -68,13 +168,11 @@ endif()
|
|||||||
if (APPLE)
|
if (APPLE)
|
||||||
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
|
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# include occt macros
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
|
||||||
|
|
||||||
# include the patched or original list of modules
|
# include the patched or original list of modules
|
||||||
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
||||||
# list <OCCT_MODULES> will contain all modules
|
# list <OCCT_MODULES> will contain all modules
|
||||||
@ -114,7 +212,7 @@ endif()
|
|||||||
# accumulate all used toolkits
|
# accumulate all used toolkits
|
||||||
list (REMOVE_DUPLICATES BUILD_TOOLKITS)
|
list (REMOVE_DUPLICATES BUILD_TOOLKITS)
|
||||||
set (RAW_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)
|
OCCT_TOOLKIT_FULL_DEP (${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS)
|
||||||
list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS})
|
list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS})
|
||||||
endforeach()
|
endforeach()
|
||||||
@ -293,9 +391,12 @@ if (BUILD_DOC_OcctOverview)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (INSTALL_DOC_OcctOverview)
|
if (INSTALL_DOC_OcctOverview)
|
||||||
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/doc")
|
install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_SHARE_DIR}/doc")
|
||||||
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}")
|
# create overview.html only for windows
|
||||||
|
if (WIN32)
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_SCRIPT_DIR}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
|
||||||
@ -344,10 +445,6 @@ if (3RDPARTY_LIBRARY_DIRS)
|
|||||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
|
||||||
OCCT_MAKE_OS_WITH_BITNESS()
|
|
||||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
|
||||||
|
|
||||||
# build directories
|
# build directories
|
||||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
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_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
@ -367,15 +464,6 @@ if (WIN32)
|
|||||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
endif()
|
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")
|
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||||
|
|
||||||
@ -385,15 +473,24 @@ COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}"
|
|||||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||||
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||||
|
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_SHARE_DIR}")
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
|
||||||
|
|
||||||
|
# OCCT samples
|
||||||
if (INSTALL_SAMPLES)
|
if (INSTALL_SAMPLES)
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
|
if (WIN32)
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/CSharp" "${INSTALL_SHARE_DIR}/samples")
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/mfc" "${INSTALL_SHARE_DIR}/samples")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_SHARE_DIR}/samples")
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_SHARE_DIR}/samples")
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_SHARE_DIR}/samples")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_SHARE_DIR}/samples")
|
||||||
|
|
||||||
if (INSTALL_TEST_CASES)
|
if (INSTALL_TEST_CASES)
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
|
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_SHARE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@ -402,14 +499,16 @@ else()
|
|||||||
set (SCRIPT_EXT sh)
|
set (SCRIPT_EXT sh)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# DRAW.BAT or DRAW.SH
|
# copy draw script to install script folder
|
||||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
|
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}")
|
||||||
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||||
else()
|
else()
|
||||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_SCRIPT_DIR}"
|
||||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# copy draw script to CMake binary folder
|
||||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||||
@ -417,29 +516,29 @@ set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM_NAME}\" (\n call \"%~dp0${SUB_CUSTOM_NAME}\" %VCVER% %ARCH% %CASDEB% \n)")
|
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM_NAME}\" (\n call \"%~dp0${SUB_CUSTOM_NAME}\" %VCVER% %ARCH% %CASDEB% \n)")
|
||||||
else()
|
else()
|
||||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
|
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\$1\" \"\$2\" \nfi")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# change custom.bat/sh
|
# change custom.bat/sh
|
||||||
if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
|
if (EXISTS "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}")
|
||||||
file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
file (READ "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||||
|
|
||||||
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
||||||
|
|
||||||
file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
file (WRITE "${INSTALL_BIN_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||||
else()
|
else()
|
||||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
|
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_SCRIPT_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# write current custom.bat/sh (for install directory)
|
# write current custom.bat/sh (for install directory)
|
||||||
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
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}")
|
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_SCRIPT_DIR}")
|
||||||
|
|
||||||
# write current custom.bat/sh (for build directory)
|
# write current custom.bat/sh (for build directory)
|
||||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||||
|
|
||||||
if (BUILD_MODULE_OcctMfcSamples)
|
if (BUILD_MODULE_OcctMfcSamples)
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
|
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_SCRIPT_DIR}")
|
||||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -447,29 +546,31 @@ endif()
|
|||||||
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||||
|
|
||||||
# end script for draw in standalone environment
|
# end script for draw in standalone environment
|
||||||
# release version
|
if (UNIX)
|
||||||
set (BUILD_LETTER "")
|
OCCT_CONFIGURE ("adm/templates/env.install.sh.in" "env.install.sh")
|
||||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.release.${SCRIPT_EXT}")
|
install (FILES "${CMAKE_BINARY_DIR}/env.install.sh" DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.sh")
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.${SCRIPT_EXT}"
|
else()
|
||||||
CONFIGURATIONS Release
|
# release version
|
||||||
DESTINATION "${INSTALL_DIR}"
|
set (CURRENT_BUILD_LETTER "")
|
||||||
RENAME "env.${SCRIPT_EXT}")
|
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.release.bat")
|
||||||
|
install (FILES "${CMAKE_BINARY_DIR}/env.install.release.bat"
|
||||||
|
CONFIGURATIONS Release
|
||||||
|
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||||
|
|
||||||
# debug version
|
# debug version
|
||||||
set (BUILD_LETTER "d")
|
set (CURRENT_BUILD_LETTER "d")
|
||||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.debug.${SCRIPT_EXT}")
|
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.debug.bat")
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.${SCRIPT_EXT}"
|
install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.bat"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS Debug
|
||||||
DESTINATION "${INSTALL_DIR}"
|
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||||
RENAME "env.${SCRIPT_EXT}")
|
|
||||||
|
|
||||||
# release with debug info version
|
# release with debug info version
|
||||||
set (BUILD_LETTER "i")
|
set (CURRENT_BUILD_LETTER "i")
|
||||||
OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.relwithdebinfo.${SCRIPT_EXT}")
|
OCCT_CONFIGURE ("adm/templates/env.install.bat.in" "env.install.relwithdebinfo.bat")
|
||||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.${SCRIPT_EXT}"
|
install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.bat"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}"
|
DESTINATION "${INSTALL_SCRIPT_DIR}" RENAME "env.bat")
|
||||||
RENAME "env.${SCRIPT_EXT}")
|
endif()
|
||||||
|
|
||||||
# copy DrawAppliInit from OCCT source to build directory
|
# copy DrawAppliInit from OCCT source to build directory
|
||||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
|
if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
|
||||||
@ -482,9 +583,9 @@ foreach(RESOURCE ${RESOURCES})
|
|||||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
|
get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
|
||||||
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
|
if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
|
||||||
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
|
get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src/${RESOURCE_FOLDER}")
|
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}/${RESOURCE_FOLDER}")
|
||||||
else()
|
else()
|
||||||
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src")
|
OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_OCCT_RESOURCE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
@ -191,47 +191,62 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
|||||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
CONFIGURATIONS Release
|
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
else()
|
||||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
||||||
|
|
||||||
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
||||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||||
install (FILES "${ABS_PATH}"
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${FREEIMLIB}.3)
|
||||||
RENAME ${FREEIMLIB}.3)
|
else()
|
||||||
install (FILES "${ABS_PATH}"
|
install (FILES "${ABS_PATH}"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||||
RENAME ${FREEIMLIB}.3)
|
RENAME ${FREEIMLIB}.3)
|
||||||
install (FILES "${ABS_PATH}"
|
install (FILES "${ABS_PATH}"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||||
RENAME ${FREEIMLIB}.3)
|
RENAME ${FREEIMLIB}.3)
|
||||||
|
install (FILES "${ABS_PATH}"
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||||
|
RENAME ${FREEIMLIB}.3)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
||||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||||
install (FILES "${ABS_PATH}"
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_LIB_DIR}" RENAME ${GL2PSLIB}.1)
|
||||||
RENAME ${GL2PSLIB}.1)
|
else()
|
||||||
install (FILES "${ABS_PATH}"
|
install (FILES "${ABS_PATH}"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||||
RENAME ${GL2PSLIB}.1)
|
RENAME ${GL2PSLIB}.1)
|
||||||
install (FILES "${ABS_PATH}"
|
install (FILES "${ABS_PATH}"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||||
RENAME ${GL2PSLIB}.1)
|
RENAME ${GL2PSLIB}.1)
|
||||||
|
install (FILES "${ABS_PATH}"
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||||
|
RENAME ${GL2PSLIB}.1)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -289,34 +289,44 @@ endif()
|
|||||||
|
|
||||||
# install instructions
|
# install instructions
|
||||||
if (INSTALL_FREETYPE)
|
if (INSTALL_FREETYPE)
|
||||||
|
|
||||||
OCCT_MAKE_OS_WITH_BITNESS()
|
OCCT_MAKE_OS_WITH_BITNESS()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
CONFIGURATIONS Release
|
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
else()
|
||||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||||
|
|
||||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
CONFIGURATIONS Release
|
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
DESTINATION "${INSTALL_LIB_DIR}"
|
||||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
CONFIGURATIONS Release
|
||||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
||||||
CONFIGURATIONS Debug
|
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
CONFIGURATIONS RelWithDebInfo
|
||||||
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
|
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()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||||
|
@ -274,7 +274,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO
|
|||||||
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/inc/${HEADER_FILE_NAME}" @ONLY)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/inc")
|
install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_INCLUDE_DIR}")
|
||||||
|
|
||||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
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...")
|
||||||
@ -457,28 +457,42 @@ function (OCCT_MODULES_AND_TOOLKITS MODULE_LIST)
|
|||||||
set (${MODULE_LIST} ${${MODULE_LIST}} PARENT_SCOPE)
|
set (${MODULE_LIST} ${${MODULE_LIST}} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Returns OCCT version string from file Standard_Version.hxx (if available)
|
# Returns OCC version string from file Standard_Version.hxx (if available)
|
||||||
function (OCCT_VERSION OCCT_VERSION_VAR)
|
function (OCC_VERSION OCC_VERSION_MAJOR OCC_VERSION_MINOR OCC_VERSION_MAINTENANCE OCC_VERSION_DEVELOPMENT OCC_VERSION_STRING_EXT)
|
||||||
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")
|
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}")
|
if (EXISTS "${STANDARD_VERSION_FILE}")
|
||||||
foreach (SOUGHT_VERSION OCC_VERSION_COMPLETE OCC_VERSION_DEVELOPMENT)
|
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)
|
||||||
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
file (STRINGS "${STANDARD_VERSION_FILE}" ${SOUGHT_VERSION} REGEX "^#define ${SOUGHT_VERSION} .*")
|
||||||
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*\"([^ ]+)\".*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
string (REGEX REPLACE ".*${SOUGHT_VERSION} .*\"([^ ]+)\".*" "\\1" ${SOUGHT_VERSION} "${${SOUGHT_VERSION}}" )
|
||||||
endforeach()
|
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()
|
endif()
|
||||||
|
|
||||||
set (${OCCT_VERSION_VAR} "${OCCT_VERSION_LOCALVAR}" PARENT_SCOPE)
|
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()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
|
macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME THE_VAR_TYPE THE_MESSAGE_OF_BEING_CHECKED_PATH)
|
||||||
|
@ -130,37 +130,46 @@ endif()
|
|||||||
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
if ("${PROJECT_NAME}" STREQUAL "DRAWEXE")
|
||||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||||
|
|
||||||
install (TARGETS ${PROJECT_NAME}
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
CONFIGURATIONS Release
|
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
else()
|
||||||
install (TARGETS ${PROJECT_NAME}
|
install (TARGETS ${PROJECT_NAME}
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
install (TARGETS ${PROJECT_NAME}
|
install (TARGETS ${PROJECT_NAME}
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (TARGETS ${PROJECT_NAME}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE})
|
||||||
|
|
||||||
install (TARGETS ${PROJECT_NAME}
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
CONFIGURATIONS Release
|
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
else()
|
||||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
install (TARGETS ${PROJECT_NAME}
|
||||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
CONFIGURATIONS Release
|
||||||
install (TARGETS ${PROJECT_NAME}
|
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||||
CONFIGURATIONS RelWithDebInfo
|
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
|
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
install (TARGETS ${PROJECT_NAME}
|
||||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
CONFIGURATIONS RelWithDebInfo
|
||||||
install (TARGETS ${PROJECT_NAME}
|
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini"
|
||||||
CONFIGURATIONS Debug
|
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
install (TARGETS ${PROJECT_NAME}
|
||||||
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
|
CONFIGURATIONS Debug
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
||||||
|
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||||
|
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -173,10 +182,16 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (CURRENT_MODULE)
|
if (CURRENT_MODULE)
|
||||||
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Modules/${CURRENT_MODULE}")
|
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Modules/${CURRENT_MODULE}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
|
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
|
||||||
|
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
|
||||||
|
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
|
||||||
|
|
||||||
|
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
|
||||||
|
SOVERSION "${OCC_VERSION_MAJOR}"
|
||||||
|
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
|
||||||
|
|
||||||
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
|
||||||
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
|
||||||
|
@ -236,30 +236,40 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
|
|||||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
CONFIGURATIONS Release
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL} DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
else()
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS Release
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_DLL}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||||
|
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
CONFIGURATIONS Release
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
DESTINATION "${INSTALL_LIB_DIR}"
|
||||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
CONFIGURATIONS Release
|
||||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||||
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||||
CONFIGURATIONS Debug
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
CONFIGURATIONS RelWithDebInfo
|
||||||
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
|
||||||
|
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||||
|
install (FILES ${3RDPARTY_${PRODUCT_NAME}_LIBRARY}.2
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||||
|
RENAME ${PRODUCT_LIBRARY_NAME}.2)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||||
|
@ -203,32 +203,47 @@ if (INSTALL_TCL)
|
|||||||
|
|
||||||
# collect and install all dlls from tcl dll dirs
|
# collect and install all dlls from tcl dll dirs
|
||||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||||
install (FILES ${TCL_DLLS}
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
install (FILES ${TCL_DLLS}
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES ${TCL_DLLS}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
CONFIGURATIONS Release
|
||||||
install (FILES ${TCL_DLLS}
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
CONFIGURATIONS Debug
|
install (FILES ${TCL_DLLS}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (FILES ${TCL_DLLS}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
CONFIGURATIONS Release
|
||||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
CONFIGURATIONS Debug
|
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
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()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TCL_TCLSH_VERSION)
|
if (TCL_TCLSH_VERSION)
|
||||||
# tcl is required to install in lib folder (without)
|
# tcl is required to install in lib folder (without)
|
||||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
|
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
|
else()
|
||||||
|
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
|
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
|
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.")
|
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||||
|
@ -207,31 +207,45 @@ if (INSTALL_TK)
|
|||||||
|
|
||||||
# collect and install all dlls from tk dll dirs
|
# collect and install all dlls from tk dll dirs
|
||||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||||
install (FILES ${TK_DLLS}
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_BIN_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_BIN_DIR}")
|
||||||
install (FILES ${TK_DLLS}
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES ${TK_DLLS}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
CONFIGURATIONS Release
|
||||||
install (FILES ${TK_DLLS}
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||||
CONFIGURATIONS Debug
|
install (FILES ${TK_DLLS}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||||
|
install (FILES ${TK_DLLS}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
|
||||||
CONFIGURATIONS Release
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
else()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
CONFIGURATIONS Release
|
||||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
CONFIGURATIONS Debug
|
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||||
|
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TCL_TCLSH_VERSION)
|
if (TCL_TCLSH_VERSION)
|
||||||
# tk is required to install in lib folder (without)
|
# 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")
|
if (DEFINED INSTALL_LIB_DIR)
|
||||||
|
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||||
|
else()
|
||||||
|
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message (STATUS "\nWarning: tkX.X subdir won't be copyied during the installation process.")
|
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.")
|
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
if [ "$1" == "@COMPILER@" ]; then
|
||||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
if [ "$2" == "@COMPILER_BITNESS@" ]; then
|
||||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||||
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
|
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
|
||||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||||
@ -9,6 +9,32 @@ if [ "$COMPILER" == "@COMPILER@" ]; then
|
|||||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
||||||
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
||||||
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
||||||
|
|
||||||
|
export BIN_PATH="@INSTALL_BIN_DIR@"
|
||||||
|
if [ "$BIN_PATH" != "" ]; then
|
||||||
|
export PATH="${BIN_PATH}:${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export LIB_PATH="@INSTALL_LIB_DIR@"
|
||||||
|
if [ "$LIB_PATH" != "" ]; then
|
||||||
|
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||||
|
export LD_LIBRARY_PATH="${LIB_PATH}:${LD_LIBRARY_PATH}"
|
||||||
|
else
|
||||||
|
export LD_LIBRARY_PATH="${LIB_PATH}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
export OCCT_RESOURCE_PATH="${CASROOT}/src"
|
||||||
|
if [ "@INSTALL_OCCT_RESOURCE_DIR@" != "" ]; then
|
||||||
|
export OCCT_RESOURCE_PATH="@INSTALL_OCCT_RESOURCE_DIR@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# required for set default testing environment
|
||||||
|
# and "Samples" window creation in DRAW
|
||||||
|
export OCCT_SHARE_PATH="${CASROOT}"
|
||||||
|
if [ "@INSTALL_SHARE_DIR@" != "" ]; then
|
||||||
|
export OCCT_SHARE_PATH="@INSTALL_SHARE_DIR@"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||||
|
|
||||||
source "${aScriptPath}/env.sh" "$1" "$2"
|
source "${aScriptPath}/env.sh" "$1"
|
||||||
|
|
||||||
echo 'Hint: use "pload ALL" command to load standard commands'
|
echo 'Hint: use "pload ALL" command to load standard commands'
|
||||||
DRAWEXE
|
DRAWEXE
|
||||||
|
@ -5,7 +5,7 @@ set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
|||||||
|
|
||||||
set "VCVER=@COMPILER@"
|
set "VCVER=@COMPILER@"
|
||||||
set "ARCH=@COMPILER_BITNESS@"
|
set "ARCH=@COMPILER_BITNESS@"
|
||||||
set "CASDEB=@BUILD_LETTER@"
|
set "CASDEB=@CURRENT_BUILD_LETTER@"
|
||||||
|
|
||||||
if not ["%1"] == [""] set "VCVER=%1"
|
if not ["%1"] == [""] set "VCVER=%1"
|
||||||
if not ["%2"] == [""] set "ARCH=%2"
|
if not ["%2"] == [""] set "ARCH=%2"
|
||||||
|
@ -35,7 +35,7 @@ fi
|
|||||||
|
|
||||||
# ----- Set local settings -----
|
# ----- Set local settings -----
|
||||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
source "${aScriptPath}/custom.sh" "${COMPILER}" "${ARCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
THRDPARTY_PATH=""
|
THRDPARTY_PATH=""
|
||||||
@ -76,15 +76,10 @@ if [ "$TK_DIR" != "$TCL_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
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
|
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||||
else
|
else
|
||||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
|
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WOKSTATION" == "mac" ]; then
|
if [ "$WOKSTATION" == "mac" ]; then
|
||||||
@ -99,34 +94,34 @@ fi
|
|||||||
export CSF_LANGUAGE=us
|
export CSF_LANGUAGE=us
|
||||||
export MMGT_CLEAR=1
|
export MMGT_CLEAR=1
|
||||||
export CSF_EXCEPTION_PROMPT=1
|
export CSF_EXCEPTION_PROMPT=1
|
||||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
export CSF_SHMessage="${OCCT_RESOURCE_PATH}/SHMessage"
|
||||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
export CSF_MDTVTexturesDirectory="${OCCT_RESOURCE_PATH}/Textures"
|
||||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
export CSF_ShadersDirectory="${OCCT_RESOURCE_PATH}/Shaders"
|
||||||
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
export CSF_XSMessage="${OCCT_RESOURCE_PATH}/XSMessage"
|
||||||
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
export CSF_TObjMessage="${OCCT_RESOURCE_PATH}/TObj"
|
||||||
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
export CSF_StandardDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||||
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
export CSF_PluginDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
export CSF_XCAFDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
export CSF_TObjDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
export CSF_StandardLiteDefaults="${OCCT_RESOURCE_PATH}/StdResource"
|
||||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
export CSF_UnitsLexicon="${OCCT_RESOURCE_PATH}/UnitsAPI/Lexi_Expr.dat"
|
||||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
export CSF_UnitsDefinition="${OCCT_RESOURCE_PATH}/UnitsAPI/Units.dat"
|
||||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
export CSF_IGESDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
export CSF_STEPDefaults="${OCCT_RESOURCE_PATH}/XSTEPResource"
|
||||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
export CSF_XmlOcafResource="${OCCT_RESOURCE_PATH}/XmlOcafResource"
|
||||||
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
export CSF_MIGRATION_TYPES="${OCCT_RESOURCE_PATH}/StdResource/MigrationSheet.txt"
|
||||||
|
|
||||||
# Draw Harness special stuff
|
# Draw Harness special stuff
|
||||||
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources" ]; then
|
||||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
export DRAWHOME="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
export CSF_DrawPluginDefaults="${OCCT_RESOURCE_PATH}/DrawResources"
|
||||||
|
|
||||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
if [ -e "${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault" ]; then
|
||||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
export DRAWDEFAULT="${OCCT_RESOURCE_PATH}/DrawResources/DrawDefault"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
if [ -e "${OCCT_RESOURCE_PATH}/DrawResourcesProducts" ]; then
|
||||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
export CSF_DrawPluginProductsDefaults="${OCCT_RESOURCE_PATH}/DrawResourcesProducts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -37,12 +37,10 @@ set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
|
|||||||
|
|
||||||
set (3RDPARTY_MATHJAX_RELATIVE_PATH "http://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)
|
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
|
# Add common options for generation of Overview and User Guides
|
||||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCCT_SOURCE_VERSION}")
|
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}")
|
||||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
|
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")
|
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
|
||||||
|
|
||||||
|
@ -59,17 +59,34 @@ if { [file isdirectory $dir] } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# set default testing environment
|
# set default testing environment
|
||||||
|
if {[array names ::env OCCT_SHARE_PATH] != "" && "$::env(OCCT_SHARE_PATH)" != ""} {
|
||||||
|
if {[file isdirectory $env(OCCT_SHARE_PATH)/tests]} {
|
||||||
|
if { ! [info exists env(CSF_TestScriptsPath)] } {
|
||||||
|
set env(CSF_TestScriptsPath) $env(OCCT_SHARE_PATH)/tests
|
||||||
|
} else {
|
||||||
|
set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(OCCT_SHARE_PATH)/tests
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[file isdirectory $env(OCCT_SHARE_PATH)/data]} {
|
||||||
|
if { ! [info exists env(CSF_TestDataPath)] } {
|
||||||
|
set env(CSF_TestDataPath) $env(OCCT_SHARE_PATH)/data
|
||||||
|
} else {
|
||||||
|
set env(CSF_TestDataPath) $env(CSF_TestDataPath)[_path_separator]$env(OCCT_SHARE_PATH)/data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if { [info exists env(CASROOT)] && [file isdirectory $env(CASROOT)/tests] } {
|
if { [info exists env(CASROOT)] && [file isdirectory $env(CASROOT)/tests] } {
|
||||||
if { ! [info exists env(CSF_TestScriptsPath)] } {
|
if { ! [info exists env(CSF_TestScriptsPath)] } {
|
||||||
set env(CSF_TestScriptsPath) $env(CASROOT)/tests
|
set env(CSF_TestScriptsPath) $env(CASROOT)/tests
|
||||||
} else {
|
} else {
|
||||||
set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(CASROOT)/tests
|
set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(CASROOT)/tests
|
||||||
}
|
}
|
||||||
if { ! [info exists env(CSF_TestDataPath)] } {
|
if { ! [info exists env(CSF_TestDataPath)] } {
|
||||||
set env(CSF_TestDataPath) $env(CASROOT)/data
|
set env(CSF_TestDataPath) $env(CASROOT)/data
|
||||||
} else {
|
} else {
|
||||||
set env(CSF_TestDataPath) $env(CSF_TestDataPath)[_path_separator]$env(CASROOT)/data
|
set env(CSF_TestDataPath) $env(CSF_TestDataPath)[_path_separator]$env(CASROOT)/data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# load application-defined initialization script, which is expected to
|
# load application-defined initialization script, which is expected to
|
||||||
|
@ -29,7 +29,12 @@ if { [info exists tk_library] } {
|
|||||||
|
|
||||||
#fills menu "Load" with submenus
|
#fills menu "Load" with submenus
|
||||||
proc fillloadmenu {} {
|
proc fillloadmenu {} {
|
||||||
set chan [open [file nativename $::env(CASROOT)/src/DrawResources/DrawPlugin]]
|
set drawplugpath "$::env(CASROOT)/src/DrawResources/DrawPlugin"
|
||||||
|
if {[array names ::env OCCT_RESOURCE_PATH] != "" && "$::env(OCCT_RESOURCE_PATH)" != "" && [file exists $::env(OCCT_RESOURCE_PATH)/DrawResources/DrawPlugin]} {
|
||||||
|
set drawplugpath "$::env(OCCT_RESOURCE_PATH)/DrawResources/DrawPlugin"
|
||||||
|
}
|
||||||
|
|
||||||
|
set chan [open [file nativename $drawplugpath]]
|
||||||
while {[gets $chan line] >= 0} {
|
while {[gets $chan line] >= 0} {
|
||||||
if {[lindex [split $line ""] 0] != "!"} {
|
if {[lindex [split $line ""] 0] != "!"} {
|
||||||
if {[lindex [split $line ""] 0] == ""} {continue}
|
if {[lindex [split $line ""] 0] == ""} {continue}
|
||||||
@ -230,8 +235,14 @@ proc vsource {} {
|
|||||||
proc vsamples {} {
|
proc vsamples {} {
|
||||||
#create list {{category} {title} {filename}}
|
#create list {{category} {title} {filename}}
|
||||||
set alistofthree ""
|
set alistofthree ""
|
||||||
foreach fname [file nativename [glob -path $::env(CASROOT)/samples/tcl/ *]] {
|
|
||||||
if {[lindex [split $fname "."] end] != "tcl"} {continue}
|
set samplespath "$::env(CASROOT)/samples/tcl/"
|
||||||
|
if { [array names ::env OCCT_SHARE_PATH] != "" && "$::env(OCCT_SHARE_PATH)" != "" && [file exists $::env(OCCT_SHARE_PATH)/samples/tcl/]} {
|
||||||
|
set samplespath "$::env(OCCT_SHARE_PATH)/samples/tcl/"
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach fname [glob -path "${samplespath}" *.tcl] {
|
||||||
|
|
||||||
set chan [open $fname]
|
set chan [open $fname]
|
||||||
set istitlefound 0
|
set istitlefound 0
|
||||||
while {[gets $chan line] >= 0} {
|
while {[gets $chan line] >= 0} {
|
||||||
@ -394,7 +405,13 @@ proc about {} {
|
|||||||
set screenheight [expr {int([winfo screenheight .]*0.5-200)}]
|
set screenheight [expr {int([winfo screenheight .]*0.5-200)}]
|
||||||
set screenwidth [expr {int([winfo screenwidth .]*0.5-200)}]
|
set screenwidth [expr {int([winfo screenwidth .]*0.5-200)}]
|
||||||
wm geometry .about 400x200+$screenwidth+$screenheight
|
wm geometry .about 400x200+$screenwidth+$screenheight
|
||||||
image create photo occlogo -file $::env(CASROOT)/src/DrawResources/OCC_logo.png -format png
|
|
||||||
|
set logopath "$::env(CASROOT)/src/DrawResources/OCC_logo.png"
|
||||||
|
if {[array names ::env OCCT_RESOURCE_PATH] != "" && "$::env(OCCT_RESOURCE_PATH)" != "" && [file exists $::env(OCCT_RESOURCE_PATH)/DrawResources/OCC_logo.png]} {
|
||||||
|
set logopath "$::env(OCCT_RESOURCE_PATH)/DrawResources/OCC_logo.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
image create photo occlogo -file $logopath -format png
|
||||||
frame .about.logo -bg red
|
frame .about.logo -bg red
|
||||||
frame .about.links -bg blue
|
frame .about.links -bg blue
|
||||||
frame .about.copyright
|
frame .about.copyright
|
||||||
@ -445,13 +462,17 @@ proc _launchBrowser {url} {
|
|||||||
# Else opens a site with this guide
|
# Else opens a site with this guide
|
||||||
################################################################
|
################################################################
|
||||||
proc openuserguide {} {
|
proc openuserguide {} {
|
||||||
if [file exists $::env(CASROOT)/doc/pdf/user_guides/occt_test_harness.pdf] {
|
if { [array names ::env OCCT_SHARE_PATH] != "" && "$::env(OCCT_SHARE_PATH)" != "" && [file exists $::env(OCCT_SHARE_PATH)/doc/pdf/user_guides/occt_test_harness.pdf]} {
|
||||||
_launchBrowser $::env(CASROOT)/doc/pdf/user_guides/occt_test_harness.pdf
|
_launchBrowser $::env(OCCT_SHARE_PATH)/doc/pdf/user_guides/occt_test_harness.pdf
|
||||||
|
} elseif { [array names ::env OCCT_SHARE_PATH] != "" && "$::env(OCCT_SHARE_PATH)" != "" && [file exists $::env(OCCT_SHARE_PATH)/doc/overview/html/occt_user_guides__test_harness.html]} {
|
||||||
|
_launchBrowser $::env(OCCT_SHARE_PATH)/doc/overview/html/occt_user_guides__test_harness.html
|
||||||
|
} elseif [file exists $::env(CASROOT)/doc/pdf/user_guides/occt_test_harness.pdf] {
|
||||||
|
_launchBrowser $::env(CASROOT)/doc/pdf/user_guides/occt_test_harness.pdf
|
||||||
} elseif [file exists $::env(CASROOT)/doc/overview/html/occt_user_guides__test_harness.html] {
|
} elseif [file exists $::env(CASROOT)/doc/overview/html/occt_user_guides__test_harness.html] {
|
||||||
_launchBrowser $::env(CASROOT)/doc/overview/html/occt_user_guides__test_harness.html
|
_launchBrowser $::env(CASROOT)/doc/overview/html/occt_user_guides__test_harness.html
|
||||||
} else {
|
} else {
|
||||||
_launchBrowser {http://dev.opencascade.org/doc/overview/html/occt_user_guides__test_harness.html}
|
launchBrowser {http://dev.opencascade.org/doc/overview/html/occt_user_guides__test_harness.html}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Search through commands and display the result
|
#Search through commands and display the result
|
||||||
|
@ -12,5 +12,16 @@
|
|||||||
# commercial license or contractual agreement.
|
# commercial license or contractual agreement.
|
||||||
|
|
||||||
set Draw_GEOMETRY 1
|
set Draw_GEOMETRY 1
|
||||||
source $env(CASROOT)/src/DrawResources/CURVES.tcl
|
|
||||||
source $env(CASROOT)/src/DrawResources/SURFACES.tcl
|
if {[array names ::env OCCT_RESOURCE_PATH] != "" && "$::env(OCCT_RESOURCE_PATH)" != "" && [file exists $::env(OCCT_RESOURCE_PATH)/DrawResources/CURVES.tcl]} {
|
||||||
|
source $env(OCCT_RESOURCE_PATH)/DrawResources/CURVES.tcl
|
||||||
|
} else {
|
||||||
|
source $env(CASROOT)/src/DrawResources/CURVES.tcl
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[array names ::env OCCT_RESOURCE_PATH] != "" && "$::env(OCCT_RESOURCE_PATH)" != "" && [file exists $::env(OCCT_RESOURCE_PATH)/DrawResources/SURFACES.tcl]} {
|
||||||
|
source $env(OCCT_RESOURCE_PATH)/DrawResources/SURFACES.tcl
|
||||||
|
} else {
|
||||||
|
source $env(CASROOT)/src/DrawResources/SURFACES.tcl
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -251,6 +251,11 @@ proc testgrid {args} {
|
|||||||
set prefix "${branch}_"
|
set prefix "${branch}_"
|
||||||
}
|
}
|
||||||
set logdir "results/${prefix}[clock format [clock seconds] -format {%Y-%m-%dT%H%M}]"
|
set logdir "results/${prefix}[clock format [clock seconds] -format {%Y-%m-%dT%H%M}]"
|
||||||
|
|
||||||
|
if { [array names ::env OCCT_SHARE_PATH] != "" && "$::env(OCCT_SHARE_PATH)" != ""} {
|
||||||
|
set logdir "$::env(OCCT_SHARE_PATH)/${logdir}"
|
||||||
|
}
|
||||||
|
|
||||||
set logdir [file normalize $logdir]
|
set logdir [file normalize $logdir]
|
||||||
}
|
}
|
||||||
if { [file isdirectory $logdir] && ! $overwrite && ! [catch {glob -directory $logdir *}] } {
|
if { [file isdirectory $logdir] && ! $overwrite && ! [catch {glob -directory $logdir *}] } {
|
||||||
|
@ -1082,7 +1082,7 @@ void MAT2d_Tool2d::Dump(const Standard_Integer bisector,
|
|||||||
if(bisector == -1) return;
|
if(bisector == -1) return;
|
||||||
if(bisector > theNumberOfBisectors) return;
|
if(bisector > theNumberOfBisectors) return;
|
||||||
|
|
||||||
Handle(Geom2d_Curve) thebisector = GeomBis(bisector).Value();
|
Handle(Geom2d_Curve) thebisector = Handle(Geom2d_Curve)::DownCast(GeomBis(bisector).Value());
|
||||||
|
|
||||||
MAT2d_DrawCurve(thebisector,3);
|
MAT2d_DrawCurve(thebisector,3);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user