mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
196 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bd2a789f15 | ||
|
a4e91f855b | ||
|
9efc032b9a | ||
|
44cbb3d8e7 | ||
|
392377a331 | ||
|
6635f53848 | ||
|
f7f32bf33e | ||
|
c1620d29fa | ||
|
92e70f93d0 | ||
|
54754bccab | ||
|
33a5691ef1 | ||
|
689b59692e | ||
|
c7fd6ca63b | ||
|
9704e22131 | ||
|
f3f713569a | ||
|
db976e0a59 | ||
|
ee8f2ea3c2 | ||
|
58393b24b6 | ||
|
b896c6f4af | ||
|
656b0d217f | ||
|
83bb2a329d | ||
|
5b0f5b52b9 | ||
|
06282d9c7c | ||
|
60792f26f0 | ||
|
6ef56849a5 | ||
|
e8605596c9 | ||
|
ffd7a3aa4f | ||
|
8147976d9f | ||
|
40b80d8d66 | ||
|
7036facf10 | ||
|
a6e425d0a6 | ||
|
b9fbc699b5 | ||
|
0435edfe54 | ||
|
bd651bbbd9 | ||
|
3aeea1e96e | ||
|
ed85665b55 | ||
|
1103eb60af | ||
|
6dbfade692 | ||
|
588ee924e4 | ||
|
f0c6e6fc8d | ||
|
58390c4eb1 | ||
|
38581280d0 | ||
|
4ce99d9697 | ||
|
2b5ee7c791 | ||
|
06f2625c35 | ||
|
28b505b27b | ||
|
a948803521 | ||
|
e7bcf415c3 | ||
|
0e6977d668 | ||
|
0e97c80e6a | ||
|
73914537d1 | ||
|
ae1683705e | ||
|
f3a66dd7c0 | ||
|
eb2be8bb46 | ||
|
b32425859a | ||
|
96d1fe2b05 | ||
|
5e53920228 | ||
|
2a0420be1d | ||
|
3421323164 | ||
|
1dad584450 | ||
|
a958a3377e | ||
|
afccc8d019 | ||
|
b47b7e69f7 | ||
|
6aa053ae00 | ||
|
54ed243582 | ||
|
8748042259 | ||
|
92e0a76a50 | ||
|
b2fedee6a1 | ||
|
c28dd7f1cf | ||
|
c36205a05e | ||
|
945e309564 | ||
|
e3841f9ffe | ||
|
bcfc5f0d5a | ||
|
c3f6267d24 | ||
|
5d8b1a4076 | ||
|
e4f00dbb7e | ||
|
359edc7d8a | ||
|
f9998f03ad | ||
|
c479c4f6d8 | ||
|
c51df6bfd2 | ||
|
5e43274280 | ||
|
efe960751c | ||
|
6b9e0dc3f8 | ||
|
2ef94c994e | ||
|
1dd4b902c0 | ||
|
a846d36326 | ||
|
86e352849d | ||
|
6d140acb14 | ||
|
44be123039 | ||
|
47263fa6a3 | ||
|
b0afa94d10 | ||
|
c772c6caa4 | ||
|
53eae1a935 | ||
|
d22b135217 | ||
|
3c7c705d77 | ||
|
fc72568ba9 | ||
|
107b57a955 | ||
|
8b301eb865 | ||
|
1f469e3781 | ||
|
ce4d294074 | ||
|
9f338a00a1 | ||
|
a011359b8a | ||
|
42e4ae96ae | ||
|
686926c0a9 | ||
|
a638dd6224 | ||
|
961a306dc4 | ||
|
195a068c4f | ||
|
669e0dfc17 | ||
|
74cb5673a5 | ||
|
768f3a4a19 | ||
|
2a8c5ad46c | ||
|
7ea3eff4f8 | ||
|
c07f4ee70d | ||
|
6cc679d81c | ||
|
62f554bc3f | ||
|
7eeb5d5fbf | ||
|
9b7f1aea28 | ||
|
1e96cf65fa | ||
|
03275c0be1 | ||
|
2f33e34038 | ||
|
3eb891ec49 | ||
|
057dcfddf7 | ||
|
3837b3bf28 | ||
|
db2bfd1e83 | ||
|
a855215141 | ||
|
195aac3a42 | ||
|
f706dd34b3 | ||
|
c325231de6 | ||
|
91a2f58f8f | ||
|
8175a70c4e | ||
|
f9990707fe | ||
|
aba5c241c6 | ||
|
cc164fd7dc | ||
|
d7d89acb39 | ||
|
d444cc35c6 | ||
|
eeba62cbd3 | ||
|
185d29b92f | ||
|
2923ef0df8 | ||
|
402ad27743 | ||
|
f8d4cfbb80 | ||
|
aaacd83510 | ||
|
3e06b70623 | ||
|
b77de43fb0 | ||
|
59223e118d | ||
|
3b5a94a165 | ||
|
5cbd98a5be | ||
|
25b5e83a4c | ||
|
3c9178dd5c | ||
|
f73592edf0 | ||
|
a24391a133 | ||
|
3a24514d48 | ||
|
3453354ee1 | ||
|
9218d04b9a | ||
|
259b930379 | ||
|
3536158f11 | ||
|
cb77bfc4f0 | ||
|
92f1875fc0 | ||
|
a453f9d128 | ||
|
492b09dcae | ||
|
f55fe3b3f7 | ||
|
51329afcef | ||
|
13f5da81ad | ||
|
f0049a9599 | ||
|
0b4962a7f0 | ||
|
b3284f3ba9 | ||
|
b95eefe1c2 | ||
|
5bde4773f9 | ||
|
b0f92d3d5c | ||
|
b9f787f180 | ||
|
a939fd40eb | ||
|
c4ea4ca3d1 | ||
|
f3573fb54b | ||
|
78aade7569 | ||
|
03b0ca59cb | ||
|
d6baf70a93 | ||
|
526c506cb0 | ||
|
2949b238c1 | ||
|
dfb5aebd35 | ||
|
8da2801496 | ||
|
e92d322d40 | ||
|
b71cb85f67 | ||
|
05cfce4d83 | ||
|
d7eefb11bf | ||
|
80d4753574 | ||
|
ed6a17ef6c | ||
|
2182812a5b | ||
|
92915edda8 | ||
|
06aa200142 | ||
|
acac44d571 | ||
|
7aaed2ce3b | ||
|
da76ea432b | ||
|
53152e6dd9 | ||
|
1a1739b200 | ||
|
fd5c113a03 | ||
|
f74f684b16 | ||
|
621ed3bc36 |
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
|
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
|
||||||
|
|
||||||
@@ -6,6 +6,26 @@ set (CMAKE_SUPPRESS_REGENERATION TRUE)
|
|||||||
|
|
||||||
set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
|
set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
|
||||||
|
|
||||||
|
# set using C++ standard
|
||||||
|
set (BUILD_CPP_STANDARD "C++11" CACHE STRING "Select using c++ standard.")
|
||||||
|
set_property(CACHE BUILD_CPP_STANDARD PROPERTY STRINGS "C++11" "C++14" "C++17" "C++20" "C++23")
|
||||||
|
|
||||||
|
# Set desired C++ standard
|
||||||
|
if ("${BUILD_CPP_STANDARD}" STREQUAL "C++11")
|
||||||
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
|
elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++14")
|
||||||
|
set (CMAKE_CXX_STANDARD 14)
|
||||||
|
elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++17")
|
||||||
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
|
elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++20")
|
||||||
|
set (CMAKE_CXX_STANDARD 20)
|
||||||
|
elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++23")
|
||||||
|
set (CMAKE_CXX_STANDARD 23)
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR, "misprint in c++ standard name")
|
||||||
|
endif()
|
||||||
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
# macro: include patched file if it exists
|
# macro: include patched file if it exists
|
||||||
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
||||||
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
|
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
|
||||||
@@ -15,6 +35,14 @@ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# set using memory manager option for TKernel
|
||||||
|
set (USE_MMGR_TYPE "NATIVE" CACHE STRING "Select using memory manager tool.")
|
||||||
|
set_property(CACHE USE_MMGR_TYPE PROPERTY STRINGS "NATIVE" "FLEXIBLE" "TBB" "JEMALLOC")
|
||||||
|
|
||||||
|
# set profile for C++ compiler and linker
|
||||||
|
set (BUILD_OPT_PROFILE "Default" CACHE STRING "Select profile for compiler and linker.")
|
||||||
|
set_property(CACHE BUILD_OPT_PROFILE PROPERTY STRINGS "Default" "Production")
|
||||||
|
|
||||||
# include variable description
|
# include variable description
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
|
||||||
|
|
||||||
@@ -814,6 +842,14 @@ else()
|
|||||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Jemalloc
|
||||||
|
if ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC")
|
||||||
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/jemalloc")
|
||||||
|
else()
|
||||||
|
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_JEMALLOC")
|
||||||
|
OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
|
||||||
|
endif()
|
||||||
|
|
||||||
# qt for inspector and samples
|
# qt for inspector and samples
|
||||||
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
|
||||||
# check qt 3rdparty path
|
# check qt 3rdparty path
|
||||||
|
@@ -3,5 +3,6 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
|||||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
||||||
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
|
Visualization TKService TKV3d TKOpenGl TKOpenGles 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 TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
|
||||||
DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade
|
DataExchange TKDE TKXSBase TKDESTEP TKDEIGES TKDESTL TKDEVRML TKDECascade TKDEOBJ TKDEGLTF TKDEPLY TKXCAF TKXmlXCAF TKBinXCAF TKRWMesh
|
||||||
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
DETools TKExpress ExpToCasExe
|
||||||
|
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE TKXSDRAWDE TKXSDRAWGLTF TKXSDRAWIGES TKXSDRAWOBJ TKXSDRAWPLY TKXSDRAWSTEP TKXSDRAWSTL TKXSDRAWVRML
|
||||||
|
39
adm/UDLIST
39
adm/UDLIST
@@ -32,6 +32,7 @@ n UnitsAPI
|
|||||||
n gp
|
n gp
|
||||||
n math
|
n math
|
||||||
r OS
|
r OS
|
||||||
|
n FlexLexer
|
||||||
t TKMath
|
t TKMath
|
||||||
t TKernel
|
t TKernel
|
||||||
n Adaptor2d
|
n Adaptor2d
|
||||||
@@ -376,18 +377,13 @@ r SHMessage
|
|||||||
r XSMessage
|
r XSMessage
|
||||||
r XSTEPResource
|
r XSTEPResource
|
||||||
t TKBinXCAF
|
t TKBinXCAF
|
||||||
t TKIGES
|
t TKDESTL
|
||||||
t TKSTEP
|
t TKDEVRML
|
||||||
t TKSTEP209
|
|
||||||
t TKSTEPAttr
|
|
||||||
t TKSTEPBase
|
|
||||||
t TKSTL
|
|
||||||
t TKVRML
|
|
||||||
t TKXCAF
|
t TKXCAF
|
||||||
t TKXDE
|
t TKDE
|
||||||
t TKXDECascade
|
t TKDECascade
|
||||||
t TKXDEIGES
|
t TKDEIGES
|
||||||
t TKXDESTEP
|
t TKDESTEP
|
||||||
t TKXSBase
|
t TKXSBase
|
||||||
t TKXmlXCAF
|
t TKXmlXCAF
|
||||||
n BOPTest
|
n BOPTest
|
||||||
@@ -419,7 +415,12 @@ n XDEDRAW
|
|||||||
n XSDRAW
|
n XSDRAW
|
||||||
n XSDRAWIGES
|
n XSDRAWIGES
|
||||||
n XSDRAWSTEP
|
n XSDRAWSTEP
|
||||||
n XSDRAWSTLVRML
|
n XSDRAWSTL
|
||||||
|
n XSDRAWVRML
|
||||||
|
n XSDRAWDE
|
||||||
|
n XSDRAWGLTF
|
||||||
|
n XSDRAWOBJ
|
||||||
|
n XSDRAWPLY
|
||||||
r DrawResources
|
r DrawResources
|
||||||
t TKDCAF
|
t TKDCAF
|
||||||
t TKDraw
|
t TKDraw
|
||||||
@@ -431,6 +432,14 @@ t TKD3DHostTest
|
|||||||
t TKViewerTest
|
t TKViewerTest
|
||||||
t TKXDEDRAW
|
t TKXDEDRAW
|
||||||
t TKXSDRAW
|
t TKXSDRAW
|
||||||
|
t TKXSDRAWIGES
|
||||||
|
t TKXSDRAWSTEP
|
||||||
|
t TKXSDRAWSTL
|
||||||
|
t TKXSDRAWVRML
|
||||||
|
t TKXSDRAWDE
|
||||||
|
t TKXSDRAWGLTF
|
||||||
|
t TKXSDRAWOBJ
|
||||||
|
t TKXSDRAWPLY
|
||||||
x DRAWEXE
|
x DRAWEXE
|
||||||
n QADraw
|
n QADraw
|
||||||
n QANCollection
|
n QANCollection
|
||||||
@@ -456,6 +465,9 @@ t TKVCAF
|
|||||||
n XCAFView
|
n XCAFView
|
||||||
n XCAFNoteObjects
|
n XCAFNoteObjects
|
||||||
t TKRWMesh
|
t TKRWMesh
|
||||||
|
t TKDEGLTF
|
||||||
|
t TKDEOBJ
|
||||||
|
t TKDEPLY
|
||||||
n RWGltf
|
n RWGltf
|
||||||
n RWMesh
|
n RWMesh
|
||||||
n RWObj
|
n RWObj
|
||||||
@@ -480,3 +492,6 @@ n TreeModel
|
|||||||
n View
|
n View
|
||||||
n ViewControl
|
n ViewControl
|
||||||
n VInspector
|
n VInspector
|
||||||
|
n Express
|
||||||
|
t TKExpress
|
||||||
|
x ExpToCasExe
|
||||||
|
@@ -22,6 +22,4 @@ if (3RDPARTY_DIR)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# bison 3.2 is required because it provides options to avoid generation of redundant header
|
find_package (BISON 3.7.4)
|
||||||
# files and embedding of local paths in the generated code
|
|
||||||
find_package (BISON 3.2)
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# See the cotire manual for usage hints.
|
# See the cotire manual for usage hints.
|
||||||
#
|
#
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2012-2016 Sascha Kratky
|
# Copyright 2012-2018 Sascha Kratky
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person
|
# Permission is hereby granted, free of charge, to any person
|
||||||
# obtaining a copy of this software and associated documentation
|
# obtaining a copy of this software and associated documentation
|
||||||
@@ -43,7 +43,7 @@ if (NOT CMAKE_SCRIPT_MODE_FILE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
||||||
set (COTIRE_CMAKE_MODULE_VERSION "1.7.9")
|
set (COTIRE_CMAKE_MODULE_VERSION "1.8.1")
|
||||||
|
|
||||||
# activate select policies
|
# activate select policies
|
||||||
if (POLICY CMP0025)
|
if (POLICY CMP0025)
|
||||||
@@ -106,6 +106,11 @@ if (POLICY CMP0054)
|
|||||||
cmake_policy(SET CMP0054 NEW)
|
cmake_policy(SET CMP0054 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (POLICY CMP0055)
|
||||||
|
# strict checking for break() command
|
||||||
|
cmake_policy(SET CMP0055 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
include(ProcessorCount)
|
include(ProcessorCount)
|
||||||
|
|
||||||
@@ -234,7 +239,13 @@ function (cotire_filter_language_source_files _language _target _sourceFilesVar
|
|||||||
# add to excluded sources, if file has custom compile flags
|
# add to excluded sources, if file has custom compile flags
|
||||||
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
||||||
else()
|
else()
|
||||||
list (APPEND _sourceFiles "${_sourceFile}")
|
get_source_file_property(_sourceCompileOptions "${_sourceFile}" COMPILE_OPTIONS)
|
||||||
|
if (_sourceCompileOptions)
|
||||||
|
# add to excluded sources, if file has list of custom compile options
|
||||||
|
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
||||||
|
else()
|
||||||
|
list (APPEND _sourceFiles "${_sourceFile}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -293,7 +304,7 @@ function (cotire_get_source_file_property_values _valuesVar _property)
|
|||||||
set (${_valuesVar} ${_values} PARENT_SCOPE)
|
set (${_valuesVar} ${_values} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_resolve_config_properites _configurations _propertiesVar)
|
function (cotire_resolve_config_properties _configurations _propertiesVar)
|
||||||
set (_properties "")
|
set (_properties "")
|
||||||
foreach (_property ${ARGN})
|
foreach (_property ${ARGN})
|
||||||
if ("${_property}" MATCHES "<CONFIG>")
|
if ("${_property}" MATCHES "<CONFIG>")
|
||||||
@@ -309,8 +320,8 @@ function (cotire_resolve_config_properites _configurations _propertiesVar)
|
|||||||
set (${_propertiesVar} ${_properties} PARENT_SCOPE)
|
set (${_propertiesVar} ${_properties} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_copy_set_properites _configurations _type _source _target)
|
function (cotire_copy_set_properties _configurations _type _source _target)
|
||||||
cotire_resolve_config_properites("${_configurations}" _properties ${ARGN})
|
cotire_resolve_config_properties("${_configurations}" _properties ${ARGN})
|
||||||
foreach (_property ${_properties})
|
foreach (_property ${_properties})
|
||||||
get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET)
|
get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET)
|
||||||
if (_isSet)
|
if (_isSet)
|
||||||
@@ -320,13 +331,18 @@ function (cotire_copy_set_properites _configurations _type _source _target)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_get_target_usage_requirements _target _targetRequirementsVar)
|
function (cotire_get_target_usage_requirements _target _config _targetRequirementsVar)
|
||||||
set (_targetRequirements "")
|
set (_targetRequirements "")
|
||||||
get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)
|
get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)
|
||||||
while (_librariesToProcess)
|
while (_librariesToProcess)
|
||||||
# remove from head
|
# remove from head
|
||||||
list (GET _librariesToProcess 0 _library)
|
list (GET _librariesToProcess 0 _library)
|
||||||
list (REMOVE_AT _librariesToProcess 0)
|
list (REMOVE_AT _librariesToProcess 0)
|
||||||
|
if (_library MATCHES "^\\$<\\$<CONFIG:${_config}>:([A-Za-z0-9_:-]+)>$")
|
||||||
|
set (_library "${CMAKE_MATCH_1}")
|
||||||
|
elseif (_config STREQUAL "None" AND _library MATCHES "^\\$<\\$<CONFIG:>:([A-Za-z0-9_:-]+)>$")
|
||||||
|
set (_library "${CMAKE_MATCH_1}")
|
||||||
|
endif()
|
||||||
if (TARGET ${_library})
|
if (TARGET ${_library})
|
||||||
list (FIND _targetRequirements ${_library} _index)
|
list (FIND _targetRequirements ${_library} _index)
|
||||||
if (_index LESS 0)
|
if (_index LESS 0)
|
||||||
@@ -441,7 +457,7 @@ function (cotire_get_target_compile_flags _config _language _target _flagsVar)
|
|||||||
# interface compile options from linked library targets
|
# interface compile options from linked library targets
|
||||||
if (_target)
|
if (_target)
|
||||||
set (_linkedTargets "")
|
set (_linkedTargets "")
|
||||||
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
|
||||||
foreach (_linkedTarget ${_linkedTargets})
|
foreach (_linkedTarget ${_linkedTargets})
|
||||||
get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)
|
get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)
|
||||||
if (_targetOptions)
|
if (_targetOptions)
|
||||||
@@ -573,7 +589,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu
|
|||||||
# interface include directories from linked library targets
|
# interface include directories from linked library targets
|
||||||
if (_target)
|
if (_target)
|
||||||
set (_linkedTargets "")
|
set (_linkedTargets "")
|
||||||
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
|
||||||
foreach (_linkedTarget ${_linkedTargets})
|
foreach (_linkedTarget ${_linkedTargets})
|
||||||
get_target_property(_linkedTargetType ${_linkedTarget} TYPE)
|
get_target_property(_linkedTargetType ${_linkedTarget} TYPE)
|
||||||
if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND
|
if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND
|
||||||
@@ -627,7 +643,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu
|
|||||||
if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
|
if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||||
list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
|
list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||||
endif()
|
endif()
|
||||||
if (WIN32)
|
if (WIN32 AND NOT MINGW)
|
||||||
# convert Windows paths in include directories to CMake paths
|
# convert Windows paths in include directories to CMake paths
|
||||||
if (_includeDirs)
|
if (_includeDirs)
|
||||||
set (_paths "")
|
set (_paths "")
|
||||||
@@ -703,7 +719,7 @@ function (cotire_get_target_compile_definitions _config _language _target _defin
|
|||||||
endif()
|
endif()
|
||||||
# interface compile definitions from linked library targets
|
# interface compile definitions from linked library targets
|
||||||
set (_linkedTargets "")
|
set (_linkedTargets "")
|
||||||
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
|
||||||
foreach (_linkedTarget ${_linkedTargets})
|
foreach (_linkedTarget ${_linkedTargets})
|
||||||
get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)
|
get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)
|
||||||
if (_definitions)
|
if (_definitions)
|
||||||
@@ -711,7 +727,7 @@ function (cotire_get_target_compile_definitions _config _language _target _defin
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
# parse additional compile definitions from target compile flags
|
# parse additional compile definitions from target compile flags
|
||||||
# and don't look at directory compile definitions, which we already handled
|
# and do not look at directory compile definitions, which we already handled
|
||||||
set (_targetFlags "")
|
set (_targetFlags "")
|
||||||
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
||||||
cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags})
|
cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags})
|
||||||
@@ -859,6 +875,9 @@ macro (cotire_set_cmd_to_prologue _cmdVar)
|
|||||||
list (APPEND ${_cmdVar} "--warn-uninitialized")
|
list (APPEND ${_cmdVar} "--warn-uninitialized")
|
||||||
endif()
|
endif()
|
||||||
list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$<CONFIGURATION>")
|
list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$<CONFIGURATION>")
|
||||||
|
if (XCODE)
|
||||||
|
list (APPEND ${_cmdVar} "-DXCODE:BOOL=TRUE")
|
||||||
|
endif()
|
||||||
if (COTIRE_VERBOSE)
|
if (COTIRE_VERBOSE)
|
||||||
list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON")
|
list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON")
|
||||||
elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles")
|
elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles")
|
||||||
@@ -876,6 +895,9 @@ function (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerE
|
|||||||
if (NOT _compilerArg1)
|
if (NOT _compilerArg1)
|
||||||
set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
|
set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
|
||||||
endif()
|
endif()
|
||||||
|
if (WIN32)
|
||||||
|
file (TO_NATIVE_PATH "${_compilerExe}" _compilerExe)
|
||||||
|
endif()
|
||||||
string (STRIP "${_compilerArg1}" _compilerArg1)
|
string (STRIP "${_compilerArg1}" _compilerArg1)
|
||||||
if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
||||||
# compiler launcher is only supported for Makefile and Ninja
|
# compiler launcher is only supported for Makefile and Ninja
|
||||||
@@ -902,16 +924,16 @@ function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemInclu
|
|||||||
foreach (_include ${_includeDirs})
|
foreach (_include ${_includeDirs})
|
||||||
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
||||||
file (TO_NATIVE_PATH "${_include}" _include)
|
file (TO_NATIVE_PATH "${_include}" _include)
|
||||||
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
|
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
|
||||||
else()
|
else()
|
||||||
set (_index -1)
|
set (_index -1)
|
||||||
if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+")
|
if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+")
|
||||||
list (FIND ${_systemIncludesVar} "${_include}" _index)
|
list (FIND ${_systemIncludesVar} "${_include}" _index)
|
||||||
endif()
|
endif()
|
||||||
if (_index GREATER -1)
|
if (_index GREATER -1)
|
||||||
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}")
|
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
|
||||||
else()
|
else()
|
||||||
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
|
list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -1046,10 +1068,10 @@ macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar)
|
|||||||
set (${_headerIsIgnoredVar} TRUE)
|
set (${_headerIsIgnoredVar} TRUE)
|
||||||
elseif (IS_DIRECTORY "${_headerFile}")
|
elseif (IS_DIRECTORY "${_headerFile}")
|
||||||
set (${_headerIsIgnoredVar} TRUE)
|
set (${_headerIsIgnoredVar} TRUE)
|
||||||
elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$")
|
elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed")
|
||||||
# heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path
|
# heuristic: ignore headers with embedded parent directory references or "-fixed" or "_fixed" in path
|
||||||
# these often stem from using GCC #include_next tricks, which may break the precompiled header compilation
|
# these often stem from using GCC #include_next tricks, which may break the precompiled header compilation
|
||||||
# with the error message "error: no include path in which to search for header.h"
|
# with the error message "error: no include path in which to search for header"
|
||||||
set (${_headerIsIgnoredVar} TRUE)
|
set (${_headerIsIgnoredVar} TRUE)
|
||||||
else()
|
else()
|
||||||
set (${_headerIsIgnoredVar} FALSE)
|
set (${_headerIsIgnoredVar} FALSE)
|
||||||
@@ -1070,12 +1092,11 @@ endmacro()
|
|||||||
|
|
||||||
macro (cotire_parse_line _line _headerFileVar _headerDepthVar)
|
macro (cotire_parse_line _line _headerFileVar _headerDepthVar)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# cl.exe /showIncludes output looks different depending on the language pack used, e.g.:
|
# cl.exe /showIncludes produces different output, depending on the language pack used, e.g.:
|
||||||
# English: "Note: including file: C:\directory\file"
|
# English: "Note: including file: C:\directory\file"
|
||||||
# German: "Hinweis: Einlesen der Datei: C:\directory\file"
|
# German: "Hinweis: Einlesen der Datei: C:\directory\file"
|
||||||
# We use a very general regular expression, relying on the presence of the : characters
|
# We use a very general regular expression, relying on the presence of the : characters
|
||||||
if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$")
|
if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$")
|
||||||
# Visual Studio compiler output
|
|
||||||
string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
|
string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
|
||||||
get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE)
|
get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE)
|
||||||
else()
|
else()
|
||||||
@@ -1233,11 +1254,19 @@ function (cotire_scan_includes _includesVar)
|
|||||||
set (${_includesVar} "" PARENT_SCOPE)
|
set (${_includesVar} "" PARENT_SCOPE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
list (APPEND _cmd ${_existingSourceFiles})
|
# add source files to be scanned
|
||||||
|
if (WIN32)
|
||||||
|
foreach (_sourceFile ${_existingSourceFiles})
|
||||||
|
file (TO_NATIVE_PATH "${_sourceFile}" _sourceFileNative)
|
||||||
|
list (APPEND _cmd "${_sourceFileNative}")
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
list (APPEND _cmd ${_existingSourceFiles})
|
||||||
|
endif()
|
||||||
if (COTIRE_VERBOSE)
|
if (COTIRE_VERBOSE)
|
||||||
message (STATUS "execute_process: ${_cmd}")
|
message (STATUS "execute_process: ${_cmd}")
|
||||||
endif()
|
endif()
|
||||||
if (_option_COMPILER_ID MATCHES "MSVC")
|
if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
|
||||||
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
||||||
unset (ENV{VS_UNICODE_OUTPUT})
|
unset (ENV{VS_UNICODE_OUTPUT})
|
||||||
endif()
|
endif()
|
||||||
@@ -1473,11 +1502,16 @@ function (cotire_generate_prefix_header _prefixFile)
|
|||||||
if (_unparsedLines)
|
if (_unparsedLines)
|
||||||
if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)
|
if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)
|
||||||
list (LENGTH _unparsedLines _skippedLineCount)
|
list (LENGTH _unparsedLines _skippedLineCount)
|
||||||
message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}")
|
if (WIN32)
|
||||||
|
file (TO_NATIVE_PATH "${_unparsedLinesFile}" _unparsedLinesLogPath)
|
||||||
|
else()
|
||||||
|
set (_unparsedLinesLogPath "${_unparsedLinesFile}")
|
||||||
|
endif()
|
||||||
|
message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}")
|
||||||
endif()
|
endif()
|
||||||
string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}")
|
string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}")
|
||||||
endif()
|
endif()
|
||||||
file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}")
|
file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}\n")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar)
|
function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar)
|
||||||
@@ -1507,7 +1541,7 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
|
|||||||
# append to list
|
# append to list
|
||||||
list (APPEND _flags -H -E)
|
list (APPEND _flags -H -E)
|
||||||
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
|
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
|
||||||
list (APPEND _flags "-fdirectives-only")
|
list (APPEND _flags -fdirectives-only)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
@@ -1517,16 +1551,36 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (_compilerID MATCHES "Clang")
|
elseif (_compilerID MATCHES "Clang")
|
||||||
# Clang options used
|
if (UNIX)
|
||||||
# -H print the name of each header file used
|
# Clang options used
|
||||||
# -E invoke preprocessor
|
# -H print the name of each header file used
|
||||||
# -fno-color-diagnostics don't prints diagnostics in color
|
# -E invoke preprocessor
|
||||||
if (_flags)
|
# -fno-color-diagnostics do not print diagnostics in color
|
||||||
# append to list
|
# -Eonly just run preprocessor, no output
|
||||||
list (APPEND _flags -H -E -fno-color-diagnostics)
|
if (_flags)
|
||||||
else()
|
# append to list
|
||||||
# return as a flag string
|
list (APPEND _flags -H -E -fno-color-diagnostics -Xclang -Eonly)
|
||||||
set (_flags "-H -E -fno-color-diagnostics")
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly")
|
||||||
|
endif()
|
||||||
|
elseif (WIN32)
|
||||||
|
# Clang-cl.exe options used
|
||||||
|
# /TC treat all files named on the command line as C source files
|
||||||
|
# /TP treat all files named on the command line as C++ source files
|
||||||
|
# /EP preprocess to stdout without #line directives
|
||||||
|
# -H print the name of each header file used
|
||||||
|
# -fno-color-diagnostics do not print diagnostics in color
|
||||||
|
# -Eonly just run preprocessor, no output
|
||||||
|
set (_sourceFileTypeC "/TC")
|
||||||
|
set (_sourceFileTypeCXX "/TP")
|
||||||
|
if (_flags)
|
||||||
|
# append to list
|
||||||
|
list (APPEND _flags "${_sourceFileType${_language}}" /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly)
|
||||||
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "${_sourceFileType${_language}} /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (_compilerID MATCHES "Intel")
|
elseif (_compilerID MATCHES "Intel")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -1600,8 +1654,8 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
|
|||||||
set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (_compilerID MATCHES "GNU|Clang")
|
elseif (_compilerID MATCHES "GNU")
|
||||||
# GCC / Clang options used
|
# GCC options used
|
||||||
# -x specify the source language
|
# -x specify the source language
|
||||||
# -c compile but do not link
|
# -c compile but do not link
|
||||||
# -o place output in file
|
# -o place output in file
|
||||||
@@ -1611,11 +1665,55 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
|
|||||||
set (_xLanguage_CXX "c++-header")
|
set (_xLanguage_CXX "c++-header")
|
||||||
if (_flags)
|
if (_flags)
|
||||||
# append to list
|
# append to list
|
||||||
list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}")
|
list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}")
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
|
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
|
||||||
endif()
|
endif()
|
||||||
|
elseif (_compilerID MATCHES "Clang")
|
||||||
|
if (UNIX)
|
||||||
|
# Clang options used
|
||||||
|
# -x specify the source language
|
||||||
|
# -c compile but do not link
|
||||||
|
# -o place output in file
|
||||||
|
# -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+)
|
||||||
|
set (_xLanguage_C "c-header")
|
||||||
|
set (_xLanguage_CXX "c++-header")
|
||||||
|
if (_flags)
|
||||||
|
# append to list
|
||||||
|
list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}")
|
||||||
|
if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
|
||||||
|
list (APPEND _flags -Xclang -fno-pch-timestamp)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
|
||||||
|
if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
|
||||||
|
set (_flags "${_flags} -Xclang -fno-pch-timestamp")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
elseif (WIN32)
|
||||||
|
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
||||||
|
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
||||||
|
file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative)
|
||||||
|
# Clang-cl.exe options used
|
||||||
|
# /Yc creates a precompiled header file
|
||||||
|
# /Fp specifies precompiled header binary file name
|
||||||
|
# /FI forces inclusion of file
|
||||||
|
# /Zs syntax check only
|
||||||
|
# /TC treat all files named on the command line as C source files
|
||||||
|
# /TP treat all files named on the command line as C++ source files
|
||||||
|
set (_sourceFileTypeC "/TC")
|
||||||
|
set (_sourceFileTypeCXX "/TP")
|
||||||
|
if (_flags)
|
||||||
|
# append to list
|
||||||
|
list (APPEND _flags "${_sourceFileType${_language}}"
|
||||||
|
"/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}")
|
||||||
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
elseif (_compilerID MATCHES "Intel")
|
elseif (_compilerID MATCHES "Intel")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
||||||
@@ -1657,20 +1755,28 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
|
|||||||
get_filename_component(_pchName "${_pchFile}" NAME)
|
get_filename_component(_pchName "${_pchFile}" NAME)
|
||||||
set (_xLanguage_C "c-header")
|
set (_xLanguage_C "c-header")
|
||||||
set (_xLanguage_CXX "c++-header")
|
set (_xLanguage_CXX "c++-header")
|
||||||
|
set (_pchSuppressMessages FALSE)
|
||||||
|
if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
|
||||||
|
set(_pchSuppressMessages TRUE)
|
||||||
|
endif()
|
||||||
if (_flags)
|
if (_flags)
|
||||||
# append to list
|
# append to list
|
||||||
if ("${_language}" STREQUAL "CXX")
|
if ("${_language}" STREQUAL "CXX")
|
||||||
list (APPEND _flags -Kc++)
|
list (APPEND _flags -Kc++)
|
||||||
endif()
|
endif()
|
||||||
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}")
|
list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-create "${_pchName}" -fsyntax-only "${_hostFile}")
|
||||||
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
||||||
list (APPEND _flags "-Wpch-messages")
|
if (NOT _pchSuppressMessages)
|
||||||
|
list (APPEND _flags -Wpch-messages)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"")
|
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"")
|
||||||
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
||||||
set (_flags "${_flags} -Wpch-messages")
|
if (NOT _pchSuppressMessages)
|
||||||
|
set (_flags "${_flags} -Wpch-messages")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -1721,23 +1827,48 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
|
|||||||
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
||||||
if (_flags)
|
if (_flags)
|
||||||
# append to list
|
# append to list
|
||||||
list (APPEND _flags "-Winvalid-pch" "-include" "${_prefixFile}")
|
list (APPEND _flags -Winvalid-pch -include "${_prefixFile}")
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
|
set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
|
||||||
endif()
|
endif()
|
||||||
elseif (_compilerID MATCHES "Clang")
|
elseif (_compilerID MATCHES "Clang")
|
||||||
# Clang options used
|
if (UNIX)
|
||||||
# -include process include file as the first line of the primary source file
|
# Clang options used
|
||||||
# -include-pch include precompiled header file
|
# -include process include file as the first line of the primary source file
|
||||||
# -Qunused-arguments don't emit warning for unused driver arguments
|
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
||||||
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
if (_flags)
|
||||||
if (_flags)
|
# append to list
|
||||||
# append to list
|
list (APPEND _flags -include "${_prefixFile}")
|
||||||
list (APPEND _flags "-Qunused-arguments" "-include" "${_prefixFile}")
|
else()
|
||||||
else()
|
# return as a flag string
|
||||||
# return as a flag string
|
set (_flags "-include \"${_prefixFile}\"")
|
||||||
set (_flags "-Qunused-arguments -include \"${_prefixFile}\"")
|
endif()
|
||||||
|
elseif (WIN32)
|
||||||
|
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
||||||
|
# Clang-cl.exe options used
|
||||||
|
# /Yu uses a precompiled header file during build
|
||||||
|
# /Fp specifies precompiled header binary file name
|
||||||
|
# /FI forces inclusion of file
|
||||||
|
if (_pchFile)
|
||||||
|
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
||||||
|
if (_flags)
|
||||||
|
# append to list
|
||||||
|
list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}")
|
||||||
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# no precompiled header, force inclusion of prefix header
|
||||||
|
if (_flags)
|
||||||
|
# append to list
|
||||||
|
list (APPEND _flags "/FI${_prefixFileNative}")
|
||||||
|
else()
|
||||||
|
# return as a flag string
|
||||||
|
set (_flags "/FI\"${_prefixFileNative}\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (_compilerID MATCHES "Intel")
|
elseif (_compilerID MATCHES "Intel")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -1781,24 +1912,32 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
|
|||||||
if (_pchFile)
|
if (_pchFile)
|
||||||
get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
|
get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
|
||||||
get_filename_component(_pchName "${_pchFile}" NAME)
|
get_filename_component(_pchName "${_pchFile}" NAME)
|
||||||
|
set (_pchSuppressMessages FALSE)
|
||||||
|
if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
|
||||||
|
set(_pchSuppressMessages TRUE)
|
||||||
|
endif()
|
||||||
if (_flags)
|
if (_flags)
|
||||||
# append to list
|
# append to list
|
||||||
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}")
|
list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-use "${_pchName}")
|
||||||
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
||||||
list (APPEND _flags "-Wpch-messages")
|
if (NOT _pchSuppressMessages)
|
||||||
|
list (APPEND _flags -Wpch-messages)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"")
|
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"")
|
||||||
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
||||||
set (_flags "${_flags} -Wpch-messages")
|
if (NOT _pchSuppressMessages)
|
||||||
|
set (_flags "${_flags} -Wpch-messages")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# no precompiled header, force inclusion of prefix header
|
# no precompiled header, force inclusion of prefix header
|
||||||
if (_flags)
|
if (_flags)
|
||||||
# append to list
|
# append to list
|
||||||
list (APPEND _flags "-include" "${_prefixFile}")
|
list (APPEND _flags -include "${_prefixFile}")
|
||||||
else()
|
else()
|
||||||
# return as a flag string
|
# return as a flag string
|
||||||
set (_flags "-include \"${_prefixFile}\"")
|
set (_flags "-include \"${_prefixFile}\"")
|
||||||
@@ -1836,9 +1975,17 @@ function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile)
|
|||||||
if (COTIRE_VERBOSE)
|
if (COTIRE_VERBOSE)
|
||||||
message (STATUS "execute_process: ${_cmd}")
|
message (STATUS "execute_process: ${_cmd}")
|
||||||
endif()
|
endif()
|
||||||
if (_option_COMPILER_ID MATCHES "MSVC")
|
if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
|
||||||
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
||||||
unset (ENV{VS_UNICODE_OUTPUT})
|
unset (ENV{VS_UNICODE_OUTPUT})
|
||||||
|
elseif (_option_COMPILER_ID MATCHES "Clang" AND _option_COMPILER_VERSION VERSION_LESS "4.0.0")
|
||||||
|
if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR
|
||||||
|
_option_COMPILER_EXECUTABLE MATCHES "ccache")
|
||||||
|
# Newer versions of Clang embed a compilation timestamp into the precompiled header binary,
|
||||||
|
# which results in "file has been modified since the precompiled header was built" errors if ccache is used.
|
||||||
|
# We work around the problem by disabling ccache upon pre-compiling the prefix header.
|
||||||
|
set (ENV{CCACHE_DISABLE} "true")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${_cmd}
|
COMMAND ${_cmd}
|
||||||
@@ -1853,7 +2000,7 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
|
|||||||
set (_unsupportedCompiler
|
set (_unsupportedCompiler
|
||||||
"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}")
|
"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}")
|
||||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
|
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
|
||||||
# supported since Visual Studio C++ 6.0
|
# PCH supported since Visual Studio C++ 6.0
|
||||||
# and CMake does not support an earlier version
|
# and CMake does not support an earlier version
|
||||||
set (${_msgVar} "" PARENT_SCOPE)
|
set (${_msgVar} "" PARENT_SCOPE)
|
||||||
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
|
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
|
||||||
@@ -1864,8 +2011,16 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
|
|||||||
set (${_msgVar} "" PARENT_SCOPE)
|
set (${_msgVar} "" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
|
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
|
||||||
# all Clang versions have PCH support
|
if (UNIX)
|
||||||
set (${_msgVar} "" PARENT_SCOPE)
|
# all Unix Clang versions have PCH support
|
||||||
|
set (${_msgVar} "" PARENT_SCOPE)
|
||||||
|
elseif (WIN32)
|
||||||
|
# only clang-cl is supported under Windows
|
||||||
|
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||||
|
if (NOT _compilerName MATCHES "cl$")
|
||||||
|
set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
|
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
|
||||||
# Intel PCH support requires version >= 8.0.0
|
# Intel PCH support requires version >= 8.0.0
|
||||||
if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0")
|
if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0")
|
||||||
@@ -1876,29 +2031,38 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
|
|||||||
else()
|
else()
|
||||||
set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
|
set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
# check if ccache is used as a compiler launcher
|
||||||
get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER)
|
get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER)
|
||||||
if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR _launcher MATCHES "ccache")
|
get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" REALPATH)
|
||||||
|
if (_realCompilerExe MATCHES "ccache" OR _launcher MATCHES "ccache")
|
||||||
|
# verify that ccache configuration is compatible with precompiled headers
|
||||||
|
# always check environment variable CCACHE_SLOPPINESS, because earlier versions of ccache
|
||||||
|
# do not report the "sloppiness" setting correctly upon printing ccache configuration
|
||||||
if (DEFINED ENV{CCACHE_SLOPPINESS})
|
if (DEFINED ENV{CCACHE_SLOPPINESS})
|
||||||
if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros")
|
if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR
|
||||||
|
NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros")
|
||||||
set (${_msgVar}
|
set (${_msgVar}
|
||||||
"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."
|
"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if (_launcher MATCHES "ccache")
|
if (_realCompilerExe MATCHES "ccache")
|
||||||
get_filename_component(_ccacheExe "${_launcher}" REALPATH)
|
set (_ccacheExe "${_realCompilerExe}")
|
||||||
else()
|
else()
|
||||||
get_filename_component(_ccacheExe "${CMAKE_${_language}_COMPILER}" REALPATH)
|
set (_ccacheExe "${_launcher}")
|
||||||
endif()
|
endif()
|
||||||
|
# ccache 3.7.0 replaced --print-config with --show-config
|
||||||
|
# use -p instead, which seems to work for all version for now, sigh
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND "${_ccacheExe}" "--print-config"
|
COMMAND "${_ccacheExe}" "-p"
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
RESULT_VARIABLE _result
|
RESULT_VARIABLE _result
|
||||||
OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
ERROR_QUIET)
|
ERROR_QUIET)
|
||||||
if (_result OR NOT
|
if (_result)
|
||||||
_ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR NOT
|
set (${_msgVar} "ccache configuration cannot be determined." PARENT_SCOPE)
|
||||||
_ccacheConfig MATCHES "sloppiness.*=.*pch_defines")
|
elseif (NOT _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR
|
||||||
|
NOT _ccacheConfig MATCHES "sloppiness.*=.*pch_defines")
|
||||||
set (${_msgVar}
|
set (${_msgVar}
|
||||||
"ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"."
|
"ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"."
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
@@ -2191,7 +2355,7 @@ function (cotire_generate_target_script _language _configurations _target _targe
|
|||||||
XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
|
XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
|
||||||
CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
|
CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
|
||||||
CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
|
CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
|
||||||
CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP
|
CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language}
|
||||||
CMAKE_INCLUDE_SYSTEM_FLAG_${_language}
|
CMAKE_INCLUDE_SYSTEM_FLAG_${_language}
|
||||||
CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG
|
CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG
|
||||||
CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG
|
CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG
|
||||||
@@ -2224,8 +2388,9 @@ endfunction()
|
|||||||
|
|
||||||
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
|
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
|
||||||
set (_sourceFiles ${ARGN})
|
set (_sourceFiles ${ARGN})
|
||||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
|
||||||
# for Visual Studio and Intel, we attach the precompiled header compilation to the host file
|
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||||
|
# for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file
|
||||||
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
|
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
|
||||||
if (_sourceFiles)
|
if (_sourceFiles)
|
||||||
set (_flags "")
|
set (_flags "")
|
||||||
@@ -2233,6 +2398,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
|
|||||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||||
"${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags)
|
"${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags)
|
||||||
set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
||||||
|
if (COTIRE_DEBUG)
|
||||||
|
message (STATUS "set_property: SOURCE ${_hostFile} APPEND_STRING COMPILE_FLAGS ${_flags}")
|
||||||
|
endif()
|
||||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}")
|
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}")
|
||||||
# make object file generated from host file depend on prefix header
|
# make object file generated from host file depend on prefix header
|
||||||
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
||||||
@@ -2270,8 +2438,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
|
function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
|
||||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
|
||||||
# for Visual Studio and Intel, we include the precompiled header in all but the host file
|
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||||
|
# for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file
|
||||||
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
|
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
|
||||||
set (_sourceFiles ${ARGN})
|
set (_sourceFiles ${ARGN})
|
||||||
list (LENGTH _sourceFiles _numberOfSourceFiles)
|
list (LENGTH _sourceFiles _numberOfSourceFiles)
|
||||||
@@ -2283,6 +2452,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix
|
|||||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||||
"${_prefixFile}" "${_pchFile}" _flags)
|
"${_prefixFile}" "${_pchFile}" _flags)
|
||||||
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
||||||
|
if (COTIRE_DEBUG)
|
||||||
|
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
|
||||||
|
endif()
|
||||||
# make object files generated from source files depend on precompiled header
|
# make object files generated from source files depend on precompiled header
|
||||||
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}")
|
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}")
|
||||||
endif()
|
endif()
|
||||||
@@ -2296,6 +2468,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix
|
|||||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||||
"${_prefixFile}" "${_pchFile}" _flags)
|
"${_prefixFile}" "${_pchFile}" _flags)
|
||||||
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
||||||
|
if (COTIRE_DEBUG)
|
||||||
|
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
|
||||||
|
endif()
|
||||||
# mark sources as cotired to prevent them from being used in another cotired target
|
# mark sources as cotired to prevent them from being used in another cotired target
|
||||||
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
||||||
endif()
|
endif()
|
||||||
@@ -2313,6 +2488,9 @@ function (cotire_setup_prefix_file_inclusion _language _target _prefixFile)
|
|||||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||||
"${_prefixFile}" "${_pchFile}" _flags)
|
"${_prefixFile}" "${_pchFile}" _flags)
|
||||||
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
||||||
|
if (COTIRE_DEBUG)
|
||||||
|
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
|
||||||
|
endif()
|
||||||
# mark sources as cotired to prevent them from being used in another cotired target
|
# mark sources as cotired to prevent them from being used in another cotired target
|
||||||
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
||||||
# make object files generated from source files depend on prefix header
|
# make object files generated from source files depend on prefix header
|
||||||
@@ -2402,7 +2580,7 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
|||||||
message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}")
|
message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}")
|
||||||
endif()
|
endif()
|
||||||
# because CMake PRE_BUILD command does not support dependencies,
|
# because CMake PRE_BUILD command does not support dependencies,
|
||||||
# we check dependencies explicitly in cotire script mode when the pre-build action is run
|
# we check dependencies explicity in cotire script mode when the pre-build action is run
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET "${_target}"
|
TARGET "${_target}"
|
||||||
PRE_BUILD ${_cmds}
|
PRE_BUILD ${_cmds}
|
||||||
@@ -2417,9 +2595,10 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
|||||||
# if this is a single-language target without any excluded files
|
# if this is a single-language target without any excluded files
|
||||||
if (_wholeTarget)
|
if (_wholeTarget)
|
||||||
set (_language "${_languages}")
|
set (_language "${_languages}")
|
||||||
# for Visual Studio and Intel, precompiled header inclusion is always done on the source file level
|
# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level
|
||||||
# see cotire_setup_pch_file_inclusion
|
# see cotire_setup_pch_file_inclusion
|
||||||
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
|
||||||
|
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||||
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
|
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
|
||||||
if (_prefixFile)
|
if (_prefixFile)
|
||||||
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
|
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
|
||||||
@@ -2428,6 +2607,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
|||||||
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
||||||
"${_prefixFile}" "${_pchFile}" _options)
|
"${_prefixFile}" "${_pchFile}" _options)
|
||||||
set_property(TARGET ${_target} APPEND PROPERTY ${_options})
|
set_property(TARGET ${_target} APPEND PROPERTY ${_options})
|
||||||
|
if (COTIRE_DEBUG)
|
||||||
|
message (STATUS "set_property: TARGET ${_target} APPEND PROPERTY ${_options}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -2454,7 +2636,8 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript
|
|||||||
set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})
|
set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})
|
||||||
endif()
|
endif()
|
||||||
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
||||||
# unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel
|
# unity file compilation results in potentially huge object file,
|
||||||
|
# thus use /bigobj by default unter cl.exe and Windows Intel
|
||||||
set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
|
set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
|
||||||
endif()
|
endif()
|
||||||
cotire_set_cmd_to_prologue(_unityCmd)
|
cotire_set_cmd_to_prologue(_unityCmd)
|
||||||
@@ -2660,6 +2843,9 @@ function (cotire_make_target_message _target _languages _disableMsg _targetMsgVa
|
|||||||
else()
|
else()
|
||||||
set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.")
|
set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.")
|
||||||
endif()
|
endif()
|
||||||
|
if (_disableMsg)
|
||||||
|
set (_targetMsg "${_targetMsg} ${_disableMsg}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if (_excludedStr)
|
if (_excludedStr)
|
||||||
set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.")
|
set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.")
|
||||||
@@ -2749,6 +2935,20 @@ function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTarge
|
|||||||
set (_targetUsePCH FALSE)
|
set (_targetUsePCH FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if (_targetAddSCU)
|
||||||
|
# disable unity builds if automatic Qt processing is used
|
||||||
|
get_target_property(_targetAutoMoc ${_target} AUTOMOC)
|
||||||
|
get_target_property(_targetAutoUic ${_target} AUTOUIC)
|
||||||
|
get_target_property(_targetAutoRcc ${_target} AUTORCC)
|
||||||
|
if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
|
||||||
|
if (_disableMsg)
|
||||||
|
set (_disableMsg "${_disableMsg} Target uses automatic CMake Qt processing.")
|
||||||
|
else()
|
||||||
|
set (_disableMsg "Target uses automatic CMake Qt processing.")
|
||||||
|
endif()
|
||||||
|
set (_targetAddSCU FALSE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH})
|
set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH})
|
||||||
set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU})
|
set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU})
|
||||||
cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles})
|
cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles})
|
||||||
@@ -2776,7 +2976,11 @@ function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar)
|
|||||||
set (_sourceFiles ${ARGN})
|
set (_sourceFiles ${ARGN})
|
||||||
get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
|
get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
|
||||||
if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)")
|
if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)")
|
||||||
set (_numberOfThreads "${CMAKE_MATCH_2}")
|
if (DEFINED CMAKE_MATCH_2)
|
||||||
|
set (_numberOfThreads "${CMAKE_MATCH_2}")
|
||||||
|
else()
|
||||||
|
set (_numberOfThreads "")
|
||||||
|
endif()
|
||||||
if (NOT _numberOfThreads)
|
if (NOT _numberOfThreads)
|
||||||
# use all available cores
|
# use all available cores
|
||||||
ProcessorCount(_numberOfThreads)
|
ProcessorCount(_numberOfThreads)
|
||||||
@@ -2889,8 +3093,9 @@ function (cotire_setup_pch_target _languages _configurations _target)
|
|||||||
set (_dependsFiles "")
|
set (_dependsFiles "")
|
||||||
foreach (_language ${_languages})
|
foreach (_language ${_languages})
|
||||||
set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
|
set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
|
||||||
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
|
||||||
# Visual Studio and Intel only create precompiled header as a side effect
|
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||||
|
# MSVC, Intel and clang-cl only create precompiled header as a side effect
|
||||||
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
|
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
|
||||||
endif()
|
endif()
|
||||||
cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props})
|
cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props})
|
||||||
@@ -2938,6 +3143,7 @@ function (cotire_collect_unity_target_sources _target _languages _unityTargetSou
|
|||||||
list (APPEND _unityTargetSources ${_unityFiles})
|
list (APPEND _unityTargetSources ${_unityFiles})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# handle object libraries which are part of the target's sources
|
||||||
get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)
|
get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)
|
||||||
if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$")
|
if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$")
|
||||||
cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles})
|
cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles})
|
||||||
@@ -2982,21 +3188,6 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
# determine unity target sources
|
# determine unity target sources
|
||||||
set (_unityTargetSources "")
|
set (_unityTargetSources "")
|
||||||
cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources)
|
cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources)
|
||||||
# handle automatic Qt processing
|
|
||||||
get_target_property(_targetAutoMoc ${_target} AUTOMOC)
|
|
||||||
get_target_property(_targetAutoUic ${_target} AUTOUIC)
|
|
||||||
get_target_property(_targetAutoRcc ${_target} AUTORCC)
|
|
||||||
if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
|
|
||||||
# if the original target sources are subject to CMake's automatic Qt processing,
|
|
||||||
# also include implicitly generated <targetname>_automoc.cpp file
|
|
||||||
if (CMAKE_VERSION VERSION_LESS "3.8.0")
|
|
||||||
list (APPEND _unityTargetSources "${_target}_automoc.cpp")
|
|
||||||
set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE)
|
|
||||||
else()
|
|
||||||
list (APPEND _unityTargetSources "${_target}_autogen/moc_compilation.cpp")
|
|
||||||
set_property (SOURCE "${_target}_autogen/moc_compilation.cpp" PROPERTY GENERATED TRUE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created
|
# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created
|
||||||
set (CMAKE_AUTOMOC OFF)
|
set (CMAKE_AUTOMOC OFF)
|
||||||
set (CMAKE_AUTOUIC OFF)
|
set (CMAKE_AUTOUIC OFF)
|
||||||
@@ -3010,21 +3201,6 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
else()
|
else()
|
||||||
add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
|
add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
|
||||||
endif()
|
endif()
|
||||||
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
|
||||||
# depend on original target's automoc target, if it exists
|
|
||||||
if (TARGET ${_target}_automoc)
|
|
||||||
add_dependencies(${_unityTargetName} ${_target}_automoc)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
|
|
||||||
# depend on the original target's implicitly generated <targetname>_automoc target
|
|
||||||
if (CMAKE_VERSION VERSION_LESS "3.8.0")
|
|
||||||
add_dependencies(${_unityTargetName} ${_target}_automoc)
|
|
||||||
else()
|
|
||||||
add_dependencies(${_unityTargetName} ${_target}_autogen)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
# copy output location properties
|
# copy output location properties
|
||||||
set (_outputDirProperties
|
set (_outputDirProperties
|
||||||
ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
|
ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
|
||||||
@@ -3036,8 +3212,8 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}")
|
set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}")
|
||||||
else()
|
else()
|
||||||
# append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory
|
# append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})
|
||||||
cotire_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties})
|
cotire_resolve_config_properties("${_configurations}" _properties ${_outputDirProperties})
|
||||||
foreach (_property ${_properties})
|
foreach (_property ${_properties})
|
||||||
get_property(_outputDir TARGET ${_target} PROPERTY ${_property})
|
get_property(_outputDir TARGET ${_target} PROPERTY ${_property})
|
||||||
if (_outputDir)
|
if (_outputDir)
|
||||||
@@ -3057,11 +3233,11 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
RUNTIME_OUTPUT_DIRECTORY "${_outputDir}")
|
RUNTIME_OUTPUT_DIRECTORY "${_outputDir}")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
${_outputDirProperties})
|
${_outputDirProperties})
|
||||||
endif()
|
endif()
|
||||||
# copy output name
|
# copy output name
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_<CONFIG>
|
ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_<CONFIG>
|
||||||
LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>
|
LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>
|
||||||
OUTPUT_NAME OUTPUT_NAME_<CONFIG>
|
OUTPUT_NAME OUTPUT_NAME_<CONFIG>
|
||||||
@@ -3069,7 +3245,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
PREFIX <CONFIG>_POSTFIX SUFFIX
|
PREFIX <CONFIG>_POSTFIX SUFFIX
|
||||||
IMPORT_PREFIX IMPORT_SUFFIX)
|
IMPORT_PREFIX IMPORT_SUFFIX)
|
||||||
# copy compile stuff
|
# copy compile stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
COMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>
|
COMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>
|
||||||
COMPILE_FLAGS COMPILE_OPTIONS
|
COMPILE_FLAGS COMPILE_OPTIONS
|
||||||
Fortran_FORMAT Fortran_MODULE_DIRECTORY
|
Fortran_FORMAT Fortran_MODULE_DIRECTORY
|
||||||
@@ -3081,12 +3257,12 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN
|
C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN
|
||||||
C_CLANG_TIDY CXX_CLANG_TIDY)
|
C_CLANG_TIDY CXX_CLANG_TIDY)
|
||||||
# copy compile features
|
# copy compile features
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED
|
C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED
|
||||||
CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED
|
CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED
|
||||||
COMPILE_FEATURES)
|
COMPILE_FEATURES)
|
||||||
# copy interface stuff
|
# copy interface stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN
|
COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN
|
||||||
COMPATIBLE_INTERFACE_STRING
|
COMPATIBLE_INTERFACE_STRING
|
||||||
INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS
|
INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS
|
||||||
@@ -3094,8 +3270,9 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||||
INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
|
INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
|
||||||
# copy link stuff
|
# copy link stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
|
BUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR
|
||||||
|
INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
|
||||||
LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
|
LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
|
||||||
LINK_FLAGS LINK_FLAGS_<CONFIG>
|
LINK_FLAGS LINK_FLAGS_<CONFIG>
|
||||||
LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>
|
LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>
|
||||||
@@ -3103,18 +3280,18 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC
|
LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC
|
||||||
STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>
|
STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>
|
||||||
NO_SONAME SOVERSION VERSION
|
NO_SONAME SOVERSION VERSION
|
||||||
LINK_WHAT_YOU_USE)
|
LINK_WHAT_YOU_USE BUILD_RPATH)
|
||||||
# copy cmake stuff
|
# copy cmake stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)
|
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)
|
||||||
# copy Apple platform specific stuff
|
# copy Apple platform specific stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR
|
BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR
|
||||||
MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH
|
MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH
|
||||||
OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST
|
OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST
|
||||||
IOS_INSTALL_COMBINED)
|
IOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE)
|
||||||
# copy Windows platform specific stuff
|
# copy Windows platform specific stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
GNUtoMS
|
GNUtoMS
|
||||||
COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
|
COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
|
||||||
COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
|
COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
|
||||||
@@ -3128,15 +3305,19 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES
|
VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES
|
||||||
WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS
|
WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS
|
||||||
DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE
|
DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE
|
||||||
VS_SDK_REFERENCES)
|
VS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY)
|
||||||
# copy Android platform specific stuff
|
# copy Android platform specific stuff
|
||||||
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
ANDROID_API ANDROID_API_MIN ANDROID_GUI
|
ANDROID_API ANDROID_API_MIN ANDROID_GUI
|
||||||
ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES
|
ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES
|
||||||
ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR
|
ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR
|
||||||
ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES
|
ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES
|
||||||
ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH
|
ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH
|
||||||
ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE)
|
ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE)
|
||||||
|
# copy CUDA platform specific stuff
|
||||||
|
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
||||||
|
CUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS
|
||||||
|
CUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED)
|
||||||
# use output name from original target
|
# use output name from original target
|
||||||
get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)
|
get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)
|
||||||
if (NOT _targetOutputName)
|
if (NOT _targetOutputName)
|
||||||
@@ -3150,6 +3331,13 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
|
|||||||
set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)
|
set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
# enable parallel compilation for MSVC
|
||||||
|
if (MSVC AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
||||||
|
list (LENGTH _unityTargetSources _numberOfUnityTargetSources)
|
||||||
|
if (_numberOfUnityTargetSources GREATER 1)
|
||||||
|
set_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS "/MP")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
cotire_init_target(${_unityTargetName})
|
cotire_init_target(${_unityTargetName})
|
||||||
cotire_add_to_unity_all_target(${_unityTargetName})
|
cotire_add_to_unity_all_target(${_unityTargetName})
|
||||||
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}")
|
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}")
|
||||||
@@ -3308,6 +3496,13 @@ function (cotire_target_link_libraries _target)
|
|||||||
message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
|
message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES)
|
||||||
|
if (_manualDependencies)
|
||||||
|
cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies})
|
||||||
|
if (_unityManualDependencies)
|
||||||
|
add_dependencies("${_unityTargetName}" ${_unityManualDependencies})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endfunction(cotire_target_link_libraries)
|
endfunction(cotire_target_link_libraries)
|
||||||
@@ -3340,9 +3535,9 @@ function (cotire_init_target _targetName)
|
|||||||
set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}")
|
set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}")
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||||
if (MSVC_IDE)
|
# if (MSVC_IDE)
|
||||||
set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
# set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
||||||
endif()
|
# endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function (cotire_add_to_pch_all_target _pchTargetName)
|
function (cotire_add_to_pch_all_target _pchTargetName)
|
||||||
@@ -3604,7 +3799,7 @@ else()
|
|||||||
set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING
|
set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING
|
||||||
"Ignore sources with the listed file extensions from the generated unity source.")
|
"Ignore sources with the listed file extensions from the generated unity source.")
|
||||||
|
|
||||||
set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING
|
set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "2" CACHE STRING
|
||||||
"Minimum number of sources in target required to enable use of precompiled header.")
|
"Minimum number of sources in target required to enable use of precompiled header.")
|
||||||
|
|
||||||
if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT)
|
if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT)
|
||||||
@@ -3703,7 +3898,7 @@ else()
|
|||||||
FULL_DOCS
|
FULL_DOCS
|
||||||
"The variable can be set to an integer > 0."
|
"The variable can be set to an integer > 0."
|
||||||
"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target."
|
"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target."
|
||||||
"If not defined, defaults to 3."
|
"If not defined, defaults to 2."
|
||||||
)
|
)
|
||||||
|
|
||||||
define_property(
|
define_property(
|
||||||
|
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||||
|
|
||||||
if (NOT DEFINED INSTALL_DRACO)
|
|
||||||
set (INSTALL_DRACO OFF CACHE BOOL "${INSTALL_DRACO_DESCR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_DRACO_DIR)
|
if (NOT DEFINED 3RDPARTY_DRACO_DIR)
|
||||||
set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco")
|
set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco")
|
||||||
endif()
|
endif()
|
||||||
@@ -15,14 +11,24 @@ if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR)
|
|||||||
set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco")
|
set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY OR NOT 3RDPARTY_DRACO_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY)
|
||||||
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library" FORCE)
|
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR)
|
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR)
|
||||||
set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library")
|
set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DEBUG)
|
||||||
|
set (3RDPARTY_DRACO_LIBRARY_DEBUG "" CACHE FILEPATH "Draco debug library")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR_DEBUG)
|
||||||
|
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "" CACHE PATH "The directory containing Draco debug library")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||||
if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}")
|
if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME)
|
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME)
|
||||||
@@ -32,20 +38,19 @@ if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
# header
|
||||||
set (DRACO_INCLUDE_PATH "${3RDPARTY_DRACO_DIR}/include")
|
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}")
|
||||||
set (DRACO_LIBRARY_PATH "${3RDPARTY_DRACO_DIR}/lib")
|
set (HEADER_NAMES draco)
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR)
|
# set 3RDPARTY_DRACO_INCLUDE_DIR as notfound, otherwise find_path can't assign a new value to 3RDPARTY_DRACO_INCLUDE_DIR
|
||||||
if (DRACO_INCLUDE_PATH AND EXISTS "${DRACO_INCLUDE_PATH}")
|
set (3RDPARTY_DRACO_INCLUDE_DIR "3RDPARTY_DRACO_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing headers of the Draco" FORCE)
|
||||||
set (3RDPARTY_DRACO_INCLUDE_DIR "${DRACO_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of DRACO" FORCE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT 3RDPARTY_DRACO_LIBRARY_DIR)
|
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||||
if (DRACO_LIBRARY_PATH AND EXISTS "${DRACO_LIBRARY_PATH}")
|
find_path (3RDPARTY_DRACO_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||||
set (3RDPARTY_DRACO_LIBRARY_DIR "${DRACO_LIBRARY_PATH}" CACHE FILEPATH "The directory containing DRACO library" FORCE)
|
PATHS ${3RDPARTY_DRACO_DIR}
|
||||||
|
PATH_SUFFIXES "include"
|
||||||
|
CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -57,11 +62,11 @@ endif()
|
|||||||
|
|
||||||
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
||||||
if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}")
|
if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}")
|
||||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||||
set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE)
|
set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE)
|
||||||
|
|
||||||
find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco}
|
find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco}
|
||||||
PATHS "${3RDPARTY_DRACO_LIBRARY_DIR}"
|
PATHS "${3RDPARTY_DRACO_DIR}"
|
||||||
PATH_SUFFIXES lib
|
PATH_SUFFIXES lib
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH
|
CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
NO_DEFAULT_PATH)
|
NO_DEFAULT_PATH)
|
||||||
@@ -70,27 +75,19 @@ if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
|
|||||||
set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE)
|
set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
if (3RDPARTY_DRACO_LIBRARY_DIR AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
if (WIN32 AND (NOT 3RDPARTY_DRACO_LIBRARY_DEBUG OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}"))
|
||||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_DRACO_LIBRARY_DIR}")
|
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||||
else()
|
set (3RDPARTY_DRACO_LIBRARY_DEBUG "3RDPARTY_DRACO_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "The path to debug Draco library" FORCE)
|
||||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_DRACO_LIBRARY_DIR)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (INSTALL_DRACO)
|
find_library (3RDPARTY_DRACO_LIBRARY_DEBUG NAMES ${CSF_Draco}
|
||||||
get_filename_component(3RDPARTY_DRACO_LIBRARY_REALPATH ${3RDPARTY_DRACO_LIBRARY} REALPATH)
|
PATHS "${3RDPARTY_DRACO_DIR}"
|
||||||
if (SINGLE_GENERATOR)
|
PATH_SUFFIXES libd
|
||||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
|
CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
else()
|
NO_DEFAULT_PATH)
|
||||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
if (3RDPARTY_DRACO_LIBRARY_DEBUG AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}")
|
||||||
CONFIGURATIONS Release
|
get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DEBUG}" PATH)
|
||||||
DESTINATION "${INSTALL_DIR_LIB}")
|
set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DIR_DEBUG}" CACHE FILEPATH "The directory containing debug Draco library" FORCE)
|
||||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
endif()
|
||||||
CONFIGURATIONS RelWithDebInfo
|
|
||||||
DESTINATION "${INSTALL_DIR_LIB}i")
|
|
||||||
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
|
|
||||||
CONFIGURATIONS Debug
|
|
||||||
DESTINATION "${INSTALL_DIR_LIB}d")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -26,9 +26,7 @@ if (3RDPARTY_DIR)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# flex 2.5.37 is required because closest known lower version, 2.5.3 from WOK 6.8.0,
|
find_package (FLEX 2.6.4)
|
||||||
# generates code which is unusable on Windows (includes unistd.h without any way to avoid this)
|
|
||||||
find_package (FLEX 2.5.37)
|
|
||||||
|
|
||||||
if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||||
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR)
|
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR)
|
||||||
|
@@ -110,8 +110,19 @@ if (IS_BUILTIN_SEARCH_REQUIRED)
|
|||||||
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
|
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
unset (FREETYPE_LIBRARY_RELEASE)
|
||||||
find_package(Freetype)
|
find_package(Freetype)
|
||||||
|
|
||||||
|
# Only for UNIX (not APPLE)
|
||||||
|
if ((NOT WIN32) AND (NOT APPLE))
|
||||||
|
# To avoid linker error on Ubuntu 18.04 and others linux distributives we should
|
||||||
|
# link with freetype library, compiled as Position Independent Code (PIC),
|
||||||
|
# for example, with shared object.
|
||||||
|
if ((DEFINED FREETYPE_LIBRARY_RELEASE) AND (NOT "${FREETYPE_LIBRARY_RELEASE}" STREQUAL "") AND (EXISTS "${FREETYPE_LIBRARY_RELEASE}"))
|
||||||
|
string (REPLACE "\.a" "\.so" FREETYPE_LIBRARY_RELEASE "${FREETYPE_LIBRARY_RELEASE}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# restore ENV{FREETYPE_DIR}
|
# restore ENV{FREETYPE_DIR}
|
||||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||||
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
|
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
|
||||||
@@ -122,7 +133,7 @@ if (IS_BUILTIN_SEARCH_REQUIRED)
|
|||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
|
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
|
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
|
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY_RELEASE FILEPATH "freetype library")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -141,8 +152,8 @@ if (IS_BUILTIN_SEARCH_REQUIRED)
|
|||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||||
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
|
if (FREETYPE_LIBRARY_RELEASE AND EXISTS "${FREETYPE_LIBRARY_RELEASE}")
|
||||||
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "The path to freetype library" FORCE)
|
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY_RELEASE}" CACHE FILEPATH "The path to freetype library" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -220,7 +231,7 @@ endif()
|
|||||||
# freetype library
|
# freetype library
|
||||||
#if (BUILD_SHARED_LIBS)
|
#if (BUILD_SHARED_LIBS)
|
||||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
|
||||||
|
|
||||||
set (FREETYPE_PATH_SUFFIXES lib)
|
set (FREETYPE_PATH_SUFFIXES lib)
|
||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
@@ -242,6 +253,16 @@ endif()
|
|||||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Only for UNIX (not APPLE)
|
||||||
|
if ((NOT WIN32) AND (NOT APPLE))
|
||||||
|
# To avoid linker error on Ubuntu 18.04 and some others linux distributives we should
|
||||||
|
# link with freetype library, compiled as Position Independent Code (PIC),
|
||||||
|
# for example, with shared object.
|
||||||
|
if ((DEFINED 3RDPARTY_FREETYPE_LIBRARY) AND (NOT "${3RDPARTY_FREETYPE_LIBRARY}" STREQUAL "") AND (EXISTS "${3RDPARTY_FREETYPE_LIBRARY}"))
|
||||||
|
string (REPLACE "\.a" "\.so" 3RDPARTY_FREETYPE_LIBRARY "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
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)
|
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
|
||||||
@@ -350,7 +371,7 @@ endif()
|
|||||||
# unset all redundant variables
|
# unset all redundant variables
|
||||||
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
|
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
|
||||||
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
|
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY)
|
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY_RELEASE)
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
||||||
|
143
adm/cmake/jemalloc.cmake
Normal file
143
adm/cmake/jemalloc.cmake
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
# JeMalloc
|
||||||
|
|
||||||
|
if (NOT DEFINED INSTALL_JEMALLOC)
|
||||||
|
set (INSTALL_JEMALLOC OFF CACHE BOOL "${INSTALL_INSTALL_JEMALLOC_DESCR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# include occt macros. compiler_bitness, os_with_bit, compiler
|
||||||
|
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||||
|
|
||||||
|
# specify JEMALLOC folder in connection with 3RDPARTY_DIR
|
||||||
|
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
||||||
|
if (NOT 3RDPARTY_JEMALLOC_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_DIR}")
|
||||||
|
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" jemalloc JEMALLOC_DIR_NAME)
|
||||||
|
if (JEMALLOC_DIR_NAME)
|
||||||
|
set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}" CACHE PATH "The directory containing JEMALLOC" FORCE)
|
||||||
|
set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}")
|
||||||
|
message(STATUS "Info: JEMALLOC detected in ${3RDPARTY_JEMALLOC_DIR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# define required JEMALLOC variables
|
||||||
|
if (NOT DEFINED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
|
||||||
|
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
|
||||||
|
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
|
||||||
|
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_INCLUDE_DIR PATH "the path to JEMALLOC")
|
||||||
|
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_LIBRARY_DIR FILEPATH "The directory containing JEMALLOC libraries")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# header
|
||||||
|
if (NOT 3RDPARTY_JEMALLOC_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
|
||||||
|
set (HEADER_NAMES jemalloc.h)
|
||||||
|
|
||||||
|
# set 3RDPARTY_JEMALLOC_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_JEMALLOC_INCLUDE_DIR
|
||||||
|
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "3RDPARTY_JEMALLOC_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
|
||||||
|
|
||||||
|
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
|
||||||
|
find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
||||||
|
PATHS ${3RDPARTY_JEMALLOC_DIR}
|
||||||
|
PATH_SUFFIXES include/jemalloc
|
||||||
|
CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (3RDPARTY_JEMALLOC_INCLUDE_DIR AND EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
|
||||||
|
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
|
||||||
|
else()
|
||||||
|
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
|
||||||
|
set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE FILEPATH "the path to jemalloc.h" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Installing destination path
|
||||||
|
if (WIN32)
|
||||||
|
set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
|
||||||
|
else()
|
||||||
|
set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX)
|
||||||
|
if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
|
||||||
|
set (JEMALLOC_PATH_SUFFIXES "lib" "bin")
|
||||||
|
set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND")
|
||||||
|
if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
|
||||||
|
find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
|
||||||
|
PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}"
|
||||||
|
PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
|
||||||
|
CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
else()
|
||||||
|
find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
|
||||||
|
PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
|
||||||
|
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||||
|
endif()
|
||||||
|
if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
|
||||||
|
get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH)
|
||||||
|
set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}")
|
||||||
|
else()
|
||||||
|
set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB})
|
||||||
|
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}")
|
||||||
|
set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE)
|
||||||
|
else()
|
||||||
|
message("Cannot find ${MMGR_LIB} library in jemalloc 3rdparty")
|
||||||
|
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB})
|
||||||
|
set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "")
|
||||||
|
endif()
|
||||||
|
set (JEMALLOC_IS_STATIC_LIB FALSE)
|
||||||
|
if (((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.lib$")) OR ((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.a$")))
|
||||||
|
get_filename_component(STATIC_LIB_NAME ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} NAME)
|
||||||
|
list(APPEND CSF_MMGR "${STATIC_LIB_NAME}")
|
||||||
|
set (JEMALLOC_IS_STATIC_LIB TRUE)
|
||||||
|
endif()
|
||||||
|
# install instructions
|
||||||
|
if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB)
|
||||||
|
OCCT_MAKE_OS_WITH_BITNESS()
|
||||||
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
|
get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH)
|
||||||
|
if (SINGLE_GENERATOR)
|
||||||
|
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
|
||||||
|
DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
|
||||||
|
else()
|
||||||
|
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d")
|
||||||
|
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
|
||||||
|
CONFIGURATIONS Release
|
||||||
|
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}")
|
||||||
|
install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
|
||||||
|
CONFIGURATIONS RelWithDebInfo
|
||||||
|
DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i")
|
||||||
|
endif()
|
||||||
|
set (USED_3RDPARTY_JEMALLOC_DIR "")
|
||||||
|
elseif(NOT JEMALLOC_IS_STATIC_LIB)
|
||||||
|
# the library directory for using by the executable
|
||||||
|
set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}})
|
||||||
|
endif()
|
||||||
|
unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE)
|
||||||
|
unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Reset CSF variable
|
||||||
|
set (CSF_MMGR "")
|
||||||
|
|
||||||
|
# find static jemalloc lib
|
||||||
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
|
||||||
|
if (WIN32)
|
||||||
|
JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC")
|
||||||
|
elseif(NOT WIN32)
|
||||||
|
JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC")
|
||||||
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so")
|
||||||
|
JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# find shared jemalloc lib
|
||||||
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so")
|
||||||
|
JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED")
|
@@ -44,9 +44,25 @@ elseif (MSVC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# string pooling (GF), function-level linking (Gy)
|
if ("${BUILD_OPT_PROFILE}" STREQUAL "Production")
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy")
|
# string pooling (GF), function-level linking (Gy)
|
||||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy")
|
||||||
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy")
|
||||||
|
|
||||||
|
# Favor fast code (Ot), Omit frame pointers (Oy)
|
||||||
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ot /Oy")
|
||||||
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ot /Oy")
|
||||||
|
|
||||||
|
# Whole Program Optimisation (GL), Enable intrinsic functions (Oi)
|
||||||
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /Oi")
|
||||||
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL /Oi")
|
||||||
|
|
||||||
|
# Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
endif()
|
||||||
if (BUILD_FORCE_RelWithDebInfo)
|
if (BUILD_FORCE_RelWithDebInfo)
|
||||||
# generate debug info (Zi), inline expansion level (Ob1)
|
# generate debug info (Zi), inline expansion level (Ob1)
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1")
|
||||||
@@ -116,9 +132,25 @@ if (MSVC)
|
|||||||
else()
|
else()
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||||
endif()
|
endif()
|
||||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]"))
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
||||||
|
if ("${BUILD_OPT_PROFILE}" STREQUAL "Production")
|
||||||
|
# /Ot (favor speed over size) is similar to -O2 or -O3 in GCC/Clang.
|
||||||
|
# /Oy (omit frame pointers) is similar to -fomit-frame-pointer in GCC/Clang.
|
||||||
|
# /GL (whole program optimization) is similar to -flto (Link Time Optimization) in GCC/Clang.
|
||||||
|
# /GF (eliminate duplicate strings) doesn't have a direct equivalent in GCC/Clang, but the compilers do string pooling automatically.
|
||||||
|
# /Gy (enable function-level linking) is similar to -ffunction-sections in GCC/Clang.
|
||||||
|
# /fp:precise (improve floating-point consistency) is similar to -ffloat-store in GCC, but there isn't a perfect equivalent in Clang.
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fomit-frame-pointer -flto -ffunction-sections -ffloat-store")
|
||||||
|
|
||||||
|
# Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -flto")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto")
|
||||||
|
endif()
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
|
||||||
endif()
|
endif()
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
@@ -130,14 +162,10 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMP
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
|
# 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}")
|
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
||||||
elseif(NOT WIN32)
|
|
||||||
# CLang for Windows (at least CLang 8.0 distributed with VS 2019)
|
|
||||||
# does not support option "-std=c++0x"
|
|
||||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
|
||||||
endif()
|
endif()
|
||||||
# Optimize size of binaries
|
# Optimize size of binaries
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
|
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||||
@@ -148,14 +176,10 @@ elseif(MINGW)
|
|||||||
# workaround bugs in mingw with vtable export
|
# workaround bugs in mingw with vtable export
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
|
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
|
||||||
|
|
||||||
# Require C++11
|
|
||||||
set (CMAKE_CXX_FLAGS "-std=gnu++0x ${CMAKE_CXX_FLAGS}")
|
|
||||||
# Optimize size of binaries
|
# Optimize size of binaries
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
||||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||||
# Require C++11
|
|
||||||
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
|
||||||
# Optimize size of binaries
|
# Optimize size of binaries
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
||||||
|
@@ -80,9 +80,9 @@ macro (OCCT_MAKE_COMPILER_SHORT_NAME)
|
|||||||
set (COMPILER gcc)
|
set (COMPILER gcc)
|
||||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set (COMPILER gxx)
|
set (COMPILER gxx)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
|
||||||
set (COMPILER clang)
|
set (COMPILER clang)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]")
|
||||||
set (COMPILER icc)
|
set (COMPILER icc)
|
||||||
else()
|
else()
|
||||||
set (COMPILER ${CMAKE_GENERATOR})
|
set (COMPILER ${CMAKE_GENERATOR})
|
||||||
@@ -160,6 +160,8 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
|||||||
if ("${lower_PRODUCT_NAME}" STREQUAL "egl")
|
if ("${lower_PRODUCT_NAME}" STREQUAL "egl")
|
||||||
string (SUBSTRING "${lower_PRODUCT_NAME}" 1 -1 lower_PRODUCT_NAME)
|
string (SUBSTRING "${lower_PRODUCT_NAME}" 1 -1 lower_PRODUCT_NAME)
|
||||||
list (APPEND SEARCH_TEMPLATES "[^gl]+${lower_PRODUCT_NAME}.*")
|
list (APPEND SEARCH_TEMPLATES "[^gl]+${lower_PRODUCT_NAME}.*")
|
||||||
|
elseif ("${lower_PRODUCT_NAME}" STREQUAL "tbb")
|
||||||
|
list (APPEND SEARCH_TEMPLATES "^.*${lower_PRODUCT_NAME}.*")
|
||||||
else()
|
else()
|
||||||
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]*${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}.*${COMPILER_BITNESS}")
|
||||||
@@ -589,9 +591,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install (CODE
|
install (CODE
|
||||||
"cmake_policy(PUSH)
|
"string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
|
||||||
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\")
|
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})
|
foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
|
||||||
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
|
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
|
||||||
@@ -600,8 +600,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
|
|||||||
string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
|
string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
|
||||||
file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
|
file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
|
||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()")
|
||||||
cmake_policy(POP)")
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (OCCT_INSERT_CODE_FOR_TARGET)
|
macro (OCCT_INSERT_CODE_FOR_TARGET)
|
||||||
@@ -615,17 +614,14 @@ macro (OCCT_INSERT_CODE_FOR_TARGET)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
|
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
|
||||||
install(CODE "cmake_policy(PUSH)
|
install(CODE "set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
|
||||||
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 (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT)
|
||||||
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
|
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
|
||||||
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
|
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
|
||||||
string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\")
|
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}\")
|
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\")
|
file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\")
|
||||||
endforeach()
|
endforeach()")
|
||||||
cmake_policy(POP)")
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
|
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
|
||||||
|
@@ -70,6 +70,16 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
|||||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
|
||||||
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
|
||||||
|
|
||||||
|
# remove old general version of FlexLexer
|
||||||
|
if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h)
|
||||||
|
message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h")
|
||||||
|
file(REMOVE ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h)
|
||||||
|
endif()
|
||||||
|
# install copy of FlexLexer.h locally to allow further building without flex
|
||||||
|
if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||||
|
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# bison files
|
# bison files
|
||||||
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
|
||||||
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
|
||||||
@@ -106,21 +116,30 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES})
|
|||||||
set (BISON_OUTPUT_FILE_EXT "cxx")
|
set (BISON_OUTPUT_FILE_EXT "cxx")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT)
|
file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT)
|
||||||
foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT})
|
foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT})
|
||||||
string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE})
|
string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE})
|
||||||
if (CXX_FLEX_LANGUAGE_FOUND)
|
if (CXX_FLEX_LANGUAGE_FOUND)
|
||||||
set (FLEX_OUTPUT_FILE_EXT "cxx")
|
set (FLEX_OUTPUT_FILE_EXT "cxx")
|
||||||
|
|
||||||
# install copy of FlexLexer.h locally to allow further building without flex
|
|
||||||
if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
|
||||||
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${FLEX_BISON_TARGET_DIR}/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
|
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
|
||||||
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT})
|
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT})
|
||||||
|
|
||||||
|
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
|
||||||
|
message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}")
|
||||||
|
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT})
|
||||||
|
endif()
|
||||||
|
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx)
|
||||||
|
message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx")
|
||||||
|
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx)
|
||||||
|
endif()
|
||||||
|
if (EXISTS ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE})
|
||||||
|
message (STATUS "Info: remove old output FLEX file: ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}")
|
||||||
|
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE})
|
||||||
|
endif()
|
||||||
|
|
||||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}"
|
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}"
|
||||||
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
||||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}"
|
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}"
|
||||||
@@ -226,6 +245,18 @@ endif (USE_QT)
|
|||||||
if (EXECUTABLE_PROJECT)
|
if (EXECUTABLE_PROJECT)
|
||||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||||
|
|
||||||
|
if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
||||||
|
else()
|
||||||
|
# To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire
|
||||||
|
# COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error.
|
||||||
|
# So, we just exclude PROJECT_NAME from cotire list.
|
||||||
|
# if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH)
|
||||||
|
# set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}")
|
||||||
|
# endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
install (TARGETS ${PROJECT_NAME}
|
install (TARGETS ${PROJECT_NAME}
|
||||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||||
|
|
||||||
@@ -235,15 +266,33 @@ if (EXECUTABLE_PROJECT)
|
|||||||
else()
|
else()
|
||||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||||
|
|
||||||
|
if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
||||||
|
else()
|
||||||
|
# To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire
|
||||||
|
# COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error.
|
||||||
|
# So, we just exclude PROJECT_NAME from cotire list.
|
||||||
|
# if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH)
|
||||||
|
# set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}")
|
||||||
|
# endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if (BUILD_FORCE_RelWithDebInfo)
|
if (BUILD_FORCE_RelWithDebInfo)
|
||||||
set (aReleasePdbConf "Release")
|
set (aReleasePdbConf "Release")
|
||||||
else()
|
else()
|
||||||
set (aReleasePdbConf)
|
set (aReleasePdbConf)
|
||||||
endif()
|
endif()
|
||||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
if (BUILD_SHARED_LIBS)
|
||||||
|
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
||||||
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
|
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
|
||||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||||
|
else()
|
||||||
|
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
|
||||||
|
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
|
||||||
|
DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||||
@@ -320,13 +369,17 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
|||||||
else() # get CSF_ value
|
else() # get CSF_ value
|
||||||
set (CURRENT_CSF ${${USED_ITEM}})
|
set (CURRENT_CSF ${${USED_ITEM}})
|
||||||
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
|
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
|
||||||
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs")
|
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}")
|
||||||
add_definitions (-DHAVE_OPENGL)
|
add_definitions (-DHAVE_OPENGL)
|
||||||
endif()
|
endif()
|
||||||
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs")
|
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}")
|
||||||
add_definitions (-DHAVE_GLES2)
|
add_definitions (-DHAVE_GLES2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}")
|
||||||
|
set (CURRENT_CSF "")
|
||||||
|
set (USED_DRACO 1)
|
||||||
|
endif()
|
||||||
set (LIBRARY_FROM_CACHE 0)
|
set (LIBRARY_FROM_CACHE 0)
|
||||||
separate_arguments (CURRENT_CSF)
|
separate_arguments (CURRENT_CSF)
|
||||||
foreach (CSF_LIBRARY ${CURRENT_CSF})
|
foreach (CSF_LIBRARY ${CURRENT_CSF})
|
||||||
@@ -354,7 +407,7 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
|||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (NOT ${LIBRARY_FROM_CACHE})
|
if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "")
|
||||||
# prepare a list from a string with whitespaces
|
# prepare a list from a string with whitespaces
|
||||||
separate_arguments (CURRENT_CSF)
|
separate_arguments (CURRENT_CSF)
|
||||||
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
|
||||||
@@ -365,6 +418,28 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
if (USE_DRACO)
|
||||||
|
if (USED_DRACO)
|
||||||
|
set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY})
|
||||||
|
if (WIN32)
|
||||||
|
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG})
|
||||||
|
else()
|
||||||
|
set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY})
|
||||||
|
endif()
|
||||||
|
set (USED_LIB_CONF)
|
||||||
|
if (EXISTS ${USED_LIB_DEBUG})
|
||||||
|
set (USED_LIB_CONF "$<$<CONFIG:DEBUG>:${USED_LIB_DEBUG}>;${USED_LIB_CONF}")
|
||||||
|
endif()
|
||||||
|
if (EXISTS ${USED_LIB_RELEASE})
|
||||||
|
set (USED_LIB_CONF "$<$<CONFIG:RELEASE>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
|
||||||
|
set (USED_LIB_CONF "$<$<CONFIG:RELWITHDEBINFO>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
|
||||||
|
endif()
|
||||||
|
if (DEFINED USED_LIB_CONF)
|
||||||
|
set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
||||||
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
||||||
|
@@ -1,294 +1,240 @@
|
|||||||
# tbb
|
# tbb
|
||||||
|
|
||||||
if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS)
|
|
||||||
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# tbb directory
|
|
||||||
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 AND BUILD_SHARED_LIBS)
|
||||||
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
|
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
|
||||||
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
|
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS)
|
||||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# specify TBB folder in connectin with 3RDPARTY_DIR
|
# Initialize tbb directory.
|
||||||
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
|
if (NOT DEFINED 3RDPARTY_TBB_DIR)
|
||||||
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_TBB_DIR PATH "The directory containing tbb")
|
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT 3RDPARTY_TBB_DIR OR NOT EXISTS "${3RDPARTY_TBB_DIR}")
|
if (WIN32)
|
||||||
|
if (NOT DEFINED 3RDPARTY_DIR)
|
||||||
|
message (FATAL_ERROR "3RDPARTY_DIR is not defined.")
|
||||||
|
endif()
|
||||||
|
if ("${3RDPARTY_DIR}" STREQUAL "")
|
||||||
|
message (FATAL_ERROR "3RDPARTY_DIR is empty string.")
|
||||||
|
endif()
|
||||||
|
if (NOT EXISTS "${3RDPARTY_DIR}")
|
||||||
|
message (FATAL_ERROR "3RDPARTY_DIR is not exist.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Below, we have correct 3RDPARTY_DIR.
|
||||||
|
|
||||||
|
# Initialize TBB folder in connectin with 3RDPARTY_DIR.
|
||||||
|
if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}"))
|
||||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
|
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
|
||||||
if (TBB_DIR_NAME)
|
if (TBB_DIR_NAME)
|
||||||
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
|
||||||
#set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing TBB" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
# Here we have full path name to installation directory of TBB.
|
||||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
|
# Employ it.
|
||||||
endif()
|
if (EXISTS "${3RDPARTY_TBB_DIR}")
|
||||||
|
find_package (
|
||||||
|
TBB 2021.5
|
||||||
|
PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
|
||||||
|
REQUIRED
|
||||||
|
CONFIG)
|
||||||
|
|
||||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
# Achive include directory
|
||||||
# check 3RDPARTY_TBB_INCLUDE_DIR for consictency with specified 3RDPARTY_TBB_DIR
|
get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_TBB_INCLUDE_DIR PATH "The directory containing headers of the TBB")
|
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||||
endif()
|
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
|
||||||
|
|
||||||
# tbb.h
|
|
||||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
set (HEADER_NAMES tbb.h tbb/tbb.h)
|
|
||||||
|
|
||||||
# set 3RDPARTY_TBB_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_TBB_INCLUDE_DIR
|
|
||||||
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to tbb.h" FORCE)
|
|
||||||
|
|
||||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
|
||||||
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
|
||||||
PATHS ${3RDPARTY_TBB_DIR}
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
else()
|
|
||||||
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
|
||||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
|
||||||
else()
|
|
||||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# common steps for tbb and tbbmalloc
|
|
||||||
macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
|
|
||||||
|
|
||||||
string (TOUPPER ${PRODUCT_LIBRARY_NAME} upper_PRODUCT_LIBRARY_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)
|
|
||||||
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")
|
|
||||||
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)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
if (EXISTS "${TBB_INCLUDE_DIR}")
|
||||||
|
set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE)
|
||||||
if (WIN32 AND NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# check 3RDPARTY_${upper_PRODUCT_LIBRARY_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")
|
|
||||||
|
|
||||||
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)
|
|
||||||
else()
|
else()
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library")
|
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
separate_arguments (CSF_TBB)
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
foreach (LIB IN LISTS CSF_TBB)
|
||||||
|
string(TOLOWER "${LIB}" LIB_LOWER)
|
||||||
|
string(TOUPPER "${LIB}" LIB_UPPER)
|
||||||
|
|
||||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
|
# Achive *.lib files and directory containing it.
|
||||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH)
|
get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE)
|
||||||
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)
|
# Reserve cache variable for *.lib.
|
||||||
else()
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)")
|
||||||
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
# Reserve cache variable for directory containing *.lib file.
|
||||||
endif()
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.lib)")
|
||||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
endif()
|
||||||
OCCT_MAKE_COMPILER_BITNESS()
|
if (EXISTS "${TBB_LIB_FILE}")
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY
|
||||||
if (${COMPILER_BITNESS} EQUAL 32)
|
"${TBB_LIB_FILE}"
|
||||||
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME ia32)
|
CACHE FILEPATH
|
||||||
else()
|
"${LIB_UPPER} library (*.lib)"
|
||||||
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME intel64)
|
FORCE)
|
||||||
endif()
|
get_filename_component (TBB_LIB_FILE_DIRECTORY "${TBB_LIB_FILE}" DIRECTORY)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR
|
||||||
# tbb/tbbmalloc library
|
"${TBB_LIB_FILE_DIRECTORY}"
|
||||||
if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
|
CACHE PATH
|
||||||
|
"The directory containing ${LIB_UPPER} library (*.lib)"
|
||||||
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
|
FORCE)
|
||||||
set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME})
|
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}")
|
||||||
|
|
||||||
# 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)
|
|
||||||
|
|
||||||
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 (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})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
|
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
|
# Achive *.dll files and directory containing it.
|
||||||
PATHS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}"
|
get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
|
||||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
# Reserve cache variable for *.dll.
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL)
|
||||||
NO_DEFAULT_PATH)
|
set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)")
|
||||||
else()
|
endif()
|
||||||
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
|
# Reserve cache variable for directory containing *.dll file.
|
||||||
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL_DIR)
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
set (3RDPARTY_${LIB_UPPER}_DLL_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.dll)")
|
||||||
endif()
|
endif()
|
||||||
|
if (EXISTS "${TBB_DLL_FILE}")
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_DLL
|
||||||
|
"${TBB_DLL_FILE}"
|
||||||
|
CACHE FILEPATH
|
||||||
|
"${LIB_UPPER} library (*.dll)"
|
||||||
|
FORCE)
|
||||||
|
get_filename_component (TBB_DLL_FILE_DIRECTORY "${TBB_DLL_FILE}" DIRECTORY)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_DLL_DIR
|
||||||
|
"${TBB_DLL_FILE_DIRECTORY}"
|
||||||
|
CACHE PATH
|
||||||
|
"The directory containing ${LIB_UPPER} library (*.dll)"
|
||||||
|
FORCE)
|
||||||
|
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIB_UPPER}_DLL_DIR}")
|
||||||
|
else()
|
||||||
|
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${LIB_UPPER}_DLL_DIR)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
|
# install *.dll (tbb & tbbmalloc)
|
||||||
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH)
|
if (INSTALL_TBB)
|
||||||
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)
|
OCCT_MAKE_OS_WITH_BITNESS()
|
||||||
else()
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
if (SINGLE_GENERATOR)
|
||||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
|
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}")
|
||||||
else()
|
|
||||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR)
|
|
||||||
|
|
||||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_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}")
|
|
||||||
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)
|
|
||||||
|
|
||||||
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 (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})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set (PRODUCT_PATH_SUFFIXES bin bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
|
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}")
|
||||||
endif()
|
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}i")
|
||||||
|
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_BIN}d")
|
||||||
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
|
|
||||||
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_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})
|
|
||||||
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)
|
|
||||||
else()
|
|
||||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
|
||||||
|
|
||||||
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL)
|
||||||
|
endforeach()
|
||||||
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
if (INSTALL_TBB)
|
||||||
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
|
set (USED_3RDPARTY_TBB_DIR "")
|
||||||
else()
|
else()
|
||||||
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
|
# the *.dll/*.so* directory for using by the executable
|
||||||
|
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
message (FATAL_ERROR "Installation directory with TBB is not exist.")
|
||||||
|
endif()
|
||||||
|
else ()
|
||||||
|
# NOT WIN32 branch
|
||||||
|
if ((DEFINED 3RDPARTY_DIR) AND (NOT "${3RDPARTY_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_DIR}"))
|
||||||
|
# Here, we have correct 3RDPARTY_DIR.
|
||||||
|
# Trying to specify TBB folder in connection with 3RDPARTY_DIR
|
||||||
|
if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}"))
|
||||||
|
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
|
||||||
|
if (TBB_DIR_NAME)
|
||||||
|
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if ((NOT "${3RDPARTY_TBB_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_TBB_DIR}"))
|
||||||
|
# Find TBB 2021.5 in existing directory.
|
||||||
|
find_package (
|
||||||
|
TBB 2021.5
|
||||||
|
PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
|
||||||
|
REQUIRED
|
||||||
|
CONFIG)
|
||||||
|
else()
|
||||||
|
# Find TBB 2021.5 in system directory.
|
||||||
|
find_package (
|
||||||
|
TBB 2021.5
|
||||||
|
REQUIRED
|
||||||
|
CONFIG)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# Find TBB 2021.5 in system directory.
|
||||||
|
find_package (
|
||||||
|
TBB 2021.5
|
||||||
|
REQUIRED
|
||||||
|
CONFIG)
|
||||||
|
endif()
|
||||||
|
# TBB has been configured (in other case FATAL_ERROR occures).
|
||||||
|
|
||||||
|
# Achive include directory.
|
||||||
|
get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
|
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||||
|
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
|
||||||
|
endif()
|
||||||
|
if (EXISTS "${TBB_INCLUDE_DIR}")
|
||||||
|
set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE)
|
||||||
|
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||||
|
else()
|
||||||
|
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# install tbb/tbbmalloc
|
|
||||||
if (INSTALL_TBB)
|
|
||||||
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()
|
|
||||||
else()
|
|
||||||
get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${upper_PRODUCT_LIBRARY_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()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
mark_as_advanced (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL)
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
#if (BUILD_SHARED_LIBS)
|
|
||||||
separate_arguments (CSF_TBB)
|
separate_arguments (CSF_TBB)
|
||||||
foreach (LIB IN LISTS CSF_TBB)
|
foreach (LIB IN LISTS CSF_TBB)
|
||||||
TBB_PRODUCT_SEARCH (${LIB})
|
string(TOLOWER "${LIB}" LIB_LOWER)
|
||||||
endforeach()
|
string(TOUPPER "${LIB}" LIB_UPPER)
|
||||||
|
|
||||||
|
# Achive *.so files and directory containing it.
|
||||||
|
get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
|
||||||
|
# Reserve cache variable for *.so.
|
||||||
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)")
|
||||||
|
endif()
|
||||||
|
# Reserve cache variable for directory containing *.so file.
|
||||||
|
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.so)")
|
||||||
|
endif()
|
||||||
|
if (EXISTS "${TBB_SO_FILE}")
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY
|
||||||
|
"${TBB_SO_FILE}"
|
||||||
|
CACHE FILEPATH
|
||||||
|
"${LIB_UPPER} library (*.so)"
|
||||||
|
FORCE)
|
||||||
|
get_filename_component (TBB_SO_FILE_DIRECTORY "${TBB_SO_FILE}" DIRECTORY)
|
||||||
|
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR
|
||||||
|
"${TBB_SO_FILE_DIRECTORY}"
|
||||||
|
CACHE PATH
|
||||||
|
"The directory containing ${LIB_UPPER} library (*.so)"
|
||||||
|
FORCE)
|
||||||
|
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}")
|
||||||
|
else()
|
||||||
|
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# install *.so* (tbb & tbbmalloc)
|
||||||
|
if (INSTALL_TBB)
|
||||||
|
OCCT_MAKE_OS_WITH_BITNESS()
|
||||||
|
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||||
|
|
||||||
|
if (SINGLE_GENERATOR)
|
||||||
|
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} DESTINATION "${INSTALL_DIR_LIB}")
|
||||||
|
else()
|
||||||
|
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_LIB}")
|
||||||
|
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_LIB}i")
|
||||||
|
install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_LIB}d")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
if (INSTALL_TBB)
|
if (INSTALL_TBB)
|
||||||
set (USED_3RDPARTY_TBB_DIR "")
|
set (USED_3RDPARTY_TBB_DIR "")
|
||||||
else()
|
else()
|
||||||
# the library directory for using by the executable
|
# the *.so* directory for using by the executable
|
||||||
if (WIN32)
|
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
||||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
|
|
||||||
else()
|
|
||||||
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
#endif()
|
endif()
|
||||||
|
@@ -116,6 +116,7 @@ endmacro()
|
|||||||
|
|
||||||
BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework")
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework")
|
||||||
BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange")
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange")
|
||||||
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_DETools "DETools")
|
||||||
BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw")
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw")
|
||||||
BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses")
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses")
|
||||||
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms")
|
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms")
|
||||||
|
@@ -780,14 +780,14 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if { "$::tcl_platform(platform)" == "windows" } {
|
if { "$::tcl_platform(platform)" == "windows" } {
|
||||||
set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter"]
|
set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter"]
|
||||||
if { "$aTbbDllPath" == "" } {
|
if { "$aTbbDllPath" == "" } {
|
||||||
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ]
|
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ]
|
||||||
set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"]
|
set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"]
|
||||||
if { "$aTbbDllPath" != "" } {
|
if { "$aTbbDllPath" != "" } {
|
||||||
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib"
|
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib"
|
||||||
} else {
|
} else {
|
||||||
lappend anErrBin$anArchIter "Error: 'tbb.dll' not found (Intel TBB)"
|
lappend anErrBin$anArchIter "Error: 'tbb12.dll' not found (Intel TBB)"
|
||||||
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
179
adm/genproj.tcl
179
adm/genproj.tcl
@@ -1233,28 +1233,11 @@ proc osutils:convertModules { theModules theSrcDir theSourceDirOther theProjects
|
|||||||
lappend aProjectsInModule($aModule) $aToolKit
|
lappend aProjectsInModule($aModule) $aToolKit
|
||||||
lappend aDependencies [LibToLink $aToolKit $theSrcDir $theSourceDirOther]
|
lappend aDependencies [LibToLink $aToolKit $theSrcDir $theSourceDirOther]
|
||||||
}
|
}
|
||||||
# executables, assume one project per cxx file...
|
# executables
|
||||||
foreach aUnit [OS:executable ${aModule}] {
|
foreach aUnit [OS:executable ${aModule}] {
|
||||||
set aUnitLoc $aUnit
|
lappend aProjects $aUnit
|
||||||
set src_files [_get_used_files $aUnit $theSrcDir false]
|
lappend aProjectsInModule($aModule) $aUnit
|
||||||
set aSrcFiles {}
|
lappend aDependencies [LibToLink $aUnit $theSrcDir $theSourceDirOther]
|
||||||
foreach s $src_files {
|
|
||||||
regexp {source ([^\s]+)} $s dummy name
|
|
||||||
lappend aSrcFiles $name
|
|
||||||
}
|
|
||||||
foreach aSrcFile $aSrcFiles {
|
|
||||||
set aFileExtension [file extension $aSrcFile]
|
|
||||||
if { $aFileExtension == ".cxx" } {
|
|
||||||
set aPrjName [file rootname $aSrcFile]
|
|
||||||
lappend aProjects $aPrjName
|
|
||||||
lappend aProjectsInModule($aModule) $aPrjName
|
|
||||||
if {[file isdirectory $path/$theSrcDir/$aUnitLoc]} {
|
|
||||||
lappend aDependencies [LibToLinkX $aUnitLoc [file rootname $aSrcFile] $theSrcDir $theSourceDirOther]
|
|
||||||
} else {
|
|
||||||
lappend aDependencies {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2110,98 +2093,106 @@ proc osutils:tk:execfiles { theFiles theOutDir theCommand thePrefix theExtension
|
|||||||
# Generate Visual Studio project file for executable
|
# Generate Visual Studio project file for executable
|
||||||
proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } {
|
proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } {
|
||||||
set aVcFiles {}
|
set aVcFiles {}
|
||||||
foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] {
|
set aProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 1]
|
||||||
set aProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 1]
|
|
||||||
|
|
||||||
set aProjName [file rootname [file tail $f]]
|
set aProjName $theToolKit
|
||||||
set l_compilable [osutils:compilable wnt]
|
set l_compilable [osutils:compilable wnt]
|
||||||
regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl
|
regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl
|
||||||
|
|
||||||
upvar $theGuidsMap aGuidsMap
|
upvar $theGuidsMap aGuidsMap
|
||||||
if { ! [info exists aGuidsMap($aProjName)] } {
|
if { ! [info exists aGuidsMap($aProjName)] } {
|
||||||
set aGuidsMap($aProjName) [OS:genGUID]
|
set aGuidsMap($aProjName) [OS:genGUID]
|
||||||
}
|
}
|
||||||
regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl
|
regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl
|
||||||
|
|
||||||
set aUsedLibs [list]
|
set aUsedLibs [list]
|
||||||
foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] {
|
foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] {
|
||||||
lappend aUsedLibs "${tkx}.lib"
|
lappend aUsedLibs "${tkx}.lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
set anOsReleaseLibs {}
|
set anOsReleaseLibs {}
|
||||||
set anOsDebugLibs {}
|
set anOsDebugLibs {}
|
||||||
osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true
|
osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true
|
||||||
osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false
|
osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false
|
||||||
|
|
||||||
set aVCRTVer [string range $theVcVer 0 3]
|
set aVCRTVer [string range $theVcVer 0 3]
|
||||||
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
|
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
|
||||||
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
|
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
|
||||||
regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl
|
regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl
|
||||||
|
|
||||||
set aFilesSection ""
|
set aFilesSection ""
|
||||||
set aVcFilesCxx(units) ""
|
set aVcFilesCxx(units) ""
|
||||||
set aVcFilesHxx(units) ""
|
set aVcFilesHxx(units) ""
|
||||||
|
|
||||||
if { ![info exists written([file tail $f])] } {
|
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
|
||||||
set written([file tail $f]) 1
|
foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] {
|
||||||
|
if { ![info exists written([file tail $f])] } {
|
||||||
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
|
set written([file tail $f]) 1
|
||||||
append aFilesSection [osutils:vcxproj:cxxfile $f "" 3]
|
append aFilesSection [osutils:vcxproj:cxxfile $f "" 3]
|
||||||
if { ! [info exists aVcFilesCxx($theToolKit)] } { lappend aVcFilesCxx(units) $theToolKit }
|
if { ! [info exists aVcFilesCxx($theToolKit)] } { lappend aVcFilesCxx(units) $theToolKit }
|
||||||
lappend aVcFilesCxx($theToolKit) $f
|
lappend aVcFilesCxx($theToolKit) $f
|
||||||
} else {
|
} else {
|
||||||
append aFilesSection "\t\t\t<Filter\n"
|
puts "Warning : in vcproj there are more than one occurrences for [file tail $f]"
|
||||||
append aFilesSection "\t\t\t\tName=\"$theToolKit\"\n"
|
|
||||||
append aFilesSection "\t\t\t\t>\n"
|
|
||||||
append aFilesSection [osutils:vcproj:file $theVcVer $f ""]
|
|
||||||
append aFilesSection "\t\t\t</Filter>"
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
puts "Warning : in vcproj there are more than one occurrences for [file tail $f]"
|
|
||||||
}
|
}
|
||||||
#puts "$aProjTmpl $aFilesSection"
|
} else {
|
||||||
set anIncPaths "..\\..\\..\\inc"
|
append aFilesSection "\t\t\t<Filter\n"
|
||||||
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
|
append aFilesSection "\t\t\t\tName=\"$theToolKit\"\n"
|
||||||
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
|
append aFilesSection "\t\t\t\t>\n"
|
||||||
regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl
|
foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] {
|
||||||
|
if { ![info exists written([file tail $f])] } {
|
||||||
|
set written([file tail $f]) 1
|
||||||
|
append aFilesSection [osutils:vcproj:file $theVcVer $f ""]
|
||||||
|
} else {
|
||||||
|
puts "Warning : in vcproj there are more than one occurrences for [file tail $f]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
append aFilesSection "\t\t\t</Filter>"
|
||||||
|
}
|
||||||
|
|
||||||
regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
|
#puts "$aProjTmpl $aFilesSection"
|
||||||
|
set anIncPaths "..\\..\\..\\inc"
|
||||||
|
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
|
||||||
|
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
|
||||||
|
regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl
|
||||||
|
|
||||||
set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
|
regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
|
||||||
|
|
||||||
|
set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
|
||||||
|
fconfigure $aFile -translation crlf
|
||||||
|
puts $aFile $aProjTmpl
|
||||||
|
close $aFile
|
||||||
|
|
||||||
|
set aCommonSettingsFile "$aVcFilePath.user"
|
||||||
|
lappend aVcFiles $aVcFilePath
|
||||||
|
|
||||||
|
# write filters file for vc10
|
||||||
|
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
|
||||||
|
lappend aVcFiles [osutils:vcxproj:filters $theOutDir $aProjName aVcFilesCxx aVcFilesHxx]
|
||||||
|
}
|
||||||
|
|
||||||
|
# write resource file
|
||||||
|
lappend aVcFiles [osutils:readtemplate:rc $theOutDir $aProjName]
|
||||||
|
|
||||||
|
set aCommonSettingsFileTmpl ""
|
||||||
|
if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } {
|
||||||
|
# nothing
|
||||||
|
} elseif { "$theVcVer" == "vc9" } {
|
||||||
|
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"]
|
||||||
|
} else {
|
||||||
|
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"]
|
||||||
|
}
|
||||||
|
if { "$aCommonSettingsFileTmpl" != "" } {
|
||||||
|
regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $aVCRTVer aCommonSettingsFileTmpl
|
||||||
|
|
||||||
|
set aFile [open [set aVcFilePath "$aCommonSettingsFile"] w]
|
||||||
fconfigure $aFile -translation crlf
|
fconfigure $aFile -translation crlf
|
||||||
puts $aFile $aProjTmpl
|
puts $aFile $aCommonSettingsFileTmpl
|
||||||
close $aFile
|
close $aFile
|
||||||
|
|
||||||
set aCommonSettingsFile "$aVcFilePath.user"
|
lappend aVcFiles "$aCommonSettingsFile"
|
||||||
lappend aVcFiles $aVcFilePath
|
|
||||||
|
|
||||||
# write filters file for vc10
|
|
||||||
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
|
|
||||||
lappend aVcFiles [osutils:vcxproj:filters $theOutDir $aProjName aVcFilesCxx aVcFilesHxx]
|
|
||||||
}
|
|
||||||
|
|
||||||
# write resource file
|
|
||||||
lappend aVcFiles [osutils:readtemplate:rc $theOutDir $aProjName]
|
|
||||||
|
|
||||||
set aCommonSettingsFileTmpl ""
|
|
||||||
if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } {
|
|
||||||
# nothing
|
|
||||||
} elseif { "$theVcVer" == "vc9" } {
|
|
||||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"]
|
|
||||||
} else {
|
|
||||||
set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"]
|
|
||||||
}
|
|
||||||
if { "$aCommonSettingsFileTmpl" != "" } {
|
|
||||||
regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $aVCRTVer aCommonSettingsFileTmpl
|
|
||||||
|
|
||||||
set aFile [open [set aVcFilePath "$aCommonSettingsFile"] w]
|
|
||||||
fconfigure $aFile -translation crlf
|
|
||||||
puts $aFile $aCommonSettingsFileTmpl
|
|
||||||
close $aFile
|
|
||||||
|
|
||||||
lappend aVcFiles "$aCommonSettingsFile"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $aVcFiles
|
return $aVcFiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,6 +33,7 @@ set "BUILD_ModelingAlgorithms=ON"
|
|||||||
set "BUILD_Visualization=ON"
|
set "BUILD_Visualization=ON"
|
||||||
set "BUILD_ApplicationFramework=ON"
|
set "BUILD_ApplicationFramework=ON"
|
||||||
set "BUILD_DataExchange=ON"
|
set "BUILD_DataExchange=ON"
|
||||||
|
set "BUILD_DETools=OFF"
|
||||||
|
|
||||||
rem Optional 3rd-party libraries to enable
|
rem Optional 3rd-party libraries to enable
|
||||||
set "USE_FREETYPE=ON"
|
set "USE_FREETYPE=ON"
|
||||||
@@ -166,6 +167,7 @@ if ["%toCMake%"] == ["1"] (
|
|||||||
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
||||||
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
||||||
|
-D BUILD_MODULE_DETools:BOOL="OFF" ^
|
||||||
-D BUILD_MODULE_Draw:BOOL="OFF" ^
|
-D BUILD_MODULE_Draw:BOOL="OFF" ^
|
||||||
-D BUILD_DOC_Overview:BOOL="OFF" ^
|
-D BUILD_DOC_Overview:BOOL="OFF" ^
|
||||||
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
|
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
|
||||||
|
@@ -27,6 +27,7 @@ rem set "BUILD_ModelingAlgorithms=ON"
|
|||||||
rem set "BUILD_Visualization=ON"
|
rem set "BUILD_Visualization=ON"
|
||||||
rem set "BUILD_ApplicationFramework=ON"
|
rem set "BUILD_ApplicationFramework=ON"
|
||||||
rem set "BUILD_DataExchange=ON"
|
rem set "BUILD_DataExchange=ON"
|
||||||
|
rem set "BUILD_MODULE_DETools=OFF"
|
||||||
|
|
||||||
rem Optional 3rd-party libraries to enable
|
rem Optional 3rd-party libraries to enable
|
||||||
rem set "USE_RAPIDJSON=ON"
|
rem set "USE_RAPIDJSON=ON"
|
||||||
|
@@ -33,6 +33,7 @@ rem set BUILD_PATCH=
|
|||||||
|
|
||||||
rem set BUILD_MODULE_ApplicationFramework=ON
|
rem set BUILD_MODULE_ApplicationFramework=ON
|
||||||
rem set BUILD_MODULE_DataExchange=ON
|
rem set BUILD_MODULE_DataExchange=ON
|
||||||
|
rem set BUILD_MODULE_DETools=OFF
|
||||||
rem set BUILD_MODULE_Draw=ON
|
rem set BUILD_MODULE_Draw=ON
|
||||||
rem set BUILD_MODULE_ModelingAlgorithms=ON
|
rem set BUILD_MODULE_ModelingAlgorithms=ON
|
||||||
rem set BUILD_MODULE_ModelingData=ON
|
rem set BUILD_MODULE_ModelingData=ON
|
||||||
|
@@ -26,6 +26,7 @@ FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
|
|||||||
|
|
||||||
#BUILD_MODULE_ApplicationFramework=ON
|
#BUILD_MODULE_ApplicationFramework=ON
|
||||||
#BUILD_MODULE_DataExchange=ON
|
#BUILD_MODULE_DataExchange=ON
|
||||||
|
#BUILD_MODULE_DETools=OFF
|
||||||
#BUILD_MODULE_Draw=ON
|
#BUILD_MODULE_Draw=ON
|
||||||
#BUILD_MODULE_ModelingAlgorithms=ON
|
#BUILD_MODULE_ModelingAlgorithms=ON
|
||||||
#BUILD_MODULE_ModelingData=ON
|
#BUILD_MODULE_ModelingData=ON
|
||||||
|
@@ -28,6 +28,7 @@ set BUILD_FORCE_RelWithDebInfo=OFF
|
|||||||
|
|
||||||
set BUILD_MODULE_ApplicationFramework=ON
|
set BUILD_MODULE_ApplicationFramework=ON
|
||||||
set BUILD_MODULE_DataExchange=ON
|
set BUILD_MODULE_DataExchange=ON
|
||||||
|
set BUILD_MODULE_DETools=OFF
|
||||||
set BUILD_MODULE_Draw=ON
|
set BUILD_MODULE_Draw=ON
|
||||||
set BUILD_MODULE_ModelingAlgorithms=ON
|
set BUILD_MODULE_ModelingAlgorithms=ON
|
||||||
set BUILD_MODULE_ModelingData=ON
|
set BUILD_MODULE_ModelingData=ON
|
||||||
@@ -62,6 +63,7 @@ cmake -G "%arch_compile%" ^
|
|||||||
-D BUILD_LIBRARY_TYPE:STRING=%BUILD_LIBRARY_TYPE% ^
|
-D BUILD_LIBRARY_TYPE:STRING=%BUILD_LIBRARY_TYPE% ^
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL=%BUILD_MODULE_ApplicationFramework% ^
|
-D BUILD_MODULE_ApplicationFramework:BOOL=%BUILD_MODULE_ApplicationFramework% ^
|
||||||
-D BUILD_MODULE_DataExchange:BOOL=%BUILD_MODULE_DataExchange% ^
|
-D BUILD_MODULE_DataExchange:BOOL=%BUILD_MODULE_DataExchange% ^
|
||||||
|
-D BUILD_MODULE_DETools:BOOL=%BUILD_MODULE_DETools% ^
|
||||||
-D BUILD_MODULE_Draw:BOOL=%BUILD_MODULE_Draw% ^
|
-D BUILD_MODULE_Draw:BOOL=%BUILD_MODULE_Draw% ^
|
||||||
-D BUILD_MODULE_FoundationClasses:BOOL=ON ^
|
-D BUILD_MODULE_FoundationClasses:BOOL=ON ^
|
||||||
-D BUILD_MODULE_ModelingAlgorithms:BOOL=%BUILD_MODULE_ModelingAlgorithms% ^
|
-D BUILD_MODULE_ModelingAlgorithms:BOOL=%BUILD_MODULE_ModelingAlgorithms% ^
|
||||||
|
@@ -31,6 +31,7 @@ BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
|
|||||||
|
|
||||||
BUILD_MODULE_ApplicationFramework=ON
|
BUILD_MODULE_ApplicationFramework=ON
|
||||||
BUILD_MODULE_DataExchange=ON
|
BUILD_MODULE_DataExchange=ON
|
||||||
|
BUILD_MODULE_DETools=OFF
|
||||||
BUILD_MODULE_Draw=ON
|
BUILD_MODULE_Draw=ON
|
||||||
BUILD_MODULE_ModelingAlgorithms=ON
|
BUILD_MODULE_ModelingAlgorithms=ON
|
||||||
BUILD_MODULE_ModelingData=ON
|
BUILD_MODULE_ModelingData=ON
|
||||||
@@ -63,6 +64,7 @@ cmake -G "Unix Makefiles" \
|
|||||||
-D BUILD_LIBRARY_TYPE:STRING=$BUILD_LIBRARY_TYPE \
|
-D BUILD_LIBRARY_TYPE:STRING=$BUILD_LIBRARY_TYPE \
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL=$BUILD_MODULE_ApplicationFramework \
|
-D BUILD_MODULE_ApplicationFramework:BOOL=$BUILD_MODULE_ApplicationFramework \
|
||||||
-D BUILD_MODULE_DataExchange:BOOL=$BUILD_MODULE_DataExchange \
|
-D BUILD_MODULE_DataExchange:BOOL=$BUILD_MODULE_DataExchange \
|
||||||
|
-D BUILD_MODULE_DETools:BOOL=$BUILD_MODULE_DETools \
|
||||||
-D BUILD_MODULE_Draw:BOOL=$BUILD_MODULE_Draw \
|
-D BUILD_MODULE_Draw:BOOL=$BUILD_MODULE_Draw \
|
||||||
-D BUILD_MODULE_FoundationClasses:BOOL=ON \
|
-D BUILD_MODULE_FoundationClasses:BOOL=ON \
|
||||||
-D BUILD_MODULE_ModelingAlgorithms:BOOL=$BUILD_MODULE_ModelingAlgorithms \
|
-D BUILD_MODULE_ModelingAlgorithms:BOOL=$BUILD_MODULE_ModelingAlgorithms \
|
||||||
|
@@ -34,6 +34,7 @@ export BUILD_ModelingAlgorithms=ON
|
|||||||
export BUILD_Visualization=ON
|
export BUILD_Visualization=ON
|
||||||
export BUILD_ApplicationFramework=ON
|
export BUILD_ApplicationFramework=ON
|
||||||
export BUILD_DataExchange=ON
|
export BUILD_DataExchange=ON
|
||||||
|
export BUILD_DETools=OFF
|
||||||
|
|
||||||
export USE_FREETYPE=ON
|
export USE_FREETYPE=ON
|
||||||
export USE_FREEIMAGE=OFF
|
export USE_FREEIMAGE=OFF
|
||||||
@@ -148,6 +149,7 @@ function buildArch {
|
|||||||
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
||||||
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
||||||
|
-D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
|
||||||
-D BUILD_MODULE_Draw:BOOL="OFF" \
|
-D BUILD_MODULE_Draw:BOOL="OFF" \
|
||||||
-D BUILD_DOC_Overview:BOOL="OFF" \
|
-D BUILD_DOC_Overview:BOOL="OFF" \
|
||||||
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
|
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
|
||||||
|
@@ -20,6 +20,7 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios"
|
|||||||
#export BUILD_Visualization=ON
|
#export BUILD_Visualization=ON
|
||||||
#export BUILD_ApplicationFramework=ON
|
#export BUILD_ApplicationFramework=ON
|
||||||
#export BUILD_DataExchange=ON
|
#export BUILD_DataExchange=ON
|
||||||
|
#export BUILD_DETools=OFF
|
||||||
|
|
||||||
#export USE_RAPIDJSON=ON
|
#export USE_RAPIDJSON=ON
|
||||||
#export USE_DRACO=ON
|
#export USE_DRACO=ON
|
||||||
|
@@ -34,6 +34,7 @@ export BUILD_ModelingAlgorithms=ON
|
|||||||
export BUILD_Visualization=ON
|
export BUILD_Visualization=ON
|
||||||
export BUILD_ApplicationFramework=ON
|
export BUILD_ApplicationFramework=ON
|
||||||
export BUILD_DataExchange=ON
|
export BUILD_DataExchange=ON
|
||||||
|
export BUILD_DETools=OFF
|
||||||
export BUILD_Draw=ON
|
export BUILD_Draw=ON
|
||||||
|
|
||||||
export USE_FREETYPE=ON
|
export USE_FREETYPE=ON
|
||||||
@@ -145,6 +146,7 @@ function buildArch {
|
|||||||
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
||||||
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
||||||
|
-D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
|
||||||
-D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \
|
-D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \
|
||||||
-D BUILD_DOC_Overview:BOOL="OFF" \
|
-D BUILD_DOC_Overview:BOOL="OFF" \
|
||||||
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
|
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
|
||||||
|
@@ -19,6 +19,7 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos"
|
|||||||
#export BUILD_Visualization=ON
|
#export BUILD_Visualization=ON
|
||||||
#export BUILD_ApplicationFramework=ON
|
#export BUILD_ApplicationFramework=ON
|
||||||
#export BUILD_DataExchange=ON
|
#export BUILD_DataExchange=ON
|
||||||
|
#export BUILD_DETools=OFF
|
||||||
#export BUILD_Draw=ON
|
#export BUILD_Draw=ON
|
||||||
|
|
||||||
#export USE_RAPIDJSON=ON
|
#export USE_RAPIDJSON=ON
|
||||||
|
@@ -32,6 +32,7 @@ set "BUILD_ModelingAlgorithms=ON"
|
|||||||
set "BUILD_Visualization=ON"
|
set "BUILD_Visualization=ON"
|
||||||
set "BUILD_ApplicationFramework=ON"
|
set "BUILD_ApplicationFramework=ON"
|
||||||
set "BUILD_DataExchange=ON"
|
set "BUILD_DataExchange=ON"
|
||||||
|
set "BUILD_DETools=OFF"
|
||||||
set "BUILD_Draw=ON"
|
set "BUILD_Draw=ON"
|
||||||
|
|
||||||
rem Optional 3rd-party libraries to enable
|
rem Optional 3rd-party libraries to enable
|
||||||
@@ -155,6 +156,7 @@ if ["%toCMake%"] == ["1"] (
|
|||||||
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
||||||
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
||||||
|
-D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^
|
||||||
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
|
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
|
||||||
-D 3RDPARTY_TCL_DIR:PATH="%aTclTk%" ^
|
-D 3RDPARTY_TCL_DIR:PATH="%aTclTk%" ^
|
||||||
-D 3RDPARTY_TCL_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^
|
-D 3RDPARTY_TCL_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^
|
||||||
|
@@ -22,6 +22,7 @@ rem set "BUILD_ModelingAlgorithms=ON"
|
|||||||
rem set "BUILD_Visualization=ON"
|
rem set "BUILD_Visualization=ON"
|
||||||
rem set "BUILD_ApplicationFramework=ON"
|
rem set "BUILD_ApplicationFramework=ON"
|
||||||
rem set "BUILD_DataExchange=ON"
|
rem set "BUILD_DataExchange=ON"
|
||||||
|
rem set "BUILD_DETools=OFF"
|
||||||
rem set "BUILD_Draw=ON"
|
rem set "BUILD_Draw=ON"
|
||||||
|
|
||||||
rem set "USE_RAPIDJSON=ON"
|
rem set "USE_RAPIDJSON=ON"
|
||||||
|
@@ -32,6 +32,7 @@ set "BUILD_ModelingAlgorithms=ON"
|
|||||||
set "BUILD_Visualization=ON"
|
set "BUILD_Visualization=ON"
|
||||||
set "BUILD_ApplicationFramework=ON"
|
set "BUILD_ApplicationFramework=ON"
|
||||||
set "BUILD_DataExchange=ON"
|
set "BUILD_DataExchange=ON"
|
||||||
|
set "BUILD_DETools=OFF"
|
||||||
set "BUILD_Draw=OFF"
|
set "BUILD_Draw=OFF"
|
||||||
|
|
||||||
rem Optional 3rd-party libraries to enable
|
rem Optional 3rd-party libraries to enable
|
||||||
@@ -175,6 +176,7 @@ if ["%toCMake%"] == ["1"] (
|
|||||||
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
|
||||||
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
|
||||||
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
|
||||||
|
-D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^
|
||||||
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
|
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
|
||||||
-D BUILD_DOC_Overview:BOOL="OFF" ^
|
-D BUILD_DOC_Overview:BOOL="OFF" ^
|
||||||
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
|
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
|
||||||
|
@@ -20,6 +20,7 @@ export BUILD_ModelingAlgorithms=ON
|
|||||||
export BUILD_Visualization=ON
|
export BUILD_Visualization=ON
|
||||||
export BUILD_ApplicationFramework=ON
|
export BUILD_ApplicationFramework=ON
|
||||||
export BUILD_DataExchange=ON
|
export BUILD_DataExchange=ON
|
||||||
|
export BUILD_DETools=OFF
|
||||||
|
|
||||||
if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then
|
if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then
|
||||||
. "${aScriptDir}/wasm_custom.sh"
|
. "${aScriptDir}/wasm_custom.sh"
|
||||||
@@ -74,6 +75,7 @@ echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
|
|||||||
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
||||||
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
||||||
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
||||||
|
-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
|
||||||
-DBUILD_MODULE_Draw:BOOL="OFF" \
|
-DBUILD_MODULE_Draw:BOOL="OFF" \
|
||||||
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
|
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
|
||||||
|
|
||||||
@@ -92,6 +94,7 @@ cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
|
|||||||
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
|
||||||
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
|
||||||
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
|
||||||
|
-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \
|
||||||
-DBUILD_MODULE_Draw:BOOL="OFF" \
|
-DBUILD_MODULE_Draw:BOOL="OFF" \
|
||||||
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
|
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@ rem set "BUILD_ModelingAlgorithms=ON"
|
|||||||
rem set "BUILD_Visualization=ON"
|
rem set "BUILD_Visualization=ON"
|
||||||
rem set "BUILD_ApplicationFramework=ON"
|
rem set "BUILD_ApplicationFramework=ON"
|
||||||
rem set "BUILD_DataExchange=ON"
|
rem set "BUILD_DataExchange=ON"
|
||||||
|
rem set "BUILD_DETools=OFF"
|
||||||
|
|
||||||
rem set "USE_RAPIDJSON=ON"
|
rem set "USE_RAPIDJSON=ON"
|
||||||
rem set "USE_DRACO=ON"
|
rem set "USE_DRACO=ON"
|
||||||
|
@@ -14,3 +14,4 @@ export EMSDK_ROOT="$aSrcRoot/../emsdk"
|
|||||||
#export BUILD_Visualization=ON
|
#export BUILD_Visualization=ON
|
||||||
#export BUILD_ApplicationFramework=ON
|
#export BUILD_ApplicationFramework=ON
|
||||||
#export BUILD_DataExchange=ON
|
#export BUILD_DataExchange=ON
|
||||||
|
#export BUILD_DETools=OFF
|
||||||
|
@@ -14,6 +14,7 @@ if /I "%VCVER%" == "@COMPILER@" (
|
|||||||
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
||||||
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
|
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
|
||||||
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
|
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
|
||||||
|
set "JEMALLOC_DIR=@3RDPARTY_JEMALLOC_LIBRARY_DIR@"
|
||||||
set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
|
set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
|
||||||
|
|
||||||
if not "@3RDPARTY_QT_DIR@" == "" (
|
if not "@3RDPARTY_QT_DIR@" == "" (
|
||||||
|
@@ -12,6 +12,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
|||||||
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
|
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
|
||||||
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
|
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
|
||||||
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
|
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
|
||||||
|
export JEMALLOC_DIR="@3RDPARTY_JEMALLOC_LIBRARY_DIR@"
|
||||||
|
|
||||||
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
|
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
|
||||||
export QTDIR="@3RDPARTY_QT_DIR@"
|
export QTDIR="@3RDPARTY_QT_DIR@"
|
||||||
|
@@ -16,6 +16,7 @@ if /I "%VCVER%" == "@COMPILER@" (
|
|||||||
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
||||||
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
||||||
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
|
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
|
||||||
|
set "JEMALLOC_DIR=@USED_3RDPARTY_JEMALLOC_DIR@"
|
||||||
set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@"
|
set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@"
|
||||||
|
|
||||||
if not "@USED_3RDPARTY_QT_DIR@" == "" (
|
if not "@USED_3RDPARTY_QT_DIR@" == "" (
|
||||||
|
@@ -12,6 +12,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
|||||||
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 FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@"
|
export FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@"
|
||||||
|
export JEMALLOC_DIR="@USED_3RDPARTY_JEMALLOC_DIR@"
|
||||||
|
|
||||||
if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then
|
if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then
|
||||||
export QTDIR="@USED_3RDPARTY_QT_DIR@"
|
export QTDIR="@USED_3RDPARTY_QT_DIR@"
|
||||||
|
@@ -154,6 +154,7 @@ if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%"
|
|||||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||||
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||||
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
|
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
|
||||||
|
if not ["%JEMALLOC_DIR%"] == [""] set "PATH=%JEMALLOC_DIR%;%PATH%"
|
||||||
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
|
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
|
||||||
|
|
||||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||||
|
@@ -69,6 +69,10 @@ if [ "$FFMPEG_DIR" != "" ]; then
|
|||||||
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
|
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$JEMALLOC_DIR" != "" ]; then
|
||||||
|
THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$QTDIR" != "" ]; then
|
if [ "$QTDIR" != "" ]; then
|
||||||
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
|
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
@@ -71,6 +71,10 @@ if [ "$FFMPEG_DIR" != "" ]; then
|
|||||||
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
|
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$JEMALLOC_DIR" != "" ]; then
|
||||||
|
THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$QTDIR" != "" ]; then
|
if [ "$QTDIR" != "" ]; then
|
||||||
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
|
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
@@ -45,6 +45,7 @@ user_guides/visualization/visualization.md
|
|||||||
user_guides/iges/iges.md
|
user_guides/iges/iges.md
|
||||||
user_guides/step/step.md
|
user_guides/step/step.md
|
||||||
user_guides/xde/xde.md
|
user_guides/xde/xde.md
|
||||||
|
user_guides/de_wrapper/de_wrapper.md
|
||||||
user_guides/ocaf/ocaf.md
|
user_guides/ocaf/ocaf.md
|
||||||
user_guides/draw_test_harness/draw_test_harness.md
|
user_guides/draw_test_harness/draw_test_harness.md
|
||||||
user_guides/inspector/inspector.md
|
user_guides/inspector/inspector.md
|
||||||
|
@@ -20,6 +20,7 @@ user_guides/vis/vis.md
|
|||||||
user_guides/iges/iges.md
|
user_guides/iges/iges.md
|
||||||
user_guides/step/step.md
|
user_guides/step/step.md
|
||||||
user_guides/xde/xde.md
|
user_guides/xde/xde.md
|
||||||
|
user_guides/de_wrapper/de_wrapper.md
|
||||||
user_guides/inspector/inspector.md
|
user_guides/inspector/inspector.md
|
||||||
user_guides/draw_test_harness/draw_test_harness.md
|
user_guides/draw_test_harness/draw_test_harness.md
|
||||||
|
|
||||||
|
17
dox/build/build_3rdparty/building_3rdparty.md
vendored
17
dox/build/build_3rdparty/building_3rdparty.md
vendored
@@ -128,8 +128,9 @@ You can download its sources from https://freetype.org/
|
|||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
||||||
|
|
||||||
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
|
||||||
Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Windows platform.
|
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Windows platform.
|
||||||
|
To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-win.zip`)
|
||||||
|
|
||||||
Unpack the downloaded archive of TBB product into the `3rdparty` folder.
|
Unpack the downloaded archive of TBB product into the `3rdparty` folder.
|
||||||
|
|
||||||
@@ -304,9 +305,9 @@ Download the necessary archive from https://freetype.org/ and unpack it.
|
|||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
|
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
|
||||||
|
|
||||||
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
|
||||||
Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
|
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Linux platform.
|
||||||
To install, unpack the downloaded archive of TBB product.
|
To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-lin.tgz`).
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
|
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
|
||||||
|
|
||||||
@@ -477,9 +478,9 @@ Download the necessary archive from https://freetype.org/ and unpack it.
|
|||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB
|
@subsection dev_guides__building_3rdparty_osx_3_1 TBB
|
||||||
|
|
||||||
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
|
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
|
||||||
Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Mac OS X platform.
|
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Mac OS X platform.
|
||||||
To install, unpack the downloaded archive of TBB product (`tbb30_018oss_osx.tgz`).
|
To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-mac.tgz`).
|
||||||
|
|
||||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage
|
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ On Linux and macOS we recommend to use libraries maintained by distributive deve
|
|||||||
@section build_occt_win_cmake Building with CMake tool
|
@section build_occt_win_cmake Building with CMake tool
|
||||||
|
|
||||||
This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources.
|
This chapter describes the [CMake](https://cmake.org/download/)-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.
|
OCCT requires CMake version 3.1 or later.
|
||||||
|
|
||||||
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).
|
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).
|
||||||
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
|
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
|
||||||
@@ -113,6 +113,7 @@ The following table gives the full list of environment variables used at the con
|
|||||||
| 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_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 | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. |
|
| BUILD_WITH_DEBUG | Boolean | 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 | 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. |
|
| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean | 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. |
|
||||||
|
| BUILD_CPP_STANDARD | String | Employ corresponding c++ standard (C++11, C++14, ..C++23) for building OCCT |
|
||||||
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
|
| 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 | 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_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
|
||||||
|
@@ -725,7 +725,7 @@ Another possible problem is the order of initialization of global variables defi
|
|||||||
|
|
||||||
Avoid explicit usage of basic types (*int*, *float*, *double*, etc.), use Open CASCADE Technology types from package *Standard: Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString* and others or a specific *typedef* instead.
|
Avoid explicit usage of basic types (*int*, *float*, *double*, etc.), use Open CASCADE Technology types from package *Standard: Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString* and others or a specific *typedef* instead.
|
||||||
|
|
||||||
### Use *sizeof()* to calculate sizes [MANDATORY]
|
### Use sizeof() to calculate sizes [MANDATORY]
|
||||||
|
|
||||||
Do not assume sizes of types. Use *sizeof()* instead to calculate sizes.
|
Do not assume sizes of types. Use *sizeof()* instead to calculate sizes.
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ It is recommended to follow this rule for any plain text files for consistency a
|
|||||||
|
|
||||||
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
|
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
|
||||||
|
|
||||||
### Use *OSD::SetSignal()* to catch exceptions
|
### Use OSD::SetSignal() to catch exceptions
|
||||||
|
|
||||||
When using Open CASCADE Technology in an application, call *OSD::SetSignal()* function when the application is initialized.
|
When using Open CASCADE Technology in an application, call *OSD::SetSignal()* function when the application is initialized.
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ See the following example:
|
|||||||
|
|
||||||
In C++ use *new* and *delete* operators instead of *malloc()* and *free()*. Try not to mix different memory allocation techniques.
|
In C++ use *new* and *delete* operators instead of *malloc()* and *free()*. Try not to mix different memory allocation techniques.
|
||||||
|
|
||||||
### Match *new* and *delete* [MANDATORY]
|
### Match new and delete [MANDATORY]
|
||||||
|
|
||||||
Use the same form of new and delete.
|
Use the same form of new and delete.
|
||||||
|
|
||||||
@@ -812,7 +812,7 @@ Standard_Integer aTmpVar2 = 0; // OK
|
|||||||
|
|
||||||
Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is guaranteed by subsequent code.
|
Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is guaranteed by subsequent code.
|
||||||
|
|
||||||
### Do not hide global *new*
|
### Do not hide global new
|
||||||
|
|
||||||
Avoid hiding the global *new* operator.
|
Avoid hiding the global *new* operator.
|
||||||
|
|
||||||
|
@@ -1089,10 +1089,10 @@ This group allows testing extended data exchange packages.
|
|||||||
| Draw | TKDraw, TKTopTest, TKViewerTest, TKXSDRAW, TKDCAF, TKXDEDRAW, TKTObjDRAW, TKQADraw, DRAWEXE, Problems of testing system | draw |
|
| Draw | TKDraw, TKTopTest, TKViewerTest, TKXSDRAW, TKDCAF, TKXDEDRAW, TKTObjDRAW, TKQADraw, DRAWEXE, Problems of testing system | draw |
|
||||||
| Shape Healing | TKShHealing | heal |
|
| Shape Healing | TKShHealing | heal |
|
||||||
| Mesh | TKMesh, TKXMesh | mesh |
|
| Mesh | TKMesh, TKXMesh | mesh |
|
||||||
| Data Exchange | TKIGES | iges |
|
| Data Exchange | TKDEIGES | iges |
|
||||||
| Data Exchange | TKSTEPBase, TKSTEPAttr, TKSTEP209, TKSTEP | step |
|
| Data Exchange | TKDESTEP | step |
|
||||||
| Data Exchange | TKSTL, TKVRML | stlvrml |
|
| Data Exchange | TKDESTL, TKDEVRML | stlvrml |
|
||||||
| Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXDEIGES, TKXDESTEP, TKXmlXCAF, TKBinXCAF | xde |
|
| Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXmlXCAF, TKBinXCAF | xde |
|
||||||
| Foundation Classes | TKernel, TKMath | fclasses |
|
| Foundation Classes | TKernel, TKMath | fclasses |
|
||||||
| Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg |
|
| Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg |
|
||||||
| Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata |
|
| Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata |
|
||||||
|
@@ -341,7 +341,7 @@ The tables below describe the recommended software configurations for which OCCT
|
|||||||
|
|
||||||
| OS | Compiler |
|
| OS | Compiler |
|
||||||
| --------- | ----------- |
|
| --------- | ----------- |
|
||||||
| Windows | Microsoft Visual Studio: 2013 Update 5, 2015 Update 3, 2017 <sup>1</sup>, 2019, 2022 <br>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
|
| Windows | Microsoft Visual Studio: 2015 Update 3, 2017 <sup>1</sup>, 2019, 2022 <br>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
|
||||||
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
|
||||||
| OS X / macOS | XCode 6 or newer |
|
| OS X / macOS | XCode 6 or newer |
|
||||||
| Android | NDK r12, GNU gcc 4.9 or newer |
|
| Android | NDK r12, GNU gcc 4.9 or newer |
|
||||||
@@ -359,8 +359,8 @@ https://dev.opencascade.org/resources/download/3rd-party-components
|
|||||||
|
|
||||||
| Component | Where to find | Used for | Purpose |
|
| Component | Where to find | Used for | Purpose |
|
||||||
| --------- | ------------- | -------- | -------------------- |
|
| --------- | ------------- | -------- | -------------------- |
|
||||||
| CMake 2.8+ | https://cmake.org/ | Configuration | Build from sources |
|
| CMake 3.1+ | https://cmake.org/ | Configuration | Build from sources |
|
||||||
| Intel TBB 4.x or later | https://oneapi-src.github.io/oneTBB/ | All | Parallelization of algorithms (alternative to built-in thread pool) |
|
| Intel oneTBB 2021.5.0 | https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0 | All | Parallelization of algorithms (alternative to built-in thread pool) |
|
||||||
| OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer |
|
| OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer |
|
||||||
| OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer |
|
| OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer |
|
||||||
| FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Text rendering in 3D Viewer |
|
| FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Text rendering in 3D Viewer |
|
||||||
@@ -572,8 +572,7 @@ FreeType 2 is released under two open-source licenses: BSD-like FreeType License
|
|||||||
It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert.
|
It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert.
|
||||||
Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that
|
Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that
|
||||||
abstracts platform details and threading mechanisms for scalability and performance.
|
abstracts platform details and threading mechanisms for scalability and performance.
|
||||||
TBB version 2017 is available under Apache 2.0 license, while older versions
|
Intel oneTBB 2021.5.0 is available under Apache 2.0 license (https://www.threadingbuildingblocks.org).
|
||||||
until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org).
|
|
||||||
|
|
||||||
**OpenGL** is an industry standard API for 3D graphics used by OCCT for
|
**OpenGL** is an industry standard API for 3D graphics used by OCCT for
|
||||||
implementation of 3D viewer. OpenGL specification is developed by the
|
implementation of 3D viewer. OpenGL specification is developed by the
|
||||||
|
@@ -7,7 +7,7 @@ Upgrade from older OCCT versions {#occt__upgrade}
|
|||||||
|
|
||||||
This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones.
|
This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones.
|
||||||
|
|
||||||
@ref upgrade_occt770 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.7.0)"
|
@ref upgrade_occt780 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.8.0)"
|
||||||
|
|
||||||
@subsection upgrade_intro_precautions Precautions
|
@subsection upgrade_intro_precautions Precautions
|
||||||
|
|
||||||
@@ -2338,3 +2338,74 @@ or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hx
|
|||||||
|
|
||||||
Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed.
|
Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed.
|
||||||
Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`.
|
Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`.
|
||||||
|
|
||||||
|
@subsection upgrade_occt770_shapeproximity BRepExtrema_ShapeProximity
|
||||||
|
|
||||||
|
A new way of using the `BRepExtrema_ShapeProximity` class was provided for computing a proximity value between two shapes.
|
||||||
|
If at initialization of the `BRepExtrema_ShapeProximity` class the *theTolerance* parameter is not defined (Precision::Infinite() by default), the proximity value will be computed.
|
||||||
|
|
||||||
|
@section upgrade_occt780 Upgrade to OCCT 7.8.0
|
||||||
|
|
||||||
|
@subsection upgrade_780_recommendations New Features and Recommendations
|
||||||
|
|
||||||
|
The NCollection containers have been modernized to work with move semantics through the new `Move operator` and `Move constructor`. It is recommended to leverage this functionality in the development process.<br />
|
||||||
|
Backward compatibility with STL allocators has been implemented to use the OCCT memory manager with STL allocators (NCollection_Allocator, NCollection_OccAllocator).<br />
|
||||||
|
Additionally, utilities have been introduced to work with `shared_ptr` and `unique_ptr` using the OCCT memory manager (`Standard_MemoryUtils.hxx`).
|
||||||
|
|
||||||
|
@subsection upgrade_780_ncollection_update Change in Default Clear Behavior for Containers
|
||||||
|
|
||||||
|
NCollection container's `Clear(const bool theReleaseMemory = true)` have been changed to `Clear(const bool theReleaseMemory = false)`.<br />
|
||||||
|
Impacted classes include `IndexedMap`, `IndexedDataMap`, `Map`, `DataMap`, `DynamicArray(Vector)`, `IncAllocator`.<br />
|
||||||
|
This means that allocated memory for the container will be reused. In this case, it's necessary to be careful with `IncAllocator::Reset()` to control owners of memory blocks.
|
||||||
|
|
||||||
|
@subsection upgrade_780_hash_utils Reworked Hash Mechanism for Hash Map (NCollection's map)
|
||||||
|
|
||||||
|
The `HashCode(value, upperBound)` static method has been removed and `IsEqual(value1, value2)` is no longer used in the map.<br />
|
||||||
|
NCollection's map now operates on an STL-like hash mechanism: a struct with a public operator `size_t operator()(object&) const` and `bool operator(object&, object&) const`.<br />
|
||||||
|
The difference between STL and OCCT is that the hash struct and comparator are combined into a single struct to reduce conflicts on OCCT's user side.<br />
|
||||||
|
Hash utils have been implemented to hash objects, returning `uint32_t` and `uint64_t` depending on the template (`Standard_HashUtils.hxx`). Algorithms used are `MurmurHash` and `FNVHash`.<br />
|
||||||
|
Benefits:
|
||||||
|
* x64 using 8 bytes to store the hash instead of 4 bytes.
|
||||||
|
* OCCT classes will now be usable as elements in STL `unordered_map` and `unordered_set`.
|
||||||
|
|
||||||
|
The migration problem will occur at compile time. Make sure that `int HashCode` has been changed anywhere to `size operator` and `bool IsEqual` to `bool operator`.
|
||||||
|
|
||||||
|
@subsection upgrade_780_removed_files Removed Hash Specialization Classes
|
||||||
|
|
||||||
|
The majority of include files containing only specialized hashes have been removed.
|
||||||
|
Their functionality has been consolidated into the hashed object include file (in the "std" namespace).<br />
|
||||||
|
It is guaranteed that each removed hash class has been transferred to the native hash mechanism of the hashed class.
|
||||||
|
|
||||||
|
The migration problem may arise at compile time. Ensure that you remove any files that have been deprecated.
|
||||||
|
|
||||||
|
@subsection upgrade_780_tk_rework Reorganized DE TK
|
||||||
|
|
||||||
|
DE TK components have been combined or separated based on specific CAD formats to support plug-in ability.
|
||||||
|
* Components now have a "TKDE" prefix. The available list includes `TKDESTEP`, `TKDEOBJ`, `TKDEIGES`, `TKDEGLTF`, `TKDEVRML`, `TKDEPLY`, `TKDESTL`.
|
||||||
|
* The DE DRAW TK has been updated in a similar way: DRAW components now have a "TKXSDRAW" prefix. The available list includes `TKXSDRAWSTEP`, `TKXSDRAWOBJ`, `TKXSDRAWIGES`, `TKXSDRAWGLTF`, `TKXSDRAWVRML`, `TKXSDRAWPLY`, `TKXSDRAWSTL`.
|
||||||
|
|
||||||
|
Migration problems may occur during configuration time or compile time. Ensure that you update your project configuration accordingly.
|
||||||
|
|
||||||
|
@subsection upgrade_780_step_thread_safety Implemented STEP Thread-safety Interface
|
||||||
|
|
||||||
|
The STEP interface now uses Static_Interface to extract exchange settings.<br />
|
||||||
|
A new ability has been implemented to determine parameters in STEP, avoiding Static_Interface.
|
||||||
|
* For reading, use an additional argument with STEP's parameters in `ReadFile` or `Perform`.
|
||||||
|
* For writing, use an additional argument with STEP's parameters in `Transfer` or `Perform`.
|
||||||
|
|
||||||
|
@subsection upgrade_780_new_memory_manager New Memory Management Functionality
|
||||||
|
|
||||||
|
`Standard.hxx` has a new method `AllocateOptimal` for allocating without post-processing (cleaning).<br />
|
||||||
|
New profiles to allocate memory (defined at configuration time):
|
||||||
|
* `Native` - allocates with standard `malloc` and `calloc` functionality, performance depends on the OS.
|
||||||
|
* `TBB` - allocates with TBB's `scalable` allocator functionality.
|
||||||
|
* `JeMalloc` - allocates with `jemalloc` functions.
|
||||||
|
* `Flexible` - old-way allocation which defines allocation method in real-time by environment variables.<br />
|
||||||
|
|
||||||
|
The most recommended manager is `JeMalloc`. To use it with a plugin system, like `DRAW`, please ensure that JeMalloc was built with the `--disable-initial-exec-tls` flag. For more details, visit [JeMalloc](http://jemalloc.net/).
|
||||||
|
|
||||||
|
@subsection upgrade_780_optimization_profiles New CMake Variable for Optimization Profiles
|
||||||
|
|
||||||
|
`BUILD_OPT_PROFILE` is a new variable to define optimization level. Available profiles:
|
||||||
|
* `Default` - specializes only in quality-dependent parameters for the compiler.
|
||||||
|
* `Production` - specializes in performance and quality-dependent parameters for the compiler and linker.
|
||||||
|
413
dox/user_guides/de_wrapper/de_wrapper.md
Normal file
413
dox/user_guides/de_wrapper/de_wrapper.md
Normal file
@@ -0,0 +1,413 @@
|
|||||||
|
Data Exchange Wrapper (DE_Wrapper) {#occt_user_guides__de_wrapper}
|
||||||
|
============================
|
||||||
|
|
||||||
|
@tableofcontents
|
||||||
|
|
||||||
|
@section occt_de_wrapper_1 Introduction
|
||||||
|
|
||||||
|
This guide explains how to use the **Data Exchange Wrapper** (DE Wrapper).
|
||||||
|
It provides basic directions on setup, usage and file creation via DE_Wrapper.
|
||||||
|
|
||||||
|
The Data Exchange Wrapper (DE Wrapper) module allows reading and writing supported CAD formats to shape objects or special XDE documents, setting up the transfer process for all CAD files.
|
||||||
|
|
||||||
|
It is also possible to add support for new CAD formats by prototyping existing tools.
|
||||||
|
|
||||||
|
The DE Wrapper component requires @ref occt_user_guides__xde "XDE" toolkit for operation.
|
||||||
|
|
||||||
|
This guide mainly explains how to convert CAD files to Open CASCADE Technology (OCCT) shapes and vice versa.
|
||||||
|
This guide principally deals with the following OCCT classes:
|
||||||
|
* The Provider class, which loads CAD files and translates their contents to OCCT shapes or XDE documents, or translates OCCT shapes or XDE documents to CAD entities and then writes those entities to a CAD file.
|
||||||
|
* The Configuration class, which contains all information for the transfer process, such as the units, tolerance, and all internal information for the OCC readers or writers.
|
||||||
|
* The wrapper class, which contains all loaded configuration objects with own CAD format, reads or writes CAD files in the format derived from file extension or contents and saves or loads configuration settings for loaded configuration objects.
|
||||||
|
|
||||||
|
@section occt_de_wrapper_2 Supported CAD formats
|
||||||
|
|
||||||
|
| CAD format | Extensions | RW support | Thread Safety | Presentation | Package |
|
||||||
|
| :--------- | :--------- | :--------- | :----------- | :----------- | :------ |
|
||||||
|
| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | STEPCAFControl |
|
||||||
|
| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAFCascade |
|
||||||
|
| BREP | .brep | RW | Yes | BRep, Mesh | DEBRepCascade |
|
||||||
|
| IGES | .igs, .iges | RW | No | BRep | IGESCAFControl |
|
||||||
|
| OBJ | .obj | RW | Yes | Mesh | RWObj |
|
||||||
|
| STL | .stl | RW | Yes | Mesh | RWStl |
|
||||||
|
| PLY | .ply | W | Yes | Mesh | RWPly |
|
||||||
|
| GLTF | .glTF .glb | RW | Yes | Mesh | RWGltf |
|
||||||
|
| VRML | .wrl .vrml | RW | Yes | Mesh | Vrml |
|
||||||
|
|
||||||
|
**Note** :
|
||||||
|
* The format names in the first column match the FormatName values used for configuration nodes.
|
||||||
|
* The VendorName for all listed CAD formats is "OCC".
|
||||||
|
|
||||||
|
@section occt_de_wrapper_3 DE Session Configuration
|
||||||
|
|
||||||
|
Any providers can have their own read/write parameters. The transfer process is set up using DE configuration nodes, which hold all relevant parameters. There are two ways to change the parameter values: directly from code or by an external resource file/string.
|
||||||
|
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and specilal global parameters.
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_3_1 Getting a DE session. Code sample
|
||||||
|
|
||||||
|
Working with a DE session requires a DE_Wrapper object to be loaded or created first.
|
||||||
|
|
||||||
|
Getting the global DE_Wrapping object:
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
~~~~
|
||||||
|
Creating a local DE_Wrapper:
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = new DE_Wrapper();
|
||||||
|
~~~~
|
||||||
|
It is recommended to create a local one-time copy to work with the session, if no global changes are intended.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aOneTimeSession = aSession->Copy();
|
||||||
|
~~~~
|
||||||
|
@subsection occt_de_wrapper_3_2 Configuration resource
|
||||||
|
|
||||||
|
Configuration resource is an external file or string of the following format:
|
||||||
|
~~~~{.cpp}
|
||||||
|
global.priority.STEP : OCC DTK
|
||||||
|
global.general.length.unit : 1
|
||||||
|
provider.STEP.OCC.read.precision.val : 0.0001
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_2_1 Configuration resource: graph of scopes
|
||||||
|
* **global.** is a scope of global parameters
|
||||||
|
* **priority.** is a scope of priority to use vendors with their providers.
|
||||||
|
* **general.** is a scope of global configuration parameter values
|
||||||
|
* <strong>"..."</strong> is an internal configuration with any internal scopes
|
||||||
|
* <strong>". : "</strong> is a separator of key-value
|
||||||
|
* __...__ parameter value, can't contain new line symbols.
|
||||||
|
* **provider.** is a scope of configuration providers
|
||||||
|
* **STEP.** is a scope of CAD format to configure
|
||||||
|
* **OCC.** is a scope of a vendor or provider
|
||||||
|
* <strong>"..."</strong> is an internal configuration with any internal scopes
|
||||||
|
* <strong>". : "</strong> is a separator of key-value
|
||||||
|
* <strong>"..."</strong> parameter value, can't contain new line symbols.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_2_2 Loading configuration resources. Configuring DE Session
|
||||||
|
|
||||||
|
The resource should be loaded after the registration of all providers that should be configured. The resource only impacts registered parameters. To configure a new registered provider it is necessary to load the resource again. Parameters not present in the resource will remain unchanged.
|
||||||
|
|
||||||
|
There are two ways to check what parameters are available:
|
||||||
|
* C++: Open ConfigureNode file and check the InternalParameter field. Each parameter will be described with a comment. To check the global parameters, use the DE_Wrapper class public methods.
|
||||||
|
* Resource: Register all available Nodes to the session, then save the configuration and view all existing parameters.
|
||||||
|
|
||||||
|
There are two options for loading a resource: recursive and global parameters only. Recursive is the default option to configure all global parameters (units, priority, enable status) and all registered providers. Non-recursive configures only global parameters and ignores all provider settings. This option is the best for updating provider priority.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_2_3 Loading configuration resources. Code sample
|
||||||
|
|
||||||
|
Configuring using a resource string:
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aString =
|
||||||
|
"global.priority.STEP : OCC DTK\n"
|
||||||
|
"global.general.length.unit : 1\n"
|
||||||
|
"provider.STEP.OCC.read.precision.val : 0.\n";
|
||||||
|
Standard_Boolean aIsRecursive = Standard_True;
|
||||||
|
if (!aSession->Load(aString, aIsRecursive))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: configuration is incorrect";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
Configuring using a resource file:
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "";
|
||||||
|
Standard_Boolean aIsRecursive = Standard_True;
|
||||||
|
if (!aSession->Load(aPathToFile, aIsRecursive))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: configuration is incorrect";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
@subsubsection occt_de_wrapper_3_2_4 Loading configuration resources. DRAW sample
|
||||||
|
|
||||||
|
Configuring using a resource string:
|
||||||
|
~~~~{.cpp}
|
||||||
|
set conf "
|
||||||
|
global.priority.STEP : OCC
|
||||||
|
global.general.length.unit : 1
|
||||||
|
provider.STEP.OCC.read.iges.bspline.continuity : 1
|
||||||
|
provider.STEP.OCC.read.precision.mode : 0
|
||||||
|
provider.STEP.OCC.read.precision.val : 0.0001
|
||||||
|
"
|
||||||
|
LoadConfiguration ${conf} -recursive on
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Configuring using a resource file:
|
||||||
|
~~~~{.cpp}
|
||||||
|
set pathToFile ""
|
||||||
|
LoadConfiguration ${pathToFile} -recursive on
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_2_5 Saving configuration resources. Dump of configuration DE Session
|
||||||
|
|
||||||
|
Saving the configuration of a DE Session involves dumping all parameters of registered providers.
|
||||||
|
If a parameter did not change during the session, its value remains as default.
|
||||||
|
|
||||||
|
There are two ways to save a resource: recursive and global parameters only. Recursive is the way to dump all registered provider information. Non-recursive dumps only global parameters, for example, save priority of vendors or the length unit.
|
||||||
|
|
||||||
|
It is possible to filter what vendors or providers to save by providing the correct name of the vendor or provider.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_2_6 Saving configuration resources. Code sample
|
||||||
|
|
||||||
|
Dump to resource string. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TColStd_ListOfAsciiString aFormats;
|
||||||
|
TColStd_ListOfAsciiString aVendors;
|
||||||
|
aFormats.Appends("STEP");
|
||||||
|
aVendors.Appends("OCC");
|
||||||
|
Standard_Boolean aIsRecursive = Standard_True;
|
||||||
|
TCollection_AsciiString aConf = aSession->aConf->Save(aIsRecursive, aFormats, aVendors);
|
||||||
|
~~~~
|
||||||
|
Configure using a resource file. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "";
|
||||||
|
TColStd_ListOfAsciiString aFormats;
|
||||||
|
TColStd_ListOfAsciiString aVendors;
|
||||||
|
aFormats.Appends("STEP");
|
||||||
|
aVendors.Appends("OCC");
|
||||||
|
Standard_Boolean aIsRecursive = Standard_True;
|
||||||
|
if (!aSession->Save(aPathToFile, aIsRecursive, aFormats,aVendors))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: configuration is not saved";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
@subsubsection occt_de_wrapper_3_2_7 Saving configuration resources. DRAW sample
|
||||||
|
|
||||||
|
Dump configuration to string. If no list of vendors is passed or it is empty, all vendors are saved. If no providers list is passed or it is empty, all providers of valid vendors are saved.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set vendors "OCC"
|
||||||
|
set format "STEP"
|
||||||
|
set dump_conf [DumpConfiguration -recursive on -format ${format} -vendor ${vendors}]
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Dump configuration to file. If no vendors list are set as an argument or it is empty, saves all vendors. If no providers list as argument or it is empty, saves all providers of valid vendors:
|
||||||
|
~~~~{.cpp}
|
||||||
|
set vendors "OCC"
|
||||||
|
set format "STEP"
|
||||||
|
set pathToFile ""
|
||||||
|
DumpConfiguration -path ${pathToFile} -recursive on -format ${format} -vendor ${vendors}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_3_3 Registering providers
|
||||||
|
|
||||||
|
To transfer a CAD file using DE Wrapper, it is necessary to register a CAD provider.
|
||||||
|
The provider contains internal and global parameters that have default values in the creation stage.
|
||||||
|
All registered providers are set to the map with information about its vendor and kept as smart handles. Therefore, it is possible to change the values via handle from external code.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_3_1 Registering providers. Code sample
|
||||||
|
|
||||||
|
It is nesessary to register only one ConfigurationNode for all needed formats.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
Handle(DE_ConfigurationNode) aNode = new STEPCAFControl_ConfigurationNode();
|
||||||
|
aSession->Bind(aNode);
|
||||||
|
~~~~
|
||||||
|
@subsubsection occt_de_wrapper_3_3_2 Registering providers. DRAW Sample
|
||||||
|
|
||||||
|
Use DRAW with all providers registered by the following command:
|
||||||
|
~~~~{.cpp}
|
||||||
|
pload XDE
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_3_3 Realtime initialization. Code sample
|
||||||
|
|
||||||
|
It is possible to change a paramater from code using a smart pointer.
|
||||||
|
|
||||||
|
~~~~{.cpp}
|
||||||
|
// global variable
|
||||||
|
static Handle(STEPCAFControl_ConfigurationNode) THE_STEP_NODE;
|
||||||
|
|
||||||
|
static Handle(DE_ConfigurationNode) RegisterStepNode()
|
||||||
|
{
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
if (!THE_STEP_NODE.IsNull())
|
||||||
|
{
|
||||||
|
return THE_STEP_NODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_STEP_NODE = new STEPCAFControl_ConfigurationNode();
|
||||||
|
aSession->Bind(THE_STEP_NODE);
|
||||||
|
return THE_STEP_NODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change parameter value
|
||||||
|
THE_STEP_NODE->InternalParameters.ReadRelationship = false;
|
||||||
|
THE_STEP_NODE->InternalParameters.ReadName = false;
|
||||||
|
THE_STEP_NODE->InternalParameters.ReadProps = false;
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_3_4 Priority of Vendors
|
||||||
|
|
||||||
|
DE session is able to work with several vendors with the same supported CAD format. To choose the preffered vendor for each format, use a special priority list.
|
||||||
|
|
||||||
|
If the high priority vendor's provider is not supported, a transfer operation is needed (write/read), then the next vendor will be chosen.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_4_1 Priority of Vendors. Code sample
|
||||||
|
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aFormat = "STEP";
|
||||||
|
TColStd_ListOfAsciiString aVendors;
|
||||||
|
aVendors.Appends("OCC"); // high priority
|
||||||
|
aVendors.Appends("DTK");
|
||||||
|
// Flag to disable not choosen vendors, in this case configuration is possible
|
||||||
|
// otherwise, lower their priority and continue to check ability to transfer
|
||||||
|
Standard_Boolean aToDisable = Standard_True;
|
||||||
|
aSession->ChangePriority(aFormat, aVendors, aToDisable);
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_3_4_2 Priority of Vendors. DRAW Sample
|
||||||
|
|
||||||
|
It is recommended to disable recursion and update only global parameters.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set conf "
|
||||||
|
global.priority.STEP : OCC DTK
|
||||||
|
"
|
||||||
|
LoadConfiguration ${conf} -recursive off
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@section occt_de_wrapper_4 Transfer of CAD files
|
||||||
|
|
||||||
|
To transfer from a CAD file to OCC or from OCC to a CAD file, it is necessary to use a configured DE_Wrapper object. It can be local, one-time or global. Global configuration of DE_Wrapper propagates to all nodes via transfer. There are two options for transferring: using OCC shape or XCAF document. It is possible to work only with real path to/from the file. Streaming is not supported (yet).
|
||||||
|
|
||||||
|
The format of input/output file is automatically determined by its extension or contents.
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_4_1 Transfer of CAD files. Code samples
|
||||||
|
|
||||||
|
Reading STEP file to Shape.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "example.stp";
|
||||||
|
TopoDS_Shape aShRes;
|
||||||
|
if (!aSession->Read(aPathToFile, aShRes))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't read file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Writing Shape to STEP file.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "example.stp";
|
||||||
|
TopoDS_Shape aShFrom = ...;
|
||||||
|
if (!aSession->Write(aPathToFile, aShRes))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't write file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Reading STEP file into XCAF document.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "example.stp";
|
||||||
|
Handle(TDocStd_Document) aDoc = ...;
|
||||||
|
if (!aSession->Read(aPathToFile, aDoc))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't read file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Writing XCAF document into STEP.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
|
||||||
|
TCollection_AsciiString aPathToFile = "example.stp";
|
||||||
|
Handle(TDocStd_Document) aDoc = ...;
|
||||||
|
if (!aSession->Write(aPathToFile, aDoc))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't write file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_4_2 Transfer of CAD files. DRAW samples
|
||||||
|
|
||||||
|
Reading a STEP file into a Shape.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
readfile shape ${fileName}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Writing a Shape into STEP.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
writefile shape ${fileName}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Reading STEP into XCAF document.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
ReadFile D ${fileName}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Writing XCAF document into STEP.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
WriteFile D ${fileName}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_4_3 Transfer using DE Provider. Code sample
|
||||||
|
|
||||||
|
It is possible to read and write CAD files directly from a special provider.
|
||||||
|
|
||||||
|
~~~~{.cpp}
|
||||||
|
// Creating or getting node
|
||||||
|
Handle(STEPCAFControl_ConfigurationNode) aNode = new STEPCAFControl_ConfigurationNode();
|
||||||
|
// Creationg an one-time provider
|
||||||
|
Handle(DE_Provider) aProvider = aNode->BuildProvider();
|
||||||
|
// Setting configuration with all parameters
|
||||||
|
aProvider->SetNode(aNode);
|
||||||
|
if (!aProvider->Read(...))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't read STEP file";
|
||||||
|
}
|
||||||
|
if (!aProvider->Write(...))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't write STEP file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsection occt_de_wrapper_4_4 Temporary configuration via transfer
|
||||||
|
|
||||||
|
It is possible to change the configuration of only one transfer operation. To avoid changing parameters in a session, one-time clone of the session can be created and used for transfer. This way is recommended for use in multithreaded mode.
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_4_4_1 Temporary configuration via transfer. Code sample
|
||||||
|
|
||||||
|
Code sample to configure via transfer.
|
||||||
|
~~~~{.cpp}
|
||||||
|
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper()->Copy();
|
||||||
|
TCollection_AsciiString aString =
|
||||||
|
"global.priority.STEP : OCC DTK\n"
|
||||||
|
"global.general.length.unit : 1\n"
|
||||||
|
"provider.STEP.OCC.read.precision.val : 0.\n";
|
||||||
|
if (!aSession->Load(aString, aIsRecursive))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: configuration is incorrect";
|
||||||
|
}
|
||||||
|
TCollection_AsciiString aPathToFile = "example.stp";
|
||||||
|
TopoDS_Shape aShRes;
|
||||||
|
if (!aSession->Read(aPathToFile, aShRes))
|
||||||
|
{
|
||||||
|
Message::SendFail() << "Error: Can't read file";
|
||||||
|
}
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
@subsubsection occt_de_wrapper_4_4_2 Temporary configuration via transfer. DRAW sample
|
||||||
|
|
||||||
|
Code sample to configure via transfer within DRAW command.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
readfile S5 $filename -conf "global.general.length.unit : 1000 "
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
Code sample to configure via transfer as variable.
|
||||||
|
~~~~{.cpp}
|
||||||
|
set fileName "sample.stp"
|
||||||
|
set conf "
|
||||||
|
global.priority.STEP : OCC
|
||||||
|
global.general.length.unit : 1
|
||||||
|
provider.STEP.OCC.read.iges.bspline.continuity : 1
|
||||||
|
provider.STEP.OCC.read.precision.mode : 0
|
||||||
|
provider.STEP.OCC.read.precision.val : 0.0001
|
||||||
|
"
|
||||||
|
readfile S5 $filename -conf ${conf}
|
||||||
|
~~~~
|
@@ -780,7 +780,7 @@ restore theBox
|
|||||||
|
|
||||||
@subsubsection occt_draw_3_3_1 set
|
@subsubsection occt_draw_3_3_1 set
|
||||||
|
|
||||||
#### In *DrawTrSurf* package:
|
#### In DrawTrSurf package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
void Set(Standard_CString& Name,const gp_Pnt& G) ;
|
void Set(Standard_CString& Name,const gp_Pnt& G) ;
|
||||||
@@ -797,7 +797,7 @@ void Set(Standard_CString& Name,
|
|||||||
const Handle(Poly_Polygon2D)& P) ;
|
const Handle(Poly_Polygon2D)& P) ;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
#### In *DBRep* package:
|
#### In DBRep package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
void Set(const Standard_CString Name,
|
void Set(const Standard_CString Name,
|
||||||
@@ -822,13 +822,13 @@ DBRep::Set(char*,B);
|
|||||||
|
|
||||||
@subsubsection occt_draw_3_3_2 get
|
@subsubsection occt_draw_3_3_2 get
|
||||||
|
|
||||||
#### In *DrawTrSurf* package:
|
#### In DrawTrSurf package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
Handle_Geom_Geometry Get(Standard_CString& Name) ;
|
Handle_Geom_Geometry Get(Standard_CString& Name) ;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
#### In *DBRep* package:
|
#### In DBRep package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
TopoDS_Shape Get(Standard_CString& Name,
|
TopoDS_Shape Get(Standard_CString& Name,
|
||||||
|
@@ -1331,7 +1331,7 @@ Therefore if the user of *NCollection* does not specify any allocator as a param
|
|||||||
Nevertheless, it is possible to define a custom *Allocator* type to manage the memory in the most optimal or convenient way for this algorithm.
|
Nevertheless, it is possible to define a custom *Allocator* type to manage the memory in the most optimal or convenient way for this algorithm.
|
||||||
|
|
||||||
As one possible choice, the class *NCollection_IncAllocator* is included.
|
As one possible choice, the class *NCollection_IncAllocator* is included.
|
||||||
Unlike *NCollection_BaseAllocator*, the memory is allocated in big blocks (about 20kB) and the allocator keeps track of the amount of occupied memory.
|
Unlike *NCollection_BaseAllocator*, the memory is allocated in big blocks (about 12kB) and the allocator keeps track of the amount of occupied memory.
|
||||||
The method *Allocate* just increments the pointer to non-occupied memory and returns its previous value.
|
The method *Allocate* just increments the pointer to non-occupied memory and returns its previous value.
|
||||||
Memory is only released in the destructor of *NCollection_IncAllocator*, the method *Free* is empty.
|
Memory is only released in the destructor of *NCollection_IncAllocator*, the method *Free* is empty.
|
||||||
If used properly, this Allocator can greatly improve the performance of specific algorithms.
|
If used properly, this Allocator can greatly improve the performance of specific algorithms.
|
||||||
|
@@ -326,7 +326,8 @@ The <i>Geom2dConvert</i> package provides the following:
|
|||||||
* a global function which is used to construct a BSpline curve from a bounded curve based on a 2D curve from the Geom2d package,
|
* a global function which is used to construct a BSpline curve from a bounded curve based on a 2D curve from the Geom2d package,
|
||||||
* a splitting algorithm which computes the points at which a 2D BSpline curve should be cut in order to obtain arcs with the same degree of continuity,
|
* a splitting algorithm which computes the points at which a 2D BSpline curve should be cut in order to obtain arcs with the same degree of continuity,
|
||||||
* global functions used to construct the BSpline curves created by this splitting algorithm, or by other types of segmentation of the BSpline curve,
|
* global functions used to construct the BSpline curves created by this splitting algorithm, or by other types of segmentation of the BSpline curve,
|
||||||
* an algorithm which converts a 2D BSpline curve into a series of adjacent Bezier curves.
|
* an algorithm which converts a 2D BSpline curve into a series of adjacent Bezier curves,
|
||||||
|
* an algorithm which converts an arbitrary 2D curve into a series of adjacent 2D circular arcs and 2D linear segments.
|
||||||
|
|
||||||
The <i>GeomConvert</i> package also provides the following:
|
The <i>GeomConvert</i> package also provides the following:
|
||||||
|
|
||||||
|
@@ -475,7 +475,7 @@ Modify this parameter with:
|
|||||||
if(!Interface_Static::SetIVal("read.step.tessellated",1))
|
if(!Interface_Static::SetIVal("read.step.tessellated",1))
|
||||||
.. error ..
|
.. error ..
|
||||||
~~~~
|
~~~~
|
||||||
Default value is 0 (On).
|
Default value is 1 (On).
|
||||||
|
|
||||||
@subsubsection occt_step_2_3_4 Performing the STEP file translation
|
@subsubsection occt_step_2_3_4 Performing the STEP file translation
|
||||||
|
|
||||||
@@ -1498,7 +1498,7 @@ It is necessary to call command *newmodel* to perform a new translation of the n
|
|||||||
|
|
||||||
@section occt_step_7 Reading from and writing to STEP
|
@section occt_step_7 Reading from and writing to STEP
|
||||||
|
|
||||||
The *STEPCAFControl* package (TKXDESTEP toolkit) provides tools to read and write STEP files (see XDE User's Guide).
|
The *STEPCAFControl* package (TKDESTEP toolkit) provides tools to read and write STEP files (see XDE User's Guide).
|
||||||
|
|
||||||
In addition to the translation of shapes implemented in basic translator, it provides the following:
|
In addition to the translation of shapes implemented in basic translator, it provides the following:
|
||||||
* STEP assemblies, read as OCCT compounds by basic translator, are translated to XDE assemblies;
|
* STEP assemblies, read as OCCT compounds by basic translator, are translated to XDE assemblies;
|
||||||
|
@@ -13,6 +13,7 @@ OCCT User Guides are organized by OCCT modules:
|
|||||||
* @subpage occt_user_guides__iges "IGES Translator"
|
* @subpage occt_user_guides__iges "IGES Translator"
|
||||||
* @subpage occt_user_guides__step "STEP Translator"
|
* @subpage occt_user_guides__step "STEP Translator"
|
||||||
* @subpage occt_user_guides__xde "Extended Data Exchange (XDE)"
|
* @subpage occt_user_guides__xde "Extended Data Exchange (XDE)"
|
||||||
|
* @subpage occt_user_guides__de_wrapper "Data Exchange Wrapper (DE Wrapper)"
|
||||||
* @subpage occt_user_guides__ocaf "Open CASCADE Application Framework (OCAF)"
|
* @subpage occt_user_guides__ocaf "Open CASCADE Application Framework (OCAF)"
|
||||||
* @subpage occt_user_guides__test_harness "DRAW Test Harness"
|
* @subpage occt_user_guides__test_harness "DRAW Test Harness"
|
||||||
* @subpage occt_user_guides__inspector "Inspector"
|
* @subpage occt_user_guides__inspector "Inspector"
|
||||||
|
@@ -43,10 +43,10 @@
|
|||||||
#pragma comment(lib, "TKService.lib")
|
#pragma comment(lib, "TKService.lib")
|
||||||
#pragma comment(lib, "TKV3d.lib")
|
#pragma comment(lib, "TKV3d.lib")
|
||||||
#pragma comment(lib, "TKOpenGl.lib")
|
#pragma comment(lib, "TKOpenGl.lib")
|
||||||
#pragma comment(lib, "TKIGES.lib")
|
#pragma comment(lib, "TKDEIGES.lib")
|
||||||
#pragma comment(lib, "TKSTEP.lib")
|
#pragma comment(lib, "TKDESTEP.lib")
|
||||||
#pragma comment(lib, "TKStl.lib")
|
#pragma comment(lib, "TKDESTL.lib")
|
||||||
#pragma comment(lib, "TKVrml.lib")
|
#pragma comment(lib, "TKDEVRML.lib")
|
||||||
#pragma comment(lib, "TKLCAF.lib")
|
#pragma comment(lib, "TKLCAF.lib")
|
||||||
|
|
||||||
//! Auxiliary tool for converting C# string into UTF-8 string.
|
//! Auxiliary tool for converting C# string into UTF-8 string.
|
||||||
|
@@ -51,10 +51,10 @@
|
|||||||
#pragma comment(lib, "TKV3d.lib")
|
#pragma comment(lib, "TKV3d.lib")
|
||||||
#pragma comment(lib, "TKOpenGl.lib")
|
#pragma comment(lib, "TKOpenGl.lib")
|
||||||
#pragma comment(lib, "TKD3dHost.lib")
|
#pragma comment(lib, "TKD3dHost.lib")
|
||||||
#pragma comment(lib, "TKIGES.lib")
|
#pragma comment(lib, "TKDEIGES.lib")
|
||||||
#pragma comment(lib, "TKSTEP.lib")
|
#pragma comment(lib, "TKDESTEP.lib")
|
||||||
#pragma comment(lib, "TKStl.lib")
|
#pragma comment(lib, "TKDESTL.lib")
|
||||||
#pragma comment(lib, "TKVrml.lib")
|
#pragma comment(lib, "TKDEVRML.lib")
|
||||||
#pragma comment(lib, "TKLCAF.lib")
|
#pragma comment(lib, "TKLCAF.lib")
|
||||||
|
|
||||||
#pragma comment(lib, "D3D9.lib")
|
#pragma comment(lib, "D3D9.lib")
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>IE_WPF_D3D</RootNamespace>
|
<RootNamespace>IE_WPF_D3D</RootNamespace>
|
||||||
<AssemblyName>IE_WPF_D3D</AssemblyName>
|
<AssemblyName>IE_WPF_D3D</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>IE_WPF_WinForms</RootNamespace>
|
<RootNamespace>IE_WPF_WinForms</RootNamespace>
|
||||||
<AssemblyName>IE_WPF_WinForms</AssemblyName>
|
<AssemblyName>IE_WPF_WinForms</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
<UpgradeBackupLocation>
|
<UpgradeBackupLocation>
|
||||||
</UpgradeBackupLocation>
|
</UpgradeBackupLocation>
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
|
@@ -35,4 +35,4 @@
|
|||||||
</providers>
|
</providers>
|
||||||
</roleManager>
|
</roleManager>
|
||||||
</system.web>
|
</system.web>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
@@ -4,7 +4,6 @@ project(glfw-occt-demo)
|
|||||||
|
|
||||||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH})
|
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
|
||||||
set(APP_VERSION_MAJOR 1)
|
set(APP_VERSION_MAJOR 1)
|
||||||
set(APP_VERSION_MINOR 0)
|
set(APP_VERSION_MINOR 0)
|
||||||
set(APP_TARGET glfwocct)
|
set(APP_TARGET glfwocct)
|
||||||
|
@@ -39,9 +39,9 @@ elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
|
|||||||
set (MY_COMPILER gcc)
|
set (MY_COMPILER gcc)
|
||||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set (MY_COMPILER gcc)
|
set (MY_COMPILER gcc)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
|
||||||
set (MY_COMPILER clang)
|
set (MY_COMPILER clang)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]")
|
||||||
set (MY_COMPILER icc)
|
set (MY_COMPILER icc)
|
||||||
else()
|
else()
|
||||||
set (MY_COMPILER ${CMAKE_GENERATOR})
|
set (MY_COMPILER ${CMAKE_GENERATOR})
|
||||||
@@ -63,7 +63,7 @@ set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKG2d TKG3d TKGeomBase TKBRep) # M
|
|||||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing) # ModelingAlgorithms
|
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing) # ModelingAlgorithms
|
||||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost) # Visualization
|
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost) # Visualization
|
||||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF) # ApplicationFramework
|
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF) # ApplicationFramework
|
||||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh) # DataExchange
|
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKXCAF TKDEIGES TKDESTEP TKDESTL TKDEVRML TKXmlXCAF TKBinXCAF TKRWMesh TKDEGLTF TKDEOBJ TKDEPLY) # DataExchange
|
||||||
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKDraw TKViewerTest) # Draw
|
set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKDraw TKViewerTest) # Draw
|
||||||
|
|
||||||
# validate location of OCCT libraries and headers
|
# validate location of OCCT libraries and headers
|
||||||
|
@@ -26,14 +26,10 @@
|
|||||||
0A7DEDFC1E2D29FF00267B9B /* libTKV3d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */; };
|
0A7DEDFC1E2D29FF00267B9B /* libTKV3d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */; };
|
||||||
0A7DEDFD1E2D29FF00267B9B /* libTKVCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */; };
|
0A7DEDFD1E2D29FF00267B9B /* libTKVCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */; };
|
||||||
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */; };
|
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */; };
|
||||||
0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */; };
|
0A7DEE2E1E2D2AE000267B9B /* libTKDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */; };
|
||||||
0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */; };
|
|
||||||
0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */; };
|
|
||||||
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; };
|
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; };
|
||||||
0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */; };
|
|
||||||
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; };
|
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; };
|
||||||
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */; };
|
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */; };
|
||||||
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */; };
|
|
||||||
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; };
|
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; };
|
||||||
0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; };
|
0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; };
|
||||||
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AE286631EB0D29A00A9D719 /* libz.tbd */; };
|
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AE286631EB0D29A00A9D719 /* libz.tbd */; };
|
||||||
@@ -79,7 +75,7 @@
|
|||||||
0A7DEE031E2D2A8200267B9B /* libTKBool.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBool.a; path = ../occt/lib/libTKBool.a; sourceTree = "<group>"; };
|
0A7DEE031E2D2A8200267B9B /* libTKBool.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBool.a; path = ../occt/lib/libTKBool.a; sourceTree = "<group>"; };
|
||||||
0A7DEE041E2D2A8500267B9B /* libTKFeat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFeat.a; path = ../occt/lib/libTKFeat.a; sourceTree = "<group>"; };
|
0A7DEE041E2D2A8500267B9B /* libTKFeat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFeat.a; path = ../occt/lib/libTKFeat.a; sourceTree = "<group>"; };
|
||||||
0A7DEE051E2D2A8900267B9B /* libTKFillet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFillet.a; path = ../occt/lib/libTKFillet.a; sourceTree = "<group>"; };
|
0A7DEE051E2D2A8900267B9B /* libTKFillet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFillet.a; path = ../occt/lib/libTKFillet.a; sourceTree = "<group>"; };
|
||||||
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKIGES.a; path = ../occt/lib/libTKIGES.a; sourceTree = "<group>"; };
|
0A7DEE061E2D2A8C00267B9B /* libTKDEIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDEIGES.a; path = ../occt/lib/libTKDEIGES.a; sourceTree = "<group>"; };
|
||||||
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = "<group>"; };
|
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = "<group>"; };
|
||||||
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = "<group>"; };
|
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = "<group>"; };
|
||||||
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGles.a; path = ../occt/lib/libTKOpenGles.a; sourceTree = "<group>"; };
|
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGles.a; path = ../occt/lib/libTKOpenGles.a; sourceTree = "<group>"; };
|
||||||
@@ -87,16 +83,11 @@
|
|||||||
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = "<group>"; };
|
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = "<group>"; };
|
||||||
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = "<group>"; };
|
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = "<group>"; };
|
||||||
0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStdL.a; path = ../occt/lib/libTKStdL.a; sourceTree = "<group>"; };
|
0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStdL.a; path = ../occt/lib/libTKStdL.a; sourceTree = "<group>"; };
|
||||||
0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP.a; path = ../occt/lib/libTKSTEP.a; sourceTree = "<group>"; };
|
0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDESTEP.a; path = ../occt/lib/libTKDESTEP.a; sourceTree = "<group>"; };
|
||||||
0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP209.a; path = ../occt/lib/libTKSTEP209.a; sourceTree = "<group>"; };
|
0A7DEE121E2D2AB500267B9B /* libTKDESTL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDESTL.a; path = ../occt/lib/libTKDESTL.a; sourceTree = "<group>"; };
|
||||||
0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPAttr.a; path = ../occt/lib/libTKSTEPAttr.a; sourceTree = "<group>"; };
|
|
||||||
0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPBase.a; path = ../occt/lib/libTKSTEPBase.a; sourceTree = "<group>"; };
|
|
||||||
0A7DEE121E2D2AB500267B9B /* libTKSTL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTL.a; path = ../occt/lib/libTKSTL.a; sourceTree = "<group>"; };
|
|
||||||
0A7DEE131E2D2AB900267B9B /* libTKTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKTObj.a; path = ../occt/lib/libTKTObj.a; sourceTree = "<group>"; };
|
0A7DEE131E2D2AB900267B9B /* libTKTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKTObj.a; path = ../occt/lib/libTKTObj.a; sourceTree = "<group>"; };
|
||||||
0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKVRML.a; path = ../occt/lib/libTKVRML.a; sourceTree = "<group>"; };
|
0A7DEE141E2D2ABC00267B9B /* libTKDEVRML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDEVRML.a; path = ../occt/lib/libTKDEVRML.a; sourceTree = "<group>"; };
|
||||||
0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXCAF.a; path = ../occt/lib/libTKXCAF.a; sourceTree = "<group>"; };
|
0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXCAF.a; path = ../occt/lib/libTKXCAF.a; sourceTree = "<group>"; };
|
||||||
0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDEIGES.a; path = ../occt/lib/libTKXDEIGES.a; sourceTree = "<group>"; };
|
|
||||||
0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDESTEP.a; path = ../occt/lib/libTKXDESTEP.a; sourceTree = "<group>"; };
|
|
||||||
0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXMesh.a; path = ../occt/lib/libTKXMesh.a; sourceTree = "<group>"; };
|
0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXMesh.a; path = ../occt/lib/libTKXMesh.a; sourceTree = "<group>"; };
|
||||||
0A7DEE191E2D2ACE00267B9B /* libTKXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXml.a; path = ../occt/lib/libTKXml.a; sourceTree = "<group>"; };
|
0A7DEE191E2D2ACE00267B9B /* libTKXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXml.a; path = ../occt/lib/libTKXml.a; sourceTree = "<group>"; };
|
||||||
0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlL.a; path = ../occt/lib/libTKXmlL.a; sourceTree = "<group>"; };
|
0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlL.a; path = ../occt/lib/libTKXmlL.a; sourceTree = "<group>"; };
|
||||||
@@ -134,13 +125,10 @@
|
|||||||
files = (
|
files = (
|
||||||
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */,
|
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */,
|
||||||
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */,
|
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */,
|
||||||
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */,
|
|
||||||
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */,
|
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */,
|
||||||
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */,
|
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */,
|
||||||
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */,
|
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */,
|
||||||
0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */,
|
0A7DEE2E1E2D2AE000267B9B /* libTKDESTEP.a in Frameworks */,
|
||||||
0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */,
|
|
||||||
0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */,
|
|
||||||
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */,
|
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */,
|
||||||
0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */,
|
0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */,
|
||||||
0A7DEDE71E2D28E300267B9B /* libTKBRep.a in Frameworks */,
|
0A7DEDE71E2D28E300267B9B /* libTKBRep.a in Frameworks */,
|
||||||
@@ -231,7 +219,7 @@
|
|||||||
0A7DEE031E2D2A8200267B9B /* libTKBool.a */,
|
0A7DEE031E2D2A8200267B9B /* libTKBool.a */,
|
||||||
0A7DEE041E2D2A8500267B9B /* libTKFeat.a */,
|
0A7DEE041E2D2A8500267B9B /* libTKFeat.a */,
|
||||||
0A7DEE051E2D2A8900267B9B /* libTKFillet.a */,
|
0A7DEE051E2D2A8900267B9B /* libTKFillet.a */,
|
||||||
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */,
|
0A7DEE061E2D2A8C00267B9B /* libTKDEIGES.a */,
|
||||||
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */,
|
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */,
|
||||||
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */,
|
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */,
|
||||||
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */,
|
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */,
|
||||||
@@ -239,16 +227,11 @@
|
|||||||
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */,
|
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */,
|
||||||
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */,
|
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */,
|
||||||
0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */,
|
0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */,
|
||||||
0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */,
|
0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */,
|
||||||
0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */,
|
0A7DEE121E2D2AB500267B9B /* libTKDESTL.a */,
|
||||||
0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */,
|
|
||||||
0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */,
|
|
||||||
0A7DEE121E2D2AB500267B9B /* libTKSTL.a */,
|
|
||||||
0A7DEE131E2D2AB900267B9B /* libTKTObj.a */,
|
0A7DEE131E2D2AB900267B9B /* libTKTObj.a */,
|
||||||
0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */,
|
0A7DEE141E2D2ABC00267B9B /* libTKDEVRML.a */,
|
||||||
0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */,
|
0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */,
|
||||||
0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */,
|
|
||||||
0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */,
|
|
||||||
0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */,
|
0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */,
|
||||||
0A7DEE191E2D2ACE00267B9B /* libTKXml.a */,
|
0A7DEE191E2D2ACE00267B9B /* libTKXml.a */,
|
||||||
0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */,
|
0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */,
|
||||||
|
@@ -23,12 +23,11 @@
|
|||||||
#define CafShapePrs_h
|
#define CafShapePrs_h
|
||||||
|
|
||||||
#include <TDF_Label.hxx>
|
#include <TDF_Label.hxx>
|
||||||
#include <TDF_LabelMapHasher.hxx>
|
|
||||||
#include <XCAFPrs_AISObject.hxx>
|
#include <XCAFPrs_AISObject.hxx>
|
||||||
#include <XCAFPrs_Style.hxx>
|
#include <XCAFPrs_Style.hxx>
|
||||||
|
|
||||||
typedef NCollection_DataMap<TopoDS_Shape, Handle(AIS_ColoredDrawer), TopTools_ShapeMapHasher> CafDataMapOfShapeColor;
|
typedef NCollection_DataMap<TopoDS_Shape, Handle(AIS_ColoredDrawer), TopTools_ShapeMapHasher> CafDataMapOfShapeColor;
|
||||||
typedef NCollection_DataMap<TDF_Label, Handle(AIS_InteractiveObject), TDF_LabelMapHasher> MapOfPrsForShapes;
|
typedef NCollection_DataMap<TDF_Label, Handle(AIS_InteractiveObject)> MapOfPrsForShapes;
|
||||||
|
|
||||||
//! Interactive object for shape in DECAF document
|
//! Interactive object for shape in DECAF document
|
||||||
class CafShapePrs : public XCAFPrs_AISObject
|
class CafShapePrs : public XCAFPrs_AISObject
|
||||||
|
@@ -138,11 +138,8 @@ public class OcctJniActivity extends Activity implements OnClickListener
|
|||||||
|| !loadLibVerbose ("TKFillet", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKFillet", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKOffset", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKOffset", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKXSBase", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKXSBase", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKIGES", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKDEIGES", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKSTEPBase", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKDESTEP", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKSTEPAttr", aLoaded, aFailed)
|
|
||||||
|| !loadLibVerbose ("TKSTEP209", aLoaded, aFailed)
|
|
||||||
|| !loadLibVerbose ("TKSTEP", aLoaded, aFailed)
|
|
||||||
// OCCT Visualization
|
// OCCT Visualization
|
||||||
|| !loadLibVerbose ("TKService", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKService", aLoaded, aFailed)
|
||||||
|| !loadLibVerbose ("TKHLR", aLoaded, aFailed)
|
|| !loadLibVerbose ("TKHLR", aLoaded, aFailed)
|
||||||
|
@@ -8,8 +8,8 @@ set (anOcctLibs
|
|||||||
# exchange
|
# exchange
|
||||||
TKPrim TKBO TKBool TKFillet TKOffset
|
TKPrim TKBO TKBool TKFillet TKOffset
|
||||||
TKXSBase
|
TKXSBase
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP
|
TKDESTEP
|
||||||
# OCCT Visualization
|
# OCCT Visualization
|
||||||
TKService TKHLR TKV3d TKOpenGles
|
TKService TKHLR TKV3d TKOpenGles
|
||||||
)
|
)
|
||||||
@@ -37,7 +37,7 @@ list(APPEND aLibDeps lib_FreeType)
|
|||||||
# system libraries
|
# system libraries
|
||||||
list(APPEND aLibDeps EGL GLESv2 log android)
|
list(APPEND aLibDeps EGL GLESv2 log android)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -frtti -fexceptions -fpermissive")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -frtti -fexceptions -fpermissive")
|
||||||
|
|
||||||
add_library(TKJniSample SHARED ${SOURCE_FILES})
|
add_library(TKJniSample SHARED ${SOURCE_FILES})
|
||||||
target_link_libraries(TKJniSample ${aLibDeps})
|
target_link_libraries(TKJniSample ${aLibDeps})
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
# Caution! Be careful, when increase minimal cmake version:
|
||||||
|
# using of newer version may leads (by default) to applying
|
||||||
|
# of some new policies. It may break compilation.
|
||||||
|
# For canceling of applying new policies use:
|
||||||
|
# cmake_policy(PUSH) before `cmake_minimum_required`
|
||||||
|
# and cmake_policy(POP) after.
|
||||||
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project (Geometry)
|
project (Geometry)
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bin/Geometry.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bin/Geometry.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bin/Geometry.exe</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bin/Geometry.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bind/Geometry.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bind/Geometry.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../..\win64\$(VCFMT)\bind/Geometry.exe</OutputFile>
|
<OutputFile>../../../..\win64\$(VCFMT)\bind/Geometry.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
# Caution! Be careful, when increase minimal cmake version:
|
||||||
|
# using of newer version may leads (by default) to applying
|
||||||
|
# of some new policies. It may break compilation.
|
||||||
|
# For canceling of applying new policies use:
|
||||||
|
# cmake_policy(PUSH) before `cmake_minimum_required`
|
||||||
|
# and cmake_policy(POP) after.
|
||||||
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project (Modeling)
|
project (Modeling)
|
||||||
|
|
||||||
@@ -55,4 +61,4 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
|||||||
${Modeling_SRC_DIR}
|
${Modeling_SRC_DIR}
|
||||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||||
|
|
||||||
target_link_libraries (Modeling mfcsample TKSTEP209 TKSTEPAttr TKSTEPBase TKBO)
|
target_link_libraries (Modeling mfcsample TKDESTEP TKBO)
|
||||||
|
@@ -115,7 +115,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bind/Modeling.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bind/Modeling.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bind/Modeling.exe</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bind/Modeling.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bin/Modeling.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bin/Modeling.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bin/Modeling.exe</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bin/Modeling.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
# Caution! Be careful, when increase minimal cmake version:
|
||||||
|
# using of newer version may leads (by default) to applying
|
||||||
|
# of some new policies. It may break compilation.
|
||||||
|
# For canceling of applying new policies use:
|
||||||
|
# cmake_policy(PUSH) before `cmake_minimum_required`
|
||||||
|
# and cmake_policy(POP) after.
|
||||||
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project (ImportExport)
|
project (ImportExport)
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bin/ImportExport.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bin/ImportExport.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bin/ImportExport.exe</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bin/ImportExport.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bind/ImportExport.exe</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bind/ImportExport.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bind/ImportExport.exe</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bind/ImportExport.exe</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
# Caution! Be careful, when increase minimal cmake version:
|
||||||
|
# using of newer version may leads (by default) to applying
|
||||||
|
# of some new policies. It may break compilation.
|
||||||
|
# For canceling of applying new policies use:
|
||||||
|
# cmake_policy(PUSH) before `cmake_minimum_required`
|
||||||
|
# and cmake_policy(POP) after.
|
||||||
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project (HLR)
|
project (HLR)
|
||||||
|
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
# Caution! Be careful, when increase minimal cmake version:
|
||||||
|
# using of newer version may leads (by default) to applying
|
||||||
|
# of some new policies. It may break compilation.
|
||||||
|
# For canceling of applying new policies use:
|
||||||
|
# cmake_policy(PUSH) before `cmake_minimum_required`
|
||||||
|
# and cmake_policy(POP) after.
|
||||||
|
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
project (mfcsample)
|
project (mfcsample)
|
||||||
|
|
||||||
@@ -152,15 +158,12 @@ include_directories( ${CMAKE_BINARY_DIR}/inc
|
|||||||
${COMMON_RESOURCE2D_DIR})
|
${COMMON_RESOURCE2D_DIR})
|
||||||
|
|
||||||
# OCCT libraries for using
|
# OCCT libraries for using
|
||||||
set (mfcsample_USED_LIBS TKVRML
|
set (mfcsample_USED_LIBS TKDEVRML
|
||||||
TKSTL
|
TKDESTL
|
||||||
TKBRep
|
TKBRep
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKShHealing
|
TKShHealing
|
||||||
TKSTEP
|
TKDESTEP
|
||||||
TKSTEPBase
|
|
||||||
TKSTEP209
|
|
||||||
TKSTEPAttr
|
|
||||||
TKXSBase
|
TKXSBase
|
||||||
TKBool
|
TKBool
|
||||||
TKBO
|
TKBO
|
||||||
|
@@ -115,7 +115,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bind/mfcsample.dll</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bind/mfcsample.dll</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bind/mfcsample.dll</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bind/mfcsample.dll</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win32\$(VCFMT)\bin/mfcsample.dll</OutputFile>
|
<OutputFile>../../../../win32\$(VCFMT)\bin/mfcsample.dll</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
<ResourceOutputFileName>$(IntDir)%(Filename).res</ResourceOutputFileName>
|
<ResourceOutputFileName>$(IntDir)%(Filename).res</ResourceOutputFileName>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>../../../../win64\$(VCFMT)\bin/mfcsample.dll</OutputFile>
|
<OutputFile>../../../../win64\$(VCFMT)\bin/mfcsample.dll</OutputFile>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
@@ -8,7 +8,7 @@ TKG3d
|
|||||||
TKGeomAlgo
|
TKGeomAlgo
|
||||||
TKGeomBase
|
TKGeomBase
|
||||||
TKHLR
|
TKHLR
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKernel
|
TKernel
|
||||||
TKMath
|
TKMath
|
||||||
TKMesh
|
TKMesh
|
||||||
@@ -17,13 +17,10 @@ TKOpenGl
|
|||||||
TKPrim
|
TKPrim
|
||||||
TKShHealing
|
TKShHealing
|
||||||
TKService
|
TKService
|
||||||
TKSTEP
|
TKDESTEP
|
||||||
TKSTEP209
|
TKDESTL
|
||||||
TKSTEPAttr
|
|
||||||
TKSTEPBase
|
|
||||||
TKSTL
|
|
||||||
TKTopAlgo
|
TKTopAlgo
|
||||||
TKV3d
|
TKV3d
|
||||||
TKVRML
|
TKDEVRML
|
||||||
TKXSBase
|
TKXSBase
|
||||||
|
|
||||||
|
@@ -72,8 +72,8 @@ win32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
||||||
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
-lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \
|
||||||
-lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
-lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
||||||
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
||||||
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \
|
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \
|
||||||
|
|
||||||
|
@@ -221,7 +221,7 @@ Handle(TopTools_HSequenceOfShape) Translate::importModel( const int format, cons
|
|||||||
shapes = importSTEP( file );
|
shapes = importSTEP( file );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch ( Standard_Failure ) {
|
} catch ( const Standard_Failure& ) {
|
||||||
shapes.Nullify();
|
shapes.Nullify();
|
||||||
}
|
}
|
||||||
return shapes;
|
return shapes;
|
||||||
@@ -256,7 +256,7 @@ bool Translate::exportModel( const int format, const QString& file, const Handle
|
|||||||
case FormatSTL: return exportSTL ( file, shapes );
|
case FormatSTL: return exportSTL ( file, shapes );
|
||||||
case FormatVRML: return exportVRML( file, shapes );
|
case FormatVRML: return exportVRML( file, shapes );
|
||||||
}
|
}
|
||||||
} catch ( Standard_Failure ) {
|
} catch ( const Standard_Failure& ) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -528,26 +528,26 @@ bool Translate::exportSTL( const QString& file, const Handle(TopTools_HSequenceO
|
|||||||
if ( shapes.IsNull() || shapes->IsEmpty() )
|
if ( shapes.IsNull() || shapes->IsEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TopoDS_Compound res;
|
TopoDS_Compound res;
|
||||||
BRep_Builder builder;
|
BRep_Builder builder;
|
||||||
builder.MakeCompound( res );
|
builder.MakeCompound( res );
|
||||||
|
|
||||||
for ( int i = 1; i <= shapes->Length(); i++ )
|
for ( int i = 1; i <= shapes->Length(); i++ )
|
||||||
{
|
{
|
||||||
TopoDS_Shape shape = shapes->Value( i );
|
TopoDS_Shape shape = shapes->Value( i );
|
||||||
if ( shape.IsNull() )
|
if ( shape.IsNull() )
|
||||||
{
|
{
|
||||||
myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" );
|
myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
builder.Add( res, shape );
|
builder.Add( res, shape );
|
||||||
}
|
}
|
||||||
|
|
||||||
StlAPI_Writer writer;
|
StlAPI_Writer writer;
|
||||||
|
|
||||||
const TCollection_AsciiString anUtf8Path (file.toUtf8().data());
|
const TCollection_AsciiString anUtf8Path (file.toUtf8().data());
|
||||||
|
|
||||||
writer.Write( res, anUtf8Path.ToCString() );
|
writer.Write( res, anUtf8Path.ToCString() );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -557,26 +557,26 @@ bool Translate::exportVRML( const QString& file, const Handle(TopTools_HSequence
|
|||||||
if ( shapes.IsNull() || shapes->IsEmpty() )
|
if ( shapes.IsNull() || shapes->IsEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TopoDS_Compound res;
|
TopoDS_Compound res;
|
||||||
BRep_Builder builder;
|
BRep_Builder builder;
|
||||||
builder.MakeCompound( res );
|
builder.MakeCompound( res );
|
||||||
|
|
||||||
for ( int i = 1; i <= shapes->Length(); i++ )
|
for ( int i = 1; i <= shapes->Length(); i++ )
|
||||||
{
|
{
|
||||||
TopoDS_Shape shape = shapes->Value( i );
|
TopoDS_Shape shape = shapes->Value( i );
|
||||||
if ( shape.IsNull() )
|
if ( shape.IsNull() )
|
||||||
{
|
{
|
||||||
myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" );
|
myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
builder.Add( res, shape );
|
builder.Add( res, shape );
|
||||||
}
|
}
|
||||||
|
|
||||||
VrmlAPI_Writer writer;
|
VrmlAPI_Writer writer;
|
||||||
|
|
||||||
const TCollection_AsciiString anUtf8Path (file.toUtf8().data());
|
const TCollection_AsciiString anUtf8Path (file.toUtf8().data());
|
||||||
|
|
||||||
writer.Write( res, anUtf8Path.ToCString() );
|
writer.Write( res, anUtf8Path.ToCString() );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@ TKGeomAlgo
|
|||||||
TKGeomBase
|
TKGeomBase
|
||||||
TKernel
|
TKernel
|
||||||
TKHLR
|
TKHLR
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKMath
|
TKMath
|
||||||
TKMesh
|
TKMesh
|
||||||
TKOffset
|
TKOffset
|
||||||
@@ -18,14 +18,11 @@ TKOpenGl
|
|||||||
TKPrim
|
TKPrim
|
||||||
TKService
|
TKService
|
||||||
TKShHealing
|
TKShHealing
|
||||||
TKSTEP
|
TKDESTEP
|
||||||
TKSTEP209
|
TKDESTL
|
||||||
TKSTEPAttr
|
|
||||||
TKSTEPBase
|
|
||||||
TKSTL
|
|
||||||
TKTopAlgo
|
TKTopAlgo
|
||||||
TKV3d
|
TKV3d
|
||||||
TKVRML
|
TKDEVRML
|
||||||
TKXSBase
|
TKXSBase
|
||||||
TKLCAF
|
TKLCAF
|
||||||
TKCAF
|
TKCAF
|
||||||
|
@@ -75,8 +75,8 @@ win32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
||||||
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
-lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \
|
||||||
-lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
-lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
||||||
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
||||||
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF -lTKCAF -lTKVCAF \
|
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF -lTKCAF -lTKVCAF \
|
||||||
-lTKBin -lTKXml
|
-lTKBin -lTKXml
|
||||||
|
@@ -9,7 +9,7 @@ TKGeomAlgo
|
|||||||
TKGeomBase
|
TKGeomBase
|
||||||
TKernel
|
TKernel
|
||||||
TKHLR
|
TKHLR
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKMath
|
TKMath
|
||||||
TKMesh
|
TKMesh
|
||||||
TKOffset
|
TKOffset
|
||||||
@@ -17,13 +17,10 @@ TKOpenGl
|
|||||||
TKPrim
|
TKPrim
|
||||||
TKService
|
TKService
|
||||||
TKShHealing
|
TKShHealing
|
||||||
TKSTEP
|
TKDESTEP
|
||||||
TKSTEP209
|
TKDESTL
|
||||||
TKSTEPAttr
|
|
||||||
TKSTEPBase
|
|
||||||
TKSTL
|
|
||||||
TKTopAlgo
|
TKTopAlgo
|
||||||
TKV3d
|
TKV3d
|
||||||
TKVRML
|
TKDEVRML
|
||||||
TKXSBase
|
TKXSBase
|
||||||
|
|
||||||
|
@@ -73,8 +73,8 @@ win32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
|
||||||
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
-lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \
|
||||||
-lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
-lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
||||||
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
||||||
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \
|
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \
|
||||||
|
|
||||||
|
@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.2)
|
|||||||
|
|
||||||
project(occt-webgl-sample)
|
project(occt-webgl-sample)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
|
||||||
set(APP_VERSION_MAJOR 1)
|
set(APP_VERSION_MAJOR 1)
|
||||||
set(APP_VERSION_MINOR 0)
|
set(APP_VERSION_MINOR 0)
|
||||||
set(APP_TARGET occt-webgl-sample)
|
set(APP_TARGET occt-webgl-sample)
|
||||||
@@ -60,7 +59,7 @@ else()
|
|||||||
set(OCCT_BIN_DIR)
|
set(OCCT_BIN_DIR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
|
set(OpenCASCADE_LIBS TKRWMesh TKDEGLTF TKDEOBJ TKDEPLY TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
|
||||||
|
|
||||||
add_executable(${APP_TARGET} ${SOURCES})
|
add_executable(${APP_TARGET} ${SOURCES})
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
|
@@ -102,11 +102,11 @@ set (uwp_USED_LIBS TKernel
|
|||||||
TKHLR
|
TKHLR
|
||||||
TKOffset
|
TKOffset
|
||||||
TKXMesh
|
TKXMesh
|
||||||
TKIGES
|
TKDEIGES
|
||||||
TKSTEP
|
TKDESTEP
|
||||||
TKXSBase
|
TKXSBase
|
||||||
TKSTL
|
TKDESTL
|
||||||
TKVRML
|
TKDEVRML
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries (uwp ${uwp_USED_LIBS})
|
target_link_libraries (uwp ${uwp_USED_LIBS})
|
||||||
|
@@ -251,7 +251,9 @@ void AIS_Animation::Stop()
|
|||||||
myState = AnimationState_Stopped;
|
myState = AnimationState_Stopped;
|
||||||
if (!myTimer.IsNull())
|
if (!myTimer.IsNull())
|
||||||
{
|
{
|
||||||
|
const Standard_Real anElapsedTime = ElapsedTime();
|
||||||
myTimer->Stop();
|
myTimer->Stop();
|
||||||
|
myTimer->Seek (Min (Duration(), anElapsedTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NCollection_Sequence<Handle(AIS_Animation)>::Iterator anIter (myAnimations); anIter.More(); anIter.Next())
|
for (NCollection_Sequence<Handle(AIS_Animation)>::Iterator anIter (myAnimations); anIter.More(); anIter.Next())
|
||||||
|
51
src/AIS/AIS_AnimationAxisRotation.cxx
Normal file
51
src/AIS/AIS_AnimationAxisRotation.cxx
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
#include <AIS_AnimationAxisRotation.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject)
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//function : Constructor
|
||||||
|
//purpose :
|
||||||
|
//=============================================================================
|
||||||
|
AIS_AnimationAxisRotation::AIS_AnimationAxisRotation (const TCollection_AsciiString& theAnimationName,
|
||||||
|
const Handle(AIS_InteractiveContext)& theContext,
|
||||||
|
const Handle(AIS_InteractiveObject)& theObject,
|
||||||
|
const gp_Ax1& theAxis,
|
||||||
|
const Standard_Real theAngleStart,
|
||||||
|
const Standard_Real theAngleEnd)
|
||||||
|
: AIS_BaseAnimationObject (theAnimationName, theContext, theObject),
|
||||||
|
myRotAxis (theAxis),
|
||||||
|
myAngleStart (theAngleStart),
|
||||||
|
myAngleEnd (theAngleEnd)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//function : update
|
||||||
|
//purpose :
|
||||||
|
//=============================================================================
|
||||||
|
void AIS_AnimationAxisRotation::update (const AIS_AnimationProgress& theProgress)
|
||||||
|
{
|
||||||
|
if (myObject.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
gp_Trsf aTrsf;
|
||||||
|
Standard_Real aCurrentAngle = (1.0 - theProgress.LocalNormalized) * myAngleStart + theProgress.LocalNormalized * myAngleEnd;
|
||||||
|
aTrsf.SetRotation (myRotAxis, aCurrentAngle);
|
||||||
|
updateTrsf (aTrsf);
|
||||||
|
}
|
53
src/AIS/AIS_AnimationAxisRotation.hxx
Normal file
53
src/AIS/AIS_AnimationAxisRotation.hxx
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
#ifndef _AIS_AnimationAxisRotation_HeaderFile
|
||||||
|
#define _AIS_AnimationAxisRotation_HeaderFile
|
||||||
|
|
||||||
|
#include <AIS_BaseAnimationObject.hxx>
|
||||||
|
#include <gp_TrsfNLerp.hxx>
|
||||||
|
|
||||||
|
//! Animation defining object transformation.
|
||||||
|
class AIS_AnimationAxisRotation : public AIS_BaseAnimationObject
|
||||||
|
{
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject)
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Constructor with initialization.
|
||||||
|
//! @param[in] theAnimationName animation identifier
|
||||||
|
//! @param[in] theContext interactive context where object have been displayed
|
||||||
|
//! @param[in] theObject object to apply rotation
|
||||||
|
//! @param[in] theAxis rotation axis
|
||||||
|
//! @param[in] theAngleStart rotation angle at the start of animation
|
||||||
|
//! @param[in] theAngleEnd rotation angle at the end of animation
|
||||||
|
Standard_EXPORT AIS_AnimationAxisRotation (const TCollection_AsciiString& theAnimationName,
|
||||||
|
const Handle(AIS_InteractiveContext)& theContext,
|
||||||
|
const Handle(AIS_InteractiveObject)& theObject,
|
||||||
|
const gp_Ax1& theAxis,
|
||||||
|
const Standard_Real theAngleStart,
|
||||||
|
const Standard_Real theAngleEnd);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Update the progress.
|
||||||
|
Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
gp_Ax1 myRotAxis; //!< rotation axis
|
||||||
|
Standard_Real myAngleStart; //!< start angle for rotation
|
||||||
|
Standard_Real myAngleEnd; //!< end angle for rotation
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _AIS_AnimationAxisRotation_HeaderFile
|
@@ -14,10 +14,7 @@
|
|||||||
|
|
||||||
#include <AIS_AnimationObject.hxx>
|
#include <AIS_AnimationObject.hxx>
|
||||||
|
|
||||||
#include <AIS_InteractiveContext.hxx>
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_BaseAnimationObject)
|
||||||
#include <V3d_View.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation)
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//function : Constructor
|
//function : Constructor
|
||||||
@@ -28,9 +25,7 @@ AIS_AnimationObject::AIS_AnimationObject (const TCollection_AsciiString& theAnim
|
|||||||
const Handle(AIS_InteractiveObject)& theObject,
|
const Handle(AIS_InteractiveObject)& theObject,
|
||||||
const gp_Trsf& theTrsfStart,
|
const gp_Trsf& theTrsfStart,
|
||||||
const gp_Trsf& theTrsfEnd)
|
const gp_Trsf& theTrsfEnd)
|
||||||
: AIS_Animation (theAnimationName),
|
: AIS_BaseAnimationObject (theAnimationName, theContext, theObject),
|
||||||
myContext (theContext),
|
|
||||||
myObject (theObject),
|
|
||||||
myTrsfLerp (theTrsfStart, theTrsfEnd)
|
myTrsfLerp (theTrsfStart, theTrsfEnd)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -49,52 +44,5 @@ void AIS_AnimationObject::update (const AIS_AnimationProgress& theProgress)
|
|||||||
|
|
||||||
gp_Trsf aTrsf;
|
gp_Trsf aTrsf;
|
||||||
myTrsfLerp.Interpolate (theProgress.LocalNormalized, aTrsf);
|
myTrsfLerp.Interpolate (theProgress.LocalNormalized, aTrsf);
|
||||||
if (!myContext.IsNull())
|
updateTrsf (aTrsf);
|
||||||
{
|
|
||||||
myContext->SetLocation (myObject, aTrsf);
|
|
||||||
invalidateViewer();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myObject->SetLocalTransformation (aTrsf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
//function : invalidateViewer
|
|
||||||
//purpose :
|
|
||||||
//=============================================================================
|
|
||||||
void AIS_AnimationObject::invalidateViewer()
|
|
||||||
{
|
|
||||||
if (myContext.IsNull())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Standard_Boolean isImmediate = myContext->CurrentViewer()->ZLayerSettings (myObject->ZLayer()).IsImmediate();
|
|
||||||
if (!isImmediate)
|
|
||||||
{
|
|
||||||
myContext->CurrentViewer()->Invalidate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Invalidate immediate view only if it is going out of z-fit range.
|
|
||||||
// This might be sub-optimal performing this for each animated objects in case of many animated objects.
|
|
||||||
for (V3d_ListOfView::Iterator aDefViewIter = myContext->CurrentViewer()->DefinedViewIterator();
|
|
||||||
aDefViewIter.More(); aDefViewIter.Next())
|
|
||||||
{
|
|
||||||
const Handle(V3d_View)& aView = aDefViewIter.Value();
|
|
||||||
const Bnd_Box aMinMaxBox = aView->View()->MinMaxValues (Standard_False);
|
|
||||||
const Bnd_Box aGraphicBox = aView->View()->MinMaxValues (Standard_True);
|
|
||||||
Standard_Real aZNear = 0.0;
|
|
||||||
Standard_Real aZFar = 0.0;
|
|
||||||
if (aView->Camera()->ZFitAll (aDefViewIter.Value()->AutoZFitScaleFactor(), aMinMaxBox, aGraphicBox, aZNear, aZFar))
|
|
||||||
{
|
|
||||||
if (aZNear < aView->Camera()->ZNear()
|
|
||||||
|| aZFar > aView->Camera()->ZFar())
|
|
||||||
{
|
|
||||||
aDefViewIter.Value()->Invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -15,24 +15,23 @@
|
|||||||
#ifndef _AIS_AnimationObject_HeaderFile
|
#ifndef _AIS_AnimationObject_HeaderFile
|
||||||
#define _AIS_AnimationObject_HeaderFile
|
#define _AIS_AnimationObject_HeaderFile
|
||||||
|
|
||||||
#include <AIS_Animation.hxx>
|
#include <AIS_BaseAnimationObject.hxx>
|
||||||
#include <AIS_InteractiveContext.hxx>
|
|
||||||
#include <gp_TrsfNLerp.hxx>
|
#include <gp_TrsfNLerp.hxx>
|
||||||
|
|
||||||
//! Animation defining object transformation.
|
//! Animation defining object transformation.
|
||||||
class AIS_AnimationObject : public AIS_Animation
|
class AIS_AnimationObject : public AIS_BaseAnimationObject
|
||||||
{
|
{
|
||||||
DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation)
|
DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_BaseAnimationObject)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Constructor with initialization.
|
//! Constructor with initialization.
|
||||||
//! Note that start/end transformations specify exactly local transformation of the object,
|
//! Note that start/end transformations specify exactly local transformation of the object,
|
||||||
//! not the transformation to be applied to existing local transformation.
|
//! not the transformation to be applied to existing local transformation.
|
||||||
//! @param theAnimationName animation identifier
|
//! @param[in] theAnimationName animation identifier
|
||||||
//! @param theContext interactive context where object have been displayed
|
//! @param[in] theContext interactive context where object have been displayed
|
||||||
//! @param theObject object to apply local transformation
|
//! @param[in] theObject object to apply local transformation
|
||||||
//! @param theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation())
|
//! @param[in] theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation())
|
||||||
//! @param theTrsfEnd local transformation at the end of animation
|
//! @param[in] theTrsfEnd local transformation at the end of animation
|
||||||
Standard_EXPORT AIS_AnimationObject (const TCollection_AsciiString& theAnimationName,
|
Standard_EXPORT AIS_AnimationObject (const TCollection_AsciiString& theAnimationName,
|
||||||
const Handle(AIS_InteractiveContext)& theContext,
|
const Handle(AIS_InteractiveContext)& theContext,
|
||||||
const Handle(AIS_InteractiveObject)& theObject,
|
const Handle(AIS_InteractiveObject)& theObject,
|
||||||
@@ -44,17 +43,10 @@ protected:
|
|||||||
//! Update the progress.
|
//! Update the progress.
|
||||||
Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE;
|
Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Invalidate the viewer for proper update.
|
private:
|
||||||
Standard_EXPORT void invalidateViewer();
|
|
||||||
|
|
||||||
protected:
|
gp_TrsfNLerp myTrsfLerp; //!< interpolation tool
|
||||||
|
|
||||||
Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed
|
|
||||||
Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location
|
|
||||||
gp_TrsfNLerp myTrsfLerp; //!< interpolation tool
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(AIS_AnimationObject, AIS_Animation)
|
|
||||||
|
|
||||||
#endif // _AIS_AnimationObject_HeaderFile
|
#endif // _AIS_AnimationObject_HeaderFile
|
||||||
|
88
src/AIS/AIS_BaseAnimationObject.cxx
Normal file
88
src/AIS/AIS_BaseAnimationObject.cxx
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
#include <AIS_BaseAnimationObject.hxx>
|
||||||
|
|
||||||
|
#include <V3d_View.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_BaseAnimationObject, AIS_Animation)
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//function : Constructor
|
||||||
|
//purpose :
|
||||||
|
//=============================================================================
|
||||||
|
AIS_BaseAnimationObject::AIS_BaseAnimationObject (const TCollection_AsciiString& theAnimationName,
|
||||||
|
const Handle(AIS_InteractiveContext)& theContext,
|
||||||
|
const Handle(AIS_InteractiveObject)& theObject)
|
||||||
|
: AIS_Animation (theAnimationName),
|
||||||
|
myContext (theContext),
|
||||||
|
myObject (theObject)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//function : updateTrsf
|
||||||
|
//purpose :
|
||||||
|
//=============================================================================
|
||||||
|
void AIS_BaseAnimationObject::updateTrsf (const gp_Trsf& theTrsf)
|
||||||
|
{
|
||||||
|
if (!myContext.IsNull())
|
||||||
|
{
|
||||||
|
myContext->SetLocation (myObject, theTrsf);
|
||||||
|
invalidateViewer();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
myObject->SetLocalTransformation (theTrsf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//function : invalidateViewer
|
||||||
|
//purpose :
|
||||||
|
//=============================================================================
|
||||||
|
void AIS_BaseAnimationObject::invalidateViewer()
|
||||||
|
{
|
||||||
|
if (myContext.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Standard_Boolean isImmediate = myContext->CurrentViewer()->ZLayerSettings (myObject->ZLayer()).IsImmediate();
|
||||||
|
if (!isImmediate)
|
||||||
|
{
|
||||||
|
myContext->CurrentViewer()->Invalidate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Invalidate immediate view only if it is going out of z-fit range.
|
||||||
|
// This might be sub-optimal performing this for each animated objects in case of many animated objects.
|
||||||
|
for (V3d_ListOfView::Iterator aDefViewIter = myContext->CurrentViewer()->DefinedViewIterator();
|
||||||
|
aDefViewIter.More(); aDefViewIter.Next())
|
||||||
|
{
|
||||||
|
const Handle(V3d_View)& aView = aDefViewIter.Value();
|
||||||
|
const Bnd_Box aMinMaxBox = aView->View()->MinMaxValues (Standard_False);
|
||||||
|
const Bnd_Box aGraphicBox = aView->View()->MinMaxValues (Standard_True);
|
||||||
|
Standard_Real aZNear = 0.0;
|
||||||
|
Standard_Real aZFar = 0.0;
|
||||||
|
if (aView->Camera()->ZFitAll (aDefViewIter.Value()->AutoZFitScaleFactor(), aMinMaxBox, aGraphicBox, aZNear, aZFar))
|
||||||
|
{
|
||||||
|
if (aZNear < aView->Camera()->ZNear()
|
||||||
|
|| aZFar > aView->Camera()->ZFar())
|
||||||
|
{
|
||||||
|
aDefViewIter.Value()->Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
src/AIS/AIS_BaseAnimationObject.hxx
Normal file
49
src/AIS/AIS_BaseAnimationObject.hxx
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
// Copyright (c) 2023 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
#ifndef _AIS_BaseAnimationObject_HeaderFile
|
||||||
|
#define _AIS_BaseAnimationObject_HeaderFile
|
||||||
|
|
||||||
|
#include <AIS_Animation.hxx>
|
||||||
|
#include <AIS_InteractiveContext.hxx>
|
||||||
|
|
||||||
|
//! Animation defining object transformation.
|
||||||
|
class AIS_BaseAnimationObject : public AIS_Animation
|
||||||
|
{
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_BaseAnimationObject, AIS_Animation)
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Constructor with initialization.
|
||||||
|
//! @param[in] theAnimationName animation identifier
|
||||||
|
//! @param[in] theContext interactive context where object have been displayed
|
||||||
|
//! @param[in] theObject object to apply local transformation
|
||||||
|
Standard_EXPORT AIS_BaseAnimationObject (const TCollection_AsciiString& theAnimationName,
|
||||||
|
const Handle(AIS_InteractiveContext)& theContext,
|
||||||
|
const Handle(AIS_InteractiveObject)& theObject);
|
||||||
|
|
||||||
|
//! Update the transformation.
|
||||||
|
Standard_EXPORT void updateTrsf (const gp_Trsf& theTrsf);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
//! Invalidate the viewer for proper update.
|
||||||
|
Standard_EXPORT void invalidateViewer();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed
|
||||||
|
Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _AIS_BaseAnimationObject_HeaderFile
|
@@ -56,7 +56,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Ok) {
|
if (Ok) {
|
||||||
TopoDS_Shape curEdge = SubShapes.FindKey( i );
|
const TopoDS_Shape& curEdge = SubShapes.FindKey( i );
|
||||||
myMapOfEdges.Add(curEdge);
|
myMapOfEdges.Add(curEdge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include <Prs3d_Presentation.hxx>
|
#include <Prs3d_Presentation.hxx>
|
||||||
#include <Quantity_Color.hxx>
|
#include <Quantity_Color.hxx>
|
||||||
#include <Select3D_SensitiveCircle.hxx>
|
#include <Select3D_SensitiveCircle.hxx>
|
||||||
|
#include <Select3D_SensitivePoly.hxx>
|
||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
#include <SelectMgr_Selection.hxx>
|
#include <SelectMgr_Selection.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
@@ -41,9 +42,9 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_Circle,AIS_InteractiveObject)
|
|||||||
AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& aComponent):
|
AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& aComponent):
|
||||||
AIS_InteractiveObject(PrsMgr_TOP_AllView),
|
AIS_InteractiveObject(PrsMgr_TOP_AllView),
|
||||||
myComponent(aComponent),
|
myComponent(aComponent),
|
||||||
myUStart(0.),
|
myUStart (0.0),
|
||||||
myUEnd(2*M_PI),
|
myUEnd (2.0 * M_PI),
|
||||||
myCircleIsArc(Standard_False),
|
myCircleIsArc (Standard_False),
|
||||||
myIsFilledCircleSens (Standard_False)
|
myIsFilledCircleSens (Standard_False)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -60,7 +61,7 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& theComponent,
|
|||||||
myComponent (theComponent),
|
myComponent (theComponent),
|
||||||
myUStart (theUStart),
|
myUStart (theUStart),
|
||||||
myUEnd (theUEnd),
|
myUEnd (theUEnd),
|
||||||
myCircleIsArc (Standard_True),
|
myCircleIsArc (Abs (Abs (theUEnd - theUStart) - 2.0 * M_PI) > gp::Resolution()),
|
||||||
myIsFilledCircleSens (theIsFilledCircleSens)
|
myIsFilledCircleSens (theIsFilledCircleSens)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -207,14 +208,14 @@ void AIS_Circle::UnsetWidth()
|
|||||||
//function : ComputeCircle
|
//function : ComputeCircle
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
|
void AIS_Circle::ComputeCircle (const Handle(Prs3d_Presentation)& thePresentation)
|
||||||
{
|
{
|
||||||
|
|
||||||
GeomAdaptor_Curve curv(myComponent);
|
GeomAdaptor_Curve curv(myComponent);
|
||||||
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
||||||
myDrawer->SetDeviationCoefficient(1.e-5);
|
myDrawer->SetDeviationCoefficient (1.e-5);
|
||||||
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
|
StdPrs_DeflectionCurve::Add (thePresentation, curv, myDrawer);
|
||||||
myDrawer->SetDeviationCoefficient(prevdev);
|
myDrawer->SetDeviationCoefficient (prevdev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,13 +224,13 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
|
|||||||
|
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation)
|
void AIS_Circle::ComputeArc (const Handle(Prs3d_Presentation)& thePresentation)
|
||||||
{
|
{
|
||||||
GeomAdaptor_Curve curv(myComponent,myUStart,myUEnd);
|
GeomAdaptor_Curve curv(myComponent, myUStart, myUEnd);
|
||||||
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
||||||
myDrawer->SetDeviationCoefficient(1.e-5);
|
myDrawer->SetDeviationCoefficient (1.e-5);
|
||||||
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
|
StdPrs_DeflectionCurve::Add (thePresentation, curv, myDrawer);
|
||||||
myDrawer->SetDeviationCoefficient(prevdev);
|
myDrawer->SetDeviationCoefficient (prevdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -237,27 +238,25 @@ void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation)
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void AIS_Circle::ComputeCircleSelection(const Handle(SelectMgr_Selection)& aSelection)
|
void AIS_Circle::ComputeCircleSelection (const Handle(SelectMgr_Selection)& theSelection)
|
||||||
{
|
{
|
||||||
Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this);
|
Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this);
|
||||||
Handle(Select3D_SensitiveCircle) seg = new Select3D_SensitiveCircle (eown,
|
Handle(Select3D_SensitiveCircle) aCirc = new Select3D_SensitiveCircle (anOwner,
|
||||||
myComponent->Circ(),
|
myComponent->Circ(),
|
||||||
myIsFilledCircleSens);
|
myIsFilledCircleSens);
|
||||||
aSelection->Add(seg);
|
theSelection->Add (aCirc);
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ComputeArcSelection
|
//function : ComputeArcSelection
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void AIS_Circle::ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelection)
|
void AIS_Circle::ComputeArcSelection (const Handle(SelectMgr_Selection)& theSelection)
|
||||||
{
|
{
|
||||||
|
Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this);
|
||||||
|
Handle(Select3D_SensitivePoly) aSeg = new Select3D_SensitivePoly (anOwner,
|
||||||
Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this);
|
myComponent->Circ(),
|
||||||
Handle(Select3D_SensitiveCircle) seg = new Select3D_SensitiveCircle (eown,
|
myUStart, myUEnd,
|
||||||
myComponent->Circ(),
|
myIsFilledCircleSens);
|
||||||
myUStart, myUEnd,
|
theSelection->Add (aSeg);
|
||||||
myIsFilledCircleSens);
|
|
||||||
aSelection->Add(seg);
|
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include <NCollection_IndexedDataMap.hxx>
|
#include <NCollection_IndexedDataMap.hxx>
|
||||||
#include <TopoDS_Compound.hxx>
|
#include <TopoDS_Compound.hxx>
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TColStd_MapTransientHasher.hxx>
|
|
||||||
|
|
||||||
class StdSelect_BRepOwner;
|
class StdSelect_BRepOwner;
|
||||||
|
|
||||||
@@ -104,7 +103,7 @@ protected: //! @name override presentation computation
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
typedef NCollection_IndexedDataMap<Handle(AIS_ColoredDrawer), TopoDS_Compound, TColStd_MapTransientHasher> DataMapOfDrawerCompd;
|
typedef NCollection_IndexedDataMap<Handle(AIS_ColoredDrawer), TopoDS_Compound> DataMapOfDrawerCompd;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include <StdSelect.hxx>
|
#include <StdSelect.hxx>
|
||||||
#include <StdSelect_BRepOwner.hxx>
|
#include <StdSelect_BRepOwner.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopTools_OrientedShapeMapHasher.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject)
|
||||||
|
|
||||||
@@ -241,7 +240,7 @@ void AIS_ConnectedInteractive::computeSubShapeSelection (const Handle(SelectMgr_
|
|||||||
const Standard_Integer theMode)
|
const Standard_Integer theMode)
|
||||||
{
|
{
|
||||||
typedef NCollection_List<Handle(Select3D_SensitiveEntity)> SensitiveList;
|
typedef NCollection_List<Handle(Select3D_SensitiveEntity)> SensitiveList;
|
||||||
typedef NCollection_DataMap<TopoDS_Shape, SensitiveList, TopTools_OrientedShapeMapHasher>
|
typedef NCollection_DataMap<TopoDS_Shape, SensitiveList>
|
||||||
Shapes2EntitiesMap;
|
Shapes2EntitiesMap;
|
||||||
|
|
||||||
if (!myReference->HasSelection (theMode))
|
if (!myReference->HasSelection (theMode))
|
||||||
|
@@ -19,11 +19,10 @@
|
|||||||
|
|
||||||
#include <AIS_InteractiveObject.hxx>
|
#include <AIS_InteractiveObject.hxx>
|
||||||
#include <AIS_GlobalStatus.hxx>
|
#include <AIS_GlobalStatus.hxx>
|
||||||
#include <TColStd_MapTransientHasher.hxx>
|
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.hxx>
|
||||||
|
|
||||||
typedef NCollection_DataMap<Handle(AIS_InteractiveObject),Handle(AIS_GlobalStatus),TColStd_MapTransientHasher> AIS_DataMapOfIOStatus;
|
typedef NCollection_DataMap<Handle(AIS_InteractiveObject),Handle(AIS_GlobalStatus)> AIS_DataMapOfIOStatus;
|
||||||
typedef NCollection_DataMap<Handle(AIS_InteractiveObject),Handle(AIS_GlobalStatus),TColStd_MapTransientHasher>::Iterator AIS_DataMapIteratorOfDataMapOfIOStatus;
|
typedef NCollection_DataMap<Handle(AIS_InteractiveObject),Handle(AIS_GlobalStatus)>::Iterator AIS_DataMapIteratorOfDataMapOfIOStatus;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -17,10 +17,11 @@
|
|||||||
//! Dragging action.
|
//! Dragging action.
|
||||||
enum AIS_DragAction
|
enum AIS_DragAction
|
||||||
{
|
{
|
||||||
AIS_DragAction_Start, //!< (try) start dragging object
|
AIS_DragAction_Start, //!< (try) start dragging object
|
||||||
AIS_DragAction_Update, //!< perform dragging (update position)
|
AIS_DragAction_Confirmed, //!< dragging interaction is confirmed.
|
||||||
AIS_DragAction_Stop, //!< stop dragging (save position)
|
AIS_DragAction_Update, //!< perform dragging (update position)
|
||||||
AIS_DragAction_Abort, //!< abort dragging (restore initial position)
|
AIS_DragAction_Stop, //!< stop dragging (save position)
|
||||||
|
AIS_DragAction_Abort, //!< abort dragging (restore initial position)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _AIS_DragAction_HeaderFile
|
#endif // _AIS_DragAction_HeaderFile
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Created on: 1997-01-17
|
// Created on: 1997-01-17
|
||||||
// Created by: Robert COUBLANC
|
// Created by: Robert COUBLANC
|
||||||
// Copyright (c) 1997-1999 Matra Datavision
|
// Copyright (c) 1997-1999 Matra Datavision
|
||||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||||
@@ -945,7 +945,7 @@ void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI,
|
|||||||
Standard_Boolean isRedisplayed = Standard_False;
|
Standard_Boolean isRedisplayed = Standard_False;
|
||||||
for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
|
for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
|
||||||
{
|
{
|
||||||
Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
|
const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key();
|
||||||
if (anObj->Type() != theKOI)
|
if (anObj->Type() != theKOI)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@@ -1001,6 +1001,14 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TColStd_ListOfInteger aModes;
|
||||||
|
ActivatedModes (theIO, aModes);
|
||||||
|
|
||||||
|
for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next())
|
||||||
|
{
|
||||||
|
mgrSelector->Deactivate (theIO, aModesIter.Value());
|
||||||
|
}
|
||||||
|
|
||||||
mgrSelector->RecomputeSelection (theIO);
|
mgrSelector->RecomputeSelection (theIO);
|
||||||
|
|
||||||
const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theIO);
|
const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theIO);
|
||||||
@@ -1010,10 +1018,7 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TColStd_ListOfInteger aModes;
|
for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next())
|
||||||
ActivatedModes (theIO, aModes);
|
|
||||||
TColStd_ListIteratorOfListOfInteger aModesIter (aModes);
|
|
||||||
for (; aModesIter.More(); aModesIter.Next())
|
|
||||||
{
|
{
|
||||||
mgrSelector->Activate (theIO, aModesIter.Value());
|
mgrSelector->Activate (theIO, aModesIter.Value());
|
||||||
}
|
}
|
||||||
@@ -1150,7 +1155,7 @@ void AIS_InteractiveContext::SetDisplayMode(const Standard_Integer theMode,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
|
const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value();
|
||||||
aStatus->SetDisplayMode (theMode);
|
aStatus->SetDisplayMode (theMode);
|
||||||
|
|
||||||
if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
|
if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
|
||||||
@@ -2246,7 +2251,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)&
|
|||||||
|
|
||||||
for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
|
for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
|
||||||
{
|
{
|
||||||
const Handle(SelectMgr_SelectableObject) anObject = anIter.Key();
|
const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key();
|
||||||
Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
|
Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
|
||||||
aBndSelected.Add (aTmpBox);
|
aBndSelected.Add (aTmpBox);
|
||||||
}
|
}
|
||||||
@@ -3223,6 +3228,30 @@ void AIS_InteractiveContext::ClearSelected (const Standard_Boolean theToUpdateVi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : isDetected
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean AIS_InteractiveContext::isDetected (const Handle(AIS_InteractiveObject)& theObject)
|
||||||
|
{
|
||||||
|
for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper(); aDetIter++)
|
||||||
|
{
|
||||||
|
Handle(SelectMgr_EntityOwner) aPicked = MainSelector()->Picked(myDetectedSeq(aDetIter));
|
||||||
|
Handle(AIS_InteractiveObject) anObj;
|
||||||
|
if (!aPicked.IsNull())
|
||||||
|
{
|
||||||
|
anObj = Handle(AIS_InteractiveObject)::DownCast(aPicked->Selectable());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!anObj.IsNull()
|
||||||
|
&& anObj == theObject)
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetSelected
|
//function : SetSelected
|
||||||
//purpose : Sets the whole object as selected and highlights it with selection color
|
//purpose : Sets the whole object as selected and highlights it with selection color
|
||||||
@@ -3283,7 +3312,8 @@ void AIS_InteractiveContext::SetSelected (const Handle(AIS_InteractiveObject)& t
|
|||||||
}
|
}
|
||||||
|
|
||||||
// added to avoid untimely viewer update...
|
// added to avoid untimely viewer update...
|
||||||
mySelection->ClearAndSelect (anOwner);
|
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
|
||||||
|
mySelection->ClearAndSelect (anOwner, myFilters, isDetected (anObj));
|
||||||
|
|
||||||
if (myAutoHilight)
|
if (myAutoHilight)
|
||||||
{
|
{
|
||||||
@@ -3345,7 +3375,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t
|
|||||||
unhighlightSelected();
|
unhighlightSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
mySelection->ClearAndSelect (theOwner);
|
mySelection->ClearAndSelect (theOwner, myFilters, isDetected (anObject));
|
||||||
if (myAutoHilight)
|
if (myAutoHilight)
|
||||||
{
|
{
|
||||||
Handle(Prs3d_Drawer) aCustomStyle;
|
Handle(Prs3d_Drawer) aCustomStyle;
|
||||||
@@ -3396,16 +3426,17 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!myFilters->IsOk(theOwner) && !theOwner->IsSelected())
|
if (!myFilters->IsOk (theOwner) && !theOwner->IsSelected())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mySelection->Select (theOwner);
|
AIS_SelectionScheme aSelScheme = theOwner->IsSelected() ? AIS_SelectionScheme_Remove : AIS_SelectionScheme_Add;
|
||||||
|
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
|
||||||
|
mySelection->Select (theOwner, myFilters, aSelScheme, isDetected (anObj));
|
||||||
|
|
||||||
if (myAutoHilight)
|
if (myAutoHilight)
|
||||||
{
|
{
|
||||||
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
|
|
||||||
Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj);
|
Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj);
|
||||||
if (!aStatusPtr)
|
if (!aStatusPtr)
|
||||||
{
|
{
|
||||||
@@ -3464,7 +3495,8 @@ Standard_Boolean AIS_InteractiveContext::SetSelectedState (const Handle(SelectMg
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity);
|
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast(theEntity->Selectable());
|
||||||
|
const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity, myFilters, AIS_SelectionScheme_Remove, isDetected (anObj));
|
||||||
theEntity->SetSelected (false);
|
theEntity->SetSelected (false);
|
||||||
return aSelStatus == AIS_SS_Removed;
|
return aSelStatus == AIS_SS_Removed;
|
||||||
}
|
}
|
||||||
|
@@ -1302,6 +1302,9 @@ protected: //! @name internal methods
|
|||||||
Standard_EXPORT AIS_StatusOfDetection moveTo (const Handle(V3d_View)& theView,
|
Standard_EXPORT AIS_StatusOfDetection moveTo (const Handle(V3d_View)& theView,
|
||||||
const Standard_Boolean theToRedrawOnUpdate);
|
const Standard_Boolean theToRedrawOnUpdate);
|
||||||
|
|
||||||
|
//! Returns True if the object is detected.
|
||||||
|
Standard_EXPORT Standard_Boolean isDetected (const Handle(AIS_InteractiveObject)& theObject);
|
||||||
|
|
||||||
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
|
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
|
||||||
Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
|
Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user