1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

..

969 Commits

Author SHA1 Message Date
inv
096cf1a146 Update 2022-11-04 13:27:23 +03:00
inv
c31a49b778 Update 2022-11-04 13:20:37 +03:00
inv
bad68e8523 Update 2022-11-04 13:02:30 +03:00
inv
4213cad6ed Update 2022-11-04 13:02:08 +03:00
inv
234ee68005 Update 2022-11-04 13:02:08 +03:00
inv
d348d04593 Update 2022-11-04 13:02:08 +03:00
inv
b24aa87dc3 CR3 adding get files 2022-11-04 13:02:07 +03:00
inv
12d8001d20 Correction Adaptor3d_Curve.cxx 2022-11-03 18:55:30 +03:00
inv
fd4af9bf4e Update 2022-11-03 18:50:02 +03:00
smoskvin
d404757de0 Increment OCCT version up to 7.8.0dev 2022-11-02 22:23:14 +03:00
atychini
402ad27743 0033190: Error on de_wrapper/configuration/A3
Removing provider.VRML.OCC.read.memory.limit from the test because this parameter doesn't exist inside the Vrml_ConfigurationNode class
2022-11-02 22:22:09 +03:00
aba
f8d4cfbb80 0027142: Data Exchange - add possibility to set location in XCAFDoc_ShapeTool interface 2022-10-31 19:19:33 +03:00
azv
aaacd83510 0033032: Samples - Warning on Ubuntu 20.04
Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
2022-10-31 19:18:08 +03:00
mahaidong
3e06b70623 0032350: Data Exchange - STEPControl_Writer.writeStream(std::ostream)
STEPCAFControl_Writer::WriteStream(), STEPControl_Writer::WriteStream() - added interface for writing into stream.
STEPCAFControl_Reader::ReadStream() - added stream reading method (similar to STEPControl_Reader::ReadStream()).

Added option -stream to commands ReadStep, WriteStep, and testwritestep.
2022-10-31 19:18:08 +03:00
oan
b77de43fb0 0032053: Mesh - Invalid mesh after shape scaling
Added test case
2022-10-31 19:18:08 +03:00
oan
59223e118d 0031926: Shape Healing - ShapeAnalysis::OuterWire() considers next iteration element always to be a wire causing skipping of primal one
ShapeAnalysis::OuterWire(): fixed missed logic when TopoDS_Iterator notifies about more objects to iterate, but there are only vertices and no additional wires at all.
2022-10-31 19:18:07 +03:00
oan
3b5a94a165 0033050: [Regression to OCCT 7.3.0] Mesh - meshing deflection is not reached
Add parameter EnableControlSurfaceDeflectionAllSurfaces to IMeshTools_Parameters enabling possibility to optimize mesh even on analytical surfaces;
Add corresponding parameter -surf_def_all to incmesh Draw command.
2022-10-31 19:18:07 +03:00
akaftasev
5cbd98a5be 0029093: BOP PaveFiller hungs and constantly consumes memory
Method IntWalk_PWalking::ExtendLineInCommonZone(...) now is not called if the already found intersection point is on surface boundary.
As result, the intersection line going along any boundary will never be extended. It is appropriate for high-level OCCT-algorithm because they will take the boundary (not computed line) as intersection result.
2022-10-31 19:18:07 +03:00
akaftasev
25b5e83a4c 0032691: Modeling Algorithms - Exception when trying to build solid during sweep algorithm
Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status.
2022-10-31 19:18:06 +03:00
vmigunov
3c9178dd5c 0033165: Data exchange - Instance name is not saved during writing step file
Instance name is saved also with identity location transformation
2022-10-31 18:22:37 +03:00
oan
f73592edf0 0028500: Artifact in shaded view of the shape
Increase minimum number of discretization points by one explicitly on each iteration of model healer to cover cases degenerated to line (for cases when face consists of 2 edges only).
2022-10-31 18:21:44 +03:00
oan
a24391a133 0033163: Bad definition of values in IMeshData_Status
Corrected value of status enum
2022-10-31 18:21:08 +03:00
oan
3a24514d48 0031476: Wrong shading of a toroidal face from a SAT file
Added test case
2022-10-31 18:20:29 +03:00
kgv
3453354ee1 0033141: BVH_BaseBox<T, 3, BVH_Box>::Transformed() returns empty box for identity matrix 2022-10-31 18:19:37 +03:00
Eugeny Maltchikov
9218d04b9a 0033138: [Foundation Classes] - NCollection_IncAllocator- Decrease the default block size
Set default memory block size for IncAllocator to 12KB to make sure the Low Fragmentation Heap is used for memory allocations on Windows platform.
2022-10-31 18:18:21 +03:00
abulyche
259b930379 0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case
Fixed the Toroidal surface recognition;
The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI];
The test case bugs/modalg_5/bug23954: BAD -> OK.
2022-10-31 18:17:37 +03:00
ddzama
3536158f11 0033153: Configuration: Linker error when building from source for VS2022 x64.
With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:

1>Image_VideoRecorder.obj :
  error LNK2019:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)"
      (?av_strerror@@YAHHPEAD_K@Z) referenced in function
      "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
      (?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z)
1>Media_FormatContext.obj :
  error LNK2001:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)

And many other similar errors. Similar errors occures in some other projects too:

TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView

Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.

COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).

Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:

https://gitlab.kitware.com/cmake/cmake/-/issues/18353

0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.

Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
2022-10-31 18:16:19 +03:00
ddzama
cb77bfc4f0 0033155: Regression [0033117] Coding, relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used.
After emploing intel oneTBB of version 2021.5 on NEXT platforms arises error on OCC Pr.:

`
*/ld: */libfreetype.a(truetype.o): relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used when making a shared object; recompile with -fPIC
*/ld: final link failed: bad value
`

Proposed solution: linking with shared object of libfreetype, rather than with archive library.
Despite that error occurred only in OCC Pr., it is worth to accept changes for OCCT too.
2022-10-31 18:14:31 +03:00
ddzama
92f1875fc0 0033147: [Regression to 7.6.3] Coding, Configuration - CMake Error TBB "Directory is not set".
Previous approach do not taking into account, that oneTBB library may be installed in the system folder
on Linux. So, solve the problem it is proposed to employ find_package utility, that works great
as on Windows, as on Linux.
2022-10-31 18:13:44 +03:00
atereshi
a453f9d128 0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and without natural bound not correctly read
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.
2022-10-31 18:10:55 +03:00
gelin
492b09dcae 0032850: Modeling Algorithms - Surface Surface Intersect Lost one line
IntStart_SearchOnBoundaries.gxx - improving tangent criteria
2022-10-31 18:09:15 +03:00
kgv
f55fe3b3f7 0033149: Mesh - misprint in BRepMesh_NURBSRangeSplitter::computeGrainAndFilterParameters() 2022-10-31 18:08:24 +03:00
atereshi
51329afcef 0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: There is no possibility to change shape healing options from DRAW without rewriting resource file.
Change: Shape healing parameters from STEP and IGES resource files were duplicated to InterfaceStatic. Resource manager initialize from InterfaceStatic if resource file name is empty.
Result: User can operationally change shape healing parameters from DRAW command using "param" command.
2022-10-31 18:06:02 +03:00
ddzama
13f5da81ad 0033152: Fix searching tbb in 3rdparty directory.
Currently directory containing tbb 3rdparty installation should match the template tbb*.
But after using oneTbb of version 2021.5 standard installation directory is onetbb*.
So, for this 3rdparty modify searching template.
2022-10-31 18:01:27 +03:00
nmanchen
f0049a9599 0028640: Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape
Adapt test case, the problem is not reproduced any more.
Problem is fixed by the commit: 46478ffe32 (0030008: BRepMesh does not respect angular deflection in internal area of bspline surface)
2022-09-30 10:35:34 +03:00
smoskvin
0b4962a7f0 Update version up to 7.7.0 2022-09-26 20:06:01 +03:00
ddzama
b3284f3ba9 0033117: migration to intel oneTBB 2021.5.0 (c++20 ready)
MSVC 2022/c++20.

After employed c++20 language standard errors of compilation in intel oneTBB occurred.
To get rid of compilation errors proposed moving on actual (2021.5.0) intel oneTBB occ products and occt.

After migration errors of compilation of TKernel and TMath have been occurred...
...Error occurred if using c++20 standard with new oneTBB 2021.5.0.
The error was:
   Error C2672 'tbb::v1::parallel_for_each': no matching overloaded function found TKernel
   could be 'void tbb::detail::d2::parallel_for_each(Iterator,Iterator,const Body &)' TKernel
   'tbb::detail::d2::parallel_for_each': the associated constraints are not satisfied TKernel
Note, that if we use c++14 or c++17, all ok, error does not occures.
To solve the problem, i have to modify `UniversalIterator` class:
`value_type` instead `UniversalIterator` converted to `IteratorInterface*`
`pointer` = `reference` = `value_type`
Method `DownCast` moved into `FunctorInterface` abstract class.
argument `UniversalIterator& item` of the unary fuctions converted to `IteratorInterface*`.
The proposed solution removes compilation error.

Affected projects: TKernel, TMath
Affected sources: src/OSD/OSD_Parallel.hxx, src/OSD/OSD_Parallel_Threads.cxx
Affected classes: class OSD_Parallel, OSD_Parallel::UniversalIterator, OSD_Parallel::FunctorInterface, OSD_Parallel::FunctorWrapperIter, OSD_Parallel:;FunctorWrapperInt.
2022-09-25 01:09:12 +03:00
jgv
b95eefe1c2 0031992: Modeling Algorithms - Offset of closed B-spline edge fails
1. Increase the tolerance of approximation.
2. Update auxiliary Draw command "topoload" for usage of option "-approx".

Add missing comment
2022-09-23 18:31:02 +03:00
atychini
5bde4773f9 0032820: Data Exchange - add VRML reader to XCAF document
Implementing VRML reader into XCAF document.
Updating DE_Wrapper according to VRML Reader.
2022-09-23 18:30:08 +03:00
ona
b0f92d3d5c 0032239: Data Exchange, STEP import - bounding box is too large
- ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus
- Calculation of degenerated torus bounding box is fixed
- Test reference data is changed
2022-09-21 23:09:17 +03:00
mzernova
b9f787f180 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback
Added -elapsedTime option to DRAW vanim command
2022-09-20 12:03:58 +03:00
oan
a939fd40eb 0031853: Mesh - holes in triangulation with large linear deflection
0030442: Mesh - broken triangulation on pipe shape

Scale down min size parameter for NURBS taking into account its U and V resolution in order to prevent comparison of 2d parameters with 3d value involved in filtering process.
2022-09-16 18:35:32 +03:00
oan
c4ea4ca3d1 0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0]
0032422: Mesh - Weird rendering
0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient

Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles.

Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters.
2022-09-16 18:34:44 +03:00
oan
f3573fb54b 0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face
Added test cases
2022-09-13 23:30:33 +03:00
knosulko
78aade7569 0033017: Implement an algorithm to find a proximity between a pair of shapes
Extend "proximity" command to be able to compute the proximity value;
Implement classes for calculate proximity value between two shapes;
Add possibility to set up the number of sample points for the input shapes;
Add tests lowalgos/proximity.
2022-09-13 23:29:39 +03:00
kgv
03b0ca59cb 0033142: Configuration, genproj - ExpToCasExe building fails with generated VS projects
Generate executable single MSVC project per-Unit instead of per-source file.
2022-09-13 23:28:49 +03:00
ddzama
d6baf70a93 0032960: Wrong result of BRepExtrema_DistShapeShape after translation.
Add corresponding test.
2022-09-13 10:57:29 +03:00
ifv
526c506cb0 0032859: Modeling Algorithms - BRepLib_FindSurface not return an expect plane
BRepLib/BRepLib_FindSurface.cxx = removing very small values from coordinate of normal
bug32859 - test case added
2022-09-10 17:14:05 +03:00
ddzama
2949b238c1 0033137: Updating minimal supported Microsoft Visual Studio version up to 2015 (VC140).
Microsoft Visual C++ compiler of version 2015 or higher should used to compile OCCT and Products on Windows.
2022-09-10 17:14:05 +03:00
oan
dfb5aebd35 0032982: [Regression to 7.3.0] Mesh - Meshing the shape takes too long and visualization is bad
New formula to calculate number of points along V axis of a cone depending on ratio of its size along V and U.
2022-09-08 22:06:40 +03:00
atychini
8da2801496 0033058: JT Import - perform XT translation in multiple threads
Creating mutex for proper parallel processing.
2022-09-06 20:10:58 +03:00
ddzama
e92d322d40 0032921: Configuration, CMake - allow selecting C++ standard.
Make C++ standard to be enable from cmake settings:

User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD.
For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available.
To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1.

Available next standard items:
C++11
C++14
C++17
C++20
C++23

This issue consists from several steps to achive main goal:
1) Configuratiuon, CMake - allow selecting C++ standard.
2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD).
3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!)
4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation.
5) Update CMAKE requirements in documentation.
6) Set C++11 standard for several projects.
2022-09-06 20:06:54 +03:00
jgv
b71cb85f67 0032214: Modeling Algorithms - 2d Offset produces wrong result
Add new option to convert input contours into ones consisting of 2D circular arcs and 2D linear segments only.

Update documentation
2022-09-06 20:04:21 +03:00
abv
05cfce4d83 0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
Integration of ExpToCas tool ported to modern state of OCCT:
- new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator
- executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes

Formatting added files from package Express following OCCT Coding Rules

Changes for correspondence generated files to OCCT Code Rules.

Add generation hxx files with declaration of arrays.
If field is a HArray1 method for get length of array and method for get element of array by its index are generated.

Changes for generation parser from Lex and YACC files.

Update description file ReadMe.md
2022-09-06 19:59:09 +03:00
ddzama
d7eefb11bf 0032986: Samples - csharp sample is crashed on compilation with VC++ 2022
While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured:

warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17
error C7681: two-phase name lookup is not supported for C++/CLI or C++/CX; use /Zc:twoPhase-

Officially, C++/CLI mode does not support C++ version newer than C++17, so we should not demand C++20 to compile csharp samples.
Alternative solution - using /permissive (ConformanceMode = false), rather than default value /permissive- (ConformanceMode = true)
option to compile OCCTProxy. But alternative solution has been denied.
So, here is nothing to do to fix compilation of OCCTProxy project.

Nevertheless, error occures in IE_WPF_WinForms and IE_WinForms - if we trying to compile with VC++ 2022 (not demanding c++20):

warning MSB3274: The primary reference "*\OCCTProxy.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework.
This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8.
So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015.
2022-09-06 19:57:24 +03:00
abulyche
80d4753574 0032876: Modeling algorithms - BRepClass_FaceClassifier issue
Modification of checking points for the state "ON" in BRepClass_Intersector.cxx;
Added the test for this ticket;
test case lowalgos/classifier/bug377: BAD -> OK
2022-09-06 19:48:57 +03:00
ifv
ed6a17ef6c 0033104: Modeling Algorithms - Checking for canonical geometry: surface, close to a cylinder, is not recognized
Adjusting parameters of algorithm for recognizing cylindrical surfaces.
Test case added
2022-09-05 19:24:03 +03:00
mzernova
2182812a5b 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should handle selection tolerance changes 2022-09-05 19:21:50 +03:00
akaftasev
92915edda8 0030955: [Regression to 7.3.0] Modeling Algorithms - Incorrect result of fuse operation
Added test case.
2022-09-01 21:55:21 +03:00
mzernova
06aa200142 0032172: Visualization, TKOpenGl - implement simple shadow mapping for a spot light source
added test: opengl/data/shadows/spotlight
2022-08-31 10:27:30 +03:00
dpasukhi
acac44d571 0033053: Data Exchange, Step Export - Compound with vertex is ignored
Fixed problem with deep compound including with vertex group.
2022-08-26 17:39:36 +03:00
mzernova
7aaed2ce3b 0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder
Select3D_SensitiveCircle now inherits directly from Select3D_SensitiveEntity.
The sensitive circle sector is created using the Select3D_SensitivePoly class directly.

Added appropriate methods for selecting sensitive circles.
Added parameter myIsHollow to Select3D_SensitiveCylinder class.
It allows you to search for intersections with cylinders without covers.

The Draw vcircle command has been extended with UStart and UEnd parameters
to create a sector of a circle.

Added tests: vselect/cone_cylinder/circle_sector
             vselect/cone_cylinder/circle_wire
             vselect/cone_cylinder/filled_circle
             vselect/cone_cylinder/transformed
             vselect/cone_cylinder/hollow_cone_cyl
2022-08-26 17:38:19 +03:00
ngavrilo
da76ea432b 0032782: Visualization, TKD3DHost - improve robustness of test case opengl/drivers/d3dhost 2022-08-23 18:35:39 +03:00
gka
53152e6dd9 0033101: Data Exchange - STEP reader makes unexpected enormous scaling of some parts
Modification to apply units scale factor for faces based on the triangulation
2022-08-23 18:34:10 +03:00
ddzama
1a1739b200 0032957: Add Standard_Noexcept definition
into Standard_Macro.hxx and
employ Standard_Noexcept.
2022-08-18 11:55:14 +03:00
msv
fd5c113a03 0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations
Make XCAFDoc_Editor::RescaleGeometry to pass the flag theCopyMesh==true
in call to BRepBuilderAPI_Transform::Perform.

Correct the help of the command XRescaleGeometry.
2022-08-13 13:53:14 +03:00
ichesnok
f74f684b16 0032979: Data Exchange, RWGltf_CafWriter - support multi-threaded Draco compression
'MultiThread' field was added to structure RWGltf_DracoParameters for using multithreading.
Class CafWriter_DracoEncodingFunctor was added for multithreaded compression.
2022-08-12 19:04:03 +03:00
dpasukhi
621ed3bc36 0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m
Fixed problem with dimension tolerance values (upper/lower)
 - Update supported type for tolerance measure unit, now we can handle base class
2022-08-11 10:43:32 +03:00
mzernova
81d569625e 0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions
Fixed bounding boxes for Select3D_SensitiveCylinder.

Added display of Select3D_SensitiveCylinder presentation using the "vsensdis" command.
Added test vselect/bugs/bug33084.
2022-08-04 17:50:46 +03:00
ngavrilo
6072d3093c 0032992: Visualization - Font_TextFormatter should wrap words when possible 2022-08-02 17:13:03 +03:00
jgv
e1b097eb67 0033006: Modelling Algorithms - UnifySameDomain raises exception
Correct processing cases where a group of faces lies on U-periodic and V-periodic (torus-like) surface.

Add comments according to the remarks
2022-07-29 19:11:52 +03:00
jgv
92d22d7d62 0033080: Wrong projection point from ShapeAnalysis_Surface
Correct Draw command "projface" so that it really finds only projection points belonging to the face.
2022-07-29 19:10:37 +03:00
dpasukhi
1b423e3287 0033068: Draw Harness, XDEDRAW - improve XGetProperties command to work with all document labels
Upgrade DRAW function XGetProperties to work with all document labels or sequence of labels
2022-07-24 22:33:24 +03:00
kgv
cb8519be19 0033074: Visualization, TKOpenGl - PBR shader compilation error on Mesa OpenGL 3.10033074
Graphic3d_ShaderManager::getPBREnvBakingProgram() - fix setting Graphic3d_ShaderProgram::SetPBR()
before defining GLSL version via defaultGlslVersion() that relies on this property.
2022-07-22 20:30:00 +03:00
kgv
617a2905a9 0033073: Coding Rules, RWGltf_CafWriter - suppress CLang warning coming from Draco library 2022-07-22 20:29:08 +03:00
kgv
18559e93cf 0033072: Configuration - ViewerTest_EventManager.cxx compilation error due to missing header on Emscripten
Added missing `#include <Message.hxx>`.
2022-07-22 20:28:01 +03:00
abulyche
c2e01cc5cc 0024049: Modeling Algorithms - crash in BRepOffsetAPI_MakePipe
Added the test for this ticket.
2022-07-22 20:27:15 +03:00
oan
0acc1ab47c 0033060: [Regression to 7.4.0] Mesh - Sub-precisional links provoke failure on face
Slightly increase exact resolution so to cover links with approximate length equal to resolution itself on sub-resolution differences.
2022-07-19 21:22:41 +03:00
ifv
b315a85dd7 0032940: Canonical Recognition: Some surfaces are not recognized as cylindrical surfaces
New method for recognizing cylindrical surfaces based on analysis Gaussian field of initial surface is added  in
class GeomConvert_SurfToAnaSurf
2022-07-19 21:20:53 +03:00
atychini
411ad1a819 0033055: Data Exchange, RWPly_Provider - remove dependency from BRepLib_PointCloudShape
Removing PointCloud writing feature from the RWPly_Provider class.
Getting rid of Pointcloud-related parameters in the RWPly_ConfigurationNode.
2022-07-18 07:32:54 +03:00
kgv
bbf49a300c 0033066: Visualization - null pointer dereference in MeshVS_ElementalColorPrsBuilder::Build() function
Added missing Boolean flag check.
2022-07-15 18:23:06 +03:00
ona
0bab2704ae 0031080: Data Exchange, STL reader - improve API for reading multi-domain STL files
reading of multidomain stl files into separate Poly_Triangulation objects
2022-07-15 18:22:10 +03:00
azv
33c8a72788 0031479: Modeling Algorithms - exception on geometry transformation of triangulation-only shapes (without geometry surface)
* Avoid crash in BRepBuilderAPI_GTransform algorithm. The crash in BRepBuilder_Transform has been solved by 0032716.
* Move copying modifier to BRepTools package.
* Implement copying of triangulation in BRepTools_NurbsConvertModification.
* Implement transformation of a triangulation in BRepTools_GTrsfModification.
* Update test case bugs/mesh/bug22778 to clean the triangulation after conversion to NURBS (reproduce the same behavior as before).
2022-07-08 19:30:13 +03:00
abulyche
315ed0be41 0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation
* Implement methods for copying tessellation to BRepTools_TrsfModification to keep the triangulation during transformation.
* Add tests to reproduce the problem.
2022-07-08 19:30:13 +03:00
azv
d74b1e9dd3 0033049: Command 'tclean -geom' does not remove all geometric objects from the shape
Remove unused P-curves when cleaning the geometry
2022-07-08 19:30:12 +03:00
ifv
b47b075ac5 0032995: Modeling algorithms - Interface for checking canonical geometry
GeomConvert_CurveToAnaCurve, GeomConvert_SurfToAnaSurf - geometrical algorithms
for converting geometrical curve and surfaces in canonical geometry with given tolerance.

ShapeAnalysis_CanonicalRecognition - interface for checking canonical geometry.
2022-07-08 19:26:37 +03:00
kgv
7a52478f16 0032952: Coding Rules, Graphic3d_DisplayPriority - rename inconsistent Below2/Above1 enties
Below/Below2/Below3 triplet has been renamed to Below/Below1/Below2
for consistency with Above/Above1/Above2
2022-07-07 19:28:28 +03:00
kgv
9db675b3d6 0033056: Visualization - add front face culling option
Added Graphic3d_TypeOfBackfacingModel_FrontCulled enumeration value.
OpenGl_Context::SetFaceCulling() now supports GL_FRONT in addition to GL_BACK.

Added -faceCulling option to vaspects Draw command.
2022-07-07 19:27:17 +03:00
aml
e1d576bf31 0033046: Modeling algorithms - improve performance of per-facet shape construction
Add new class (BRepBuilderAPI_MakeShapeOnMesh) to reconstruct shape from triangulation on per-facet basis.
2022-07-07 19:26:22 +03:00
ifv
e1f7382910 0028243: Bad result of the canonical recognition
LProp/LProp_CLProps.gxx - minor modification to avoid floating overflow because of multiplication of large values
2022-07-07 19:23:55 +03:00
kgv
dee5eb82b5 0033054: Configuration - link errors due to missing references to new TKXDE toolkit
src/OS/DataExchange.tcl - added missing new toolkits.
TKRWMesh - added missing reference to TKTopAlgo (for using BRepLib_PointCloudShape).
Removed redundant dependency from TKBinXCAF.
DRAWEXE - added missing references for a static build.

THE_CONFIGURATION_SCOPE definition has been corrected to postpoine calling constructor till the first variable usage.
Fixed compiler warning at SelectMgr_Frustum<3>::DumpJson() due to misleading Standard_EXPORT for an inline template method definition.
2022-07-07 19:23:00 +03:00
aml
c2eed2a326 0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit
Add test and explanatory comment.
2022-07-06 19:16:55 +03:00
ichesnok
3a2ca49b6d 0032867: Data Exchange - Implement Draco compression for writing glTF
Draco compression added in RWGltf_CafWriter class.
2022-07-06 19:15:56 +03:00
dpasukhi
4f53e7b37c 0033011: Data Exchange - Backward compatibility XBF format
Fixed problem with moving the attribute position.
Made the same positions as version 7.5 with adding to the end.
2022-07-04 18:58:05 +03:00
ona
e01ce0cd52 0029854: XCAF GD&T: Clear contents of reserved labels only
Clear attributes from reserved child labels only
2022-06-30 19:33:37 +03:00
ona
34c407eb34 0029415: Data Exchange - Step reader cannot read the surfaces of the main body of the shape
Test for model reading check is added
2022-06-30 19:33:37 +03:00
aml
ef4e5e3bf1 0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool] 2022-06-30 19:33:36 +03:00
mgerus
ca1491f88b 0030398: Modeling Algorithms - thrusection produces twisted solid
Change FirstBary to PrevBary to correct Offset calculation relative prev wire instead of first wire
2022-06-30 19:33:35 +03:00
akaftasev
b284dc42dc 0032446: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added test case
2022-06-30 19:33:35 +03:00
akaftasev
a0ffd4a521 0032445: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added test case
2022-06-30 19:33:35 +03:00
jgv
07e803dee1 0032999: Modeling Algorithms - New option in ShapeUpgrade_ShapeDivide algorithm: splitting into N parts, into N*M parts
1. Multiple changes in ShapeUpgrade_ShapeDivideArea, ShapeUpgrade_FaceDivide, ShapeUpgrade_FaceDivideArea, ShapeUpgrade_SplitSurface, ShapeUpgrade_SplitSurfaceArea: new methods NbParts and SetSplittingByNumber, changes in ShapeUpgrade_FaceDivideArea::Perform and ShapeUpgrade_SplitSurfaceArea::Compute concerning new modes of splitting.
2. New Draw command "DT_SplitByNumber" for testing new modes of splitting.
3. New subgroups "split_number" and "split_two_numbers" in the group of tests "heal" for testing new modes of splitting.
2022-06-30 19:33:34 +03:00
aml
ec2d883e53 0033041: Coding - get rid of unused headers [TopTools to Xw] 2022-06-30 19:33:34 +03:00
oan
1593d38b13 0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology
Improved the processing for the case where Failure flag for the meshing face is set. Specific tests added.
Check triangulation consistency even for shapes with problematic topology given that they are suitable for keeping it.
2022-06-29 21:32:45 +03:00
atychini
aaa03c1efb 0033029: Warning on Windows 32 and 64 with VC14 after the integration of ticket 32821
Warning has been fixed by adding condition.
2022-06-29 21:32:45 +03:00
aml
b2bce1d928 0033039: Coding - get rid of unused headers [StepData to StlAPI] 2022-06-28 20:23:23 +03:00
azv
581016faeb 0033028: Standard_ConstructionError while using ShapeUpgrade_UnifySameDomain
Additional check if the sequence of circular edges is a closed chain.
2022-06-28 20:22:28 +03:00
aml
6bf38f219b 0033025: Coding - get rid of unused Standard_TooManyUsers class 2022-06-27 07:02:50 +03:00
azv
63fa56bc83 0032915: Geom2dAPI_InterCurveCurve, The algorithm lost an intersection point.
Get rid of strange code: preliminary check of self-intersections is made on a polygonal representation of a curve, it is able to find possible intersections, but after that it filter out segments neighbor to the pair of non-intersected segments.

Test case de step_4 I1 has been marked BAD, because the self-intersection is treated correctly, but the projection algorithm generates such crooked 2D curve.

Reference data in test cases heal split_angle_advanced ZA5 and ZA6 has been updated, because those shapes have self-intersected edges, which are being detected now.
2022-06-23 20:40:07 +03:00
mgerus
a29bae45f9 0032877: Modeling algorithms - Sweeping issue
Add fix at sweeping algorithm: sweeping happens in the opposite direction as expected
Add test case tests/bugs/modalg_7/bug32877
2022-06-23 20:37:37 +03:00
atychini
6d1a049be7 0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files
Implementing DE_Wrapper and its formats
2022-06-23 20:29:00 +03:00
aml
b1970c8a47 0033022: Coding - get rid of unused headers [ShapeBuild to STEPControl] 2022-06-22 19:26:41 +03:00
mpv
f8c45c2f0d 0032894: Application Framework - Regressions on Ubuntu 20.04
Updated corrupted file reading error management, make memory unit-tests more stable.
2022-06-20 17:45:27 +03:00
aml
94748ad20e 0032653: Modeling Data - misprint in Geom2d_Conic.hxx api SetYAxis(const gp_Ax2d& theAY)
Fix misprint.
2022-06-17 19:28:07 +03:00
aml
2e0b684df3 0033019: Coding - get rid of unused classes 2022-06-15 20:46:16 +03:00
aml
a1f027b66e 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] 2022-06-15 20:41:12 +03:00
kgv
88ff1a3834 0033016: Documentation - Draw Harness User Guide mentions removed commands 'meshdispmode'
Updated description of MeshVS commands in User's Guide.
2022-06-14 21:52:44 +03:00
akondrat
fb30026cf1 0033009: Foundation Classes - Bnd_OBB::ReBuild() expects point array starting from 0
Add test. Update OBBTool constructor for any bounds of array of points.
2022-06-14 21:50:31 +03:00
snn
714fb6b516 0032954: Tool for applying transformation to OCAF document
New XCAFDoc classes:
- XCAFDoc_AssemblyIterator: iterator in depth along the assembly tree
- XCAFDoc_AssemblyGraph: assembly graph with iterator
- XCAFDoc_AssemblyTool: provides generic methods for traversing assembly tree and graph

A method for re-scaling (sub-)assembly geometry is added to XCAFDoc_Editor.

New DRAW commands:
- XDumpAssemblyTree: iterates through the assembly tree in depth up to the specified level, if any
- XDumpAssemblyGraph: prints assembly graph structure
- XDumpNomenclature: prints number of (sub-)assembly/part instances
- XRescaleGeometry: applies geometrical scale to (sub-)assembly
2022-06-10 18:56:40 +03:00
aml
bf8b7e08f1 0030492: Foundation Classes - math_BFGS fails if starting point is exactly the minimum
Fix affects BFGS optimization methods by checking convergence as the first step on each iteration. FRPR works well, but it is updated as well since its logic potentially dangerous.
2022-06-09 20:34:57 +03:00
Charlemagne Lasse
24e4b3c83b 0032929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of surfdata
When creating a fillet, num is calculated via ChFi3d_IndexOfSurfData. If it
returns just the number of entries in surfdata, it can happen that this
value becomes invalid when handling the case "two faces common to the edge
are found". When both components are on an arc, there will be num removed
from the surfdata.

num would then be larger than the number of entries surfdata. The derived
num1 is therefore also incorrect. The subsequent usage of this
value will either:

* Debug build: cause an out of bounds exception in ChangeValue
  (`SeqFil.ChangeValue(num)`)
* Release build: cause a segfault when retrieving it via index num1
  (`SeqFil(num1)`)

num + num1 must be recalculated after the deletion happens to correctly
calculate the fillet.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:51:01 +03:00
Charlemagne Lasse
10a19b2a75 0032930: Modeling Algorithms - Crash in PerformIntersectionAtEnd when no face was found
The PerformIntersectionAtEnd code is currently not handling all the faces
correctly. If it retrieves Face[0] as F, it can happen that the previously
ran code didn't actually retrieve any faces in this array at all.

For example when:

* "if (nface==3)" is true
  - "if (!findonf1)" is true (doesn't assign any faces to this array)
  - "if (!findonf2)" is true (doesn't assign any faces to this array)
  - "if (state == ChFiDS_OnSame)" is not true (because it is
    ChFiDS_AllSame)
  - "if (findonf1 && !isOnSame1)" cannot be true (see above, but would
    handle faces)
  - "if (findonf2 && !isOnSame2)" cannot be true (see above, but would
    handle faces)
  - "if (isOnSame2)" is false (but would also handle faces)

Since no faces were assigned here, F would be a NULL face. As result, the
function will crash when trying to access the Surface behind the face via
`BRep_Tool::Surface(F);`.

While the best approach would be to identify the implementation bug in the
algorithm behind PerformIntersectionAtEnd, a check + exception is used
instead because the actual algorithm is not known.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:48:22 +03:00
Charlemagne Lasse
d30f25e6b1 0032931: Modeling Algorithms - Crash in ChFi3d_IsInFront when no face was found
The ChFi3d_IsInFront code is currently not handling all the combinations
correctly. For example, if `if(fd1->IndexOfS2() == fd2->IndexOfS2())` is
true, it can happen that the `TopoDS::Face(DStr.Shape(fd1->Index(jf1)))`
returns a Face with entity == NULL. The subsequent usage of this NULL face
in `BRep_Tool::Parameters( Vtx, face )` will then cause a segfault.

While the best approach would be to identify the implementation bug in the
algorithm behind PChFi3d_IsInFron, a check + exception is used instead
because the actual algorithm is not known.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
2022-06-03 17:46:28 +03:00
snn
cec41bb93d 0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
Support of reading and writing tessellated geometry is added for the following STEP entities:
- triangulated face
- complex triangulated face
- tessellated shell
- tessellated solid
- tessellated shape representation

Models without BRep geometry (mesh formats like STL, OBJ and so on) are supported for writing to STEP.

New parameters are added to enable/disable tessellated geometry reading and writing:
- read.step.tessellated (On/Off/OnNoBRep) (On by default)
- write.step.tessellated (On/Off/OnNoBRep) (OnNoBRep by default)

OnNoBRep - tessellation is read/written only for entities for which there is no BRep representation.

Faces with poly triangulation are written in STEP as triangulated face entities with one coordinates list per face.
Only one poly triangulation per face (returned by BRep_Tool::Triangulation) is written to STEP.
2022-06-03 17:44:17 +03:00
kgv
e9c43fee29 0032989: Data Exchange, RWGltf_CafReader - fill in metadata map from asset.extras 2022-05-31 19:26:25 +03:00
kgv
812afe4edb 0032991: Visualization, TKOpenGl - OpenGl_Window::Resize() ignores window virtual flag on macOS
Added handling of Aspect_Window::IsVirtual() flag on macOS platform.
2022-05-30 20:47:07 +03:00
kgv
48e4aad412 0032990: Configuration - compilation errors since Emscripten 3.1.11 due to time_t redefined long->int
Add std::is_same filter to IsEqual(time_t, time_t) definition.
2022-05-29 12:11:24 +03:00
afokin
23c56fc66a 0032974: Configuration - update environment for VS2022
removing a repeating condition in install.bat

add vc143 in .md files
2022-05-27 19:05:24 +03:00
akaftasev
795c0d5d73 0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
Added new option '-C' with possibility to set value of Angular and linear tolerances to 'mksweep' command to correct input spine by merging smooth connected neighboring edges
2022-05-27 18:21:34 +03:00
akaftasev
fbf9efb8d5 0025309: Modeling Algorithms - Check of shape validity for BOP takes too long
Simplified condition to allow sampling for curve/surface data with depth == 0
Changed sorting method in MergeSolutions() method
2022-05-27 18:14:04 +03:00
atereshi
9b9aac4a7b 0032922: Data Exchange, STEP - The torus is stored incorrectly in STEP format
Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
 Result: Torus correctly stored.
2022-05-27 18:14:03 +03:00
kgv
86d6c284c2 0032978: Visualization - AIS_ViewController::PickPoint() includes objects invisible in current View
SelectMgr_ViewerSelector::TraverseSensitives() now takes into account object's view affinity.
AIS_InteractiveContext::moveTo() - dropped code SelectMgr_AndOrFilter::SetDisabledObjects()
as filtering is now done by selector itself.

ViewAffinity property has been moved to PrsMgr_PresentableObject for simplicity.
Removed redundant map Graphic3d_CView::HiddenObjects().
2022-05-21 17:25:43 +03:00
ifv
84d39c06fa 0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5
BRepExtrema/BRepExtrema_ExtCF.cxx - set correct using BRepAdaptor_Curve in Extrema
tests/bugs/modalg_8/bug32973 - new test case added
2022-05-18 19:18:52 +03:00
mgerus
df69c26472 0026697: BRepFeat_MakePrism returns empty compound
Add fix in direction of prism calculation
2022-05-18 19:14:43 +03:00
kgv
b56df3a60a 0032976: Visualization - AIS_InteractiveContext::FitSelected() includes objects invisible in current View 2022-05-17 20:15:55 +03:00
kgv
dcbd679c8b 0032975: Visualization, TKOpenGl - do not blit inactive Subview 2022-05-17 20:13:42 +03:00
aml
b9280b8b27 0032969: Coding - get rid of unused headers [IMeshData to PLib]
Removed unused exception classes OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW.
2022-05-17 20:09:12 +03:00
mgerus
2052b04e5b 0032807: Modeling Algorithms - Bad result of sweep operation when the UEdges has more than one intersect points
Add choosing the intersect point taking into account the tangentCross when prev UEdge and next UEdge has more than one intersect points;
Add exact correction of edge tolerance (it fix problems with edge tolerance on Linux);
Add exact check of edge tolerance in testcase
2022-05-16 21:08:21 +03:00
kgv
6036998511 0032970: Visualization, TKOpenGl - fix compilation on Linux: 'False' was not declared 2022-05-15 01:11:06 +03:00
ifv
33463eef63 0032942: Modeling Algorithms - Boolean operation Common has no result in specific example
IntTools/IntTools_BeanFaceIntersector.cxx - calculation of deflection for surface bnd box is added
tests/bugs/modalg_8/bug32942,bug32943,bug32944,bug32945 - new test cases added
2022-05-06 00:44:14 +03:00
abulyche
84f42008b7 0027081: BRepOffsetAPI_MakeOffsetShape fails on shapes with internal edges
Added the test for this problem.
Added new draw command "mkoffsetshape".
2022-05-06 00:43:27 +03:00
kgv
cb6c7c458c 0032955: Draw Harness, ViewerTest - extend vcolorconvert command to print color in hex format 2022-05-06 00:42:12 +03:00
aml
d2c11b791c 0032961: Coding - get rid of unused headers [IGESAppli to IGESToBRep] 2022-05-06 00:41:19 +03:00
ddzama
73035770f6 0032908: Coding Rules - fix E0349 MSVC compilation error on VS2019/C++20
Get rid of raw C strings in error code to avoid error 0349.
Use std::string instead.
2022-05-04 21:12:54 +03:00
ddzama
1966e6af07 0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API.
2022-05-04 21:11:11 +03:00
aml
5dd4cb6e60 0032958: Coding - problem compile OCCT on Debian80-64 and MacOS-x86_64 with debugging mode
Add missing include.
2022-05-04 21:10:02 +03:00
aml
034d1403b1 0032953: Coding - add missing references where applicable 2022-05-04 21:08:16 +03:00
kgv
267738fc40 0032959: Visualization, OpenVR - add Oculus Touch controller bindings 2022-05-04 12:55:59 +03:00
ddzama
e976df2329 0032920: Coding - fix checking of std::stringstream buffer size on VS2019/C++20
Use tellp() instead of in_avail() for testing non-empty std::stringstream state.
2022-04-30 13:22:46 +03:00
aml
82598ec0f2 0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic] 2022-04-29 18:09:58 +03:00
ddzama
7b3f255f23 0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warning C26440: "If your function may not throw, declare it noexcept"

"If code is not supposed to cause any exceptions,
it should be marked as such by using the 'noexcept' specifier.
This would help to simplify error handling on the client code side,
as well as enable compiler to do additional optimizations."
2022-04-29 18:09:00 +03:00
ddzama
4e1b5fcbf0 0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20
Put explicit type casting to avoid:
Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte
value and then casting the result to a 8 byte value.
Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
2022-04-27 00:59:45 +03:00
ddzama
9416ba5fb0 0032907: Coding Rules - eliminate MSVC warning C5054 on VS2019/C++20 (operator &,|: deprecated between enumerations of different types)
operator `&`,`|`: deprecated between enumerations of different types
2022-04-27 00:58:30 +03:00
snn
e9a13cf123 0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode
Code related to supporting of single SDR for a non-manifold group, which prevents writing all translation results except the first one, is removed.
SDRs with null used representation object are excluded from writing.
2022-04-27 00:57:20 +03:00
ifv
a0b4fff17a 0028866: Modeling Data - Problem with GeomAPI_ProjectPointOnSurf
Extrema/Extrema_GenExtPS.cxx - adaptive setting of sample points is implemented
bugs/moddata_3/bug28866 - test case added
2022-04-22 18:51:27 +03:00
jgv
51db8cab7b 0032864: Modeling Algorithms - Normal projection of a wire on a cylinder produces wrong result
Minor correction in method BRepAlgo_NormalProjection::Build: correct mixed up first and last parameters of the projected curve.
2022-04-22 00:29:38 +03:00
ddzama
8af9bbd59a 0032906: Coding Rules - get rid of std::iterator inheritance (deprecated since C++17) 2022-04-22 00:27:47 +03:00
jgv
1f45f21358 0032721: Modeling Algorithms - BOP wrong results on a cone and an extrusion
1. Modify method IntPatch_ALineToWLine::MakeWLine: add correction of end points of each line on 2 surfaces if an end point is a pole on a surface.
2. Modify method IntPatch_WLine::ComputeVertexParameters: adjust a point on curve to corresponding vertex the following way: set 3D point as the point of the vertex and 2D points as the points of the point on curve.
2022-04-19 19:23:10 +03:00
ifv
d7f5072158 0032882: Modeling Data - Extrema curve/curve cannot find all solutions
Extrema/Extrema_GenExtCC.gxx - estimation of Lipchitz constant is improved
Extrema_GlobOptFuncCC.cxx - function value is changed

LocOpe/LocOpe_WiresOnShape.cxx - small correction to fix regression

lowalgos/extcc/bug32882 - new test case is added

some test were updated according new behavior of extrema algo
2022-04-19 19:20:12 +03:00
kgv
7090725e2b 0032935: Visualization, TKOpenGles - use size window within OpenGl_Window::init() 2022-04-19 19:18:42 +03:00
azv
d8bfee7b03 0031437: Modeling Data - Offset surface throws exception when trying to evaluate at singularity point
Add test case to prove the exception is avoided.
2022-04-16 22:29:47 +03:00
kgv
879768fbf2 0032886: Visualization, V3d_View - introduce interface for creating a subview
V3d_View/Graphic3d_CView pair has been extended to define subview within the other V3d_View instance.
The initialization is done in form of V3d_View::SetWindow() taking parent V3d_View instance on input.

Subview definition includes dimensions defined as a fraction of a parent view and offset from a corner.
This scheme allows splitting window into several subviews automatically occupying entire viewport,
like splitting window into two vertial subviews (100%x50% + 100%x50%),
three horizontal subviews (33%x100% + 30%x100% + 30%x100%),
1 + 2 stacked subviews (50%x100% + 50%x50% + 50%x50%),
as well as thumbnail-alike subviews displayed on top of another larger view.

OpenGl_View::Redraw() blits content of subviews into the window within immediate redraw step.

AIS_ViewController::FlushViewEvents() has been extended
to re-calculate mouse input into local subview coordinates.
AIS_ViewController::handleViewRedraw() first redraws subviews and then parent views.
Introduced new callback AIS_ViewController::OnSubviewChanged()
to switch input focus to another subview on mouse click,
implemented by ViewerTest_EventManager (has to be done at application level).

vinit command has been extended with parameters -subview and -parent to create a subview.
In addition, view dimension arguments now can be defined as a fraction of screen size instead of pixels.
2022-04-15 18:23:16 +03:00
atychini
179fb34661 0029435: Data Exchange - Exporting wires consisting of more than one edge results in loss of color data in IGES
Colors wasn't read correctly because of incorrect curve transfers in IGESToBRep_TopoCurve.cxx
I added new calls to SetShapeResult() at the necessary places.
Also in the IGESCAFControl_Writer.cxx I added new condition because of the possible NULL exception.
2022-04-15 18:21:46 +03:00
kgv
1caf5fd317 0032924: Configuration, CMake - export INTERFACE_INCLUDE_DIRECTORIES within targets
Add 'INCLUDES' property within INSTALL targets.
2022-04-15 18:20:01 +03:00
ifv
fc41d3b1c0 0032842: Modeling Data - a regression in conversion of a face to bspline
GeomConvert/GeomConvert_1.cxx - forbid using CheckAndSegment if trim is out of base period when converting
                                trimmed torus

tests/bugs/moddata_3/bug32842 - test case added
2022-04-12 20:50:29 +03:00
kgv
08d9c0ae45 0032926: Coding, StdPrs_ToolTriangulatedShape::Normal() - range of "for" not correspond to the NCollection index which run in "for"
Obsolete method has been removed.
2022-04-12 20:46:27 +03:00
ddzama
7021de2fe7 0032909: Coding Rules - replace (removed from C++17) std::random_shuffle with std::shuffle for random permutation algorithm
Since C++17 the accessible version of permutation function left the function:

template< class RandomIt, class URBG >
void shuffle( RandomIt first, RandomIt last, URBG&& g );

See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
2022-04-08 19:04:34 +03:00
ddzama
e455c54bf0 0032918: Coding Rules - suppress MSVS warnings from 3rdparty rapidjson on VS2019/C++20
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Disable warning messages, occures in rapidjson library.
2022-04-08 19:02:14 +03:00
ddzama
d31e5dbbb4 0032916: Coding Rules - eliminate MSVS warning C26451 on VS2019/C++20 (Arithmetic overflow: Using operator '+' on a 4 byte value...)
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of `Warning C26451 Arithmetic overflow: Using operator '+' on a 4 byte value
and then casting the result to a 8 byte value.
Cast the value to the wider type before calling operator '+' to avoid overflow (io.2)`
2022-04-08 18:55:02 +03:00
ddzama
878ea8cd2b 0032910: Coding Rules - fix uninitialized class fields in constructor initialization block reported by VS2019/C++20
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warnings about uninitialized class fields in constructor initialization block.
2022-04-08 18:52:41 +03:00
azv
ee6581adbe 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0
Use precision depending on radii of participating circles.
2022-04-08 18:50:30 +03:00
mpv
1fff4ad5a7 0032870: Tests - bugs/caf/bug31918_1 is unstable
# Make the compared values more stable.
2022-04-07 19:21:40 +03:00
azv
a793b75e21 0032809: Sweep algorithm with Round Corner mode failed
Fix indentation within GeomFill_Sweep.cxx

0032809: Sweep algorithm with Round Corner mode failed

Add fix what repair shipping at corner after circle edge at path
Add fix test for bug 24909_3
2022-04-07 19:20:09 +03:00
kgv
5078d0d84e 0032912: Visualization - crash when displaying an OBJ file with missing texture file
Fix NULL dereference within Graphic3d_TextureRoot::convertToCompatible() due to wrong order of checks.
2022-04-06 22:58:16 +03:00
azv
ad3825f821 0030160: DBRep_IsoBuilder builds wrong isolines for planar faces
Add test case
2022-04-06 03:20:38 +03:00
AndreyLA
fe12f15cb4 0024657: 2dintersect returns different number of intersect points in curve intersecting the polygon points is never replaced by line
Test for 2d intersection is added
2022-04-06 03:19:45 +03:00
mgerus
b2ec2f5d42 0031361: Modeling algorithms - An exception arise when building tube
* Add status flag to GeomFill_Pipe
* Add myIsPerform flag to GeomFill_Pipe
* Add checking vectors in GeomFill_CorrectedFrenet
* Add boolean return to SetCurve virtual methods
* Add test case
2022-04-06 03:17:55 +03:00
sshutina
e3fd3d83da 0032861: Visualization - Separate rotate and move the object behavior in AIS_ViewController
Added the flag in Dragging structure that defines perform dragging (ToMove).
2022-04-06 03:16:12 +03:00
ifv
1f37f1d50a 0031661: Modeling Data - Exception when projecting parabola or hyperbola to plane
ProjLib/ProjLib_ProjectOnPlane.cxx - formatting

0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane

ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added
bugs/moddata_3/bug31661_* - new test cases are added
2022-04-06 03:15:07 +03:00
AndreyLA
1f000e5974 0031009: Modeling Algorithms - leak reported by Clang address sanitizer in IntCurvesFace_ShapeIntersector
Refactor IntCurvesFace_ShapeIntersector. Use handles and std::unique_ptr instead of raw pointers.
2022-04-06 03:13:47 +03:00
kgv
2491eec38b 0032897: Tests - include elapsed time into test log
Added "ELAPSED TIME" to test case log.
Improved syntax of chrono/dchrono command:
added -elapsed, -userCPU, -sysCPU options printing individual values in seconds.

OSD_Chronometer::IsThisThreadOnly() - added missing accessors to the property.
2022-03-31 21:49:12 +03:00
abulyche
ab279b126b 0029745: Modeling Data - GeomAdaptor_Surface::VIntervals fails on periodic surfaces
Fixed GeomAdaptor_Curve::LocalContinuity() for periodic curves.
Fixed GeomAdaptor_Curve::NbIntervals() for periodic curves.
Fixed GeomAdaptor_Curve::Intervals() for periodic curves.
Improved definition of length in tests.
Update Geom2dAdaptor_Curve to the same behavior.
2022-03-31 21:47:58 +03:00
azv
e4753a7d16 0032863: Cone surface returns wrong v derivative
* Fix error on computing V first derivative on a cone (take into account the slope of the conical generatrix).
* Add DRAW command 'sderivative' to compute certain derivative on a surface.
2022-03-25 20:13:38 +03:00
knosulko
5ae6f08cc6 0024772: Modeling Algorithms - Intersection of cylinder and cone produces incorrect results
GeomInt/GeomInt_IntSS.cxx - handle flat cone case
IntPatch/IntPatch_Intersection.hxx, IntPatch/IntPatch_Intersection.cxx - method for preparing surfaces is added
bugs/lowalgos/intss/bug24772 - test case is changed according new behavior
2022-03-24 19:56:56 +03:00
azv
9b337ad8e5 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0
Improve tolerance criteria to check values of extremas for equality: use multiplier, which depends on the value, instead of magic number
2022-03-21 19:11:50 +03:00
AndreiLA
3425e83f4b 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces
The tests are added to verify the correctness of the projection algorithm's work in two cases.
2022-03-21 19:08:57 +03:00
mpv
e720157864 0032442: Application Framework - Problems of testing on MacOS arm64 platform
Fixed the problem of reading XML files on MacOS. 'errno' was not reseted
even the 'strtol' function produced a good value. So, now it is erased
forcibly before the call.
2022-03-18 17:53:47 +03:00
atychini
452ba192d5 0032817: Data Exchange - Step export - writing untrimmed Curve
Incorrect curve handling.
If curve doesn't have trims and vertexes, we handle it such as trimmed curve, but it should be a simple curve.
Curves with only one vertex and one trim should handle by another way, such as a curve that has trims but doesn't have vertexes.
So I added conditions which handles these cases
2022-03-17 18:44:06 +03:00
azv
9140163ba8 0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation
Do not limit the normalization factor of the highly anisotropic parametric space when filtering start points in the algorithm of walking line construction.
Additionally check the knots are in the increasing orders when merging two B-spline curves
2022-03-17 18:42:34 +03:00
mpv
7573a45deb 0032870: Tests - bugs/caf/bug31918_1 is unstable
Improved the test stability: created 10 iterations of measurements and take the minimum to
minimize the affect of other processes and threads; increased the compare range of
the quarter and the whole of the document load.
2022-03-14 19:25:14 +03:00
jgv
802180e1a5 0032719: Modelling Algorithms - UnifySameDomain result has incorrect triangulation
Correct method ShapeUpgrade_UnifySameDomain::UnionPCurves: reparametrize unified pcurves to fit the new range of 3D-curve.
2022-03-14 19:24:17 +03:00
kgv
8ca58a51a7 0032866: Visualization, TKOpenGles - FitAll() is broken when performance counters are displayed
OpenGl_View::MinMaxValues() - added missing theToIncludeAuxiliary check.
2022-03-07 02:13:22 +03:00
vro
acce2c1448 0032796: Modeling Data - Calculation of distance between two circles crashes
Modified:
- Extrema_ExtCC.cxx, the method PrepareParallelResult() - angular tolerance is increased.

Added:
- A test: lowalgos extcc bug32796
2022-03-05 17:33:56 +03:00
kgv
633084b809 0032862: Visualization, Graphic3d_TextureMap - add 3D texture definition
Image_PixMap has been extended to support definition of 3D bitmap (as an array of 2D slices).

Graphic3d_TypeOfTexture enumeration values have been renamed to include full enum prefix.
Added Graphic3d_TypeOfTexture_3D redirecting to GL_TEXTURE_3D.
OpenGl_Texture::Init() has been extended to allow initialization of 3D texture.

Graphic3d_Texture2Dmanual merged into Graphic3d_Texture2D and marked as deprecated alias.
Graphic3d_TOT_2D_MIPMAP has been deprecated in favor of dedicated Graphic3d_TextureRoot::SetMipMaps().

Added Graphic3d_Texture3D class.
vtexture - added argument -3d for uploading 3D texture.
2022-03-05 17:31:39 +03:00
kgv
a9e5f65041 0032837: Documentation, Geom_Surface - add references to GeomLib::NormEstim() for Normal computations
References to GeomLib::NormEstim() have been put to Geom_Surface, Adaptor3d_Surface and BRepAdaptor_Surface.
Improved documentation of GeomLib::NormEstim().
2022-03-03 20:09:35 +03:00
kgv
b9a372bbcd 0032841: Visualization - add 16-bit grayscale pixel format to Image_PixMap
Added Image_Format_Gray16 pixel format definition, which could be uploaded into GL_R16 texture.
Added Image_Format_GrayF_half mapped to GL_R16F texture.
2022-03-03 20:07:53 +03:00
kgv
b5204c6c37 0032860: Coding Rules, Extrema_GenExtPS - add exported destructor
Added eplicit destructors to classes Extrema_GenExtCS, Extrema_GenExtPS and Extrema_GenExtSS.
2022-03-03 20:06:50 +03:00
kgv
75e2ba1695 0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
Default option value is set to 2 (major.minor) instead of previously used 1 (major),
excluding Android/Emscripten/Windows platforms that use 0 by default.
2022-03-01 19:22:48 +03:00
ifv
5c48956f8e 0032849: Modeling Algorithms - Intersection algorithm returns incomplete result.
GeomInt/GeomInt_IntSS.cxx, IntTools/IntTools_FaceFace.cxx - setting deflection 0.01
for case of two bspline surfaces
IntPolyh/IntPolyh_Intersection.cxx, IntPolyh/IntPolyh_Intersection.hxx - status IsParallel is added

BndLib/BndLib_Add3dCurve.cxx, IntTools/IntTools_TopolTool.cxx - fix small bugs

Correction of test scripts according to current behavior of algorithms

lowalgos/intss/bug32849 - test case added
2022-03-01 18:57:09 +03:00
kgv
b9184c2714 0032834: Configuration, CMake - DESTDIR ignored for OpenCASCADECompileDefinitionsAndFlags-${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake
Replace redundant configure_file() with normal file copy for installing OpenCASCADECompileDefinitionsAndFlags- files.
2022-02-26 21:52:21 +03:00
kgv
e61aa824db 0032854: Documentation - minor clean-up of User Guide for XDE module
Applied minor formatting improvements to `xde.md`.
Fixed small misprints and artifacts in text.
Removed redundant section "Working with XDE".
2022-02-25 18:10:52 +03:00
vro
5a846a5d2c 0029219: Application Framework - XML document is written with CRLF on Windows
The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
STL: RWStl::WriteAscii() ends by CR LF (to synchronize with Blender)

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
2022-02-22 20:25:47 +03:00
vro
b91e601442 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux
The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.
// Also, variable 'l' is renamed to 'aLen'.
// And a check on the number of characters is added to avoid removal of the root folder ('/').

Modified file:
- CDF_Store.cxx, the method SetFolder().
2022-02-22 20:23:29 +03:00
knosulko
cfde7eebb3 0024418: Modeling Algorithms - Wrong section curves when intersecting analytical surfaces
IntPatch_ALineToWLine.cxx - setting minimal number of points in a WLine depending on step size
IntPatch_WLineTool.cxx - fix WLines connecting check condition
test cases has been changed according to new behavior
2022-02-22 20:07:12 +03:00
jgv
600ee85631 0032814: Modeling algorithms - Unifysamedom produces invalid result
Minor correction in ShapeUpgrade_UnifySameDomain::IntUnifyFaces: correct collecting splitting vertices in the new wire
2022-02-18 18:29:10 +03:00
vro
8dee83b0f3 0032840: Application Framework, copying of a scaled shape fails
A flag not to raise an exception is set for a copying shape. A reason: if a shape is already in the model, the user should have an opportunity to copy it.

Modified files:
TNaming_CopyShape.cxx, the method Translate(). A false-flag is used on copying of location of the shape.
2022-02-18 18:27:59 +03:00
jgv
2d0dd76414 0032715: Modelling Algorithms - UnifySameDomain does incomplete union
Add the case of closed, smooth but not periodic surface (unification of faces lying on it if the flag "myConcatBSplines" is true - modify the underlying surface to make it periodic).
2022-02-17 21:45:44 +03:00
aml
08984eda3d 0032838: Coding - get rid of unused forward declarations (misc) 2022-02-17 21:42:56 +03:00
aml
b66cf6dae5 0032832: Coding - get rid of unused headers [FairCurve to GeomAPI] 2022-02-14 22:07:15 +03:00
Chris Hennes
f91202f3ee 0031585: Access Violation while creating fillet - ChiFi3d_Builder::PerformIntersectionAtEnd
There is one case in PerformIntersectionAtEnd that did not test whether
an array access exceeded the length of the array, in rare cases
resulting in a segmentation fault. That error-handling behavior is
replaced by the exception code used elsewhere in the function. For
consistency, the code is copied exactly as implemented elsewhere. This
code has the same effect as that proposed by the bug submitter.
2022-02-14 22:02:07 +03:00
kgv
072b4d382d 0032831: Documentation - drop misleading "FreeType 2.4.10 - 2.5.3" version range
Removed duplicating information about supported versions of 3rdparty libraries from `building_3rdparty.md`.
2022-02-14 22:00:32 +03:00
kgv
3d21fe1aee 0032827: Configuration - compilation error on Emscripten SDK 2022-02-10 20:40:38 +03:00
kgv
2922a73ea7 0032826: Data Exchange - use OSD_FileSystem within RWStl::ReadAscii() and StepFile_Read() 2022-02-10 20:39:28 +03:00
gka
e2d60d0f7f 0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape
Added PLY writing tools RWPly_CafWriter and RWPly_PlyWriterContext.

Added tool BRepLib_PointCloudShape generating point cloud from shape in two ways:
- random points on surface with specified density;
- points from triangulation nodes.

StdPrs_ToolTriangulatedShape::ComputeNormals() has been moved to
BRepLib_ToolTriangulatedShape for reusing outside of AIS.

Command vpointcloud has been extended to use new generation tool.
Command writeply has been added to write triangulation or point set into PLY format.
2022-02-08 22:15:24 +03:00
oan
ae38730d35 0032813: Units: ToSI and FromSI return cached dimension from previous request when parsing of unit sentence is failed
Cache value only if all necessary preparation steps are done.
2022-02-04 19:25:58 +03:00
dpasukhi
e1f5ac2c9b 0032731: Data Exchange, Step Import - Incorrect PMI text location
Added new complex Entity for representation of PMI
Added moving the presentation with new entity
2022-02-02 18:25:36 +03:00
knosulko
0b6a0adb3a 0032767: Mesh - incorrect splitting of edges of seams leading to hang [since OCCT 7.4.0]
- fix step by parameter of the edge while split curve in case of seam edges
2022-02-02 18:23:59 +03:00
aml
59cfb82b02 0032810: Coding - missing Standard_EXPORT in Standard_ErrorHandler 2022-02-02 18:22:18 +03:00
aml
1eed3c7873 0032812: Coding - problem after integration 32806 2022-01-31 07:01:49 +03:00
aml
7109a4ae58 0032806: Coding - get rid of unused headers [Contap to Extrema] 2022-01-28 18:30:32 +03:00
atychini
ff77ee8103 0032748: Data Exchange, Step Import - xstep.cascade.unit doesn't work [regression since OCCT 7.6.0]
Added new condition in STEPControl_ActorRead::Transfer: if StepData_StepModel is not an initialized Unit - we set unit to this step model
2022-01-28 18:29:12 +03:00
kgv
223ae699c7 0032795: Documentation - clarify indexation range within Poly_Triangulation/Graphic3d_ArrayOfPrimitives classes 2022-01-25 21:56:45 +03:00
ifv
9eee5ab7e4 0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face
ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx,
GeomInt_IntSS, IntTools_FaceFace:
  Analysis of curvature is added for adjusting ParametrizationType

IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces

GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation

Approx_SameParameter.cxx - adding control against big values.

BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection
2022-01-25 21:54:13 +03:00
kgv
5614b1369a 0032783: Documentation - Doxygen 1.9.3 generates corrupted HTML for dox/samples/ocaf.md
Fix incorrect/fragile Markdown syntax in samples/ocaf and user_guides/modeling_data.
2022-01-19 20:07:55 +03:00
aml
33a4d46b28 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] 2022-01-19 20:05:46 +03:00
Dzmitry Razmyslovich
d7dac7fc36 0032784: BinXCAF fails to load documents containing the shapes with scaled/mirrored location
A flag not to raise an exception is used on reading of an XCAF document. If such a shape with scaling transformation is stored in the document, it should be read.
2022-01-19 20:01:14 +03:00
kgv
ba9548c55b 0032668: Documentation - add tutorial for creating a custom AIS Interactive Object 2022-01-18 21:46:09 +03:00
kgv
2275caec09 0032780: Visualization, TKOpenGl - add smoothing to row interlaced stereoscopic output
Added new option Graphic3d_RenderingParams::ToSmoothInterlacing enabled by default.
Added -smooth   option to vstereo command.
Added -dpiAware option to vinit   command (Windows).
2022-01-17 20:04:30 +03:00
kgv
ddb9ed4810 0032779: Visualization, TKOpenGl - support using a wide color window buffer format (10bit per component / 30bit RGB)
Added new flag OpenGl_Caps::buffersDeepColor disabled by default.
OpenGl_Window now tries to find a RGB10_A2 pixel format using wglChoosePixelFormatARB().
OpenGl_TextureFormat::FindSizedFormat() - added handling of GL_RGB10_A2 internal format.
OpenGl_View::SetWindow() now selects preferred FBO color format basing on parameters.
OpenGl_Context::DiagnosticInformation()/OpenGl_View::DiagnosticInformation() now include
information about window pixel format / FBO texture format.
2022-01-17 20:03:28 +03:00
isn
7073768338 0028642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections
1) BRepFill_Generator and BRepOffsetAPI_ThruSections now support 'non-destructive' mode for the input shapes (sections wires). The shape history of this algorithms also has been modified.
2) New test grids (based on the previous ones) have been added. These new cases use locked shapes as input arguments
3) The option '-safe' has been added to 'thrusections' command
2022-01-17 20:02:13 +03:00
achesnok
71943b31f8 0032722: Visualization, TKOpenGl - performance counters disappear at some camera viewpoints
Fixed OpenGl_FrameStatsPrs::Render() to enable depth clamping.
Fixed OpenGl_View::MinMaxValues() to take into account performance overlay.
2022-01-14 18:04:40 +03:00
emv
0101c6febe 0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode "Complete" join type "Intersection"
Add more faces for intersection in rebuilding process basing on the connection of the splits of offset faces (special treatment for the artificially invalid faces).
When rebuilding faces add vertices common for faces for trimming the new intersection edges.

Adjust existing and create new test cases.
2022-01-13 20:52:33 +03:00
kgv
dfa2a6719c 0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx 2022-01-13 20:51:37 +03:00
aml
9ff36dac47 0032768: Coding - get rid of unused headers [BopAlgo to BRepBuilderAPI] 2022-01-12 23:10:09 +03:00
kgv
7e524fcbe1 0032764: Coding Rules - missing include guard in BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx 2022-01-10 19:46:35 +03:00
kgv
d925497360 0032758: Visualization, TKOpenGl - disable shadow-map from transform-persistence objects
OpenGl_View::renderShadowMap() now skips transform-persistent objects.
OpenGl_ShadowMap::UpdateCamera() - removed redundant Z-range expansion for non-rendered objects.
Improved syntax of vdrawtext command.
2022-01-10 19:45:09 +03:00
vro
6cb968fd6f 0032757: Application Framework, scaling transformation - loading of an OCAF XML document fails
A flag not to raise an exception is used on reading of an OCAF document. If such a shape with scaling transformation is stored in the document, it should be read.

Modified files:
XmlMNaming\XmlMNaming_NamedShapeDriver.cxx: not checking of the type of transformation for a read shape
2022-01-10 19:43:48 +03:00
jgv
e2a956a633 0032747: Modeling Algorithms - Exact HLR algorithm gives wrong result
Modify the method IntWalk_IWalking::TestArretCadre: correct the value of scalar product of two vectors according to the tolerances in U and V.
2022-01-10 19:42:11 +03:00
achesnok
16a263dc17 0032606: Visualization - add a shader for sky V3d_View::BackgroundSkydome()
Introduced V3d_View::SkydomeAspect() property for generating skydome cubemap environment.
Skydome features: day/night cycle, 2 types of clouds, atmosphere, water surface, stars, fog.
2021-12-30 00:14:47 +03:00
asuraven
2ac4e1beee 0032744: Modeling Algorithms - Endless loop in GCPnts_UniformDeflection
fixed finish criteria in CPnts_UniformDeflection::Perform()
2021-12-28 19:23:48 +03:00
aml
2f23e4e3a5 0032751: Coding - get rid of unused headers [AppStd to BndLib] 2021-12-27 10:17:16 +03:00
emv
bcecb5832b 0032644: Modeling Algorithms - Empty result of section operation
Use distance criteria additionally to parameter criteria when verifying the extrema solution to belong to the edge boundary.
Refactor the BRepExtrema_DistanceSS class to remove the excessive methods with mirrored parameters.
2021-12-23 19:19:11 +03:00
aml
f32cb549d8 0032742: Coding - get rid of unused headers [Adaptor2d to Approx] 2021-12-20 18:11:59 +03:00
kgv
ce7fe22d97 0032743: Coding Rules - remove unused class friends of Package classes 2021-12-20 18:10:56 +03:00
kgv
1bc34debc1 0032740: Coding Rules, OpenGl_Context.cxx - new warning on macOS after integration fix for #32732 2021-12-19 12:29:47 +03:00
kgv
302ad26bff 0032739: Configuration, scripts - handle ABI list within macOS building script adm/scripts/macos_build.sh 2021-12-17 17:51:40 +03:00
kgv
90eac74988 0032738: Configuration, scripts - handle ABI list within iOS building script adm/scripts/ios_build.sh
Variables "toSimulator" and "anAbi" within "ios_custom.sh"
have been replaced by "anAbiList" which can be defined like "iPhoneOS|arm64 iPhoneSimulator|arm64".
Added "toPackFat" option packing multiple architectures into FAT archives.
2021-12-17 17:48:53 +03:00
kgv
4d476dd2ed 0032732: Visualization, TKOpenGl - do not include system headers within OpenGl_GlFunctions.hxx 2021-12-17 17:43:29 +03:00
kgv
f291ad2528 0032733: Coding Rules - fix misprints in Doxygen tags 2021-12-17 17:41:36 +03:00
ichesnok
468856bf4a 0032452: Data Exchange - IGES reader returns invalid shapes if xstep.cascade.unit property is changed from default
Fixed documentation in 'IGES Translator' and 'STEP Translator' sections (description of the read.maxprecision.val parameter).
2021-12-16 19:26:41 +03:00
kgv
2f195ab915 0032484: Configuration, CMake fails to find EGL and GLES2 include directory on iOS platform
Fixed configuration errors and compilation errors on iOS target due to unexpected EGL usage (non-existing on iOS).
2021-12-16 19:24:31 +03:00
ssafarov
6ba81a695f 0026174: Data Exchange, IGES - Loss of color after the second write of file
A copy of myface is made, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods.
2021-12-13 09:36:02 +03:00
kgv
e463b2f685 0032725: Visualization - Graphic3d_Structure::SetDisplayPriority() should use public enumeration Graphic3d_DisplayPriority
Added new enumeration Graphic3d_DisplayPriority.
Graphic3d_Layer now defines a fixed-length array of priorities.
Properties Graphic3d_CStructure::Id, Priority, PreviousPriority have been wrapped into methods.
2021-12-10 01:24:40 +03:00
kgv
e3dae4a9f3 0032723: Draw Harness, ViewerTest - sloppy animation in WebGL
Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout().
ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView()
before previous one has been processed (leading to multiplying of pending redraws executed at the same time).
RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings.
2021-12-10 01:23:40 +03:00
kgv
f4f9ce4b77 0032727: Coding Rules - eliminate CLang warning -Wshorten-64-to-32 in MessageView_ActionsTest.cxx 2021-12-09 01:28:36 +03:00
kgv
4af354e6ed 0032720: Coding Rules - rename glext.h to OpenGl_glext.h 2021-12-09 01:27:48 +03:00
kgv
8f7159cbaa 0032713: Visualization, OpenGl_GlFunctions - unify OpenGL and OpenGL ES function lists
Including system OpenGL headers has been moved from OpenGl_GlFunctions.hxx to OpenGl_GlNative.hxx.
Added OpenGl_GlTypes.hxx providing basic OpenGL 1.1 types.
Wrappers of system OpenGL 1.1 / OpenGL ES 2.0 functions have been moved to OpenGl_GlFunctions.cxx.
Avoided usage of global OpenGL functions in OpenGl package outside of OpenGl_GlFunctions.cxx.
2021-12-09 01:26:48 +03:00
kgv
bf2884afbe 0032724: Coding Rules, Graphic3d_Structure - remove unused property Graphic3d_Structure::ContainsFacet() 2021-12-09 01:25:41 +03:00
kgv
18c678759e 0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces
BRepBuilderAPI_Copy now ignores toCopyMesh flag for non-geometric shapes.
2021-12-09 01:22:28 +03:00
kgv
340b2327b6 0032718: Draw Harness, ViewerTest - fix misprint in vanim command description 2021-12-09 01:22:27 +03:00
kgv
7ce8fe052d 0032712: Visualization, OpenGl_Context.hxx - avoid including OpenGL headers 2021-12-07 22:32:15 +03:00
kgv
ccd3858e63 0032711: Coding Rules - new warning in AIS_Shape::Color() after integration fix for 0032704 2021-12-07 22:32:14 +03:00
knosulko
4ec4e4e8a8 0030272: Modeling Algorithms - Incorrect work of gproject
-fix TolU/V for approximation;
-fix cutting tool for approximation;
-add method Adaptor3d_HSurfaceTool::IsSurfG1.
-add test bugs/moddata_3/bug30272
2021-12-07 22:32:14 +03:00
kgv
90da038e9d 0032663: Coding - remove AIS_SequenceOfInteractive 2021-12-07 22:32:14 +03:00
kgv
9a52982920 0032678: Coding Rules, ApproxInt_SvSurfaces - eliminate GCC -fsanitize=undefined error
ApproxInt_SvSurfaces::myUseSolver is now initialized by default constructor.
2021-12-07 22:32:13 +03:00
kgv
68a8b15260 0032714: Documentation - drop VS2010 from minimal requirements 2021-12-07 22:32:13 +03:00
kgv
03eb96038e 0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Animation, Convert 2021-12-03 18:00:22 +03:00
kgv
44f6e8d5e8 0032694: Documentation, Draw Harness Guide - update ViewerTest commands
Draw Harness Guide now refers to ViewerTest commands description
via @snippet pointing to C++ source code instead of duplicating it.
"help" command now tries to beautify output of command's description.
2021-12-03 17:58:15 +03:00
kgv
4f5e934445 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects.
Added missing initialization of default properties in AIS_InteractiveContext.
AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
2021-12-03 17:56:37 +03:00
kgv
65acdce54c 0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers
Removed usage of std::auto_ptr.
opencascade::std workarounds for VS2008 have been dropped, when possible.
OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
2021-12-03 17:56:37 +03:00
kgv
30fa5f6713 0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X
Several test cases writing temporary files have been corrected.
2021-12-02 21:14:57 +03:00
kgv
740833a6a8 0032697: Configuration - fix compilation errors with oneTBB 2021
Removed usage of no more existing tbb::task_scheduler_init and tbb::captured_exception.
2021-12-01 20:28:27 +03:00
aml
2009530611 0032696: Coding - get rid of unused forward declarations [StepSelect to Xw]
Packages starting with lower-case (gp and gce) are also processed.
2021-11-30 00:36:15 +03:00
dpasukhi
250ad34d90 0032683: Coding Rules, XCAFDoc_Editor::CloneMetaData() - unexpected bitwise operations
Fixed problem with incorrect bitwise operators.
Removed forced naming via cloning metadata
2021-11-30 00:36:15 +03:00
Dzmitry Razmyslovich
4a837ecec2 0031087: Configuration - make FreeType dependency optional [part 2] 2021-11-26 18:51:36 +03:00
isn
58c0958b50 0029406: Foundation Classes - gp_Ax3 fails setting direction
Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction.
2021-11-26 18:50:18 +03:00
nbv
323e88ada7 0030365: Modeling Algorithms - Create tool to compute deviation between any 2D-curve and some its segment
Adds two new overloaded 'ComputeDeviation()' function (approx & exact) to GeomLib_Tool class to calculates the parameter in the curve where the maximum deviation is obtained between the curve and the line segment connecting its points with the specified parameters

Adds new '2ddeviation' DRAW command for 'ComputeDeviation()' functional testing
2021-11-26 18:49:17 +03:00
kgv
d0cf7e8f3c 0032684: Draw Harness - fix Draw_Interpretor::Add() misuse due to overloaded syntax 2021-11-25 19:56:06 +03:00
kgv
4e69a6ac05 0032685: Draw Harness - help output smashes command names without delimiter
"help" procedure now ensures to put space between listed commands.
2021-11-25 19:54:46 +03:00
kgv
b6b55c3d96 0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events
Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events.
Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux.
2021-11-25 19:51:15 +03:00
msv
87b7b496ec 0032679: Data Exchange - STEP writer loses assembly instance name
In STEPCAFControl_Writer::WriteNames, write the names of components
even if the name of the assembly is absent.

In STEPControl_ActorWrite::TransferSubShape, move assembly structure
information to the beginning of the list of results, so that CDSR
information of this assembly became preceding CDSR of any sub shapes.
2021-11-25 00:35:25 +03:00
kgv
e1aa4ee31f 0032682: Draw Harness, ViewerTest - add -rotationMode and -navigationMode to vcamera 2021-11-25 00:35:25 +03:00
kgv
120dec9fb3 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined 2021-11-22 19:05:31 +03:00
kgv
3bbcf114f0 0032680: Visualization, AIS_TextLabel - Bold FontAspect doesn't work
Prs3d_TextAspect now sets Font_NOF_SERIF as default font
instead of confusig Font_NOF_ASCII_TRIPLEX (Times-Bold).
Therefore, default font now uses regular aspect, not bold.

Command vdrawtext does no more set "Courier" font by default.
2021-11-22 19:04:09 +03:00
kgv
d62df471b2 0032677: Coding Rules, Geom_BezierSurface - eliminate GCC warning -Wmaybe-uninitialized -fsanitize=undefined
Fixed initialization of TColStd_Array1OfReal for weights.
2021-11-22 19:02:55 +03:00
kgv
7ac3f543c7 0032675: Draw Harness, ViewerTest - remove command vr
Removed unused commands vr and Draft.
2021-11-22 19:01:19 +03:00
kgv
7c3daf20d1 0032676: Draw Harness, ViewerTest - fix NULL dereference on vanim -remove 2021-11-22 18:59:53 +03:00
aml
a81bd74a38 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] 2021-11-22 18:58:00 +03:00
kgv
c1e15aa538 0023398: Documentation, Shape Healing User's Guide - example does not compile
Fixed some misprints in the documentation.
Removed description of non-existing Message_TraceFile.
2021-11-21 12:42:10 +03:00
msv
519c84b43e 0030054: BRepOffset_MakeOffset fails to build joints in intersection mode
Test case has been added.
2021-11-21 12:42:10 +03:00
kgv
794b3d8936 0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape
SelectMgr_RectangularFrustum::OverlapsCylinder() - added missing 3D point transformation.
StdSelect_BRepSelectionTool::ComputeSensitive() - fixed cylinder height computation on TopoDS_Shape with scale transformation.
SelectMgr_AxisIntersector::OverlapsCylinder(),::OverlapsSphere() - added missing computations of surface normal.
2021-11-21 12:42:10 +03:00
kgv
c8365a1c28 0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported.
In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content
and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0.

env.bat.in has been corrected to include path to custom ANGLE (GLES2_DIR)
in front of Qt which might include its own older ANGLE build.
2021-11-21 12:42:10 +03:00
dipts
45143b7a24 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx
Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx.
Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus,
AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive.
2021-11-21 12:42:09 +03:00
dipts
9eab1511b0 0032661: Coding - Forward class declaration in ProjLib collides with typeref
Removed redundant forward declarations from ProjLib.hxx.
2021-11-21 12:42:09 +03:00
akaftasev
0ffecc2fc7 0032448: Modeling Algorithms - Provide exact validating (as option) using GeomLib_CheckCurveOnSurface
Add '-exact' option to checkshape command to use exact method to validate edges using BRepLib_ValidateEdge class. Default mode is calculating in finite number of points.
2021-11-21 12:42:09 +03:00
kgv
6eddc28410 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md 2021-11-21 12:42:09 +03:00
Xu Zhongxing
97e80b8c30 0032649: Bug in BRepLib::EnsureNormalConsistency()
Fix a typo in variable name.
2021-11-21 12:42:08 +03:00
rkv
57c5e9e895 0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings 2021-11-21 12:42:08 +03:00
kgv
2b40ee81d1 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer()
Added missing break.
Fixes reading of glTF files with Normal attributes preceding Position
(and eliminates redundant / erroneous copy when Position attributes precede Normal).
2021-11-21 12:42:08 +03:00
ichesnok
62874fa199 0032096: Data Exchange - Extension for XCAFDimTolObjects_DimensionQualifier
Added XCAFDimTolObjects_AngularQualifier for angles. And added field and methods for dimensions.
2021-11-21 12:42:08 +03:00
kgv
e77bcb6b57 0032655: Configuration, qmake - add missing CSF_Draco
Added CSF_Draco to OccToolkit.pri.
Removed libXmu.so search from genconf.
2021-11-21 12:42:07 +03:00
inv
d4edeaed31 Increment OCCT version up to 7.7.0dev 2021-11-21 12:42:07 +03:00
inv
80ffc5f84d Update version up to 7.6.0 2021-11-01 18:12:14 +03:00
kgv
d1069cad4b 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option
Fixed handling of -s=<search_mode> option.
Fixed handling of -mathjax=<path> option.
2021-11-01 18:12:14 +03:00
akaftasev
0c4931e873 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection()
2021-10-29 17:18:18 +03:00
btokarev
3ea347e562 0032551: Documentation - Novice user guide for OCCT Documentation
Added novice guide.
Improved structure of Tutorials & Samples.
2021-10-29 17:08:16 +03:00
dpasukhi
510d099d15 0028104: Data Exchange - Extract sub-assembly (XDE)
- Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
- Added XCAFDoc_Editor::Extract to transfer part to a new location
  - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
- Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
- Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
- Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
- Protected against creating a new label for non-existent tools via extract or expand process
2021-10-28 22:04:04 +03:00
ski
5bd54bef32 0024975: Improve of preprocessor directives in header files to be equal to the file name
Preprocessor directives were changed or created by function "check_headers" from script adm/upgrade.tcl (CR24816)
2021-10-27 21:00:02 +03:00
kgv
4f7ad5fb76 0032640: Coding Rules - fix misprints in GeomliteTest_API2dCommands.cxx 2021-10-27 20:58:18 +03:00
aml
f706c128c2 0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM] 2021-10-27 20:57:19 +03:00
asuraven
209ae313a5 0032031: Analyze Precise HLR behaviour in Draw/AIS
- Set "Algo" as default HLR algorithm in MFC HLR sample
2021-10-26 23:12:30 +03:00
knosulko
81f57d1135 0030046: Modeling Algorithms - Cannot find necessary projection of the curve
move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform;
fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve;
new treatment of myMaxDist;
use extend bounds in approximation;
add test;
test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior.
2021-10-26 23:10:34 +03:00
ifv
9923f08703 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps
GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries
bug32557 - test is updated by new cases
2021-10-25 11:18:27 +03:00
aml
5b756182c2 0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect] 2021-10-22 20:17:18 +03:00
kgv
5f69cfa70c 0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly
ViewerTest_EventManager - added tracking of EMSCRIPTEN_EVENT_FOCUSOUT event.
onWasmMouseCallback() has been adjusted to return FALSE for EMSCRIPTEN_EVENT_TARGET_WINDOW
target to avoid misbehavior of other HTML controls.

WNT_Window::ProcessMessage() now handles WM_SETFOCUS/WM_KILLFOCUS instead of WM_ACTIVATE to track focus changes.

AIS_ViewController::ProcessFocus() now redirects to AIS_ViewController::ResetViewInput() on focus loss.
This fixes issues when key action (like WASD navigation) keep working even after releasing key if window has been switched.
2021-10-22 19:58:16 +03:00
vro
19da974edc 0032632: Visualization, AIS_ViewCube - the class AIS_ViewCubeSensitive is hidden inside CXX file 2021-10-22 19:58:16 +03:00
kgv
bcb2a742a7 0032631: Draw Harness - add DRAWEXE.evalAsync() to WebAssembly 2021-10-22 19:58:16 +03:00
kgv
005caf39cf 0032633: Draw Harness - extend command incmesh to apply default visualization parameters
incmesh - added -prs option to use StdPrs_ToolTriangulatedShape::GetDeflection() as meshing parameters.
vdisplay, XDisplay - added -autoTriangulation option to manage meshing behavior before displaying a shape.
trinfo - added output of meshing parameters.
Fixed broken incmesh syntax usage in several test cases.
2021-10-22 19:58:15 +03:00
kgv
2c8c4b8086 0032629: Configuration, scripts - add USE_PTHREADS building option to wasm_build.bat 2021-10-22 19:58:15 +03:00
mpv
7e63845c9e 0026981: Application Framework - read a BinOcaf document from С++ stream sequentially
The current version of the document supports partial reading. So, as a result, the shapes section is dispersed into attributes and it becomes easy avoid any seekg call during the reading.
But this will work only in case whole document is opened. For partial reading seekg functions could be naturally called.
2021-10-22 19:58:15 +03:00
jgv
f8d8c3f2bc 0032623: [Regression] Modelling Algorithms - UnifySameDomain invalid result only in release mode
Correct local function ReconstructMissedSeam: use copy of existing pcurve for seam edge reconstruction to prevent possible corruption of another edges.
2021-10-20 20:06:30 +03:00
kgv
4e61131a1c 0032626: Samples - add Qt::WA_NativeWindow attribute to Qt IESample 2021-10-18 20:14:35 +03:00
kgv
4e2151f654 0032624: Configuration, genproj - add support for VS 2022 / vc143 2021-10-18 20:13:10 +03:00
dpasukhi
475da0f135 0032310: Data Exchange - Invalid STEP export/import of backslashes in names [Regression since OCCT 7.5.0]
Fixed a problem with handling slashes and apostrophes
Changed cleaning of the 'TEXT' fields of the step entity to direct order w/o removing operations
Changed converting text locale to covert before cleaning directives and specials symbols (all directives and sp. symbols encoded in ASCII[0-125] and haven't any differ with any locals)
Special case, when directives have two slashes before name changed to don't handle directives value and converts as is (combine two slashes as one and write, for example "\\X2\00C3" as "X2\00C3")
2021-10-15 19:52:25 +03:00
jgv
538700ffa2 0032619: [Regression] Modelling Algorithms - UnifySameDomain ignores shared face
Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: exclude free boundary edges from unification.
2021-10-15 19:50:25 +03:00
abulyche
eb78d737d4 0030747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours.
Corrected Geom2dConvert_CompCurveToBSplineCurve::Add in Geom2dConvert_CompCurveToBSplineCurve.cxx;
Added the test for this problem;
Corrected "gluing" curves in ProjLib_ProjectedCurve.cxx.
2021-10-14 20:19:22 +03:00
kgv
c1638a8db8 0032622: Draw Harness - writebrep "-version 3" is unrecognized
Fixed version range check.
Added description of -normals argument.
2021-10-14 20:17:11 +03:00
aml
0c9c466e9d CR32614 Coding - get rid of unsused forward declarations [Adaptor2d to GccAna]
Packages from Adaptor2d to GccAna are processed.
2021-10-12 20:11:16 +03:00
kgv
16f9b46dbb 0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds
RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes
(allow flattering only of Mesh nodes).

Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming().
Added comparisons with reference Xdump data to glTF tests.
2021-10-12 20:08:57 +03:00
kgv
34043fc845 0032613: Samples - glfw compilation error on Linux
GlfwOcctWindow - added cast to Aspect_XDisplay*.
Added auxiliary OCCT searching script as alternative to CMake config files.
2021-10-12 09:37:23 +03:00
ifv
56b495d93b 0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result
IntPatch/IntPatch_ImpPrmIntersection.cxx - decreasing step for some conditions
tests/lowalgos/intss/bug32607 - test case added
2021-10-08 20:51:50 +03:00
vkuzin
96b92906de 0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data
Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.
2021-10-08 20:51:13 +03:00
kgv
f1c209dc77 0032609: Visualization, Wasm_Window - handle mouse movements outside canvas element
Wasm_Window::ProcessMouseEvent() - removed redundant check on EMSCRIPTEN_EVENT_MOUSEUP event.
ViewerTest and WebGL sample - mouse movements are now tracked on window element
to allow tracking updates when mouse with clicked button is moved outside canvas element.
2021-10-08 20:26:22 +03:00
kgv
f9ae10ed21 0032604: Visualization, AIS_LightSource - improve dragging robustness 2021-10-08 20:24:43 +03:00
achesnok
956d91571c 0032591: Visualization, V3d_View - improve corner gradient
- Added new shader for correct Aspect_GradientFillMethod_Corner mode shading.
2021-10-08 20:22:22 +03:00
aml
c2064b60e7 0032603: Coding - get rid of unsused forward declarations
Packages from Adaptor2d to BRepMesh are processed.
2021-10-04 20:03:10 +03:00
kgv
eba0379cde 0032602: Configuration, genconf - reduce window height with empty error log
Font height is reduced to 1 for empty error labels is empty to win some space.
2021-10-04 19:54:22 +03:00
msv
41fc11b056 0032601: Foundation Classes - Poly_Connect hangs on the given incorrect triangulation 2021-10-04 19:53:12 +03:00
asuraven
0f05f21194 0032539: Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm 2021-10-01 19:14:13 +03:00
dpasukhi
7d5e26eb2e 0032596: [REGRESSION] Data Exchange, STEP Reader - OCCT 7.6.0dev does not open file correctly
Fixed typo in the StepToTopoDS_TranslateFace.cxx after #29564 issue
2021-10-01 19:08:36 +03:00
btokarev
5c38397303 0032550: Documentation - Proofreading for "Tutorials and Samples -> Tutorial"
New images added for better representation of solid model;
Minor fixes for misprints and old classes;
Proofreading done.
2021-10-01 19:06:33 +03:00
jgv
ca65b1ae37 0032581: Modelling Algorithms - UnifySameDomain produces invalid result
1. Correct local function TransformPCurves of ShapeUpgrade_UnifySameDomain: take into account the case of seam edge.
2. Correct local function ReconstructMissedSeam of ShapeUpgrade_UnifySameDomain: use previously stored seam edge in some cases.
2021-09-30 19:43:06 +03:00
kgv
b4871a3b12 0032595: Documentation - revise "Build OCCT" structure to highlight CMake usage
"Building with CMake tool" subsection has been moved out from "Windows" to a dedicated top-level section.
genproj sections have been merged and restructured.
Added description of some new CMake configuration options.
Updated URL to 3rd-party components on Development Portal.
2021-09-30 19:41:47 +03:00
kgv
ff60d28357 0032597: Coding Rules, Wasm_Window - add missing setter for DevicePixelRatio property 2021-09-30 19:39:45 +03:00
aml
307fef1dcd 0032593: Documentation - get rid of unused file in the documentation. 2021-09-28 20:15:15 +03:00
abulyche
95c380d252 0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
This problem was solved by fix for 0030597.
Added the non-regression test for this problem.
2021-09-28 20:12:06 +03:00
ifv
f277dcbbc0 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors
BRepTools/BRepTools_NurbsConvertModification.cxx -
 Checking domain of 2dCurves if surfaces are periodic is improved

tests/bugs/moddata_3/bug32557 - test case added
2021-09-28 20:10:04 +03:00
ifv
af0cb16691 0032569: Modeling Algorithm - Section not found
IntPatch/IntPatch_WLineTool.cxx - adding control of maximal ratio of distances between 3 sequential points.
tests/bugs/modalg_7/bug32569 - new test case added
tests/lowalgos/intss/bug29972_1 test case is modified according new behavior of intersection algorithm
2021-09-28 20:06:09 +03:00
emv
f72c595119 0032578: Modeling Algorithms - Splitting face by set of edges fails
Update information about ON/IN sub-shapes for all touched faces when intersection with shapes of lower types (edges and vertices) complete.
Previously only the faces participating in the Face/Face intersection were updated.
2021-09-27 20:12:00 +03:00
kgv
3e9cb80644 0032590: Visualization, V3d_View - improve API for setting Image Based Lighting
Added method V3d_View::SetImageBasedLighting() for managing IBL.
OpenGl_View implementation has been revised to handle IBL updates in a more straightforward way,
2021-09-26 16:44:20 +03:00
achesnok
9af0d66b84 0031039: Visualization - add elliptical gradient background style
Added new elliptical gradient fill method and updated vbackground command.
Renamed enum values of Aspect_GradientFillMethod and defined aliases for old ones.
Changed draw mode in OpenGl_BackgroundArray from triangle-strip to GL_TRIANGLES.
2021-09-26 11:05:34 +03:00
kgv
3be25c1170 0032585: Data Exchange, RWGltf_CafWriter - include OCCT version 2021-09-24 18:34:45 +03:00
kgv
ea99d048d7 0032582: Configuration, genproj - make CSF_OPT_LIB64D configurable by genconf 2021-09-23 19:59:22 +03:00
kgv
c585f731eb 0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure sRGB flag
Command vbackground has been refactored to simplify logic and relax syntax.
Added -srgb argument to vbackground and vtexture commands.
2021-09-22 20:11:44 +03:00
kgv
c983176406 0032580: Data Exchange, STL - add option splitting nodes at sharp corners
Added Poly_MergeNodesTool tool for merging nodes within triangulation.
Added RWStl_Reader::MergeAngle() property managing merging behavior.
2021-09-22 20:09:48 +03:00
asemenov
5dd92c395a 0029478: Crash because bSplineSurfaceWithKnots is NULL.
Modified the method void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
Added processing B spline surface with knots and rational B spline surface with empty data in the name field
Added test
2021-09-20 20:03:49 +03:00
abulyche
296dbe8cc8 0031631: Modeling Algorithms - Invalid result of Pipe builder
Added the ability to operate the algorithm with different types of curves.
2021-09-18 17:07:06 +03:00
dpasukhi
812ee2c9be 0031388: Data Exchange - support kinematics data in STEP format
- add new STEP entities.
2021-09-17 20:08:51 +03:00
asuraven
92c1f9728e 0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory
Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance
2021-09-17 20:07:40 +03:00
emv
b878139461 0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
Before removal of the part make sure that it was not filled due to overlapping of opposite parts.
Improve procedure of checking for inverted edges by taking into account that the original edges may not be connected.

Correct test case offset/shape_type_i_c/YL5, as it was working incorrectly - some parts were missing.
2021-09-17 20:07:39 +03:00
kgv
5aa7b61083 0032236: Modeling Algorithms - Exception on calculation optimal bounding box
- BRepBndLib - added VOID box checks to AdjustFaceBox() method.
 - added the test
2021-09-17 20:07:39 +03:00
kgv
eee6a80a90 0032089: Visualization, TKOpenGl - support GL_EXT_sRGB extension to OpenGL ES 2.0 2021-09-17 20:07:39 +03:00
sshutina
58f2990bc5 0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text
- removed the call of glGetTexEnviv, glTexEnvi
 - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams
 - added the method in OpenGl_Font returning first texture
2021-09-15 20:12:43 +03:00
akaftasev
7c6fecf9a8 0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break
Add progress indicator to BRepOffset_MakeOffset::MakeOffsetShape().
2021-09-15 20:08:36 +03:00
kgv
13b36bb14f 0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full enumeration name 2021-09-15 20:07:06 +03:00
ifv
e2421df543 0030422: Random behaviour of BRepAdaptor_CompCurve
BRepTools/BRepTools_WireExplorer.cxx - replace MapOfShape vmap by IndexedMapOfShape
to avoid random behavior of algorithm

bugs/moddata_3/bug30422 - new test case added
2021-09-15 20:07:06 +03:00
jgv
1e6b2065b5 0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected to union two pairs of faces
Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: when creating the Edge-Face map of initial shape, count each face only once.
2021-09-15 20:07:06 +03:00
kgv
e2d6f0e37a 0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for macOS 10.14+
The warning has been suppressed for building TKOpenGl.
2021-09-15 20:07:05 +03:00
asuraven
9ae883970d 0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters 2021-09-11 11:15:44 +03:00
asemenov
8019a482b5 0029233: Incorrect result of conversion to the STEP format.
Modified the method TopoDSToStep_MakeStepFace::Init
Added processing of degenerate toroidal surfaces, which are the base surfaces of offset surfaces
Added test
2021-09-10 20:24:53 +03:00
kgv
36d21f1a1a 0032565: Foundation Classes, OSD_FileSystem - expose interface for registering global protocols
Added methods OSD_FileSystem::AddDefaultProtocol()/::RemoveDefaultProtocol()
and fixed misleading description of OSD_FileSystemSelector::AddProtocol().
2021-09-10 20:24:52 +03:00
kgv
8a17a8bb45 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory
First scene is now loaded when default one is undefined.
2021-09-10 20:24:52 +03:00
sshutina
8dcb81ac82 0031337: Inspectors - user guide update
- Modifyed 3D view:
     Added the trihedron, view cube
     Removed the scene manipulation actions (Fit all isn't removed)
 - Added the new MessageView plugin to display content of Message_Report
 - DFBrowser plugin improvements:
     Added the  button to switch ON DumpJson in DFBrowser(OFF by default, for better performance)
     Renamed in DFBrowser "Property Panel" into "Property Panel (custom)
     Removed the selection controls
 - ShapeView plugin improvements:
     Property View content based on DumpJson (columns in tree view for properties are removed),
     Properties for TopoDS_Shape are displayed
 - VInspector plugin imrovements:
      Property View content based on DumpJson (columns in tree view for properties are removed),
      Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
      Removed History panel in VInspector as not used
      Implemented the item and actions in VInspector for setting Lights in the view
2021-09-10 20:24:52 +03:00
kgv
cd4977383d 0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale image
Image_VideoRecorder::writeVideoFrame(), added protection from API misuse.
2021-09-10 20:24:51 +03:00
kgv
801e67bc7b 0032564: Foundation Classes, OSD_CachedFileSystem - allow referring to non-default File System
Linked file system can be now customized within OSD_CachedFileSystem.
2021-09-10 20:24:51 +03:00
sshutina
7d7541ceeb 0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_PEELING_OIT enabled 2021-09-10 20:24:51 +03:00
vro
e8ae1c42a8 0032531: Application Framework - There should be methods to get explanations of PCDM_StoreStatus and PCDM_ReaderStatus values
Documentation is added for PCDM_ReaderStatus enumeration.

Modified:
- PCDM_ReaderStatus.hxx: each value received a short explanation.
2021-09-10 20:24:51 +03:00
emv
74a53b82dc 0030206: Improve API of commands bbop and bapibop
0030620: Tests - perf/bop/buildfaces does not match description (broken)

Allow using meaningful parameters for the commands bbop and bapibop:
* common - for Common operation
* fuse - for Fuse operation
* cut - for Cut operation
* tuc/cut21 - for Cut21 operation
* section - for Section operation

Add description for the commands dealing with Boolean/GF/Split operations.
Validate arguments of these commands.

Correct test case perf/bop/buildfaces to perform GF execution in parallel and serial modes - compare the results.
2021-09-10 20:24:50 +03:00
emv
efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00
kgv
35ad04e78b 0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
RWGltf_CafWriter has been fixed to write shared Faces having a different style.
RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face
from the same primitive array definition.

RWGltf_CafReader - improved name generation.
2021-09-10 20:22:59 +03:00
akaftasev
8ab0b859df 0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms
Added progress indicator to BRepAlgoAPI_Defeaturing
2021-09-08 19:14:11 +03:00
kgv
5e76328243 0032328: Missing include of TopoDS_Edge.hxx in ShapeUpgrade_UnifySameDomain.hxx 2021-09-07 20:03:29 +03:00
abulyche
41e2eed0fc 0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances
Updated the math_DirectPolynomialRoots.cxx
Added the test case "bug30722"
Updated the command "b2dclassify" in the BOPTest_LowCommands.cxx
2021-09-07 20:01:40 +03:00
msv
a1ae05e173 0018170: Modeling Data - crash in TopExp_Explorer::Init if Clear was called after empty constructor
TopExp_Explorer::Clear() now sets myTop=-1 with align to TopExp_Explorer::Init() logic.
2021-09-05 23:13:27 +03:00
asuraven
f26ee38f2a 0029792: Add ::IsParallel method to GeomAPI_Extrema* classes
Add IsParallel() methods for classes:
- GeomAPI_ExtremaCurveCurve
- GeomAPI_ExtremaCurveSurface
- GeomAPI_ExtremaSurfaceSurface
2021-09-03 20:20:20 +03:00
ifv
4391df896c 0026269: Modeling Data - Analytical extrema does not take into account trimmed input data
Treatment of trimmed data is added
Extrema/Extrema_ExtCC.cxx

Test cases added
tests/lowalgos/extcc/bug26269_1
tests/lowalgos/extcc/bug26269_2

Test cases are modified according to new behavior of algorithm
2021-09-03 20:19:56 +03:00
asuraven
872a7e3a7e 0032485: Modeling Algorithms - Add Clone() function for adapters
Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.
2021-09-03 20:19:56 +03:00
asuraven
82bee1621a 0031942: Modeling Algorithms - add possibility to abort the BRepExtrema_DistShapeShape algorithm
- Now available to interrupt the DRAW 'distmini' command by Ctrl/C
- Message_ProgressRange/Message_ProgressScope used in BRepExtrema_DistShapeShape::Perform() to provide user break
2021-09-03 20:19:56 +03:00
akaftasev
d03c08988c 0021264: Modeling Algorithms - Progress indicator for Boolean operations
Update BOP commands to use progress indicator
Deleted wrong usage of progress indicator from bop operations
Added UserBreak() method to break execution boolean operation if progress indicator is used
Added method AnalyzeProgress() to calculate steps of progress indicator
Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector.
Provide suitable way of keeping the progress steps of operations.
Give meaningful names to progress scopes.
Propagate progress indicator into deeper methods of BOA.
Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter
2021-09-03 20:19:55 +03:00
vro
632deee0b0 0032125: Application Framework, OCAF - need to have adequate message if document cannot be saved due to unrecognized format
A list of storage statuses (PCDM_StoreStatus) is extended for PCDM_SS_UnrecognizedFormat. It is set if
- extension of a document file name is not defined (the extension doesn't correspond to any declared file formats) or
- a storage driver is not found for the document storage format.

Modified:
CDF_StoreList.cxx: the mechanism of raising and catching exceptions is replaced by direct setting the status and error message for each particular error.
PCDM_StoreStatus.hxx: a new enumeration value is added - PCDM_SS_UnrecognizedFormat. Also, a short explanation is added to each enumeration value.
DDocStd_ApplicationCommands.cxx: processing of a new enumeration value by the draw-command.
XDEDRAW.cxx: processed a new enumeration value PCDM_SS_UnrecognizedFormat by saveDoc draw-command.

Deleted:
CDF_MetaDataDriverError.hxx: It is not used anywhere and it seems it will not be used by someone.
2021-09-03 20:19:55 +03:00
dpasukhi
9443cf8ec4 0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file
Fix STEP writing Wire for periodic surface
2021-09-03 20:19:54 +03:00
mkrylova
3016a39071 0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings
- fixed CLang UndefinedBehaviorSanitizer warnings
2021-09-03 20:19:54 +03:00
kgv
e21db5b80e 0030976: Configuration, CMake - Build failure with static FreeType dependency
Removed linkage with "freetype.lib" with help of pragma lib specific to msvc.
FreeType library should be configured as a normal external dependency via CSF_FreeType
by CMake and genproj, which is already done (information was duplicated).
2021-09-03 20:19:53 +03:00
kgv
e639e9bcdc 0032553: Configuration, CMake - unable to building with ActiveTcl
Removed linkage with "tcl8.6.lib" with help of pragma lib specific to msvc.
Tcl libraries should be configured as normal external dependencies via CSF_TclLibs
by CMake and genproj, which is already done (information was duplicated).
2021-09-03 20:19:53 +03:00
sshutina
0b1fd5909d 0031351: Inspectors - thread in DFBrowser removing
- DFBrowser_Thread and connected are removed from the package as obsolete
2021-09-03 20:19:52 +03:00
jgv
13584d1468 0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder
Modifications in the method IntPatch_ALineToWLine::MakeWLine:
correct setting parameters to vertices on IntPatch_WLine curve.
2021-09-03 20:19:52 +03:00
kgv
c1b3ce202a 0032549: Configuration - fix misprint in adm/scripts/android_build.bat for Draco library name 2021-08-31 20:54:52 +03:00
kgv
ce83709ac9 0032546: Data Exchange, XCAF - mark material as defined XCAFDoc_VisMaterialPBR::IsDefined=true within default constructor
XCAFDoc_VisMaterialCommon and XCAFDoc_VisMaterialPBR default constructors now set IsDefined property to TRUE.
So that it is required to set IsDefined=false explicitly to create an undefined material,
which is done by XCAFDoc_VisMaterial constructor.

Existing application code shouldn't require any modifications in most cases
(IsDefined=true required before to setup material could be now removed).
2021-08-31 20:05:37 +03:00
kgv
19691a22fd 0032545: Configuration, CMake - add BUILD_FORCE_RelWithDebInfo option for generating VS project files with Debug info in Release mode 2021-08-31 19:53:33 +03:00
akaftasev
7e187d6b22 0028687: Offset for open wire is built with incorrect direction
Added new condition to exclude offsetting non closed part of circle as complete circle
2021-08-30 09:47:33 +03:00
akaftasev
55b5d19bd8 0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire
Added flag to reverse resulting shape, if it was reverse in BuildDomains() to bringing to the same direction as the original shape
2021-08-30 09:47:33 +03:00
kgv
8f70959571 0032464: Draw Harness, ViewerTest - rely on AIS_ViewController within vanimation command
Added AIS_ViewController::ObjectsAnimation() property
similar to AIS_ViewController::ViewAnimation() but designed for objects animation.
2021-08-27 19:11:44 +03:00
mkrylova
9dd8af261f 0032281: Visualization - add Select3D_SensitiveCylinder
- implemented Select3D_SensitiveCylinder class performing an analytical intersection with an untriangulated cone/cylinder
- added tests
2021-08-27 19:09:09 +03:00
kgv
8a77384b0c 0032403: Visualization - RayTracing renders all object as white color in view with white background
OpenGl_Caps::buffersOpaqueAlpha is now set to TRUE by default.
OpenGl_View::runPathtrace - fixed higlighting with PathTracing turned on and buffersOpaqueAlpha=true.
2021-08-27 19:08:14 +03:00
msv
45d498ef1f 0031514: Foundation Classes - Add Base64 encoding function
The class FSD_Base64Decoder has been renamed to FSD_Base64.
The new method FSD_Base64::Encode has been added.
The method Decode has been improved for performance.
2021-08-27 19:08:14 +03:00
dpasukhi
da80ff68f1 0031382: Data Exchange - BinXCAF should preserve length unit information
Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
2021-08-20 20:30:11 +03:00
ifv
9592ae247b 0027457: Modeling - Raise exception if scaled transformation is used for shape location
Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.
2021-08-20 20:18:06 +03:00
kgv
91428b468b 0032536: Configuration - extend adm/scripts with USE_DRACO option 2021-08-14 18:00:19 +03:00
knosulko
7b5f784419 0026979: Parabola curve intersection with variety of surfaces produces incorrect results.
Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola.
Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method.
2021-08-13 20:43:47 +03:00
abulyche
715fcb5a92 0027884: Modeling Algorithms - Possible improvement for 2d classifier
Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d
Added the speedup for 2d classification to BRepClass_Intersector.cxx
Added the test for our improvement
2021-08-13 20:22:41 +03:00
kgv
fceeb82917 0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to OpenGL 4.5 specs violation
OpenGl_GlCore45 - removed a couple of FFP-related functions introduced by OpenGL 4.5 Compatible Profile, but not Core Profile.

OpenGl_GlFunctions::load() now tries to load a set of functions
from GL_ARB_robustness extension (having ARB suffix) to fill OpenGL 4.5 function table,
and from GL_ARB_indirect_parameters extension to fill missing items in OpenGL 4.6 function table on Intel drivers.
Warning message (trace level) is now reported instead of error in case of fallback usage.
2021-08-12 19:15:44 +03:00
kgv
11c23250dc 0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part
Added RWGltf_CafWriter::ToMergeFaces() property disabled by default.
RWMesh_MaterialMap - fixed creation of texture folder within working dir ".".
XCAFDoc_VisMaterial::FillMaterialAspect() - added clamping of too small shininess values.

Added options -mergefaces and -splitindices16 to WriteGltf for new feature.
Added -systemCoordSys option to WriteGltf for consistency with WriteObj.
2021-08-12 19:12:23 +03:00
kgv
fd42e7645d 0032527: Data Exchange, RWGltf_CafWriter - make name format configurable
Added properties RWGltf_CafWriter::NodeNameFormat() and ::MeshNameFormat().
2021-08-12 19:07:52 +03:00
kgv
d9d75a845f 0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression
Added new optional dependency - Draco library.
RWGltf_GltfJsonParser now detects KHR_draco_mesh_compression extension,
marks accessor being compressed and redirects to compressed buffer view.
RWGltf_TriangulationReader now handles decoding of buffer view compressed using Draco.

env.bat template for genproj has been modified to allow specifying dedicated folders
with debug versions of libraries (CSF_OPT_LIB64D / CSF_OPT_BIN64D) within custom.bat.
Removed unused CSF_FREETYPE from TKOpenGl.
2021-08-12 19:03:55 +03:00
kgv
aeef9e2c13 0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials
RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial()
now reset matallic factor to 0.0f in case of transparent color.
2021-08-12 18:59:54 +03:00
achesnok
45fc824bac 0031220: Visualization - remove internal field of viewer selector in context
- Removed myMainSel field from AIS_InteractiveContext and obtained this value from mgrSelector.
- Moved SelectMgr_ViewerSelector3d implementation into SelectMgr_ViewerSelector to get rid of redundant separation and extra DownCast's.
- Declared SelectMgr_ViewerSelector3d as deprecated.
2021-08-12 18:57:05 +03:00
kgv
f227f3dc96 0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect
ViewerTest_ContinuousRedrawer now explicitly invalidates V3d_View content
in addition to emitting window content redrawing request.

"vrepaint -continuous" now tries to avoid creation of dedicated thread
on Windows platform and relies on AIS_ViewController::SetContinuousRedraw().
2021-08-12 18:53:12 +03:00
achesnok
1b5eb2be23 0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron
- Made class Graphic3d_AxisAspect publicly nested in Graphic3d_GraduatedTrihedron.
- Removed public PtrView field from trihedron and obtained it from OpenGL_Workspace while rendering.
- Made CubicAxesCallback protected and provided corresponding getter/setter.
- Renamed AxisAspect() to AxisAspectAt().
2021-08-09 19:14:26 +03:00
mkrylova
27e64adb38 0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams
- provided OSD_FileSystem::OpenOStream() for output streams
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-08-04 20:13:20 +03:00
kgv
e93008abdd 0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer() 2021-08-04 20:11:27 +03:00
jgv
1a75fcddae 0032470: Modeling Algorithms - BOP wrong result on sphere and box
Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point.
2021-08-04 20:08:52 +03:00
kgv
286e9f13f3 0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrapping textured FBO
OpenGl_FrameBuffer::InitWrapper() now reads viewport from GL_VIEWPORT
and doesn't return error on GL_TEXTURE attachments.
OpenGl_FrameBuffer::Release() assertion is now skipped for wrapped FBOs.
2021-08-01 12:34:41 +03:00
kgv
32f86ef5a3 0032506: Visualization - add AIS_InteractiveContext::ObjectIterator() for iterating over objects in context 2021-07-31 13:14:05 +03:00
kgv
6054db8a29 0032482: Visualization - Object owner isn't removed from picked owner when object is removed
SelectMgr_ViewerSelector::RemoveSelectableObject() now removes object from picking results.
2021-07-31 13:11:27 +03:00
asuraven
bec59435e0 0032492: Coding - New warnings after integration fix for 27814 2021-07-27 14:51:05 +03:00
nds
4e993e4d0d 0027919: Visualization - support multiple transformation persistence groups within single presentation
Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
2021-07-23 18:31:51 +03:00
mkrylova
ad3f20c684 0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-07-23 18:28:23 +03:00
asuraven
000c21fa0c 0027814: Parallelize BRepCheck_Analyzer
Change BRepCheck_Analyzer::Perform algorithm from recursion to 'for' loop
Add parallelization to BRepCheck_Analyzer::Perform
Add '-parallel' option to checkshape command to use parallelization. Default mode is single-thread.

mutex as Handle
2021-07-23 18:15:55 +03:00
oan
f1c034f905 0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.
2021-07-23 18:15:55 +03:00
mkrylova
a3b2aaefac 0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
2021-07-23 11:28:42 +03:00
emv
b7344f5d72 0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to decrease number of static methods
Refactoring of the BRepOffset_MakeOffset_1.cxx - Introduce local class BRepOffset_BuildOffsetFaces to compute splits of offset faces.

Change of tests is caused by the correction of the misprint in the code (incorrect input parameter for CheckEdgesCreatedByVertex method).
2021-07-23 11:28:42 +03:00
kgv
acab849d30 0032479: Application Framework - unnecessary API break within TDocStd_Application::Open()
Added aliases to Open() without theFilter argument for compatibility with old API.
2021-07-15 20:09:58 +03:00
oan
9ee9e5ec34 0032424: [Regression] Mesh - Slow triangulation of a simple shape.
Check links produced by splitting of an initial link by the middle point for MinSize requirement.
2021-07-15 20:05:10 +03:00
kgv
06d40093b7 0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
2021-07-12 20:50:25 +03:00
abulyche
cb7f92396f 0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result
Added map of edges to BrepClass_Edge
Added searching of vertices with high tolerance to BrepClass_Intersector.cxx
Added check for hitting a vertex with high tolerance
Added the creation of a segment for the correct work of the classifier
2021-07-09 19:16:14 +03:00
kgv
7b17aba789 0032473: Visualization, WNT_Window::ProcessMessage() - handle WM_TOUCH
WNT_Window::ProcessMessage() now redirects WM_TOUCH events to AIS_ViewController,
so that it is possible to use multitouch displays in Draw Harness on Windows platform.

_WIN32_WINNT in CMake configuration for MinGW has been raised from 0x0501 to 0x0601.
2021-07-09 19:14:39 +03:00
kgv
0f04bd99d0 0032475: Configuration, qmake - drop "-z defs" linker flag on macOS 2021-07-09 19:14:00 +03:00
jgv
d1b591e580 0031890: Modeling Algorithms - Invalid result of common fuse BOP. Intersection has failed.
Modify the method BOPTools_AlgoTools3D::DoSplitSEAMOnFace: correct processing closed non-periodic surfaces.
2021-07-09 19:14:00 +03:00
mpv
d5c71e2057 0031918: Application Framework - New binary format for fast reading part of OCAF document
Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version.

Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read:
- into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite
- only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead)
- only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example
- to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example

The current limitations:
- only in Bin format
- if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore

Modifications:
BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class.
PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings.
TDocStd, CDF and some other packages are changed for supporting reading filters API and options.

Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.
2021-07-09 19:13:59 +03:00
kgv
9e5e4c0c84 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON - part 2 2021-07-06 16:46:31 +03:00
mkrylova
1f3c5058f2 0032389: Visualization, AIS_Axis - simple ray creation and displaying
- Added constructor to create axis by gp_Ax1
- Added possibility to display axis as ray
- Added function SetDisplayAspect to set required visualization parameters
2021-07-01 22:27:46 +03:00
mkrylova
9749af25ae 0032441: Draw Harness - command readstl doesn't print error message on failure
- added producing error message when passing an invalid file path
2021-07-01 22:26:10 +03:00
kgv
0770d850d6 0032465: Visualization, TKOpenGles - invalid enum on GL_RGBA16F initialization in Edge 92
GL_HALF_FLOAT_OES from OpenGL ES 2.0 extension
is now avoided within OpenGL ES 3.0+ context in favor of GL_HALF_FLOAT.

emscripten_webgl_enable_extension() is now called for all extensions
checked by OpenGl_Context::CheckExtension().
So far this doesn't solve any problem, but looks more logical and provisional.
2021-06-28 23:01:11 +03:00
kgv
16222b8cd2 0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data() 2021-06-27 17:32:27 +03:00
kgv
73dee81133 0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
2021-06-24 23:47:45 +03:00
mkrylova
503374ad84 0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
2021-06-24 19:52:25 +03:00
kgv
c123c310df 0032459: Draw Harness, ViewerTest - fix description of vrenderparams -oit 2021-06-24 19:50:48 +03:00
kgv
91836c86eb 0032458: Draw Harness, ViewerTest - fix misprint in vaspects -drawSilhouette 2021-06-24 19:49:35 +03:00
asuraven
c9337e33a6 0029059: It is necessary to have a unique way of checking of the validity of the edge and its 2D curves
Add new class BRepLib_ValidateEdge to use for edge checking instead of functions:
- Validate() from BOPTools_AlgoTools.cxx
- Validate() from BRepCheck_Edge.cxx
- ShapeAnalysis_Edge::ComputeDeviation()
2021-06-24 19:47:49 +03:00
osa
51d4a4f9d0 0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated methods
Fix incorrect value of axis intersection with segment inside of SelectMgr_AxisIntersector::raySegmentDistance().
Move camera definition to base intersector (it is not possible to set it for axis intersector, is is not applicable).
Add method Graphic3d_Camera::SetIdentityOrientation() to set camera parameters to make current orientation matrix identity one.
Remove all matrices from selection intersectors and frustum builder and use camera instead of them.
Fix missed axis tests in vselect grid.
2021-06-22 11:17:39 +03:00
kgv
4db6d89bc6 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON 2021-06-18 18:36:57 +03:00
kgv
690757a382 0032453: Documentation - nested multiline comments within BOPAlgo_CellsBuilder.hxx destroy Java wrapping 2021-06-18 18:35:43 +03:00
osa
168c27c69e 0032400: Visualization, TKIVtk - convert VTK camera to OCC
Add new interfaces GetEyePosition(), GetClippingRange(), GetAspectRatio() to IVTK_IView
Add ivtkviewparams command to print current parameters of view
Add ivtkcamera comand to print current camera parameters or manages camera parameters (set ortho or persp projection)
2021-06-18 18:34:02 +03:00
kgv
1790e9f28c 0032430: Coding Rules - eliminate CLang warning -Wdeprecated-copy
Introduced Standard_DELETE alias to C++11 feature "=delete".
2021-06-18 18:23:45 +03:00
bugmaster
42633ff642 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option 2021-06-18 18:23:45 +03:00
Natalia Ermolaeva
1aee888374 0032432: Inspectors - problems with tools test group
Adding __APPLE_ definition for libraries
2021-06-18 18:23:44 +03:00
bugmaster
50174691dc 0032404: Draw - problems with definition of cpulimit in tests
- The maximum value of cpulimit in test cases was limited to 1000 seconds (~ 17 minutes)
- cpulimit 1000 has been added to hlr/begin
2021-06-16 17:10:53 +03:00
kgv
3e6e62d861 0032438: Configuration - add batch files to build OCCT using Mingw-w64 2021-06-13 14:08:59 +03:00
kgv
902b31b6ee 0032437: Coding Rules - eliminate MinGW warning -Wmaybe-uninitialized 2021-06-13 14:08:59 +03:00
kgv
f9ab9f7f1c 0032433: Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK
Introduced Wasm_Window implementing Aspect_Window interface.

Aspect_WindowInputListener has been extended by touch input callbacks (moved from AIS_ViewController),
which now implements redirection of single taps to UpdateMouseClick().

AIS_ViewController::FetchNavigationKeys() now requests more frames even if Delta is zero,
but navigation keys are pressed - indicated by a new flag AIS_WalkDelta::IsDefined().

Fixed missing implementation of Xw_Window::DisplayConnection() getter.
The property has been moved to the base class Aspect_Window.

Removed unused Aspect_Convert.hxx.

DRAWEXE targeting Wasm:
- added exposing of FS interface so that it is possible uploading/downloading files to/from emulated file system on JavaScript level;
- added printer redirecting messages to Module.printMessage callback accepting message gravity;
- Run_Appli() now skips std::cin when Module.noExitRuntime is set.
2021-06-12 12:36:24 +03:00
mpv
7b3a032f1e 0032299: Application Framework - Loading OCAF document saved with earlier version fails when using OCCT 7.5.1
Keeping information about the file start instead of calling tellg. This fixes problem with not-seekable streams used for XML files reading and improves performance of XML files reading (about 10%), since tellg is quite long operation.
2021-06-09 19:46:22 +03:00
mkrylova
623e54f9ac 0032417: Coding Rules - clean up public headers gp_Mat.hxx/ gp_Mat2d.hxx from internal macros
Deleted internal macros.
2021-06-09 19:40:22 +03:00
kgv
aa71e826ca 0032428: Documentation, AIS_InteractiveContext - put cross-references between MoveTo() and HighlightStyle()
Added more @sa section between methods.
Deprecated Select() methods have been moved to the section with obsolete methods.
Methods delimiter within @sa listing has been changed from '/' to ',' for proper Doxygen generation results.
2021-06-09 14:44:31 +03:00
kgv
6a920e0243 0032419: Coding Rules - revert Overlaps() methods to SelectBasics_SelectingVolumeManager as deprecated aliases
Deprecated Overlaps() methods have been moved from subclass SelectMgr_SelectingVolumeManager
to the base class SelectBasics_SelectingVolumeManager,
so that they are actually accessible within Select3D_SensitiveEntity::Matches() implementations.

Several methods have been marked as pure virtual in the base interface.
Second SelectMgr_BaseIntersector::OverlapsPolygon() has been dropped from virtual interface
as useless (trivially replaceable).
2021-06-04 19:10:46 +03:00
kgv
1b6b8afcd0 0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file
Unstable test case v3d/memory/bug26538 has been adjusted.
2021-06-03 18:28:45 +03:00
zaphod
ff1f0c9ae2 0032402: Coding Rules - eliminate msvc warning C4668 (symbol is not defined as a preprocessor macro, replacing with '0' for directive)
Make preprocessor expressions consistent with respect to guard expressions.

Fixed usage of macros __QNX__, IRIX, OCCT_DEBUG, DO_INVERSE, DRAW, CHFI3D_DEB by value.
Removed obsolete hack for Sun Workshop 5.0 compiler.
2021-06-03 18:06:46 +03:00
mkrylova
d5477f8c82 0032137: Coding Rules - merge redundant .lxx files into header files within Package gp
- merged .lxx files into header files within Package gp
- fixed code style
2021-06-03 18:02:58 +03:00
kgv
5b441ee1a0 0032406: Configuration, CMake - DRAWEXE build fails on Linux with static libraries
Add missing CSF_dl, CSF_TclTkLibs to DRAWEXE dependencies (static build).
2021-05-31 16:05:43 +03:00
mkrylova
2315a04424 0032279: Draw Harness - protect incmesh from hanging on syntax error
- improved incmesh to raise exception on invalid input parameters
- added possibility to operate multiple objects
- added checking for too small values in BrepMesh algorithm
2021-05-28 18:08:30 +03:00
osa
1e4f29c5af 0032399: Configuration - correct search of VTK bin path by genconf 2021-05-27 21:09:36 +03:00
osa
18a353149e 0032385: Coding - New msvc10 warnings after integration fix for 32338 2021-05-26 20:21:34 +03:00
kgv
3738565abb 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface
Removed workaround within GeomLib_CheckCurveOnSurface.
2021-05-26 20:20:38 +03:00
Dzmitry Razmyslovich
793d165af6 0032261: Mesh - some trivial improvements for mesher
BRepMesh_Delaun::decomposeSimplePolygon(): minor change to improve code readability;
Correct test case
2021-05-26 20:09:15 +03:00
Dzmitry Razmyslovich
3326f9238c 0032261: Mesh - some trivial improvements for mesher
BRepMesh_ModelHealer::amplifyEdges use a single instance of EdgeAmplifier
2021-05-26 20:09:15 +03:00
Dzmitry Razmyslovich
ccb3502a56 0032261: Mesh - some trivial improvements for mesher
BRepMesh_GeomTool::IntSegSeg misses one case, when the result is Glued
2021-05-26 20:09:15 +03:00
osa
0038de11f4 0032388: Visualization - provide ray-picking interface with zero tolerance for rectangular frustum 2021-05-26 20:07:41 +03:00
osa
807340d924 0032387: Visualization - use interface of ray-picking for selection/highlighting for XR pose
Fixed regression of SelectMgr_ViewerSelector::SetPixelTolerance(). Removed redundant myToUpdateTolerance flag.

SelectMgr_AxisIntersector::raySegmentDistance() - fixed usage of SquareModulus() instead of Modulus().
SelectMgr_ViewerSelector::TraverseSensitives() now skips both BVHSubset_2dPersistent and BVHSubset_3dPersistent relying on Camera.

AIS_ViewController::handleXRMoveTo() now uses interface for picking by Axis explicitly
instead of emulating axis by point picking.
2021-05-26 20:06:45 +03:00
mkrylova
03c9cc86c6 0032337: Visualization - rename Overlaps() method in selection to more self-describable names
- renamed Overlaps and hasOverlap overloaded methods to self-describable names
2021-05-26 20:02:42 +03:00
kgv
df23a355c4 0032391: Draw Harness - missing syntax validation within vseldump
SelectMgr_SelectionImageFiller, SurfaceNormalFiller - pick results from SelectMgr_SortCriterion
instead of calling redundant Matches().
vseldump - added missing syntax error output on incorrect -type parameter.
2021-05-26 19:26:12 +03:00
vro
604aa3f4b3 0031920: Application Framework - speed up methods of getting label by entry and vice versa
A table for fast access to the labels by entry is implemented in OCAF document. A method TDF_Data::SetAccessByEntries(true) fills-in a table for fast access to the labels. New labels, created later will be added to the table automatically. The method TDF_Tool::Label() will search the entry in the table and then, if not found, will call the old code. Disabling of usage of the table (by calling of TDF_Data::SetAccessByEntries(false)) cleans the internal table of entries - labels. By default, the table is not used.
            This improvement is useful for large documents with a lot of labels, and if the application uses entries to get labels. The application should call TDF_Data::SetAccessByEntries(true) for a document and then, the method TDF_Tool::Label() called inside OCAF and XCAF will use the fast access to the labels and speed-up the application.
            Also, the method TDF_Tool::Entry() is improved (by MPV).

            Modified files:
            - TDF_Data.hxx and cxx: the new methods SetAccessByEntries(bool), IsAccessByEntries() and GetLabel(entry) are implemented. No need to use the method GetLabel() directly. It is called in TDF_Tool::Label().
            - TDF_Label.cxx: adding of a newly created label to the table of entries - labels.
            - TDF_Tool.cxx: the method Entry() is accelerated (by MPV) and Label() is improved to call TDF_Data::GetLabel().
            - DDF_DataCommands.cxx: a new draw-command is added SetAccessByEntry, which sets or unsets usage of the table for fast access to the labels. Usage of the draw-command is illustrated in a new test "bugs caf bug31920".

            Tests:
            - bugs caf bug31920: a new simple test to check TDF_Tool::Label() when fast access to the labels is on.

            Doc:
            - dox\upgrade\upgrade.md is extended for new information
2021-05-22 10:36:40 +03:00
jgv
f0ca3c819f 0032196: Modeling Algorithms - Invalid section curve
Modify the method IntWalk_IWalking::ComputeCloseLine: add condition for check of update of variable containing current solution
2021-05-22 10:36:40 +03:00
osa
0461e7fd03 0032338: Visualization - provide straightforward interface for ray-picking 2021-05-22 10:36:39 +03:00
osa
e1eb39d29d 0032365: Visualization - refactoring of viewer selector
Add SelectMgr_BaseIntersector class as base intersector that can have any geometry not only frustum.
Remove cached static array of selecting volumes from selecting volume manager. Keep only one the latest active selection volume.
Change initialization interface of active volume frustum inside of selecting volume manager: Init*SelectingVolume(), set required parameters, BuildSelectingVolume(). Mark existing BuildSelectingVolume() methods as deprecated.
Use SelectMgr_SelectionType instead of SelectBasics_SelectingVolumeManager::SelectionType (the last one is marked as deprecated).
Add interface GetViewRayDirection() to selecting volume manager to get view ray direction (instead of computation it as vector from near to far point).
Add interface IsScalableActiveVolume() to selecting volume manager to check possibility of scaling of current active selecting volume.
2021-05-22 10:36:39 +03:00
btokarev
77d94fd174 0032340: OCCT Documentation - highlight C++ code snippets
Added {.cpp} highlighting markers to the C++ code blocks in documentation;
Excessive tildes "~~~~~~~" in code block borders are reduced to required minimum of "~~~~" (4);
Removed obsolete space bars after code block borders;
TCL code blocks are now highlighted with {.php} markers;
Removed excessive {.cpp} highlighting markers appended to non-code blocks such as lists, reports and file content or structure examples;
Minor fixes for tests.md and draw_test_harness.md (whitespace removal and structural fix for "Where:" in code examples);
Minimum HDD space for OCCT updated in introduction.md.
2021-05-22 10:36:38 +03:00
kgv
4d67a36952 0032353: Modeling Data - Missing definition of ProjLib_ProjectOnSurface::Load() 2021-05-22 10:36:38 +03:00
kgv
c1ce84dcb3 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 3
Use typed collections instead Handle(Standard_Transient) values.
2021-05-22 10:36:38 +03:00
mkrylova
114e7a9022 0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
- extended functionality to dump surface normals
- added new option to vseldump command
- added tests
2021-05-21 19:00:57 +03:00
nds
d16ecfe28e 0031362: Inspectors - MessageView plugin for message alerts
- append new MessageView plugin to display content of Message_Report;

- correct DumpJson of TDataStd array attributes to print Lower/Upper values;
- correct remove level of Message_Report to store stop time during removing all levels;
- append DumpJson for TFunction, TPrsStd attributes;
- correct DumpJson of XCAFDoc tools due to simplify performance of it;
- move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside;
- remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes;
- add new property panel in DFBrowser (synchronized with the same in other plugins);
- add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view;
- rename in DFBrowser "Property Panel" into "Property Panel (custom)";
- implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now;
- implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape;
- remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way;
- remove History panel in VInspector as not used, MessageView will be better solution for this;
- implement item and actions in VInspector for setting Lights in the view.
2021-05-18 19:23:10 +03:00
bugmaster
9a5bfc1c07 0032326: Tests - duplicated bottle.brep reference in test data 2021-05-15 12:47:44 +03:00
sshutina
d1b8120b69 0032364: Visualization - Add interface to return global filter from context 2021-05-14 20:44:00 +03:00
jgv
06392edef7 0032291: Modeling Algorithms - General Fuse produces wrong number of solids
Modify method IntWalk_IWalking::ComputeCloseLine: add new flag "isOnDegeneratedBorder" to reach the border successfully.
2021-05-14 20:43:59 +03:00
kgv
44a5aa517b 0032372: Configuration, qmake - define -Wall -Wextra flags for consistency with CMake options 2021-05-14 20:43:59 +03:00
akaftasev
8d52a74d03 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access
Added to Draw command 'setsweep ' posibility to change degmax and segmax parameter manually by '-SM' and '-DM' options
Added test
Added new condition to prevent crash
2021-05-14 20:43:58 +03:00
akaftasev
da02839efe 0029645: Hang on making pipe shell using BRepOffsetAPI_MakePipeShell
Added new boolean parameter to GeomLib::FuseIntervals() to select method of defining an element with close values
2021-05-14 20:43:58 +03:00
kgv
f5682e9f78 0032357: Coding Rules - eliminate GCC11 compiler warnings -Wignored-qualifiers 2021-05-12 19:59:21 +03:00
kgv
14ba0bbad7 0032351: Visualization, PrsDim_LengthDimension - add NULL checks for handling non-Line curves
Added several missing NULL-checks.
Reduced restrictions on building Edge-Edge and Edge-Vertex length dimension.
Added empty constructor for more straightforward initialization from vdimension command.
2021-05-11 19:24:10 +03:00
kgv
1220d98e7a 0032349: Visualization, TKOpenGl - move base buffer interface out from OpenGl_VertexBuffer class to OpenGl_Buffer
OpenGl_Buffer - added new class as a base for OpenGl_VertexBuffer, OpenGl_IndexBuffer, OpenGl_TextureBuffer.
OpenGl_TextureBufferArb has been renamed to OpenGl_TextureBuffer.
OpenGl_FrameBuffer - added initializers taking vec2i instead of (int,int) for dimensions.
2021-05-11 19:20:51 +03:00
jgv
11bbf75932 0032332: Modeling Algorithms - Incorrect result of ShapeUpgrade_UnifySameDomain
Method UnionPCurves of ShapeUpgrade_UnifySameDomain is modified: check of the range of new pcurves is added: if the range differs from the 3D-curve's one, the pcurves are being recomputed by projection.
2021-05-11 19:19:37 +03:00
kgv
d82eb9de24 0032270: Configuration - Removing VS 2008 from maintenance
Documentation - updated list of supported platforms.
2021-05-11 19:18:29 +03:00
luz paz
03ca365a6c 0031939: Coding - correction of spelling errors in comments [part 12]
Fix various typos via codespell.
2021-05-10 14:29:42 +03:00
luz paz
2641792e45 0031939: Coding - correction of spelling errors in comments [part 11]
Fix various typos via codespell.
2021-05-10 14:29:40 +03:00
mkrylova
43d09575e1 0032191: Tests - merge duplicated tests/v3d selection cases
- merged duplicated tests vselect cases
2021-04-30 18:43:32 +03:00
anv
2c276f91da 0032331: Visualization - Exception when trying to display some surfaces using iVtk with VTK 9
Updated memory allocation for vtkPolyData to use more suited method for VTK versions after 9.0
2021-04-30 18:42:01 +03:00
kgv
977d3d479e 0032342: Draw Harness - preload basic Tcl scripts into WebAssembly
DrawResources Tcl scripts and $tcl_library (init.tcl) are now preloaded into WebAssembly emulated filesystem for DRAWEXE.wasm.
DRAWEXE now mimics "pload" command for statically linked plugins.
2021-04-30 18:39:33 +03:00
kgv
b04cd5d587 0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized 2021-04-30 10:55:01 +03:00
dpasukhi
36fbf05b15 0032314: Data Exchange - Reading corrupted STEP files crashes
RWAxis2Placement3d:
 fixed problem with reading parameters ( if sub-entity invalid, set has-parameter to false )
2021-04-28 18:38:34 +03:00
emv
62eafa5ac7 0032088: Modeling Algorithms - Empty result of offset operation in mode "Complete" join type "Intersection"
Mark inverted edges located inside loops of invalid edges as invalid as well.
2021-04-28 18:37:28 +03:00
dpasukhi
596e783958 0031949: JT Import - some colors are lost while reading XT representation from JT file
Added checking to style of faces from SHELL and edges from WIRE
RWMesh_CafReader::fillDocument() is virtual now
2021-04-28 18:31:04 +03:00
kgv
cece953cb4 0032334: Visualization - SelectMgr_RectangularFrustum::Overlaps() does not set triangle normal in some cases
Added missing SelectBasics_PickResult::SetSurfaceNormal().
2021-04-28 18:27:56 +03:00
kgv
342bb7fd4d 0032323: Configuration - drop unused dependency from Xmu
Removed unused header Aspect_XWD.hxx.
Removed redundant includes of unused X11 extension headers.
Added missing dependency on pthread to TKDraw.

Added "-z defs" linker flag to qmake projects to detect missing library dependencies.
Removed unused CSF_MotifLibs.
2021-04-28 18:26:58 +03:00
kgv
376d374d1f 0032319: Foundation Classes, OSD_MemInfo - use mallinfo2() instead of deprecated mallinfo() 2021-04-28 18:18:26 +03:00
kgv
fd2efe5428 0032320: Documentation - mention rapidjson-dev and qtcreator within Debian packages 2021-04-23 18:47:36 +03:00
kgv
a34bddcfd6 0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
DPLUGIN() macros no more defines exported function PLUGINFACTORY when building static libraries.
DRAWEXE executable now pre-loads a set of plugins when building static libraries.
dversion - added WebAssembly info.
2021-04-23 18:46:13 +03:00
bugmaster
d0d9e9375f 0032311: Documentation - Removing obsolete tag COLS_IN_ALPHA_INDEX 2021-04-22 14:50:54 +03:00
kgv
f6651f22e6 0032313: Modeling Algorithms - Missing definition of constructor in GeomFill_NSections 2021-04-22 14:50:54 +03:00
emv
ad3dc75556 0032307: Modeling Algorithms - Empty result of offset operation in mode "Complete" Joint type "Intersection"
Make sure the vertices created by pairwise intersection of edges connected in the same vertex are unified correctly.
2021-04-22 14:50:54 +03:00
nds
b06da8f1f1 0032091: Visualization - possibility to redefine Graphic3d_TransformPers 2021-04-22 14:50:53 +03:00
kgv
e186cf152b 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 2
Applied name conventions and dropped tabulation symbols.
2021-04-22 14:50:48 +03:00
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +03:00
kgv
b69e576af0 0032308: Configuration - make Xlib dependency optional
MACOSX_USE_GLX has been renamed to HAVE_XLIB and now configurable on Linux target.

Xw_Window.hxx now export class on non-Linux platforms.
OpenGl_Window now creates an off-screen EGL surface also in case of
window-less desktop setup (e.g. with disabled Xlib on Linux).

Draw_Window - code has been cleaned up.
Class definition has been unified across platforms when possible.
Unusued constructors have been removed.
Internal header files (MainWindow.h, init.h, etc.) have been renamed to .pxx
to avoid their unexpected distribution in "inc".
2021-04-22 14:50:46 +03:00
kgv
e8e157df45 0032306: Draw Harness, ViewerTest - move window message processing to TKService
Aspect_WindowInputListener - basic mouse/keyboard/expose input methods
have been moved out from AIS_ViewController to dedicated base interface.

Added WNT_Window::ProcessMessage()/Xw_Window::ProcessMessage() methods
redirecting Win32/X11 message to Aspect_WindowInputListener.
2021-04-17 15:14:16 +03:00
jgv
1294d5e39e 0031984: Modeling Algorithms - Sweep crashes if Bi-normal is given
Small modification in BRepFill_Sweep: to avoid exception, return status NotDone if construction of pipe surface fails.
2021-04-16 18:29:29 +03:00
jgv
93e453aa02 0032213: Modeling Algorithms - Invalid result of UnifySameDomain
Modify unification of faces: add splitting new wire into several ones.
2021-04-16 18:27:34 +03:00
kgv
57357010a8 0032301: Visualization, TKOpenGl - depth peeling is broken with OpenGl_Caps::buffersOpaqueAlpha option
OpenGl_LayerList::renderTransparent() - color mask is now set to write into Alpha channel of depth peeling FBOs.
OpenGl_View::blitBuffers() - avoid using undefined color for glClear(GL_COLOR_BUFFER_BIT) operation.
2021-04-16 18:19:49 +03:00
kgv
b907cca37e 0032304: Configuration - genproj should not override env.bat in OCC Products 2021-04-15 19:14:25 +03:00
kgv
d85cd274c4 0032302: Visualization, TKOpenGles - do not use window buffer by default
OpenGl_Caps::useSystemBuffer is now set to FALSE on both OpenGL and OpenGL ES.
OpenGl_Caps::buffersNoSwap and OpenGl_Caps::buffersOpaqueAlpha are now set to TRUE by default on WebGL.
2021-04-15 19:11:43 +03:00
kgv
87b68a0fd6 0032232: Draw Harness - make Tk dependency optional 2021-04-15 19:07:50 +03:00
nds
e76471b558 0032205: Visualization - implementing new selection scheme in context - replace extra
- implementation of additional selection scheme, mainly to deselect single selected object.
2021-04-15 19:05:56 +03:00
kgv
d37aef5ccf 0031678: Visualization - add option enabling hinting for textured fonts
Added new rendering parameter Graphic3d_RenderingParams::FontHinting
allowing to enable/disable hinting (default is no hinting preserving old behavior).

Command vrenderparams has been extended with arguments -fontHinting.
2021-04-15 19:03:52 +03:00
kgv
75e1b51170 0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 1
HLRBRep_PolyAlgo::StoreShell() - removed a couple of redundant variables (pointers to handles) and extra iterators.
Added a couple of missing NULL checks (HLRBRep_PolyAlgo::Normal() now skips CSLib::Normal() in case of no surface).
2021-04-13 20:17:03 +03:00
kgv
9e7cc3ad59 0032297: Coding Rules - merge GCPnts_UniformAbscissa.pxx into GCPnts_UniformAbscissa.cxx 2021-04-12 23:18:52 +03:00
kgv
194c71af96 0032296: Coding Rules - merge GCPnts_QuasiUniformDeflection.pxx into GCPnts_QuasiUniformDeflection.cxx 2021-04-12 23:18:52 +03:00
kgv
24579ecd6e 0032295: Coding Rules - merge GCPnts_AbscissaPoint.pxx into GCPnts_AbscissaPoint.cxx 2021-04-12 23:18:52 +03:00
kgv
de8a63e98e 0032294: Coding Rules - merge GCPnts_QuasiUniformAbscissa.pxx into GCPnts_QuasiUniformAbscissa.cxx 2021-04-12 23:16:44 +03:00
kgv
3d42fbc189 0032293: Coding Rules - merge GCPnts_UniformDeflection.pxx into GCPnts_UniformDeflection.cxx 2021-04-12 13:09:27 +03:00
kgv
a2af24d1a9 0032289: Visualization - add NCollection_Mat3 for 3x3 matrix similar to NCollection_Mat4
Introduced NCollection_Mat3 class similar to NCollection_Mat4.
Added NCollection_Mat4::operator() alias to NCollection_Mat4::Value().
Added NCollection_Mat4::Negated(), ::Subtracted(), ::Added(), ::Divided() operations.
Added a note to NCollection_Mat4::GetData() that matrix values are stored in column-major order.
Removed duplicated operator== operators from NCollection_Mat4/NCollection_Vec4/NCollection_Vec3/NCollection_Vec2 classes.

Removed obsolete and no more used matrix state fields from OpenGl_Workspace.
Removed obsoiete structure OpenGl_Matrix (replaced by OpenGl_Mat4).
OpenGl_ShaderProgram - duplicated methods have been replaced by templates.
2021-04-09 18:12:05 +03:00
kgv
c6aa2a8317 0032285: Coding Rules - get rid of generic methods in GCPnts_TangentialDeflection 2021-04-07 18:39:53 +03:00
kgv
95bdefb201 0032274: Tests - unstable snapshots from test case v3d/bugs/bug24785
Test case has been adjusted to reproduce scenario it was supposed to check.
2021-04-07 18:38:17 +03:00
ifv
c57bf5636c 0032106: Modeling Algorithms - Tolerance of General Fuse result depends on a sequence of arguments
BOPTools_AlgoTools2D::MakePCurveOnFace(...): extension of surface for projection with large tolerance is added.

test/bugs/modalg_7/bug32106 : new test case added
2021-04-07 18:37:19 +03:00
kgv
5c9493b348 0031087: Configuration - make FreeType dependency optional
Added option USE_FREETYPE to CMake configuration, enabled by default.
Added handling of HAVE_FREETYPE macros.

genproj now overrides env.bat/env.sh on template change.
2021-04-07 09:42:45 +03:00
gka
5e4f263d1c 0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
Location of edge is applied to geom curve before analysis of vertices projections
2021-04-02 20:02:03 +03:00
kgv
ae64fe0119 0032276: Coding Rules - replace IntTools_CArray1OfReal by NCollection_Array1
IntTools_CArray1OfReal has been replaced by TColStd_Array1OfReal.
IntTools_CArray1OfInteger has been removed (unused).
2021-04-02 20:01:35 +03:00
luz paz
5e6e59146f 0031939: Coding - correction of spelling errors in comments [part 9]
Fix various typos via codespell.
2021-04-02 20:01:34 +03:00
akaftasev
00e9052bee 0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent
Added ability to display progress indicator in plate commands
Added tests
2021-04-02 20:01:34 +03:00
kgv
51c21d1fe4 0032174: Data Exchange - read.step.root.transformation parameter has reversed definition
Parameter definition has been corrected to match other Boolean parameters to map 0=OFF and 1=ON.
2021-04-02 20:01:33 +03:00
kgv
d0b8f0108f 0025845: VIS - Surface normals to be associated with polygonal source
IVtk_IShapeData::InsertCoordinate() has been replaced by IVtk_IShapeData::InsertPoint()
defining vertex position with surface normal.
IVtkVTK_ShapeData now allocates normals array within vtkPolyData.
IVtkOCC_ShapeMesher now fills in vertex positions with surfcae normals.
IVtkTools_SubPolyDataFilter has been corrected to optionally copy normals.

ivtksetboundingdraw command has been merged into "ivtksetdispmode -faceBoundaryDraw".
2021-04-02 20:01:33 +03:00
osa
cb766858b7 0032269: Visualization - update trinfo command with -lods option 2021-03-31 20:44:33 +03:00
kgv
20085dac44 0032262: Samples - JNIViewer sample compilation failure due to usage of removed aliases to Image_Format 2021-03-31 20:44:33 +03:00
kgv
cdcb843ef4 0032251: Documentation, gendoc.tcl - reference manual excludes TKIVtk and other optional modules
gendoc.tcl -refman now temporarily sets HAVE_ environment variables for including optional modules.
2021-03-31 20:44:32 +03:00
kgv
08eda8e30d 0032250: Documentation - pseudographics within gp_Trsf description is not properly escaped
Added @code tags to documentation of several classes in the package gp.
2021-03-31 20:44:31 +03:00
osa
5443dd2ffa 0032248: Visualization - load "false" deferred glTF data immediately 2021-03-31 20:44:30 +03:00
kgv
3483c64453 0032247: VIS, IVtkOCC_ShapeMesher - allow disabling auto-triangulation behavior
IVtkOCC_Shape now stores Prs3d_Drawer object used by IVtkOCC_ShapeMesher and IVtkOCC_SelectableObject.
IVtkOCC_ShapeMesher::internalBuild() made more consistent to AIS_Shape::Compute() in cleaning/triangulating shape.

Added command ivtkdefaults similar to vdefaults managing triangulation default parameters.
2021-03-31 20:44:29 +03:00
kgv
bbc5899a8c 0032242: Configuration, CMake - USE_GLES2 option does not appear in interactive configurator
USE_D3D, USE_OPENGL and USE_GLES2 options declarations have been reordered.
2021-03-27 13:46:04 +03:00
ifv
bff660919f 0032225: Modeling Data - Wrong result of extrema curve-surface
Extrema_GenExtCS.cxx: subdivision on intervals for periodic c curves is added

Extrema_FuncExtCS.hxx: access to fields mySqDist, myPoint1, myPoint2 is added

bug32225: new test case is added
2021-03-27 13:46:04 +03:00
ifv
c69e0e408f 0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:

Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.

Extrema_FuncPSDist.cxx - small bug fixing.

BRepFill_TrimShellCorner.cxx - fixing regression

ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution

ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization

Some test cases are modified according to current state of Extrema algorithm
2021-03-27 13:46:03 +03:00
kgv
6c2cf030e2 0032234: Configuration, OSD_Process::UserName() - avoid using getpwuid() unimplemented by Emscripten SDK 2021-03-27 13:46:03 +03:00
kgv
285b5189cd 0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory leak
Test case has been adjusted to check memory trend after the loop.
2021-03-27 13:46:02 +03:00
osa
e816dce36e 0032086: Visualization - support deferred data loading
1) Extend Poly_Triangulation by mesh purpose, possibility to be cleared and late-load deferred data interfaces.
2) Update BRep_TFace to store list of triangulations istead of single one. And also active one. Update getter and setter of single triangulation and add new methods to interaction with whole triangulations list.
3) Update BRep_Tool to get single triangulation of face according to the input mesh purpose or whole triangulations list.
4) Update BRep_Builder to make face by not only single triangulation but whole triangulations list with specified active one.
5) Add new methods to BRepTools to interact with shape triangulations (Load/Unload/Activate/LoadAll/UnloadAllTriangulation(s))
6) Add new 'tlateload'command for shape to load/unload/activate triangulations.
7) Update 'trinfo' command by '-lods' options to print detailaed information about LODs of this shape
8) Support empty triangulations by selection. Use bounding box selection in this case.
9) Add new 'outdisplist' option to XDispaly command to print list of displayed objects to output variable but not to theDI
10) Add new '-noecho' option to vdisplay command to skip printing of displayed objects to theDI
11) Create new RWMesh_TriangulationSource as mesh data wrapper for delayed triangulation loading.
12) Create new RWMesh_TriangulationReader as base interface for reading primitive array from the buffer.
13) Cache nodes/triangles number defined in glTF file
14) Use RWMesh_TriangulationSource class as base of RWGltf_GltfLatePrimitiveArray one and RWMesh_TriangulationReader class as base of RWGltf_TriangulationReader one
15) Add possibilty to support of LODs by glTF reader. It is possible to skip data loading and load them later
16) Add new '-skiplateloading' (to skip triangulation loading), '-keeplate' (to keep information about deferred storage to load/unload triangulation later),
'-toprintdebuginfo' (to print additional debug information) options to ReadGltf command
17) Add new test of glTF late loading
2021-03-27 13:46:02 +03:00
kgv
6387996871 0032243: Tests - unexpected file artifact s.stl at the root of repository
Several test cases have been corrected to avoid creation
of temporary files s.stl, comp_nonmanifold.step, bug31301_1.stp at unexpected location.
2021-03-26 19:48:51 +03:00
kgv
0d828ac838 0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.
2021-03-25 19:14:33 +03:00
kgv
a076535090 0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection 2021-03-25 19:14:28 +03:00
kgv
1a96d253a5 0032222: Visualization, V3d_Viewer - use Graphic3d_TOSM_FRAGMENT by default instead of Graphic3d_TOSM_VERTEX 2021-03-25 19:14:27 +03:00
kgv
bbd9292784 0032230: Coding Rules - remove class headers Graphic3d_HighlightStyle.hxx deprecated since OCCT 7.2.0
Removed unused Graphic3d_HighlightStyle, Graphic3d_CTexture, Graphic3d_MapOfZLayerSettings,
Graphic3d_TypeOfComposition, Graphic3d_TypeOfComposition, V3d_Parameter, V3d_ViewPointer, SelectMgr_SequenceOfFilter.

Added missing deprecation statements to SelectBasics_SensitiveEntity, SelectMgr_EntityOwner and PrsMgr_Presentation3d.
2021-03-24 18:32:05 +03:00
kgv
ef188756a0 0032235: Foundation Classes, Message_MsgFile - force initialization of global mutex
Initialization of several global variables has been refactored to a function.
2021-03-22 11:34:52 +03:00
pdn
f7ad1e7e37 0025262: Foundation Classes - Poly package improvements
Improvements of functionality of Poly package:
* Add function to intersect a triangulation by an axis.
* Add function to intersect a triangle by an axis.
* Correct the bugs in the methods RemoveDegenerated, RemoveTriangle and ReplaceNodes of the class Poly_CoherentTriangulation.
2021-03-21 19:15:07 +03:00
jgv
0c2517292f 0032140: Modeling Algorithms - unify same domain calls crossed for opposite vectors
1. Correct unification of circular edges: avoid trying to make an axis with null magnitude.
2. New method UnionPCurves: unify existing pcurves of chain instead of projecting the curve of unified edge onto surfaces
2021-03-21 19:15:06 +03:00
kgv
b8ef513c8f 0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles
Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
2021-03-21 19:15:06 +03:00
emv
e22a91ccc9 0032199: Modeling Algorithms - BOP Cut produces invalid shape
Use section tolerance for checking the valid range.
2021-03-17 19:59:48 +03:00
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
655e883cb9 0032221: Visualization, TKD3DHost - fix memory leak within D3DHost_FrameBuffer::Release()
D3DHost_FrameBuffer - added missing color texture release within FBO destruction.
OpenGl_View::RedrawImmediate() - fixed unexpected window buffer swap while rendering into offscreen myFBO.
2021-03-17 19:55:44 +03:00
kgv
9b329b9aa4 0032202: Visualization - XCAFDoc_VisMaterial::FillMaterialAspect() should copy emissive color from PBR definition 2021-03-17 19:54:55 +03:00
kgv
43eddb470f 0032217: Visualization, TKOpenGl - drop propagation of unused FFP functions
OpenGl_GlFunctions no more loads unused FFP functions.
OpenGl_GlCoreXX function tables no more defined two hierarchies with and without FFP functions,
and OpenGl_Context::coreXXback fields have been removed.
Introduced OpenGl_Context::core11ffp as more straightforward naming for obsolete FFP function set.
2021-03-17 19:53:14 +03:00
kgv
b470ebea04 0032200: Visualization, TKOpenGl - unify Phong/PBR light space calculations
Graphic3d_ShaderManager - Phong shading now uses World space calculations.
OpenGl_ShaderManager::pushLightSourceState() - fixed unnormalized direction of headlight source.
2021-03-17 19:53:13 +03:00
kgv
61a05a3658 0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors
Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.
2021-03-17 19:53:13 +03:00
kgv
941f6cae55 0032201: Visualization, TKOpenGl - unify Phong/PBR material properties getters
Graphic3d_ShaderManager::stdComputeLighting() - implementation has been adjusted
for better consistency between PBR / non-PBR.

OpenGl_Material definition has been modified to join Front/Back pair into a single uniform variable.
Common material definition now occupies 4x2 vec4 instead of 5x2 vec4.

Getters of Common material properties within Declarations.glsl
have been renamed to match PBR material syntax (e.g. take IsFront flag as function argument).
Auxliary macros (like occTextureColor()) has been renamed (like occMaterialBaseColor())
and adjusted to return material property directly instead of taking it as argument.
2021-03-17 19:53:12 +03:00
kgv
a604968547 0032207: Draw Harness, ViewerTest - explicitly close 3D Viewer windows at Tcl interpreter closure 2021-03-17 19:52:22 +03:00
kgv
114db5a5ce 0032218: Visualization - move V3d_View::ShadingModel() property to Graphic3d_RenderingParams 2021-03-17 19:41:25 +03:00
kgv
3ae8c60b87 0032219: Visualization, TKService - drop dependency from OpenGL
Visual selection has been moved out from Xw_Window constructor to OpenGl_GraphicDriver::InitContext().
Default Visual is now stored within Aspect_DisplayConnection.
2021-03-17 19:40:40 +03:00
kgv
442850c032 0032220: Configuration, Aspect_VKeySet - eliminate name collision with X11 macros
Aspect_VKeySet::KeyState::Status field has been renamed to KStatus.
2021-03-17 09:54:47 +03:00
emv
58210e5983 0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape
Avoid increasing tolerance of the vertex before the check on valid range is passed.
2021-03-05 18:00:28 +03:00
kgv
19ed08fda6 0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild() used
PrsMgr_PresentationManager::Display(), PrsMgr_PresentationManager::Color(),
and SelectMgr_SelectionManager::Activate() now skip children in Erased state.
2021-03-05 17:49:17 +03:00
kgv
e70625d6b1 0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
2021-03-05 17:41:27 +03:00
mkrylova
395d00e058 0032144: Draw Harness - add -silent option to command Close
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests
2021-03-05 17:31:07 +03:00
kgv
d6e050ac44 0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d classes.

Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
copies by value are now disallowed;
several unexpected places copying the object have been fixed.

IntTools_Context - maps of void* have been replaced by typed maps.
2021-03-05 17:31:07 +03:00
mpv
6498be7036 0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable
In test it should be taken into account that
  lappend listmem [meminfo h]
  checktrend $listmem 0 0 "Memory leak"
also gets memory (also about 100 bytes per iteration).
2021-03-04 19:49:35 +03:00
kgv
952a0565d7 0032192: Visualization, TKOpenGl - load OpenGL 4.6 functions within OpenGl_Context
glext.h has been updated to include latest fixes and new definitions.
2021-03-04 19:44:57 +03:00
mkrylova
e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00
Chris Hennes (chennes)
329e5df986 0032181: Modeling Algorithms - ChFi3d missing error checking
Throughout the ChFi3d fillet creation functions there are two sets of unchecked
errors that can result in segmentation faults when geometry-creation problems
occur.

The first is that the functions ChFi3d_cherche_* may fail to find the requested
item: they silently return without setting the required reference, which is
then accessed by the algorithms. This can be caught with a conditional at the
end of the function that throws an exception if the required item was not
found.

The second class of unchecked error is the use of BRep_Tool::CurveOnSurface,
which may fail to create the required curve, returning a null handle. In many
cases in the existing fillet code this is not checked. This can be dealt with
by checking the returned handle using IsNull() and throwing an exception
if the call did not result in valid geometry.
2021-03-04 19:42:05 +03:00
kgv
7fd4958d45 0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.
2021-03-04 19:40:23 +03:00
kgv
42ddd0028c 0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.
2021-03-04 19:39:20 +03:00
kgv
33425a46b8 0032143: Visualization - add option excluding transparent object from sorting
Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
2021-03-04 19:38:16 +03:00
kgv
ba590cbf15 0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape
StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.
2021-02-27 15:36:19 +03:00
osa
bc0711a5c3 0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box
Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.
2021-02-26 17:31:02 +03:00
kgv
53219061ca 0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 2021-02-26 10:56:32 +03:00
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
1507ccda40 0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
Fixed wrong axis check.
2021-02-26 10:56:31 +03:00
kgv
478862fcc2 0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file
Removed redundant .lxx files from API package.

AIS_InteractiveContext_1.cxx,AIS_InteractiveContext_2.cxx,AIS_InteractiveContext_3.cxx
have been merged into AIS_InteractiveContext.cxx.
V3d_View_2.cxx,V3d_View_3.cxx,V3d_View_4.cxx have been merged into V3d_View.cxx
V3d_View_4.cxx has been merged into V3d_View.cxx.
2021-02-25 18:58:50 +03:00
kgv
39e6123e3b 0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_PresentableObject
AIS_DisplayStatus has been renamed to PrsMgr_DisplayStatus
and moved from AIS_GlobalStatus class field to PrsMgr_PresentableObject.

0032167: Visualization, AIS_InteractiveContext - setObjectStatus sets wrong status when AIS_DS_Erased

AIS_InteractiveContext::setObjectStatus() Fixed setting unexpected Displayed status to Erased objects.
2021-02-25 18:58:49 +03:00
kgv
79d49683d6 0032155: Tests - remove broken command OCC280
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.
2021-02-25 18:55:30 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
02a2beaad9 0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator
Added method Graphic3d_Buffer::DefaultAllocator(), which is now used across code.
2021-02-25 18:55:28 +03:00
kgv
4bf072e4eb 0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager 2021-02-25 18:55:27 +03:00
kgv
4464c6b591 0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback 2021-02-25 18:55:27 +03:00
kgv
9299697997 0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable
OpenGl_Workspace::Activate() now implicitly disables OpenGl_Caps::ffpEnable when it is unsupported.
OpenGl_AspectsSprite::build() now ignores OpenGl_Caps::pntSpritesDisable when Display Lists are unsupported.
2021-02-24 20:59:43 +03:00
kgv
93cdaa76da 0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2
OpenGl_Context now activates Ray-Tracing and arbTboRGB32 for GLES 3.2.
Removed initialization of some uniforms from GLSL code.
Fixed implicit casts within Ray-Tracing shaders.
2021-02-24 20:58:38 +03:00
kgv
127330f9d7 0032147: Documentation - drop mentioning of WOK from build_3rdparty 2021-02-20 19:00:34 +03:00
kgv
374dffea0b 0032139: Visualization - support single-precision floating point data within Poly_Triangulation
Introduced NCollection_AliasedArray collection defining a general byte array
to be aliased as array of elements of mutable type.

Poly_ArrayOfNodes specializes this interface for collecting 2d/3d points with single/double precision.
Poly_Triangulation relies on this new class for definition of 3D nodes and UV coordinates
using gp_Pnt and gp_Pnt2d by default as before.

RWGltf_CafReader now fills in triangulation using single precision by default (as stored in the file).
2021-02-20 18:58:56 +03:00
kgv
e44b849de9 0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx 2021-02-20 18:57:49 +03:00
asuraven
a13df0fee0 0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters
2021-02-20 10:43:32 +03:00
dpasukhi
930b466c9b 0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT
2021-02-20 10:43:17 +03:00
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
osa
92f8ec2f01 0032099: Visualization - define OSD_FileSystem class managing opening of file streams
1) Remove unnecessary includes of "Standard_OStream.hxx" file and add it only into files where it is really used.
2) Create the base interface for a file stream provider OSD_FileSystem and its inheritor OSD_CachedFileSystem that keeping last stream to be reused for opening a stream with the same URL.
3) Use OSD_CachedFileSystem object instead of RWGltf_GltfSharedIStream during Gltf reading.
2021-02-13 11:04:19 +03:00
kgv
9ee2481598 0032124: Visualization, AIS_Shape - setting color will cause Iso Lines to appear due to misprint in Prs3d_Drawer::SetOwnLineAspects()
Fixed misprint myUIsoAspect -> myVIsoAspect.
2021-02-11 20:06:15 +03:00
emv
8d55cb22a8 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP
Problem is fixed by #0031995. Integrating test case only.
2021-02-11 20:06:14 +03:00
mkrylova
2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00
kgv
9779ff75fd 0032095: Tests - drop comparison in unstable perf/ncollection group
Mark performance deviations compared to STL collections as warnings instead of errors.
2021-02-11 20:06:13 +03:00
dpasukhi
830616a60b 0032119: Coding Rules - eliminate msvc warning C4800 (implicit cast to bool) after fix for 32115
Fixed incorrect comparison and forcing cast
2021-02-10 20:45:26 +03:00
kgv
e03a03fdc2 0032122: Samples - handle WASD keys in WebGL sample 2021-02-10 20:44:31 +03:00
kgv
1ff3663c91 0032118: Visualization, Graphic3d_MarkerImage::StandardMarker() - return marker with pre-defined id 2021-02-10 20:42:57 +03:00
kgv
665dc9e50b 0032117: Visualization, TKOpenGl - assert in OpenGl_AspectsSprite due to implicit destruction of existing resource
RGBA and Alpha markers are now handled independently within OpenGl_AspectsSprite::build().
2021-02-10 20:42:57 +03:00
dpasukhi
00a72254dc 0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught
Fixed a checking for a non-existent step file
2021-02-06 14:09:56 +03:00
dpasukhi
0c38be8f8d 0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
- Upgraded files using new version of WinFlexBison
 - Removed global variables within StepFile_Read.cxx
 - Upgraded error message during bison analyzing ( added a expected expression information )
 - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
 for a compatibility with the StepData/StepData_StepReaderData
 - Added handling parse errors and transferring it to the StepData_StepReaderData
 - Now parsing and referencing errors save in the check and non output by default
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - Removed useless location.hxx
 - Removed TraceLevel for the StepFile_Reader ( now it useless,
  it is 0 by default and newer and nowhere change )
 - Translate error message into English within StepData_StepReaderData
 - Replace "Error" word in the output messages
2021-02-05 20:35:19 +03:00
kgv
1ac837b2c2 0032114: Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0
Added image formats Image_Format_RGF_half/Image_Format_RGBAF_half
with manual conversion between 32-bit float and 16-bit half-float values.

PBR LUT table is now converted into GL_HALF_FLOAT_OES data format in case of OpenGL ES 2.0.
2021-02-03 18:40:34 +03:00
kgv
75642c1489 0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod
textureCube() is now used as fallback when textureCubeLod() is unavailable.
2021-02-03 18:38:50 +03:00
kgv
7106e4c8b1 0032113: Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffersOpaqueAlpha() on OpenGL ES 2.0
Fixed enabling of alpha channel writes while baking PBR environment.
2021-02-03 18:34:25 +03:00
emv
a36a30b724 0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow
Fixed by 0029711. Integrating test case only.
2021-02-03 18:32:55 +03:00
luz paz
4551e1be75 0031939: Coding - correction of spelling errors in comments [part 8]
Fix various typos

Fixed via codespell v2.1.dev
2021-02-03 18:31:42 +03:00
kgv
8df3104cd2 0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0
OpenGl_ShaderManager::defaultGlslVersion() - fixed combining two extensions in header.
2021-02-03 18:28:17 +03:00
kgv
e1d17cebe2 0032101: Visualization, TKOpenGl - use GL_UNPACK_ROW_LENGTH within OpenGL ES 3.0 / WebGL 2.0
Added OpenGl_Context::hasUnpackRowLength property for using GL_UNPACK_ROW_LENGTH in runtime.
OpenGl_Texture now uses GL_UNPACK_ROW_LENGTH on OpenGL ES 3.0 when necessary.
OpenGl_Texture::InitCubeMap() now allows uploading vertically-stacked cubemaps
without GL_UNPACK_ROW_LENGTH requirement.
2021-02-03 18:26:28 +03:00
kgv
82b856b880 0032079: Coding Rules - rename AIS_KindOfInteractive enumeration values with fully-qualified name
In addition, several ViewerTest command have been cleared out from duplicated checks.
2021-01-30 20:22:29 +03:00
kgv
4ad4054c90 0032094: Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently does nothing without active GLSL program
OpenGl_VertexBuffer::bindAttribute() now prints an error message indicating a possible VBO misuse.
2021-01-29 19:54:31 +03:00
kgv
a0073def2d 0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0
"MAX_WEBGL_VERSION=2" Emscripten option is now used for building sample instead of deprecated "USE_WEBGL2=1".
2021-01-29 19:51:18 +03:00
kgv
8f8fe4a97c 0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)
Added "#define occLight_Index(theId) 0" workaround allowing to compile
a single light source PBR shading program on OpenGL ES 2.0,
as it disallows non-constant index expressions (even trivially deducable at compile-time).

PBR lookup table is now automatically resized to RGBA format
when RG texture format is unsupported (OpenGL ES 2.0).

OpenGl_ShaderManager now allows compiling PBR shaders
using WebGL 1.0 + GL_EXT_shader_texture_lod extension.

PBR IBL baking GLSL program has been redisigned to use
if/else to avoid non-constant index expressions.
Diffuse baking implements packing float values into a temporary RGBA8 texture
as a fallback solution on WebGL 1.0 implementations supporting float textures
but not as FBO render targets.

OpenGl_PBREnvironment now uses GL_FRAMEBUFFER instead of GL_DRAW_FRAMEBUFFER
for compatibility with OpenGL ES 2.0.
2021-01-29 19:51:18 +03:00
kgv
776302d46b 0032093: Visualization, TKOpenGl - loading texture in BGR format fails in OpenGL ES
Graphic3d_TextureRoot::convertToCompatible() - fixed handling of
Image_Format_BGR and Image_Format_BGRA formats.

OpenGl_Texture - added error message for unsupported pixel format;
error messages have been extended by resource id.
OpenGl_Texture::InitCubeMap() now does not release cubemap
on mipmaps generation failure.

Image_PixMap::ImageFormatToString() - added method returning name of pixel format.
2021-01-29 19:51:17 +03:00
emv
961c002c46 0031912: Modeling Algorithms - Boolean Cut can't build resulting shape
Problem is fixed by #0032058. Integrating test case only.
2021-01-29 19:44:58 +03:00
osa
538ab5dd8a 0032078: Visualization, Poly_Triangulation - add cached bounding box.
1) Add empty constructor for Poly_Triangulation(),
2) Add Poly_Triangulation::HasGeometry() method to check that triangulation has any geometry.
3) Add possibility to cache bounding box in Poly_Triangulation and use it later in case of empty triangulation.
4) Add Poly_Triangulation::MinMax() to extends input box with bounding box of triangulation.
5) Add Poly_Triangulation::UpdateCachedMinMax() to cache min - max range of this triangulation with bounding box of nodal data.
6) Add virtual Poly_Triangulation::computeBoundingBox() to calculate bounding box of nodal data.
7) Update BRepBndLib::Add/AddOptimal/AddOBB algorithms to check empty triangulation and use cached box in this case.
8) Update BRepGProp::roughBary/surfaceProperties/volumeProperties to skip empty triangulation.
9) Remove additional myBox from RWGltf_GltfLatePrimitiveArray and some hack to save this box as nodes of base Poly_Triangulation.
10) Cache min-max range from JT file during its parsing
2021-01-27 21:21:32 +03:00
kgv
a46ab511c5 0032082: Visualization, TKOpenGl - improve formatting of error messages
Error messages in TKOpenGl package have been improved to format
GLenum values as string constants or hex values.
OpenGl_VertexBuffer::init() now logs a message with error details
instead of just returning Boolean flag.
2021-01-24 23:48:10 +03:00
jgv
8948e18df8 0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails
Multiple changes in BRepOffset_MakeOffset algorithm:
- correct fusing vertices;
- correct building intersection edges;
- correct intersecting new edges in 2D;
- correct building wire on a new face;
- correct building history.
2021-01-22 19:09:02 +03:00
mkrylova
5634c81a9b 0031547: Visualization - V3d_View creates V3d_Trihedron instance
- moved creating of V3d_View::myTrihedron from constructor to first attempt of displaying or calling it;
- moved creating of V3d_Viewer::myRGrid and V3d_Viewer::myCGrid to to first attempt of displaying or calling them;
- renamed V3d_Viewer::IsActive() to V3d_Viewer::IsGridActive();
- redefined V3d_View::Trihedron() and V3d_Viewer::Grid() by adding new argument toCreate
for opportunity to check the existence of the objects without their recreating.
2021-01-22 19:04:25 +03:00
kgv
5de4b704fe 0032065: Samples - use MODULARIZE within WebGL sample
Fixed multitouch input.

Module is now exported with global functions hidden via MODULARIZE
as global object OccViewerModule created by createOccViewerModule().
Global Module setup has been moved to occt-webgl-viewer.js.

Use EMSCRIPTEN_KEEPALIVE attribute istead of listing C functions via EXTRA_EXPORTED_RUNTIME_METHODS.
WasmOcctView now exports static methods as Module functions using EMSCRIPTEN_BINDINGS.

Standard_ASSERT_DBGBREAK_() is now defined using emscripten_debugger().
2021-01-22 19:03:14 +03:00
dpasukhi
96049f2e3d 0032049: Data Exchange - STEP file import problems
- Added checking for null objects
- Added support to find layers according to visible attr
- Fixed problem with same names of layers:
 Now, layers are grouped by names and visibility parameter
2021-01-22 13:16:22 +03:00
ifv
b007889efd 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle
Extrema_GenExtCS.cxx : added solution refinement, if solution seems to be "bad" according to special criteria.
Extrema_FuncExtCS.cxx : "cosmetic" modifications
BOPAlgo_PaveFiller_3.cxx : adding control of shape index to prevent exception in ShapeInfo
bugs/moddata_3/bug32058 : new test
2021-01-21 20:36:28 +03:00
kgv
fe2a8faab6 0032067: Visualization, TKOpenGl - shadowmap GLSL compilation error on WebGL 3.0
Shadowmap sampler is now passed as a dedicated argument
to occDirectionalLightShadow() to workaround strict GLSL syntax validator.
Fixed texture coordinates clamping range.

Shadow antialiasing is disabled on OpenGL ES 2.0.
2021-01-20 21:30:27 +03:00
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
kgv
5be130de06 0032064: Coding Rules - make RWGltf_GltfJsonParser non-private 2021-01-20 21:26:36 +03:00
akaftasev
5bae0bebe4 0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
Added flag for force clean triangulation and treatment for it
Command "trinfo" now show number of polygons on triangulation
2021-01-20 21:25:44 +03:00
kgv
4925946065 0032061: Data Exchange, RWGltf_CafWriter - exporting XBF file produces an invalid glTF document
Empty Nodes are now skipped while filling in Scene node map.
2021-01-20 21:24:17 +03:00
kgv
78c4e836b1 0031571: Visualization, TKOpenGl - provide depth peeling OIT option
Graphic3d_RenderTransparentMethod has been extended by Graphic3d_RTM_DEPTH_PEELING_OIT,
which is handled by OpenGl_LayerList::renderTransparent().

OpenGl_FrameBuffer::Init() now does not silently ignore unknown color attachment format and return failure.
OpenGl_FrameBuffer::InitWrapper() - added constructor wrapping existing color textures.

v3d/transparency/oit: test case added
2021-01-20 21:21:59 +03:00
asuraven
9f45d35b6b 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
theWithNormals parameter added to BRepTools::Write()
IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet
-normals/-noNormals option added to StoreTriangulation DRAW command
-normals/-noNormals option added to writebrep DRAW command
Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added
Test for StoreTriangulation options -normals/-noNormals added
2021-01-20 21:20:43 +03:00
aavtamon
6fab0b3428 0031172: Unexpected result of BRepTools::OuterWire()
In BRepTools::OuterWire() compare of parameters was rewritten using Precision.
The test case bug31172 has been created
2021-01-15 18:52:11 +03:00
kgv
f4e7c30785 0032056: Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0
Removed functionality deprecated since OCCT 7.1.0:
- 0027834 built-in iterator in class SelectMgr_ViewerSelector;
- 0027900 obsolete constructor of V3d_Viewer class;
- 0027816 obsolete clipping plane setters V3d_View/PrsMgr_PresentableObject:SetClipPlanes();
- 0027860 obsolete transformation persistence methods from class PrsMgr_PresentableObject;
- 0027756 obsolete methods Prs3d_Text::Draw();
- 0024393 obsolete enum Graphic3d_ZLayerSetting;
- 0025180 obsolete method Graphic3d_Structure::Transform().

Removed functionality deprecated since OCCT 7.2.0:
- 0028832 obsolete class MMgt_TShared;
- 0026937 obsolete property Standard_Failure::Caught();
- 0028799 obsolete types defined within Quantity package;
- 0028441 obsolete nested enum Image_PixMap::ImgFormat;
- 0025695 obsolete method PrsMgr_PresentationManager::Unhighlight();
- 0028205 obsolete class MeshVS_ColorHasher;
- 0027958 obsolete methods from Prs3d_DatumAspect class;
- 0025695 obsolete class Graphic3d_HighlightStyle;
- 0027954 obsolete BRepOffsetAPI_MakeOffsetShape,BRepOffsetAPI_MakeThickSolid constructors.
2021-01-14 19:38:24 +03:00
kgv
92cc34d702 0032057: Coding Rules - eliminate CLang warning -Wunused-parameter when targeting iOS
Cocoa_Window::Cocoa_Window()/OpenGl_Context::SetSwapInterval() have been corrected to suppress warning.
2021-01-14 19:37:19 +03:00
kgv
ff6122e008 0032055: Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Draw::ParseOnOffIterator() - added auxiliary wrapper over Draw::ParseOnOff() for more compact syntax.
strncasecmp() definition for msvc compilers has been moved to Standard_CString for consistency with strcasecmp().
vmanipulator command has been refactored to use more straightforward parser.

vmanipulator now accepts "-adjustPosition {0|center|location|shapeLocation}" options
adjusting position to object's AABB center (existed before), object's local transformation or TopoDS_Shape location.
2021-01-14 19:21:54 +03:00
akaftasev
607f045954 0025055: Modeling Algorithms - Incorrect shape copying in BRepBuilderAPI_Copy
Correct test case: exclude "fixshape" calls
2021-01-13 17:18:49 +03:00
kgv
be8c9f2bde 0032050: Configuration - define fallback Android API version within auxiliary batch files
Script now defines a minimal Android API version when %anNdkApiLevel% is set to empty value
as 16 for 32-bit targets and 21 for 64-bit targets.
Added clearing of destination folders.
Added better handling of errors.
2021-01-13 17:10:27 +03:00
kgv
85381cfaf2 0032048: Configuration - Extend batch files to build OCCT with Emscripten
Added option USE_RAPIDJSON.
Added option toPack creating a .7z archive.
Added option toBuildSample building WebGL sample.
Improved aborting on error.
2021-01-13 17:10:27 +03:00
kgv
c0efce7c3b 0032045: Visualization, TKOpenGl - move light source functions from OpenGl_ShaderManager.cxx to Shaders 2021-01-13 17:10:27 +03:00
kgv
d84e866973 0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).

OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.

vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.
2021-01-13 17:10:26 +03:00
kgv
37f80e163c 0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source position
OpenGl_ShaderManager::pushLightSourceState() now pre-multiplies headlight transformation.
Built-in shading GLSL programs have been updated to remove special handling if headlight flag;
also removed redundant pre-normalization of light source direction
(already normalized implicitly by Graphic3d_CLight interface).

Graphic3d_CLight::SetHeadlight() now raises exception in case of ambient light type.
OpenGl_ShaderManager::SetLastView() - removed unused property.
2021-01-12 16:41:38 +03:00
kgv
0f26ed5476 0032044: Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array
NCollection_Array2::Resize() has been fixed to set myDeletable before calling Allocate().
2021-01-12 16:07:23 +03:00
kgv
4b52faa56f 0032036: Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
Enable GL_DEPTH_CLAMP while rendering skybox to workaround unexpected clamping issue on some GPUs.
2021-01-12 13:51:20 +03:00
dpasukhi
ab80de54da 0032028: Coding Rules, StepFile - eliminate CLang warning -Wmisleading-indentation
Regenerated the StepFile/lex.step.cxx using the latest version of WinFlexBison
- Fixed [-Wmisleading-indentation] warning
- Removed empty lines
2021-01-12 13:48:44 +03:00
luz paz
54adc5e979 0031939: Coding - correction of spelling errors in comments [part 6]
Fix various typos

Fixed via `codespell v2.1.dev
2021-01-12 13:32:43 +03:00
kgv
83746de803 0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
2021-01-12 13:30:35 +03:00
kgv
cfb54c0c0a 0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx 2021-01-12 13:29:22 +03:00
kgv
4b7fee8f47 0032038: Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers() 2021-01-12 13:29:21 +03:00
kgv
f3a53980a8 0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax() 2021-01-12 13:29:21 +03:00
kgv
d723356fca 0032027: Visualization, Prs3d_Drawer - unable to unset HasOwnFaceBoundaryDraw() property
Added missing Unset methods to Prs3d_Drawer properties.
2020-12-29 15:22:50 +03:00
vro
894133a5ad 0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
The visual links between functions are recovered.
The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).
2020-12-25 17:08:25 +03:00
kgv
41046145c4 0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
Added a workaround for msvc10 misbehavior.
2020-12-25 12:34:20 +03:00
kgv
b2a63f9b6f 0032013: Samples - iOS sample compilation errors
Added missing includes.
Fixed usage of obsolete Standard_Failure interface.
Fixed file headers.
2020-12-23 19:45:33 +03:00
kgv
8d8971e7b8 0032011: Configuration - add batch files to build OCCT for macOS and iOS targets
Added script adm/scripts/macos_build.sh and template macos_custom.bat.template
intended for automating building routines targeting macOS platform.

Added script adm/scripts/ios_build.sh and template ios_custom.bat.template
intended for automating building routines targeting iOS platform.
2020-12-23 19:45:32 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00
kgv
73dc2d3ae5 0032015: Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible
Added Select3D_SensitiveTriangulation::LastDetectedTriangle() property.
2020-12-23 19:42:48 +03:00
luz paz
b81b237fa4 0031939: Coding - correction of spelling errors in comments [part 5]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-23 19:30:48 +03:00
asuraven
3b1129a546 0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.
2020-12-23 19:30:48 +03:00
dpasukhi
2057c37b67 0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
- Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
- Added counter of entity arguments for appropriate error messages
- Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment
2020-12-23 19:30:47 +03:00
luz paz
3273937d01 0032004: Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name
Found using `codespell 2.1.dev0`
2020-12-21 20:30:07 +03:00
mkrylova
d45edf248c 0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
- Added comment to the method
- Added Boolean argument indicating the need for a strict
- Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
- Updated existing places of IsRealValue() usage in ViewerTest to use new flag
2020-12-21 20:30:06 +03:00
vro
5fd0b80027 0029822: Make TDocStd_Document extensible
Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.

Modified files:
- CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
- TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
- BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
- TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.

Documentation:
- upgrade.md is modified.
2020-12-20 11:41:33 +03:00
nds
04114fd201 0031945: Foundation Classes - unique names of alerts of message report in DumpJson
- add OCCT_DUMP_FIELD_VALUE_NUMERICAL_INC and OCCT_DUMP_FIELD_VALUES_DUMPED_INC - to increment key Value;
- add OCCT_DUMP_STREAM_VALUE_DUMPED - to give stream as a parameter of the DumpJson;
- correct Message_Report, Message_CompositeAlerts to increment keys;
- correct Message_AttributeMeter to have in result start and stop values united in value block: [start stop]. It's better for parsing;
- correct result of Message::MetricToString output for updated in 29451 Message_MetricType enum;
- correct Standard_Dump::AddValuesSeparator to avoid adding ',' in additional case;
- correct Standard_Dump::FormatJson to add opening/closing brace for the whole result (for valid parsing);
- correct Standard_Dump::FormatJson to ignore '\n' in value.
2020-12-18 19:48:03 +03:00
nds
983aaaeb03 0032001: Visualization - moving dump of selection owner from sensitive to selection manager 2020-12-18 19:48:03 +03:00
asuraven
e529b67d19 0031998: Tests - unexpected file artifact at the root of repository
Saving path for .obj file changed
2020-12-18 19:48:03 +03:00
nds
39b707a6d2 0031350: Foundation Classes - Dump improvement for OCAF classes
- do not dump document in CDM_MetaData, just pointer text;
- move ID dump in to TDF_Attribute;
- extend TDF_Attribute with other important states(obtained by methods);
- extend TDocStd_Document  with other important states;
- avoid dumping of shapes in TNaming_UsedShapes (it takes much time);
- extend XCAFDoc, XCAFDimTolObjects dump to json;
- correct XCAFDoc_ColorTool, XCAFDoc_MaterialTool, XCAFDoc_LayerTool to dump only connected to the object information;
- correct XCAFDoc_Material to dump name and density value only if it exists;
- add check on correct direction in gp_Ax3.
2020-12-18 19:48:02 +03:00
nds
9283bba22f 0032000: Foundation Classes - collect OSD_Timer time in message report
Added Message_MetricType_WallClock metric type handled by Message_AttributeMeter.
Added public OSD_Timer::GetWallClockTime() method.
2020-12-18 19:48:02 +03:00
mpv
53f46612d9 0031983: Samples - CSharp cannot be compiled "atomic<> is not supported by C++/CLI"
Removed includes-dependency of the CSharp sample from TDF_Label.hxx
2020-12-17 21:17:45 +03:00
ifv
2fda738623 0031995: Modeling Data - Bounding box wrong for face
BndLib/BndLib_AddSurface.cxx : algorithm of building bounding box for BSpline surfaces is improved

Test cases are modified according to current state of algorithm
Test case bug31995 added
2020-12-17 21:17:44 +03:00
nds
38b336df80 0031944: Foundation Classes, Message_Report - add missing mutex locks for message level 2020-12-17 21:17:44 +03:00
luz paz
0177fe2617 0031939: Coding - correction of spelling errors in comments [part 4]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-17 21:17:43 +03:00
kgv
7fb9d6d573 0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
Standard_Failure now holds an optional stack trace dump.
Added function Standard::StackTrace() dumping backtrace to the string.
SegvHandler within OSD_signal now appends backtrace to the message
if OSD::SignalStackTraceLength() is set to non-zero value
or environment variable "CSF_DEBUG_MODE" is set for debugging.

Added auxiliary macros Standard_NOINLINE disallowing function inlining.

Command "dsetsignal" has been extended by -strackTraceLength argument
for defining stack trace length within signals redirected to C++ exceptions.
Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).
2020-12-17 21:17:43 +03:00
asuraven
14eea8293d 0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.

Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
and providing arguments to setup writing of triangulation data and of format version.
"binrestore" is made an alias to new command "readbrep".
"binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
2020-12-17 21:17:42 +03:00
kgv
1e1158c78b 0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.
2020-12-17 21:05:06 +03:00
kgv
fccc168a6f 0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
Added handling of __aarch64__ macros.
2020-12-17 21:05:06 +03:00
kgv
6169ae2d3d 0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
Fixed occLight_IsHeadlight() misuse in sample GLSL program.
2020-12-17 21:05:05 +03:00
mkrylova
6eb502b27b 0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
into GLB file enabled by default.
Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.

Image_Texture::MimeType() - added method returning MIME type based on image file format.
Image_Texture::WriteImage() - added method writing image into stream.
2020-12-17 21:05:05 +03:00
ifv
a2cb8561eb 0029441: Modeling Algorithms - Incorrect intersection curves between faces
ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.

Test cases added
2020-12-17 21:05:04 +03:00
mkrylova
59500bb229 0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
RGBA8 pixel format is now preferred over BGRA8.
Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().

Added function Image_PixMap::FlipY() flipping image rows.
2020-12-17 21:05:04 +03:00
vro
a8d3a0b102 0029901: Support save to and restore from Stream interface in TObj package
Storage and retrieval of a document by means of a stream is distributed to TObj model.
Modified files:
-TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
-TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
-TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.

A new test:
- bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.

Modified test:
- bugs caf bug28425 - just improved to proper manipulate a test-file on disk.
2020-12-17 21:05:03 +03:00
vro
c6685c65fd 0027426: FSD_BinaryFile: Assignment to a temporary handle variable
A reference is added to the returning object of the method Storage_InternalData::ReadArray().
Modified files:
- Storage_InternalData.hxx

OCCT: CR27426
Products: nothing
2020-12-17 21:05:02 +03:00
kgv
31174e1a58 0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
into alpha component of color buffer and keep it opaque.
Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.

New option is set within WebGL sample.
2020-12-17 21:05:02 +03:00
dpasukhi
465ffe2840 0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21
Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner
2020-12-14 18:39:00 +03:00
luz paz
a25d5aaa30 0031939: Coding - correction of spelling errors in comments [part 3]
Fix various typos

Fixed via `codespell v2.1.dev0`
2020-12-11 19:19:10 +03:00
vro
65cec1a6ef 0031985: Documentation - description of TDocStd_FormatVersion is excessive
Description of TDocStd_FormatVersion enum is simplified and formatting for good rendering in HTML
2020-12-11 19:13:17 +03:00
kgv
c22b52d60e 0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.

Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.

Removed obsolete adaptor classes with H suffix.
2020-12-11 19:12:48 +03:00
age
266877a7c3 0031987: Visualization - Slow rectangular selection on models with big number of sensitives
SelectMgr_SensitiveEntitySet now stores a map of registered owners with a counter of registered entities.
SelectMgr_ViewerSelector::traverseObject() now reads the number of sensitive entities for specific owner
from SelectMgr_SensitiveEntitySet instead of re-computing it every time.
2020-12-10 19:03:12 +03:00
kgv
c74e3dc300 0031986: Visualization - Regression in StdPrs_WFDeflectionRestrictedFace::Add()
Fixed misplaced closing bracket after #0030146 fix.
2020-12-08 19:50:46 +03:00
abv
954caad094 0031977: Modeling Algorithms - useless static variable in BRepFill_OffsetWire::Init() preventing its parallel usage
Removed useless "static" before local variable and some commented code
2020-12-08 19:49:20 +03:00
dpasukhi
c026141bb6 0031923: DXF import - add support of code page DOS850
- Add support for converting from CP850 to UTF-8 and UTF-8 to CP850;
- Add support for reading STEP file encoding by cp850 code page.
2020-12-08 19:45:50 +03:00
aavtamon
1e08a76f1e 0031402: Modeling Data - Geom_BSplineSurface::Segment() produces wrong result
In the method Segment() index1 needs to be checked as well as index2 in Geom_BSplineSurface and Geom2d_BSplineCurve
(Geom_BSplineCurve already has this check).
New test cases bug31402_1, bug31402_2 has been added.

The unnecessary code block in Geom2d_BSplineCurve has been deleted,
and checking index2 block has beed extended.
2020-12-04 19:00:48 +03:00
emv
1aa38057ef 0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer 2020-12-04 19:00:12 +03:00
nds
75cf82505b 0030737: Visualization - implementing new selection schemes in context
AIS_SelectionScheme enumeration is defined to set which selection behaviour is used in Select of context
AIS_InteractiveContext is corrected to use single Select method instead of combination of Select/ShiftSelect methods with a selection scheme parameter.
Upgrade: Select() -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_Replace), ShiftSelect -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_XOR)
2020-12-04 18:50:20 +03:00
skl
b735354545 0030075: [REGRESSION] Shape Healing - Regression after implementation of fix for bug 28694.
Detect situation when U or V parameter has a big jump between two neighbour 2D points (diffX > 0.95*(Umax-Umin) or diffY > 0.95*(Vmax-Vmin)).
Additionaly surface must BSpline and distance between corresponding 3D points must be less than given precision.
For set of 2D points contains such jump method InsertAdditionalPointOrAdjust() is performed.
2020-12-04 18:50:19 +03:00
kgv
6078550944 0031972: Application Framework, FSD_CmpFile - exception on reading file in old persistence format with Windows EOL
FSD_CmpFile::ReadLine()/FSD_CmpFile::ReadString() now use TCollection_AsciiString::Trunc()
instead of ill-formed character assignment to '\0'.
2020-12-03 18:51:47 +03:00
vro
716cf4d96b 0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
1. Unification of usage of a storage version of an OCAF document by XML and binary file formats.
2. A new format version enumeration in TDocStd package: TDocStd_FormatVersion.
3. Removal of unnecessary methods for storage version like XmlLDrivers::StorageVersion() and BinLDrivers::StorageVersion().
4. Support of old documents (storage version <= 9) in binary file format (came from ESA).

New files:
- TDocStd_FormatVersion.hxx: a new storage format version enumeration for an OCAF document.

Modified files:
- CDM_Document.hxx and cxx: removal of storage format version property (moved to TDocStd_Document).
- TDocStd_Document.hxx and cxx: a storage format version property (moved from CDM_Document).
- BinLDrivers_DocumentSection.hxx and cxx: support of old document storage version in binary file format.
- BinDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentStorageDriver.cxx: usage of document storage version from TDocStd_Document in storage and retrieval drivers.
- DDocStd_ApplicationCommands.cxx: draw-command name StorageVersion is replaced by StorageFormatVersion (to be the same everywhere). A corresponding script is corrected too.

New test:
- bugs caf bug29217: a test case for old document storage version in binary file format. It checks several attributes saved by the version TDocStd_FormatVersion_VERSION_7 (old) and the latest version.

Modified test:
- caf presentation M1: the test used a file in the current folder, not in {imagedir} like all other tests.
- bugs caf bug28691

Documentation:
- dox/upgrade/upgrade.md

// All remarks are fixed.
2020-12-03 18:51:08 +03:00
kgv
4268c64672 0031965: Visualization - AIS_InteractiveContext::HilightWithColor() ignores passed highlight style
AIS_InteractiveContext::highlightGlobal() now passed through Style argument to highlightOwners().
Added OCC31965 command for testing AIS_InteractiveContext::Hilight() behavior.
2020-12-03 18:46:25 +03:00
luz paz
a110c4a377 0031939: Coding - correction of spelling errors in comments [part 2]
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-30 14:04:03 +03:00
skl
d66f7c0fa2 0029564: STEP Import and Export failure
In the result of translation one face lying on the spherical surface converted to the two separate faces due to method IsSurfaceUVPeriodic returned false for spherical surface.
Now method IsSurfaceUVPeriodic returns true for spherical surface in order to natural bounds can be added for spherical surface too.
Method ShapeFix_Face::FixOrientation was corrected to avoid reversing inner wire for case when spherical face has only one inner bound without outer bound.
Check that wire has bounding box equal to bounding box of surface was added in the method ShapeFix_Face::FixAddNaturalBound in order to avoid addition of the natural bounds ( test bugs xde bug22535_2 1 for face 2 lying on the torus)

In order to avoid regressions fix for translation "VERTEX_LOOP" entities was added. Natural bounds for "VERTEX_LOOP" lying on the Spherical and BSpline surface is added only if face does not have any other bounds.
In other case natural bounds were added during ShapeFix operation after translation in order take into account mutual position of the all bounds in the UV space of the face.
2020-11-28 12:36:49 +03:00
kgv
59069d3fd8 0031958: Tests - testdiff shows empty Total Image difference
stat(img1) counter is now incremented in case of total log.

Renamed "Total Image difference" -> "Total IMAGE difference" for consistency with other output.

Regexp inserting links to images now looks for "IMAGE ..." at the start of line
to avoid misdetection on "Total IMAGE difference" line.
_diff_show_positive_ratio() now prints image difference percents
without leading empty space to highlight large deviations in RED.

Image files having no match are now added to statistics as differences.
2020-11-28 12:36:07 +03:00
kgv
90e0d12d8f 0031940: Foundation Classes - TCollection_ExtendedString::Print() corrupts UNICODE strings and does not compile with C++20
TCollection_ExtendedString::Print() now converts string into UTF-8
instead of printing character indexes.
2020-11-28 12:36:06 +03:00
mpv
b84b672185 0031921: Application Framework - reading OCAF data from several threads is not possible
Make myLastFoundChild field of TDF_LabelNode that can be changed during accessing to different sub-labels in different threads as atomic (only for newer versions of compilers which support this "atomic").

Added definition of Standard_ATOMIC macro to the Standard_Macro.hxx
2020-11-28 12:36:06 +03:00
emv
9d9edcf49d 0031913: Modeling Algorithms - Invalid result of cut operation
Fixed by 0029711. Integrating test case only.
2020-11-28 12:36:05 +03:00
ifv
9a640cbe72 0030703: Modeling Algorithms - Intersector returns overlapping curves
IntPatch/IntPatch_ImpPrmIntersection.cxx - calculation of step depending on resolution of surface

IntWalk_IWalking_6.gxx - calculation of point-line coincidence is improved

Correction of tests according to current results

lowalgos/intss/bug30703 - new test case added
2020-11-28 12:36:05 +03:00
akaftasev
9ab58ebf65 0029392: Modeling data - Exception when getting UIso of offset surface of surface of linear extrusion
Added treatment for Geom_OffsetSurface::UIso() if basisSurface is Geom_SurfaceOfLinearExtrusion
2020-11-25 18:48:38 +03:00
dpasukhi
65eed8ff8e 0026047: Data Exchange - Lost colors for IGES export
- Fix problem with write shape with locations ( IGESCAFControl_Writer.cxx )
- Add support for adding sub-shapes (labels) together with sub-shapes without location ( XCAFDoc_ShapeTool.cxx )
2020-11-23 11:43:57 +03:00
aavtamon
0f5a1a9485 0028572: Modeling Algorithms - Wrong result of the mkface command
- Added note to BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S,
										const TopoDS_Wire& W,
										const Standard_Boolean Inside = Standard_True)
in BRepBuilderAPI_MakeFace.hxx;
- Modified subsubsection occt_modalg_3_5_2 in dox/user_guides/modeling_algos/modeling_algos.md
2020-11-21 12:26:06 +03:00
mzernova
4552cb8552 0027130: Visualization, Ray tracing - skip structures with transformation persistence flag
Objects with transform persistence are detected as non ray-tracable and redered using the rasterization approach.
The renderFiltered() method moved to the OpenGl_Group class.

v3d/raytrace/bug27130: test case added
2020-11-21 12:19:50 +03:00
luz paz
21c7c45701 0031939: Coding - correction of spelling errors in comments
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-21 12:19:49 +03:00
kgv
81ff49158a 0029642: Foundation Classes - deprecate TCollection classes except strings
Removed remnants of generic templates in TCollection package.
2020-11-21 12:19:49 +03:00
kgv
d99673cf22 0031943: Foundation Classes, TColStd_PackedMapOfInteger - get rid of TCollection_BasicMap
TCollection_BasicMap has been merged into TColStd_PackedMapOfInteger.
TColStd_PackedMapOfInteger has been cleaned up from redundant type casts.
2020-11-21 12:19:48 +03:00
akaftasev
6e01c25ad1 0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient.
Nullified shapes are equal and same now.
Added test.
2020-11-21 12:19:48 +03:00
kgv
026aec1860 0031922: Configuration - unresolved external symbol NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate()
A normal method Graphic3d_Camera::Interpolate() is now exported instead of
template method NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate().
2020-11-21 12:19:47 +03:00
skl
ad2ef2599a 0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation
Add all missing values.
2020-11-21 12:19:46 +03:00
akaftasev
c5b42a1afe 0030342: Modeling Data - Successively trimming surface in both directions lose the first trim
Added trim for U and V directions when trimming happens sequentially in these directions.
Added possibility to set sense to trim command.
2020-11-21 12:19:46 +03:00
kgv
e89202ea02 0031815: Visualization, TKOpenGl - avoid XResizeWindow() within OpenGl_Window::Resize()
OpenGl_Window::Resize() no more calls XResizeWindow() and relies only on dimensions returned by Aspect_Window.
Xw_Window::Size() now ignores Window in case of virtual window in similar way as WNT_Window does.
2020-11-21 12:19:45 +03:00
kgv
0aeb898418 0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
Prs3d_DatumAspect::TextAspect() now takes Prs3d_DatumParts argument
and defined separately for Prs3d_DatumParts_XAxis/Prs3d_DatumParts_YAxis/Prs3d_DatumParts_ZAxis.
The method without arguments has been marked as deprecated.

V3d_Trihedron now stores per-label text attributes.
Added method V3d_View::Trihedron() returning V3d_Trihedron object for more straightforward definition.
V3d_Trihedron::SetWireframe() - added missing invalidation.

AIS_Trihedron::setOwnDatumAspect() implementation has been moved to Prs3d_DatumAspect::CopyAspectsFrom()
and now used by Prs3d_Drawer::SetOwnDatumAspects().
OpenGl_Text::render() - added NULL-check.

AIS_Trihedron::computePresentation() now takes into account Prs3d_Datum*Arrow shading/line aspects.

Command vtrihedron has been extended by "-textColor XAxis|YAxis|ZAxis Color" syntax.
Command vviewcube has been extended by "-xAxisTextColor|-yAxisTextColor|-zAxisTextColor" arguments.
2020-11-21 12:19:45 +03:00
kgv
24f9d04c72 0031909: Visualization, AIS_Trihedron - replace maps with arrays
Prs3d_DatumAspect, AIS_Trihedron - redundant maps have been replaced by explicitly sized arrays.

AIS_Trihedron::myHasOwnDatumAspect - removed unused class field.

Prs3d_DatumAttribute, Prs3d_DatumParts, Prs3d_DatumAxes - enumeration values
have been renamed to have full name prefix.

vzbufftrihedron - fixed no more necessary Quantity_Color -> Quantity_NameOfColor convertion.
2020-11-21 12:19:44 +03:00
asuraven
84d0342cef 0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters
* Change file path variable in wavefront function from char[100] to TCollection_AsciiString
2020-11-21 12:19:43 +03:00
skl
5ae53d4986 0030421: Data Exchange - Standard_RangeError exception while reading VRML files with polygons
Import of arbitrary polygon is implemented in VrmlData_IndexedFaceSet.
Class IFCCAFControl_Triangulator has been moved to BRepMesh_Triangulator.
New Draw test /bugs/stlvrml/bug30421 is added.
2020-11-21 12:19:43 +03:00
bugmaster
0d7753d266 Update version up to 7.6.0.dev 2020-11-12 10:49:58 +03:00
bugmaster
628c0211d5 Increment OCCT version up to 7.5.0 2020-11-02 19:52:44 +03:00
kgv
dbecff5fab 0031898: Coding Rules - extend Standard_WarningsDisable.hxx with -Wreorder 2020-11-02 19:41:29 +03:00
asuraven
7a88ce5b98 0029108: Crash writing STEP file
* Wrapped a try / catch block on creating objects in TopoDSToStep_MakeStepFace::Init()
2020-11-02 14:32:39 +03:00
Xu Zhongxing
2b7fd8c81c 0031887: IntTools_Context::IsPointInFace always return TRUE
If aDist >= aTol, bIn is never updated to false, and the function
always returns TRUE.
2020-10-30 18:25:19 +03:00
kgv
a8b9d7eb27 0031888: Configuration, qmake - linkage error due to missing .cpp file in TKMesh
OccToolkit.pri now handles also .cpp file extension.
2020-10-29 19:04:46 +03:00
dpasukhi
71af3370c4 0031878: DXF import - support Windows and ISO 8859 code pages in DXF import
Add support of converting Big5 and GBK code pages to Unicode within Resource_Unicode::ConvertFormatToUnicode
2020-10-29 19:01:54 +03:00
asuraven
40858cc79c 0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- refactoring
File StepToGeom_MakeBSplineCurve.pxx is removed, relevant code is converted to C++ template and merged to StepToGeom.cxx
2020-10-29 18:55:37 +03:00
asuraven
3940436ae2 0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- fix
The number of weights is adjusted to the number of poles in StepToGeom::MakeBSplineCurve(2d).
2020-10-29 18:55:36 +03:00
kgv
c3da64a686 0031884: Data Exchange - NULL de-reference within STEPCAFControl_Reader::SetSourceCodePage()
Removed methods with unclear usage rules.
2020-10-28 22:19:23 +03:00
mzernova
4065c66c24 0031808: Visualization - NULL dereference in Graphic3d_Structure::IsDisplayed() on Removed presentation
Added a NULL check for IsDisplayed(), IsHighlighted(), IsTransformed(), IsVisible(), etc.
2020-10-28 22:18:12 +03:00
abv
94f16a8961 0014673: Provide true support for Unicode symbols
Construction of TCollection_ExtendedString from plain C string is fixed to consider input string as UTF-8 in several places (identified as described in notes to #31113).

Message_MsgFile is corrected to load resource file as UTF-8 (unless it has BOM indicating use of UTF-16).

Added tests for use of Unicode in some DRAW commands (bugs demo bug14673_*)
2020-10-28 22:18:11 +03:00
kgv
aa7e9f8d78 0031881: Coding Rules - OpenGl_HaltonSampler::initRandom() uses deprecated in C++14 function std::random_shuffle
Unused function has been removed.
2020-10-28 19:24:00 +03:00
akaftasev
5445eaeed5 0030003: Construction of pipe by two circular sections and spine curve leads to crash
GeomFill_NSection.cxx  : setting of UPeriodic flag while call constructor of BSpline surface is added

bug3003 : Test cases added
2020-10-27 19:46:14 +03:00
asuraven
07bc68e8d8 0031873: Samples, Qt OCCT Overview sample - Problems of compilation and launch in 32 bit mode on Windows 2020-10-26 19:47:54 +03:00
kgv
ec4128df29 0031876: Configuration - Prs3d_Arrow::DrawShaded() crashes in msvc10 win32 Release build
Use longer code syntax to workaround compiler bug.
2020-10-26 19:45:16 +03:00
abv
f41fd243b6 0031877: DRAW - some Visualization commands are not protected against uninitialized viewer
Added protections in DRAW commands against accessing Null context

Added test bugs demo bug31877
2020-10-25 08:46:49 +03:00
kgv
9f9490e1ae 0031875: Draw Harness, ViewerTest - command vaspects -mostContinuity lacks g1 and g2 options
vaspects -mostContinuity now accepts g1 and g2 values.
2020-10-23 19:58:51 +03:00
emv
0612bb7010 0031858: Modeling Algorithms - boolean operation crash between the given cylinder and torus.
Integrating test cases only, as the problem is not reproduced.
2020-10-23 19:57:30 +03:00
ifv
7ccfd41fa2 0031782: Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests
ChFiKPart_ComputeData_FilPlnCyl.cxx - rewriting some code to avoid "extra" optimization
2020-10-23 19:56:03 +03:00
dpasukhi
692decba26 0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description
Fix adding name and description of the datum
2020-10-23 19:54:58 +03:00
dpasukhi
1b9cb073b9 0028454: Data Exchange, STEP reader - names with special characters cannot be read
- Add support of the control directives ( "\X2\" "\X4" "\X\" "\P*\" "\S\");
- Make param "read.stepcaf.codepage" base for conversion inside StepData instead of CAF;
- Rename "read.stepcaf.codepage" to "read.step.codepage".
- Add ISO 8859-1 - 9 code pages for conversion
- Add Resource_FormatType_NoConversion format type, that indicates non-conversion behavior
- Update old test cases that contain control directives
2020-10-22 17:54:29 +03:00
ifv
380748c340 0027469: Modeling Algorithms - Regression vs 6.9.1: Wrong result of Edge/Face intersection
IntTools/IntTools_BeanFaceIntersector.cxx - decreasing parameter aDeltaRestrictor in method ComputeRangeFromStartPoint(...) to avoid "jumping" across the common part boundary.

IntTools/IntTools_EdgeFace.cxx - method IsCoincident() - improving criteria of coincidence between edge and face.
2020-10-22 17:49:17 +03:00
kgv
a966542b8a 0031866: Documentation - add description to Graphic3d_NameOfMaterial enumeration values
Enumeration values have been renamed to use complete prefix Graphic3d_NOM_ -> Graphic3d_NameOfMaterial_
and to match string names (with old values preserved as aliases).
2020-10-22 17:40:42 +03:00
asuraven
8833fd4dc5 0031827: Samples - Qt OCCT Overview sample is not compiled with VS 2010
* Menu storage changed from json to XML (because Qt 4 does not support json)
 * C++11 for(object : container) construction changed to OCCT iterators / Qt foreach
 * enum type::name changed to type_name
 * non used class members removed
 * Qt connect functions changed to macros version
 * warning 4127 disabled for Q_INIT_RESOURCE in VS2010 / Qt 4 case
 * widgets parent problem on Qt 4 fixed
 * QRegularExpression changed to QRegExp
2020-10-22 17:35:37 +03:00
kgv
1877dc98c9 0031856: Draw Harness - ReadStep should propagate progress indicator
Added progress indication to commands ReadStep, WriteStep, ReadIges, WriteIges, XOpen, XSave.

Draw_ProgressIndicator::Reset() now backups Tcl result string before evaluating command,
so that Draw_ProgressIndicator destructor will not eat error/result message in main command.
2020-10-20 18:16:09 +03:00
jgv
3e98579a83 0031855: Modeling Algorithms - regression of the unifysamedom command.
Transformation of 2d-curves on elementary surfaces has been corrected.
2020-10-20 18:13:49 +03:00
kgv
16ed73bec5 0031790: Configuration, CMake - add optional OpenVR dependency 2020-10-17 18:07:29 +03:00
abv
ae9f4b64ca 0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks, and spaces by underscores, on export to STEP.

Related: DRAW commands dealing with strings in OCAF documents are corrected to pass Unicode symbols as UTF-8.

Off-topic: code saving names of external STEP files in XDE and fetching them back is corrected to preserve Unicode symbols as UTF-8.

Added test bugs xde bug31851

Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
2020-10-14 19:28:58 +03:00
emv
870ae593c3 0031850: Modeling Algorithms - boolean cut and common generate unexpected result
IntPatch_WLineTool::JoinWLines(): using correct point for the check if WLines may be joined.
2020-10-14 19:25:45 +03:00
emv
135c2bd908 0031835: Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
Fix inconsistency between IntAna_QuadQuadGeo(gp_Cylinder,gp_Cylinder) and AxeOperator::Coplanar().
2020-10-14 19:23:26 +03:00
kgv
6eeb528cd1 0031848: [REGRESSION] Visualization - MoveTo() triggers exception "gp_Dir() - input vector has zero norm"
SelectMgr_RectangularFrustum::Overlaps() - added zero magnitude check.

Commands vsphere,vcylinder,vtorus have been corrected to provide missing parameters defining number of stacks and slices.
2020-10-14 19:17:33 +03:00
emv
815f039bd2 0031836: Modeling Algorithms - Boolean cut failed between a Cone and a Torus
BOPAlgo_PaveFiller::UpdateExistingPaveBlocks: Add check for closed edge when updating pave block.
2020-10-13 19:18:02 +03:00
abv
81f2078cdb 0031575: Tests - make location of source test folder available in test
Documentation of global variables available for the test script during test execution is improved.

Off-topic: mark-up error is fixed in DRAW user guide
2020-10-13 19:15:39 +03:00
ifv
794aa3390c 0029722: Modeling Algorithms - checkshape modifies UV points of parametric curve
removed updating uvpoints from WireExplorer
2020-10-13 19:09:44 +03:00
kgv
d922149528 0031842: Coding Rules, BOPAlgo - eliminate CLang warning -fsanitize=undefined reference binding to null pointer
Added NULL checks before Progress Scope pointer dereference.
2020-10-13 19:07:42 +03:00
mpv
2958b91f62 0031841: Coding Rules, LDOM_XmlReader - eliminate new CLang compiler warning -Wtautological-overlap-compare 2020-10-13 19:06:40 +03:00
kgv
cdfcd39b69 0031833: Visualization - dynamic highlighting does not appear within ImmediateRedraw()
AIS_ViewController::contextLazyMoveTo() now undoes Z Range changes after MoveTo().
2020-10-09 18:29:52 +03:00
vsv
c4d4fceaa7 0031824: Samples - Code is not displayed in Qt OCCT Overview sample after compilation by CMake 2020-10-09 18:28:27 +03:00
abv
d730835599 0031095: Debugging - add code for display of TCollection_AsciiString as UTF-8 in Visual Studio debugger visualizer 2020-10-09 18:26:03 +03:00
kgv
a84f14abee 0031830: Documentation - broken reference 14 in pbr_math document
References to literature are simplified to reduce duplication of names.
List of references is converted to table for better presentation.
2020-10-09 18:24:24 +03:00
bugmaster
278da162dc Increment OCCT version up to 7.5.0beta 2020-10-06 20:40:27 +03:00
dpasukhi
baf60a870c 0031670: Data Exchange - cp1251 Cyrillic characters in STEP file
Add support for converting pages from Windows encoding to Unicode
2020-10-06 20:40:26 +03:00
jgv
99c9a82021 0031735: Modeling Algorithms - BRepOffset_MakeOffset works slowly and produces wrong result
Modify method IsPlanar of BRepOffset_MakeOffset: try to make planar all possible faces to simplify the input shape.
2020-10-06 20:40:25 +03:00
ifv
bf46352772 0031700: Modeling Algorithms - Regression in 0029580 after integration 0029839
BOPAlgo_PaveFiller_6.cxx: protection against creation of thin faces is added
bug29580_1: reverting in original state

dimensions.tcl: correction according to current state of BO algorithm
2020-10-06 20:40:24 +03:00
asuraven
a2176e6524 0031570: Samples - add Qt samples similar to standard MFC samples
Added Qt sample OCCTOverview providing examples of use of OCCT API with relevant code and demonstration of results in the viewer.

Off-topic: some unused images are removed from dox/introduction/images/
2020-10-06 20:40:23 +03:00
tiv
50ae6dad80 0031821: Coding - Uninitialized variables in TKFillet project
Some variables that remain uninitialized in the project TKFillet received proper initializers.
2020-10-06 20:40:22 +03:00
gka
809a2e13f8 0031812: IGES import - NURBS patches lost in the import process - 720
Correction for case invalid color definition to avoid considering an entity that has a number corresponding to the color field as erroneous if entity is not a color entity.
2020-10-06 20:40:21 +03:00
abv
b81a7e3160 0030378: Data Exchange - extract of subset of model entities fails (regression)
Field theflags in class Interface_BitMap is always initialized to avoid exception on operations with the class.

Added test bugs step bug30378
2020-10-06 20:40:20 +03:00
kgv
afe3ff9aaa 0031820: Tests - "dlog get" skips last exception when calling 'test" with echo OFF
Added missing puts to "test" command.
2020-10-05 13:29:54 +03:00
abv
b9ec690a2f 0031819: Documentation - add references to Flex and Bison
References to Flex and Bison added

Related:
- table of third-party tools in Requirements section is reorganized to be more clear
- sections Acknowledgements and Installation are updated
2020-10-03 16:07:52 +03:00
abv
d430d12909 0030800: Foundation Classes, UnitsAPI - poise dynamic viscosity unit is not defined correctly
Definition of Poise unit corrected.

Added test bugs fclasses bug30800
2020-10-03 16:06:35 +03:00
nds
6522304c17 0029451: Information Message Alert to debug an algorithm or object functionality
- Added possibility to send stream information and transient object into Message_Messenger. Message_Printer will process it if needed.
- Add Message_PrinterToReport to send messenger information into Message_Report.
- Extended Message_Report to collect hierarchical alerts, to be able to collect some metrics during alerts processing.
- Added Message_AlertExtended to prepare hierarchical alerts with custom attributes. One attribute for one alert.
- Added Message_CompositeAlerts class to handle a container of alerts.
- Added Message_Level to start a new hierarchical level by creating an instance, stop by destricting.
- Added Message_Attribute and inheritors to store custom information about alert like object, stream, shape, some metrics.
- Implement Message_AttributeAlert to collect start/stop information about active metrics of Message_Report. This kind of attribute is created if at least one metric is active in the report.
- Add Message_MetricType enumeration with possible kinds of metrics in report.
- Implement DumpJson for Message_Report to store all collected alerts into stream.
- Added draw commands for Message_Report, Message_Messenger.
2020-10-02 20:45:29 +03:00
kgv
dba9887351 0031816: Data Exchange - RWMesh_MaterialMap::CopyTexture() copies glb file instead of a texture inside it
Image_Texture is now checked if it defines an additional offset within the file
to avoided copying an old glb file with embedded image files instead of extracting them.
2020-10-02 19:13:47 +03:00
Vera Sdobnova
e6c8fcfed4 0027191: Documentation - redesign of information architecture -- revision (user guides)
Revision of User Guides

- Changes in User Guides Section to correspond with OCCT Overview structure: Mesh became a direct subsection of User Guides (it was a part of Modeling Algorithms).
  TObj is included into OCAF.
- Changes in User Guides – Modeling Algorithms section: Fillets and Chamfers, Offsets, Drafts, Pipes and Evolved shapes, Sewing, Features, 3D Model Defeaturing, 3D Model Periodicity,
  Object Modification are moved into The Topology API section.
- Changes in User Guides – Modeling Data section: Naming shapes, sub-shapes, their orientation and state section is renamed to Shape content. Shape Location is moved into Shape content section.
  Storage of Shapes is moved into BRep Format section of Specification. Lists and Maps of Shapes subsection is moved into Topology - Exploration of Topological Data Structures.
- Some pictures in User Guides (Foundation Classes, Modeling Data, Modeling Algorithms) and Tutorial are updated to improve quality and correct mistakes.
2020-10-02 18:11:24 +03:00
Vera Sdobnova
0a6d974274 0027191: Documentation - redesign of information architecture -- revision (overview and samples)
Revision of Introduction, Overview, Samples, Tutorial

- Technical Overview is incorporated into Introduction
- Samples (from Overview) and Tutorial are moved into new section Tutorials and Samples
- Content of Getting Started section (Draw Test Harness and Experimenting with Draw Test Harness) is moved into Tutorial and Samples section.
- Content changes: links to Open Cascade website promoting paid training and support are deleted.
- Some pictures in User Guides (Foundation Classes, Modeling Data, Modeling Algorithms) and Tutorial are updated to improve quality and correct mistakes.
2020-10-02 17:46:31 +03:00
Vera Sdobnova
06ce029fb9 0027191: Documentation - redesign of information architecture -- revision (build)
Revised documentation of building OCCT and third-parties; some related tags updated
2020-10-02 16:28:52 +03:00
abv
6b6d06fa08 0027191: Documentation - redesign of information architecture -- renaming (4)
Move documents describing BREP format, Boolean operations, and PBR math to dox/specification
2020-10-02 16:18:37 +03:00
abv
825c3a4a4b 0027191: Documentation - redesign of information architecture -- renaming (3)
Move guides on documentation, tests, coding rules, contribution workflow to dox/contribution
2020-10-02 16:17:08 +03:00
abv
5dab9b575b 0027191: Documentation - redesign of information architecture -- renaming (2)
Move debug and upgrade user guides to corresponding folders on upper level

Related: remove "debug" pattern from .gitignore to avoid ignoring relevant folder in dox
2020-10-02 16:16:51 +03:00
abv
2d863ff7bd 0027191: Documentation - redesign of information architecture -- renaming (1)
Move / rename overview to introduction
2020-10-02 16:16:33 +03:00
iko
27ce25199f 0031645: Documentation - provide external article references to PBR developer guide
References have been added.
2020-10-02 16:15:01 +03:00
kgv
28828566e9 0031813: Data Exchange, RWGltf_GltfJsonParser - debug assertion in progress scope on reading glTF1.0 files
RWGltf_GltfJsonParser::gltfParseSceneNode() - removed redundant progress indication on sub-meshes list level.
2020-10-02 16:12:51 +03:00
bugmaster
7e6da17b9f 0027922: Samples - Qt sample document window display problem 2020-10-02 16:12:51 +03:00
nds
ac5b3cbc0a 0030911: Visualization - Font_BRepFont using as a usual Standard_Transient
- StdPrs_BRepFont inherits Standard_Transient;
- StdPrs_BRepFont contains Font_FTFont in internal field;
- StdPrs_BRepFont implements FindAndCreate;
2020-10-02 16:12:50 +03:00
kgv
6183f3fead 0031762: Visualization, Font_TextFormatter - tabulation length is respected with one extra symbol shift
Integrate test case for checking various scenarios with tabulation symbol.
2020-10-02 16:12:50 +03:00
mkrylova
4945e8be99 0031789: Coding Rules - remove redundant Standard_EXPORT from TKMesh
- Standard_EXPORT which were specified for inline methods were deleted.
- ALL occurrences of DEFINE_STANDARD_RTTI_INLINE were replaced by DEFINE_STANDARD_RTTIEXT in header files and IMPLEMENT_STANDARD_RTTIEXT in source files
- ALL occurrences of "inline" keyword were deleted where it didn't not cause a linkage errors
- Added source files for classes that were without them for IMPLEMENT_STANDARD_RTTIEXT
2020-10-02 16:12:49 +03:00
kgv
42624fdc75 0031799: Configuration - compilation errors with Android NDK r12
Added missing <stdarg.h> include (va_list) to Standard_CString.hxx.
Do not include <search.h> in delabella.cpp when using gcc 4.9 from Android NDK.
2020-10-02 16:12:49 +03:00
mzernova
e2409d34b5 0031793: Draw Harness, vmanipulator - disable sorting picking result workaround
AIS_InteractiveContext::SetPickClosest() has been removed from vmanipulator command,
and test cases using the manipulator have been updated.
2020-09-29 18:11:03 +03:00
kgv
9211c8ffbc 0031795: Documentation - OCCDoc_ProcessSvg uses syntax incompatible with Inkscape 1.0
Detect old/new Inkscape version and pass arguments correspondingly.
2020-09-29 18:09:40 +03:00
imn
68922bccc4 0027342: STEP - support C++ streams for import / export
- STEP low-level parser is converted to C++; required minimal version of flex is elevated to 2.5.37.
- Added possibility to import STEP from stream, see new method XSControl_Reader::ReadStream() (now implemented in STEP only).
- Parsers ported to win_flex_bison 2.5.23 (flex 2.6.4, bison 3.7.1)
- Added support of C++ flex and bison scanners in in CMake scripts
- Some code clean-up in StepFile and around (unused files and functions are eliminated)
- Option to read from stream is added in DRAW command testreadstep for testing ReadStream() function
- Added test bugs step bug27342
2020-09-28 10:46:04 +03:00
sshutina
ed75148574 0031786: Data Exchange - After the importing STEP file the free shape is empty
- Fixed the exception
 - Added the test
2020-09-28 10:46:03 +03:00
kgv
8c36926a54 0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.

AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
for issue fixed long time ago by #0027797.
2020-09-28 10:46:02 +03:00
dpasukhi
14abc514ed 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
- Fix incorrect sharing DatumTargetType_Area
- Add check for null object
2020-09-28 10:46:02 +03:00
abv
8a39adb7d8 0031785: [REGRESSION] Application Framework - application crashes on reading XBF document in background thread
Class CDF_Session is removed.

Integrated previously but not described:

0029195: OCAF - ensure thread safety for different documents.

Static local variables are eliminated in PCDM package.
Global documents metadata look-up table and directory of opened documents are removed.
Look-up table is maintained now as field in instances of the CDM_Application class.
Methods providing iteration by components are removed from class CDF_Store; signature of methods returned Standard_ExtString is changed to return Handle(TCollection_HExtendedString).
Support of different "Presentations" of documents is eliminated.
2020-09-28 10:46:01 +03:00
mkrylova
0e57793fc6 0031688: Visualization - Wrong ISO lines for a face created from BSpline
Added a check to see if the ISO line intersects the bounding contour.
2020-09-27 12:00:08 +03:00
kgv
9df0497931 0031765: Coding Rules - eliminate GCC compiler warnings -Wcatch-value in IVtk
Catched exceptions are now passed by reference and error message is printed.
Added Standard_FALLTHROUGH to IVtkOCC_ShapePickerAlgo::SetSelectionMode().
2020-09-27 12:00:07 +03:00
oan
f2006a6f19 0028089: Mesh - New algorithm for triangulation of 2d polygons
Added custom meshing core algorithm to generate base mesh using Delabella library,
which can be enabled via IMeshTools_Parameters::MeshAlgo option or CSF_MeshAlgo environment variable.

Do not fill cirles filter upon explicit initialization.
Call base postProcessMesh functionality after initialization of circles in BRepMesh_CustomDelaunayBaseMeshAlgo.

Added Vsprintf() wrapper for vsprintf() preserving C locale.
2020-09-27 12:00:07 +03:00
mpv
689dc3b1c9 0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used
Added theAllSubChildren flag to the TObj_OcafObjectIterator to iterate all sub-children.
By default it still iterates only the first level of children.
2020-09-27 12:00:06 +03:00
tiv
0b55d29b6a 0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
and linked to NCollection_Vector::Differ() method.
This workaround was suggested by MSFT team.
2020-09-27 12:00:05 +03:00
bugmaster
99178701db 0031738: Samples: Update of samples for public release 7.5.0
- Adding VS 2019 redefinition
- Update sln files for vc14,141,142
2020-09-27 12:00:05 +03:00
emv
d476fc37f8 0030559: BOP Fuse: result is inconsistent
Implement alternative approach for making the edge seam (closed) on the face. This approach is useful for non-periodic surfaces (e.g. tore-like surface of revolution is periodic in U direction only).
Avoid internal faces in the affected solids of the result of BOP Fuse.
2020-09-27 12:00:04 +03:00
nds
b3bf8485a2 0031379: Configuration - using defined variable of THIRDPARTY_DIR 2020-09-23 18:49:14 +03:00
mzernova
113bda7072 0031773: Visualization - add Prs3d_ToolTorus
Added Prs3d_ToolTorus tool to create a torus

Added DRAW commands:
- vtorus
- vcylinder
- vsphere

Added test cases:
- v3d/quadric/torus
- v3d/quadric/cylinder
- v3d/quadric/sphere
2020-09-21 12:36:27 +03:00
ika
b0b7668261 0027185: Data Exchange - IGES - incorrect reading of DE for undefined entity
Fix reading of pointers to color entity.
2020-09-18 18:17:21 +03:00
dpasukhi
4661dcadd4 0025171: Data Exchange - STEP Lexer - the strings with quote sign inside can't be properly lexed
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:09 +03:00
dpasukhi
3d46ce87d7 0030014: Data Exchange - Step File import does not create shapes, after transfer roots
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:01 +03:00
dpasukhi
ebfd071c3c 0031191: Data Exchange - STEP import returns empty shape for a file written by SolidWorks 2018
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
c6d45aceb8 0030539: Data Exchange - Step file can't be imported (ADT.step)
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
87cf7029c3 0025440: Data Exchange - STEP file with Japanese unicode symbols cannot be read
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:02 +03:00
jgv
06f68996cf 0031766: Modeling Algorithms - Instability on pipe bugs bug26088 test case
Correction in GeomFill_Sweep: set the flags "myExchUV", "isUReversed", "isVReversed" to FALSE (initial state) after failure of BuildKPart method.
2020-09-18 17:47:03 +03:00
ika
ba98b079eb 0031491: Data Exchange, STEP Import - Regression due to patch 29068
Add parameter read.step.root.transformation to switch on/off using transformation placed in the root shape representation.
2020-09-18 17:47:02 +03:00
dpasukhi
16bb5630bc 0031675: Data Exchange - Error opening the STEP-file
Add a check for null array object ("Elements") within StepShape_GeometricSet.cxx
2020-09-18 17:47:01 +03:00
emv
ce97cd9708 0025113: Mesh - Progress indication and user break functionality for BRepMesh component
Added Progress Indicator to BRep_Mesh
2020-09-18 17:47:01 +03:00
abv
99ca2eec6b 0031595: Foundation Classes - make methods Message_Report::SendMessages() virtual 2020-09-18 17:47:00 +03:00
jgv
9390642d49 0025495: Documentation - Enumeration Approx_ParameterizationType is not documented 2020-09-18 17:46:59 +03:00
kgv
df9f66149b 0031513: Data Exchange - FSD_Base64Decoder::Decode() returns buffer with wrong length 2020-09-18 17:46:58 +03:00
age
6a2fb7a1d1 0031757: Visualization - Prebuild BVH for Select3D_SensitiveEntity in separate threads
- Added a new mode in SelectMgr_ViewerSelector for computing BVH for Select3D_SensitiveEntity in background which can be activated via method SelectMgr_ViewerSelector::SetToPrebuildBVH(). Default behavior has not been changed.
- New class SelectMgr_BVHThreadPool manages background processing of BVH building queue.
- Added Select3D_SensitiveEntity::ToBuildBVH() method that checks if BVH (if it used) is in invalidated state. Defined this method for all standard classes inherited from Select3D_SensitiveEntity.
2020-09-18 17:46:57 +03:00
mpv
ee3280a94f 0031769: Application Framework - regression : can not initialize two kinds of application in one thread 2020-09-18 17:46:56 +03:00
emv
296f017a16 0029789: Modeling Algorithms - General Fuse produces invalid shape for valid arguments
Integrating test case for the issue.
2020-09-18 17:46:56 +03:00
emv
242af8c222 0025462: BRepAlgoAPI_Fuse not work correctly for a planar face
Fixed by 0028747. Integrating test case only.
2020-09-18 17:46:55 +03:00
mpv
74fdb82c73 0031770: Application Framework - To add tests of Abort command to 31748 2020-09-18 17:46:54 +03:00
vro
8fde921fbe 0031759: Application Framework - regression: support of old versions of OCAF document fails 2020-09-18 17:46:53 +03:00
kgv
48cbe5f797 0031768: Foundation Classes - use usleep within OSD::MilliSecSleep() 2020-09-18 17:46:52 +03:00
agv
97454ee0cb 0031173: Point Cloud Rendering - Enable remote file systems as input and output for the Point Cloud converter
Make RWStl_Reader::IsAscii() accepting optional argument pointing how to rewind the input stream, using unget() or seekg(). This allows writing a reader that uses a stream supporting seekg but not supporting unget.
2020-09-18 17:46:51 +03:00
emv
cd0705f660 0024789: BOPAlgo_Builder produces invalid result on planar, conical and spherical surfaces
BOPAlgo_PaveFiller::MakeBlocks() - Improve Face/Face post treatment procedure by:
* Adding more existing edge for intersection with section edges to resolve all possible intersections.
* Using tree for edges selection.
* Avoiding intersection of the existing edges among themselves.

IntPatch_ImpImpIntersection::CyCyNoGeometric - add more points to wline to make it more smooth.
2020-09-18 17:46:50 +03:00
gka
65da6e2e3e 0031452: Impossible to get Backup of the attribute and status that attribute was modified before commit transaction
Method TObj_Object::HasModifications() was added to get flag that object or it's children was modified in the current open transaction
2020-09-18 17:46:50 +03:00
emv
7f7d121f90 0030786: BOP Cut: artifacts with enabled nondestructive flag
Avoid PaveBlocks initialization on vertex update.
Test case for the issue.
2020-09-18 17:46:49 +03:00
dpasukhi
2547d97917 0031711: Data Exchange - STEPCAFControl_Reader hangs on attached file in an infinite loop
Add check if .step external file is the same main file.
2020-09-18 17:46:48 +03:00
bugmaster
2fa0e902f0 0030308: OCCT Qt Tutorial Sample Cannot Be Built on Linux 2020-09-18 17:46:48 +03:00
gka
8b77b2fc99 0031219: Application Framework - TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString. -
2020-09-18 17:46:47 +03:00
emv
6c9f3cf15c 0030792: Modeling Algorithms, BOP Fuse - some parts of the shape are dropped
Integrating test case for the issue.
2020-09-16 19:32:57 +03:00
abv
7a3e8aad74 0031763: Foundation Classes - reporting of progress within parallel algorithms
Classes Message_ProgressRange and Message_ProgressScope are improved to store start point of the range.
Method Message_ProgressScope::Value() is improved to compute the value in the current scope from the actual current value of the global progress.
Description of Message_ProgressScope class is improved.

Off-topic:
- method Message_ProgressScope::Relieve() is renamed to Close() for semantic consistency
- article in Upgrade Guide is revised and corrected
2020-09-16 19:32:57 +03:00
gka
88610dfc0e 0031228: It is impossible switch off setting default names for objects inherited TObj_Partition
In order to switch off setting default names for objects of the type TObj_Partition argument "theSetName" defining addition of the default names was added
2020-09-12 20:42:26 +03:00
kgv
0784d6e3cb 0030662: Documentation - update programming example in Visualization user guide
"A programming example" section has been updated to provide a working code.
2020-09-12 20:42:25 +03:00
sshutina
897aeb207f 0031221: Visualization - selection filter in context
- Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used
 - Added the enumeration SelectMgr_FilterType provides filter types
 - To define behavior SelectMgr_AndOrFilter use  SetFilterType in AIS_InteractiveContext
 - Added the test
 - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter
2020-09-12 20:42:24 +03:00
ika
b95caec47d 0031466: Data Exchange - Cannot import layers from STeP file (7.4.0 regression)
Return possibility to find layers fir subshapes.
2020-09-12 20:42:23 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
mkrylova
99289bed0a 0031683: Visualization - V3d_View::SetBackgroundImage() should accept Image_PixMap
Added V3d_View::SetBackgroundImage() accepting Graphic3d_Texture2D on input.

Graphic3d_CView/OpenGl_View have been modified to merge Graphic3d_CView::SetBackgroundImage()
and ::SetBackgroundCubeMap() implementations into a single method.
2020-09-12 20:42:21 +03:00
dpasukhi
bf0114a372 0030848: Data Exchange - Problem load step file
Update .step scanner rules to read anything within the text, including nested apostrophes
2020-09-12 20:42:20 +03:00
dpasukhi
183c99caf8 0030053: STEP read fails due to comment string
- Update .step scanner:
  - add rules to read anything within the comment
  - add a function to initialize of lexical scanner
  - add states for Commit & End instead of global variables modcom & modend
2020-09-12 20:42:19 +03:00
dpasukhi
e0a25f3d93 0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols
STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants.
2020-09-12 20:42:19 +03:00
mpv
c99ad5d760 0030773: Application Framework - To allow to inherit existing attributes to reuse persistence mechanisms
Added possibility to inherit existing attributes if the same persistent fields are used. All methods that allow controlling the data model changes or getting some callbacks may be overridden in successor. They may have same GUIDs as a base class or new ones.

Special macros IMPLEMENT_DERIVED_ATTRIBUTE and IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE must be used instead of standard Handle macro definition IMPLEMENT_STANDARD_RTTIEXT to register new derived attributes.

Using this improvement several existing attributes from TDataStd, TDataXtd and XCAFDoc packages become inherited from other base attribute-classes. XML and Bin drivers of these attributes are removed. New base attribute classes are added: TDataStd_GenericEmpty and TDataStd_GenericExtString.

This improvement does not change both present formats Bin and XML documents. The obsolete Standard scheme is not changed at all.
2020-09-12 20:42:18 +03:00
vro
59e11a2f75 0031310: Application Framework - A document with a reference array attribute crashes on attempt to save on disk 2020-09-12 20:42:17 +03:00
mpv
dbab9c538c 0031748: Application Framework - Efficient OCAF transactions in OCCT 2020-09-12 20:42:16 +03:00
mpv
d9d03f10c3 0029195: OCAF - ensure thread safety for different documents.
OCAF persistence architecture modification to satisfy multi-threading criteria.
2020-09-12 20:42:02 +03:00
jgv
c3e0e1de43 0031736: ShapeUpgrade_UnifySameDomain algorithm does not unify all possible faces
1. Correct processing faces that can be converted into planar ones.
2. Correct processing faces based on V-closed surfaces.
2020-09-10 18:16:44 +03:00
nds
ed753e10df 0031658: Inspector - using AIS_ViewController in View package
- View: using AIS_ViewController, AIS_ViewCube.
2020-09-10 18:15:06 +03:00
nds
630ab53881 0031656: Visualization - drag item to handle in AIS_ViewController
ProcessDragging method in AIS_InteractiveObject. Empty by default. Should be implemented if drag is used for the object.
2020-09-09 19:48:49 +03:00
osa
bbbb6bff1f 0031758: Visualization, AIS_InteractiveContext - unify clearDynamicHighlight() method 2020-09-09 19:46:14 +03:00
nds
6b63dc83c3 0031326: Foundation Classes - Init from Json for base OCCT classes
InitFromJson method implementation for some simple classes.
OCCT_INIT_* defines introduction to do automatic parsing of the stream into values.
Inspector is extended to visualize objects created on the dump stream if it might be created.
2020-09-09 19:36:06 +03:00
nds
b19cde437e 0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using 2020-09-09 19:34:18 +03:00
dpasukhi
4637000015 0031489: Data Exchange - STEP Reader can't read a big file
- Add checking for null object for edge_curve within TranslateEdgeLoop;
- Update STEP parser rule allowing empty element in the list of entity parameters;
- Update test case of bug26451 for a new scanner rule;
- Update test case of bug30273 for a new added check for null object
2020-09-09 19:32:00 +03:00
nds
60f7b22536 0030537: Visualization - wrapping text in font text formatter
Font_TextFormatter inherits Standard_Transient, now it is given as a handle in functions.
Graphic3d_Text - extended with Font_TextFormatter to be able to have it filled out of text render. If it is not defined here, the default text formatter of context is used.
OpenGl_Context - has default Font_TextFormatter for rendering OpenGl_Text.
AIS_TextLabel extending with Font_TextFormatter to prepare test case for text wrapping.
Prs3d_Text returns created graphic text to be able to manage it outside.
2020-09-07 11:10:32 +03:00
sshutina
a516227511 0031354: Visualization - Dump improvement for V3d, Graphic3d, Aspect
- do not dump light in view as it's dumped in the viewer
2020-09-04 18:14:24 +03:00
mzernova
f0da497005 0031733: Visualization, Prs3d_ToolQuadric - create indexed arrays
Prs3d_ToolQuadric has been modified to return an indexed triangulation.
Added methods Prs3d_ToolQuadric::CreateTriangulation() and Prs3d_ToolQuadric::CreateTriangulation()
as more straightforward API returning generated triangulation.
Added missing const to constant methods.

Confusing method Prs3d_ToolQuadric::FillArray() filling both
Graphic3d_ArrayOfTriangles and Poly_Triangulation at once has been marked deprecated.

V3d_Trihedron, AIS_ViewCube and AIS_Manipulator
now set Closed flag to groups with shaded sphere and arrows.
2020-09-04 18:14:23 +03:00
emv
ba8175dd5d 0027973: Result of Common operation contains a face with an open wire
Integrating test case only as the problem is not reproduced anymore.
2020-09-04 18:14:22 +03:00
emv
129d6e8cc4 0026534: Boolean Cut returns empty result
Integrating test case only as the problem is not reproduced anymore.
2020-09-04 18:14:21 +03:00
mpv
59af6f852a 0029838: Application Framework - TObj.msg defines unused messages 2020-09-04 18:14:21 +03:00
mpv
8f34d47e21 0031340: LDOM fails to read XML file starting with BOM
Added support of BOM (byte order mask) characters at the start of an XML stream or file and provided information about found BOM in LDOMParser.
2020-09-04 18:14:20 +03:00
emv
b3df3dcd82 0026452: Infinite loop in Edge/Edge intersection.
Integrating test case only as the problem is not reproduced anymore.
2020-09-03 20:02:44 +03:00
akaftasev
992876e98f 0030795: BRepOffsetAPI_MakePipeShell: hangs on the attached model and produces infinite rails
Added new condition to catch bad shape
2020-09-03 20:00:47 +03:00
kgv
eca6e7c547 0031744: Configuration - add batch files to build OCCT for Android target
Added script adm/scripts/android_build.bat and template android_custom.bat.template
intended for automating building routines targeting Android platform.

OpenCASCADEConfig.cmake has been extended to detect "$INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade" location.
2020-09-03 19:56:25 +03:00
msv
a75f5cdd86 0031742: Configuration - Add batch files for cmake build
The scripts cmake_gen.bat and cmake_gen.sh have been added to facilitate batch building of OCCT correspondingly on Windows and Linux platforms.

The files build.bat and install.bat are copied to the build directory by cmake configure procedure to enable batch building and installation on Windows platform.
2020-09-02 19:58:07 +03:00
osa
b3da9c3ede 0031737: Configuration - Add batch files to build OCCT with Emscripten
The scripts occ_build_wasm.bat and occ_build_wasm.sh have been added
to simplify batch building of OCCT with Emscripten (Web Assembly packages) correspondingly on Windows and Linux platforms.
These scripts are configurable through calling files with custom environment wasm_custom_env.bat and wasm_custom_env.sh.
2020-09-02 19:51:56 +03:00
mpv
17a5b56767 0031320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object 2020-09-02 19:42:39 +03:00
kgv
f5e758d239 0031728: Visualization, Font_FontMgr - provide function to register fallback fonts in application level
Added public method Font_FontMgr::AddFontAlias() for registering custom aliases and fallback fonts.
vfont command has been extended with arguments -aliases, -addAlias, -removeAlias, -clearAlias and -clearAliases.
2020-09-02 19:38:48 +03:00
ifv
cdddd079cc 0026088: Modeling Algorithms - Exception in pipe algorithm
GeomFill_Sweep.cxx: treatment KPart for sphere is improved
bug26088: test case is corrected - TODO is removed
2020-09-02 19:37:14 +03:00
abv
fba34cf8ba 0031740: Configuration - recover support of Yacc and Lex generation
Scripts adm/cmake/bison.cmake and adm/cmake/flex.cmake are refactored to enable actual search for bison and flex.
Apart of standard locations, also sub-folders of 3RDPARTY_DIR whose names contain "bison" and "flex", respectively, are added to search.
Cache variables 3RDPARTY_BISON_EXECUTABLE and 3RDPARTY_FLEX_EXECUTABLE are removed to avoid confusion (they duplicated similar variables without "3RDPARTY_" prefix).

Lex and Yacc files are corrected to match changes made manually in generated files during last years:
- StepFile/step.yacc: correction missing from #22972
- StepFile/step.lex: corrected for compilation (broken by #31060)
- MSVC-specific code is synchronized between StepFile/step.lex and ExprIntrp/ExprIntrp.lex
- Old commented code and duplicate code blocks removed

Commands for execution of Flex and Bison tools in CMake scripts are tweaked to avoid embedding line numbers (with local paths) in generated files.

Scanners and parsers are regenerated from updated source files with modified options.
Note that lex.ExprIntrp.c is regenerated with multiple differences because option -f (fast scanner) was used for generation of previous version (by WOK).
2020-09-02 19:25:24 +03:00
kgv
dda9303c69 0031743: Draw Harness - fix misprint in Draw_Interpretor::SetToColorize() 2020-09-02 18:54:31 +03:00
kgv
7d47ebdbcd 0030617: Coding - using reinterpret_cast instead of static_cast for downcast
Several reinterpret_cast have been replaced by static_cast when applicable.
2020-09-02 18:48:56 +03:00
kgv
d6c489212b 0028990: Coding Rules - deprecate redundant class Prs3d_Root
Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
2020-08-30 19:04:53 +03:00
kgv
68a2329305 0031369: Foundation Classes, Standard_ReadBuffer - access violation on second ::ReadChunk() call after read failure
Standard_ReadBuffer::readRawDataChunk() - do not increment NULL pointer and return invalid address.
2020-08-28 18:13:36 +03:00
kgv
90bc1adb77 0031086: Coding Rules - STEPCAFControl_Reader has virtual functions, but no virtual destructor
Added missing virtual destructor.
2020-08-28 18:11:58 +03:00
kgv
af7fa1438e 0031706: Data Exchange, RWGltf_CafReader - imports model with incorrect transformation
RWGltf_GltfJsonParser::bindNamedShape() - shape location is now multiplied not just overridden.
2020-08-28 18:00:22 +03:00
emv
6f04cbb1fb 0031734: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
BRepOffset_MakeOffset_1::IntersectFaces - Build intersection pairs for rebuilding process basing on the intersection results and removed faces.
2020-08-28 17:53:40 +03:00
kgv
d99f0355e3 0031731: Draw Harness - colorize errors and exception messages
Draw_Interpretor, CommandCmd() - catched exceptions and messages put into Tcl string result
before throwing a Tcl exception (return 1) are now print in intense red (using Message::SendFail()).
Duplication of exception message in std::cout and Tcl output has been removed.

Draw Harness plugins have been updated to use either Message::SendFail() or theDI instead of std::cout/std::cerr
for printing colored error message before throwing a Tcl exception.
2020-08-25 09:44:15 +03:00
kgv
1d99a2baaa 0031720: Visualization, Font_FontMgr - register one more CJK fallback font available on newer Android devices 2020-08-22 12:13:14 +03:00
kgv
4c99a1f80a 0031727: Samples, JNI Sample - JNI DETECTED ERROR on calling OcctJniRenderer.postMessage()
Use CallVoidMethod() instead of CallObjectMethod().
2020-08-22 12:13:13 +03:00
osa
fe3dbc63fc 0031715: Visualization - add access to proxy shader program 2020-08-22 12:13:12 +03:00
kgv
8e16477b50 0031582: Configuration, CMake - OCCT fails to build with VTK 9.0
Handle "VTK::" prefix instead of "vtk" used by previous VTK versions for targets.
Corrected unexpected location of endif() and broken indentation.
Obsolete $VTK_USE_FILE is no more included (basing on VTK version check).

Standard_WarningsDisable.hxx/Standard_WarningsRestore.hxx pair is now used to suppress VTK warnings instead of partial disabling.
2020-08-22 12:13:11 +03:00
ifv
ce9aefc8aa 0026568: Modeling Algorithms - Exception when creating pipe
BRepFill_Pipe.cxx:  protection against wrong shape type is added
GeomFill_Sweep.cxx:  protection against using 0-vector to create Direction is added

bug26568: test script is corrected: "TODO ..." is removed
2020-08-22 12:13:10 +03:00
age
f3269ef5f1 0031716: Visualization, Select3D_SensitiveSet::matches() - avoid building BVH in case of full overlapping by the volume 2020-08-22 12:13:10 +03:00
kgv
63e5cfcaab 0031714: Draw Harness - print command name with intense within help output
Added command "dputs" similar to "puts" but with extra arguments modifying text color/intensity.
Command "help" now prints the name of command with intense style.
2020-08-22 12:13:09 +03:00
mpv
0fb210edbf 0031681: Foundation Classes - Shared Libraries Cannot Be Loaded
Standard_ErrorHandler now accesses global mutex via proxy function
instead of a global variable to avoid initialization order issues.
2020-08-22 12:13:08 +03:00
kgv
4254e74196 0031324: Data Exchange - Cannot read BinOcaf document with colour
BinMDataXtd_PresentationDriver and XmlMDataXtd_PresentationDriver have been corrected
to convert old (OCCT 7.4.0) Quantity_NameOfColor enumeration values to new ones.
2020-08-22 12:13:08 +03:00
kgv
12e6d49993 0031713: Draw Harness, IVtkDraw - add commands ivtksetcolor, ivtkaxo, ivtkclose, ivtksettransparency
Added missing NULL checks before accessing GetInteractor().
Errors are now reported using Message::SendFail().
Not found actor names are now reported as syntax error instead of silently skipping them.

ivtkinit now accepts aguments -srgb and -msaa for overriding defaults.
Default MSAA settings have been changed from 8 to 0 to match vinit behavior.
Added command ivtkclose closing a Vtk view.

Added commands ivtkaxo, ivtkfront, ivtkback, ivtkleft, ivtkright,
ivtktop and ivtkbottom assigning view projection similar to sonamed commands in ViewerTest.

Added commands ivtksetcolor and ivtksettransparency assigning
color properties to shaded presentation.
2020-08-14 13:30:05 +03:00
kgv
dae2a92241 0031709: Draw Harness - move methods ViewerTest::ParseOnOff()/ParseColor() to package Draw
Methods ParseOnOff()/ParseColor() have been moved from package ViewerTest to Draw.
Command "vlight -color" now accepts RGB values, not only name.
Implementation of pload command has been cleaned up.
2020-08-14 13:30:04 +03:00
kgv
76fada6839 0031702: Visualization, TKOpenGl - hatching interior is ignored in second View within the Viewer
Current state variables have been moved out from OpenGl_LineAttributes to OpenGl_Context.
2020-08-14 12:46:34 +03:00
szy
5980a9fb23 0031049: OCAF - Error message during Ascii file (std) opening. 2020-08-14 12:44:54 +03:00
ifv
1bf23e5bb6 0031697: Foundation Classes - Expr_GeneralExpression::Derivative does not seem to work (691 & 720)
Expr_NamedUnknown.cxx - wrong comparing of named unknown is fixed

QABugs_20.cxx - new QAcommand is created
QABugs_11.cxx - wrong command is corrected
bug902 - wrong test is corrected
bug31697 - new test is added
2020-08-07 18:49:38 +03:00
kgv
e0b2443737 0031698: Visualization, Graphic3d_Aspects - provide stipple line factor parameter
Added Graphic3d_Aspects::LineStippleFactor() property.
Adjusted help for vaspects command suggesting a shorter syntax.
2020-08-07 15:17:53 +03:00
kgv
148820b2a9 0031689: Coding Rules - including STEPCAFControl_Writer.hxx produces compilation error
Added missing #include <NCollection_Vector.hxx>.
2020-08-07 15:08:55 +03:00
ifv
9c4214b416 0030944: [Regression to 7.0.0] Modeling Algorithms - Intersection curves between pair of faces are not found
IntPatch_ImpPrmIntersection.cxx: treatment of coinciding lines is improved
IntWalk_IWalking_1.gxx: bug correction
bug30944 : test case added
2020-08-03 10:52:59 +03:00
kgv
4c7a3faef5 0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating viewer defaults
SelectMgr_ViewerSelector3d::ClearSensitive() - fixed crash on removing presentations (via command vsensera).

Added new parameters -sync and -reset to vrenderparams command synchronizing parameters across Views.
Parameters -raster and -rayTrace now accept optional on|off values.
Improved command description.
2020-07-24 19:20:33 +03:00
kgv
9f013fee98 0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with Graphic3d_TOSM_UNLIT shading model
Prs3d_ShadingAspect::SetTransparency() now sets transparency also to interior color.
AIS_RubberBand now uses Graphic3d_TOSM_UNLIT.
2020-07-23 16:14:57 +03:00
akaftasev
6d8f9f4a49 0031353: TDocStd_Application does not have api to set progress indicator
Add support of Message_ProgressIndicator in BinTools classes.

Add support of Message_ProgressIndicator with possibility of user break in methods of opening and saving TDocStd_Application.

Add tests of ProgressIndicator in TDocStd_Applacation.
2020-07-23 16:08:23 +03:00
Benjamin Bihler
d27293d9bf 0031677: Configuration - Allow Optimization Level O3 When Compiling With G++
Removed suppression of optimization level O3 with using Mingw64.
2020-07-23 16:08:22 +03:00
mkrylova
b011420f28 0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
Added a check for non-empty mesh and new warning
that notifies about skipping an empty node
2020-07-23 16:08:22 +03:00
mkrylova
d533dafb56 0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
Added initialization of fields that had not initialization
Added default constructors to classes without constructors
2020-07-23 16:08:20 +03:00
dpasukhi
078f916446 0028345: Data Exchange - Reading STEP model using STEPCAF crashes
# Add test to verify import
* Note: Each layer contains a valid name, but only one contains a link to the shape, so .step file contains only one valid Layer.
2020-07-23 16:08:19 +03:00
jgv
c28d4a89d4 0031617: Export STEP in nonmanifold mode corrupts the shape
Modify method XSControl_TransferWriter::TransferWriteShape: add removal of locations before writing the shape.
2020-07-23 16:08:19 +03:00
Benjamin Bihler
6531dfeacd 0031680: Configuration - Compilation Fails With G++ 10.1, LD 2.34 and Link-Time Optimization
Added a non-inline empty virtual destructor to LDOM_OSStream to force vtable generation in one
translation unit only.
2020-07-23 16:08:18 +03:00
kgv
dbc8becff4 0031673: Draw Harness, ViewerTest - command vlocation applies transformation in opposite order
gp_Trsf::SetRotationPart() - added method replacing rotation matrix without reseting other components,
similar to existing SetTraslationPart() and SetScaleFactor().

Transformation multiplication order has been fixed
for vlocation arguments -rotate, -translate, -mirror and -scale.
Added -prerotate, -pretranslate, -premirror and -prescale options following previous behavior.

vlocation -setRotation now uses new method gp_Trsf::SetRotationPart()
for consistency with methods -setLocation and -setScale.
2020-07-23 16:08:17 +03:00
kgv
99ee8f1a83 0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
2020-07-23 16:08:17 +03:00
kgv
7465bfa65e 0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
OpenGl_Context now skips loading functions related to mapping buffer,
which are required by OpenGL ES 3.0 specs but not provided by WebGL 2.0.
Message_PrinterSystemLog does not use a broken emscripten_log() anymore, which corrupted UNICODE strings.

WasmOcctView::initWindow() - callbacks now set using EMSCRIPTEN_EVENT_TARGET_WINDOW
instead of 0 used by older Emscripten API.

Mouse callbacks now track canvas element and use
EmscriptenMouseEvent::targetX/targetY instead of ::canvasX/canvasY
as the latter was broken.

Added emscripten_set_main_loop() setup to shut up eglSwapInterval() error message.
Fixed missing \0 at the end of string converted by toUtf8Array().
2020-07-22 19:24:38 +03:00
azv
b939a13923 0031016: Projection of an ellipse is a B-spline in some cases
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
2020-07-20 16:57:29 +03:00
emv
41ccce129d 0031662: Modeling Algorithms - Incomplete result of section operation
Integrating test case for the issue as the problem is not reproduced.
2020-07-11 11:35:18 +03:00
emv
529444be92 0031655: Modeling Algorithms - Invalid result of General Fuse operation
IntTools_BeanFaceIntersector: Perform exact intersection range search in case there are few intersection points.
2020-07-11 11:26:31 +03:00
mkrylova
210914d562 0030277: Coding Rules - avoid extremely long class names in STEP packages
Has changed the names of classes that are too long
and fixed names in files where these classes are used
2020-07-11 11:26:30 +03:00
akaftasev
3e85dfc5e5 0026555: Modeling Algorithms - Exception-safe status reporting in BRepOffset_MakeOffset
Set safe exit status for:
Standard_NullObject exception,
Standard_NullObject: BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt,
BRep_Tool: no parameter on edge,
BRepOffset_MakeOffset::TrimEdge no projection
2020-07-11 11:26:29 +03:00
kgv
453103d191 0031637: Documentation - minor clean-up of User Guide for Visualization module
Fixed a couple of misprints, usage of changed classes / methods.
Added references to other supported 3d displays.
Added reference to PBR metallic-roughness material properties in addition to Common.

Cosmetics: removed numerous trailing spaces, double spaces.
Added missing {.cpp} language qualifier to code quotations.
Sentences within paragraphs have been split into multiple lines in source file.
2020-07-10 15:22:15 +03:00
akaftasev
3f54cc41a8 0027909: Modeling Algorithms - Exception during offset computation
Added function ChFi3d::IsTangentFaces for more accurate definition of connection type.
Test cases have been changed according to the current behavior.
2020-07-08 16:03:42 +03:00
ifv
e8e8b273bb 0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added;
Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added
Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added

BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved
ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero
math_PSOParticlesPool.cxx : initialization of array is added
2020-07-08 16:03:10 +03:00
emv
2a6b7c2306 0031604: Wrong result of Boolean Operation Cut
BOPAlgo_WireSplitter::Path - continue building the next loop with the last edge not included into found loop.
2020-07-08 16:03:10 +03:00
kgv
cdc54fb017 0031649: Visualization, TKOpenGL - broken skybox in VR output
OpenGl_ShaderManager::GetBgCubeMapProgram() and OpenGl_BackgroundArray::createCubeMapArray()
have been corrected to draw cube in straightforward way instead of a screen-quad.

Graphic3d_Camera::SetCustomStereoProjection() now recieves decomposed projection + head-to-eye matrices.
Added method Graphic3d_Camera::StereoProjection() returning projection matrix without translation part.
OpenGl_BackgroundArray::Render() now applies stereoscopic projection matrix in case of VR output,
but keeps using mono projection matrix in case of common 3D displays.
2020-07-08 15:53:32 +03:00
kgv
6d1d35e4b8 0031652: Visualization - crash on highlighting HLR Computed presentation displayed with Shaded display mode
PrsMgr_PresentationManager::displayImmediate() now uses proper ZLayer for a shadow presentation
of computed presentation (fixes dynamic highlighting on mouse move).
Graphic3d_CView::SetComputedMode() - added invalidation of bounding box on turning OFF compute mode.
AIS_ViewController::contextLazyMoveTo() now ignores MoveTo() while rotating
view with temporary disabled compute mode (leading to undefined results and crashes).

Graphic3d_Structure::Graphic3d_Structure() - do not copy Graphic3d_TOS_COMPUTED visual
from linked structure, as Graphic3d_CView::SetComputedMode() does not compute such structures.
2020-07-08 15:53:31 +03:00
kgv
72e9e86732 0031650: Visualization - invalid picking of object with local transformation and per-object clipping plane
SelectMgr_SelectingVolumeManager::SetViewClipping() now updates clipping range
using picking ray in world coordinates, as clipping planes are always defined in world space.
2020-07-06 18:31:14 +03:00
mzernova
3e9c1d1e5a 0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
The bounding box has been resized to fit the sensitive rectangle.
Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
The findConnectedObject function has also been changed to correctly set transform persistence.
2020-07-06 18:31:13 +03:00
kgv
8f5760bc16 0031588: Visualization, TKOpenGl - display immediate updates in brackets within frame stats 2020-07-03 17:34:54 +03:00
kgv
6bd5d0a26d 0031647: Samples - do not enable floating point exceptions in MFC samples 2020-07-03 11:03:09 +03:00
emv
bea1065693 0031639: Modeling Algorithms - Offset algorithm incorrectly fills one of the holes
Check if unclassified edge may be added as neutral (invalid in one split, valid in other) by checking the SD faces in which the edge was classified.
2020-07-03 11:03:08 +03:00
kgv
8b742dc132 0031635: Documentation - minor clean-up of User Guide for Foundation Classes module
Changes in Technical Overview:
Corrected reference of "Mesh" as dedicated module, which is actually a Toolkit within "Modeling Algorithms" module.
Reduced references to "Configurable optimized memory manager",
which has not been updated for a long time and no more encouraged to be used as replacement of standard memory allocator of C library.
VRML/STL converters have been moved from section Mesh to Data Exchange.
Visualization chapter has been slightly reworded and reordered;
added references to PBR metallic-roughness material model.
Data Exchange chapter - reworded sentence "The exchanges run smoothly regardless of the quality of external data..."
to "This module handles various problems of interoperability between CAD systems...";
added AP242 to the list of STEP capabilities.

Changes in User Guide for Foundation Classes:
Removed references to "physical quantities" in package Quanity, deprecated since #0028799 and not actually used anywhere.
Adjusted description of string classes to avoid duplicated statements.
Collections section has been refactored to replace obsolete TCollection references by NCollection.
Remove obsolete statement "furthermore *catch()* statement does not allow passing exception object as argument".

Fixed broken nested enumeration in a couple of places.
Fixed usage of inappropriate quote symbols in code snippets.
Fixed references to non-existing classes like ZeroDivide instead of Standard_DivideByZero.
Removed suggested usage of Standard_Failure::Raise() instead of "throw Standard_Failure()" following #0026937.
Code snippets now suggest "catch(const Standard_Failure& )" instead of "catch(Standard_Failure )" (#0026937).
Fixed broken code snippets with lost symbols like <<.

Cosmetics: removed numerous trailing spaces, double spaces.
Added missing {.cpp} language qualifier to code quotations.
Sentences within paragraphs have been split into multiple lines in source file.
2020-07-03 11:03:07 +03:00
kgv
dad7fede39 0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying edge in AIS_Shape
Fixed unexpected calling of PrsMgr_Presentation::Erase() from Graphic3d_Structure::SetVisual().
2020-07-03 11:03:07 +03:00
kgv
7e251883e1 0031643: Visualization - Graphic3d_Camera::Copy() raises exception on copying ZNear < 0.0
Graphic3d_Camera::CopyMappingData() now copies ProjectionType at first.
2020-07-03 11:03:06 +03:00
kgv
d6fbb2aba4 0031632: Draw Harness - handle 3d mouse Raw HID input on Windows
WNT_HIDSpaceMouse - added auxiliary class for processing 3d mouse Raw HID input.
AIS_ViewController::Update3dMouse() - added default processor for 3d mouse input event.
ViewerTest now redirects WM_INPUT to AIS_ViewController::Update3dMouse().
Aspect_VKey enumeration has been extended by 3D view buttons.
WNT_Window::RegisterRawInputDevices() has beend added as a small wrapper
over WinAPI RegisterRawInputDevices() for common HID input devices.

AIS_ViewCube now stores animation duration within AIS_AnimationCamera instead of dedicated duplicating class property.
2020-07-03 11:03:05 +03:00
ifv
79e9ba31d2 0031616: Modeling algorithm - Section between two shells returns wire with gaps (720)
Adaptor3d_TopolTool.cxx, IntTools_TopolTool.cxx:

Anisotropy of BSpline surface along U and V direction is taken in account for calculation of numbers of sample points;

bug31616: test case added
2020-07-01 17:50:56 +03:00
mzernova
832a6f4412 0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing
Fixed problem with misplacing background texture in Ray-Tracing.

An environment background is always drawn using a perspective matrix.
2020-06-26 15:07:40 +03:00
iko
4e8371cb1f 0031370: Documentation - provide information about PBR implementation
PBR documentation (math) has been added as developer guide.
2020-06-25 19:25:52 +03:00
kgv
d22962e4e0 0031621: Draw Harness - handle navigation keys
AIS_ViewController::handleNavigationKeys() - added an interface for processing navigation keys.
ViewerTest_EventManager now maps WASD+Arrows navigation keys.
Axonometric view hotkey A has been replaced by Backspace.
Shaded/Wireframe are now mapped with hotkeys W+Ctrl/S+Ctrl.
Hotkey D (reset view to undefined default state) has been removed.
2020-06-25 19:24:58 +03:00
mzernova
2ff1d580f1 0031412: Visualization - entity behind is returned as topmost at the edges
SelectMgr_RectangularFrustum now handles degenerated triangle as a segment or a point.
Triangle orthogonal to view direction is now handled as a segment.
myViewRayDir field is now defined as normalized vector to avoid confusing math.

For the case when the segment and myViewRayDir are almost parallel,
the segmentSegmentDistance function may set the depth to zero, although this will not
be the correct value, therefore it is better to pass a segment that will not
be parallel to myViewRayDir as an argument to the function.

vpoint command has been extended by arguments -2d and -nosel
for displaying picking mouse position as on-screen point in pixels.
Fixed double-binding-map error in case of displaying point with already used name.

bugs/vis/bug31412: test case added.
2020-06-25 19:09:04 +03:00
kgv
64f128c111 0031622: Samples - update MFC Animation sample with proper frame updates
Animation sample has been updated to:
- use reuse AIS_ViewController for general viewer manipulations;
- update animation using elapsed time;
- do not block camera manipilations;
- get rid of redundant controls.
2020-06-25 19:09:03 +03:00
kgv
08b7a39f75 0030939: Draw Harness, ViewerTest - AIS_ViewCube animation does not work on Linux and macOS
ViewerTest_EventManager::handleViewRedraw() now starts ViewerTest_ContinuousRedrawer
working thread to workaround Tcl event loop invalidation issue.
2020-06-25 19:09:02 +03:00
kgv
ceddb5ca9a 0031620: Samples - update Android JNI sample to use AIS_ViewController
Multi-touch input is now redirected to AIS_ViewController.
GLSurfaceView.RENDERMODE_WHEN_DIRTY is now used by 3D Viewer.
AIS_ViewCube is now displayed instead of trihedron.
2020-06-22 11:53:57 +03:00
kgv
bbe85f2b40 0031619: Samples - update JNI sample to use Android Studio
Project structure and project files have been updated to use Android Studio 4.0, gradle and CMake.
Redundant OcctJni_Window has been replaced by Aspect_NeutralWindow.
SD Card permissions are not dynamically requested for compatibility with Android API level 26+.
2020-06-22 09:19:06 +03:00
mpv
ef779ae0da 0031075: Application Framework - reading STEP file into TDocStd_Document leads to memory leaks
In the TDocStd_Owner keep simple pointer to TDocStd_Document instead of Handle. This causes automatic destruction of the document without explicit call of Close.
In Standard_Type added a static variable theType that initializes theRegistry map earlier. Otherwise exit from Draw interpreter crashes in many test-cases because not-closed transactions are aborted on document handle release from Draw theVariables map.

Corrected method for test OCC159bug due to the fact that Owner does not add a ref count now
Close the document in the end of bugs xde bug22776 otherwise double remove of visualization objects (on library exit and on visualization attributes remove from the document) causes crash on exit from draw
Added a new test bugs caf bug31075
2020-06-19 19:08:46 +03:00
ifv
003c363cf4 0031615: Coding - New warnings after integration fix for 0031552 2020-06-18 20:00:39 +03:00
ifv
dccf867561 0031602: [Regression vs 7.0.0] Modeling Algorithms - Invalid result of boolean operation
IntPatch/IntPatch_ImpImpIntersection_4.gxx : adding tolerance in comparison surface range and surface period
bug31602: test case added
2020-06-18 19:59:49 +03:00
ifv
5d904c3454 0031611: Modeling Algorithms - BRepOffsetAPI_NormalProjection - can't build wire in 720 but it was possible in 691
BRepLib_MakeWire.cxx:
in method BRepLib_BndBoxVertexSelector::Accept() accepting tolerance criterion is changed

BRepLib_MakeWire.hxx:
correctionof class field name

bug31611: test case added
2020-06-18 19:57:46 +03:00
mzernova
9a31c01064 0030922: Visualization - OpenGl_Text wrong local transformation if text has not own attach point
bugs/vis/bug30922: test case added
2020-06-16 14:29:41 +03:00
kgv
32b723d5c6 0031606: Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles
CLang is now checked before MINGW within occt_defs_flags.cmake.
Added "-Wl,-s" linker flag when using CLang for stripping symbols consistently to GCC builds.
2020-06-13 17:17:53 +03:00
jgv
36cc58f85d 0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE.
2020-06-10 20:41:40 +03:00
emv
09543c2d99 0031587: Modeling Data - add BRepTools::RemoveInternals() removing internal sub-shapes from the shape 2020-06-09 20:01:06 +03:00
kgv
a7400019ce 0031599: Visualization - when using AIS_Manipulator, the scene rotates at the same time
AIS_ViewController::HandleViewEvents() - reverted order of handleMoveTo() and handleCameraActions() events.
2020-06-09 19:53:08 +03:00
akaftasev
1fc1a207b0 0031504: Data Exchange - Wrong output of progress indicator when writing to stl
Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
2020-06-09 19:53:08 +03:00
kgv
59ec2ccec9 0031596: Visualization, OpenGl_Context - take GL_OES_texture_float extension into account for arbTexFloat flag 2020-06-09 19:53:07 +03:00
kgv
d4cefcc0da 0031477: Visualization, TKOpenGl - fetch/wrap getBufferSubData() function from WebGL 2.0
Added OpenGl_Context::GetBufferSubData() implementing getBufferSubData() based on capabilities of various APIs.
Added OpenGl_VertexBuffer::GetSubData() similar to OpenGl_VertexBuffer::SubData().
2020-05-29 19:40:57 +03:00
kgv
872f98d9ef 0031583: Visualization, OpenGl_Context - load OpenGL ES 3.0 functions
OpenGl_Context now retrieves complete functions sets of OpenGL ES 3.0, 3.1 and 3.2.
2020-05-28 10:24:35 +03:00
vsv
2ba1172b73 0031573: Visualization - Do not show seam edge for shading presentation with boundary edges in VTK 2020-05-28 10:22:54 +03:00
kgv
e4e3254a35 0031580: Visualization, TKOpenGl - cubemap initialization error on OpenGL ES 2.0
OpenGl_Texture::InitCubeMap() now avoids using sized internal format in case of GLES2.
OpenGl_Sampler::applySamplerParams() now checks OpenGL version before setting GL_TEXTURE_WRAP_R.
2020-05-28 10:21:03 +03:00
mkrylova
04c5a696e4 0029917: Foundation Classes - OSD_FileNode AccessMoment and CreationMoment return the same date on Windows
fAccess in CreationMoment() function for Windows has been modified from TRUE to FALSE
2020-05-28 10:18:56 +03:00
16687 changed files with 479688 additions and 404242 deletions

4
.gitattributes vendored
View File

@@ -1,6 +1,8 @@
.gitattributes eol=lf
.gitignore eol=lf
*.txt eol=lf
*.htm eol=lf
*.html eol=lf
*.h eol=lf
*.c eol=lf
*.inl eol=lf
@@ -29,6 +31,7 @@
*.xib eol=lf
*.plist eol=lf
*.java eol=lf
*.js eol=lf
*.igs eol=lf
*.iges eol=lf
*.stp eol=lf
@@ -44,6 +47,7 @@
FILES eol=lf
PACKAGES eol=lf
EXTERNLIB eol=lf
EXTERNLIB_STATIC eol=lf
UDLIST eol=lf
tests/* eol=lf
tests/*/* eol=lf

6
.gitignore vendored
View File

@@ -12,12 +12,6 @@
win32
win64
# standard names of directories for objects and binaries for samples
bin
obj
Debug
Release
# project files and artifacts
/adm/msvc
/adm/wnt

View File

@@ -1,3 +1,3 @@
[bugtraq]
url = https://tracker.dev.opencascade.org/view.php?id=%BUGID%
logregex = "(\\s)(00|#)\\d+(?!\\w)\n(\\d+)"
[bugtraq]
url = https://tracker.dev.opencascade.org/view.php?id=%BUGID%
logregex = "(\\s)(00|#)\\d+(?!\\w)\n(\\d+)"

View File

@@ -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")
@@ -6,6 +6,26 @@ set (CMAKE_SUPPRESS_REGENERATION TRUE)
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 (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake")
@@ -56,6 +76,20 @@ set_property (GLOBAL PROPERTY OCC_VERSION_MAJOR ${OCC_VERSION_MAJOR})
set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR})
set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE})
# set soversion variable determining compatibility version on platforms with symlinks
# 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance
if (NOT BUILD_SOVERSION_NUMBERS)
set (BUILD_SOVERSION_NUMBERS "0" CACHE STRING "${BUILD_SOVERSION_NUMBERS_DESCR}" FORCE)
SET_PROPERTY(CACHE BUILD_SOVERSION_NUMBERS PROPERTY STRINGS 0 1 2 3)
# update default state of soversion on different platforms
if (WIN32 OR ANDROID OR EMSCRIPTEN)
set (BUILD_SOVERSION_NUMBERS 0)
else()
set (BUILD_SOVERSION_NUMBERS 2)
endif()
endif()
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
# Regeneration of OCCT resource files
@@ -91,6 +125,16 @@ if (NOT DEFINED BUILD_RELEASE_DISABLE_EXCEPTIONS)
set (BUILD_RELEASE_DISABLE_EXCEPTIONS ON CACHE BOOL "${BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR}")
endif()
if (MSVC)
set (BUILD_FORCE_RelWithDebInfo OFF CACHE BOOL "${BUILD_FORCE_RelWithDebInfo_DESCR}")
else()
set (BUILD_FORCE_RelWithDebInfo OFF)
endif()
if (BUILD_FORCE_RelWithDebInfo)
set (CMAKE_CONFIGURATION_TYPES Release Debug CACHE INTERNAL "" FORCE)
endif()
# option to enable or disable use of precompiled headers
if (NOT DEFINED BUILD_USE_PCH)
set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}")
@@ -101,7 +145,7 @@ if (BUILD_USE_PCH)
# Load Cotire tool for accelerating build procedure
include(cotire)
# Set Cotire to ignore lxx, pxx, gxx
# Set Cotire to ignore lxx, pxx, gxx
set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "lxx;pxx;gxx" CACHE STRING "Set Cotire to ignore OCCT specific files that can be #included" FORCE)
# Set priority for inclusion of system headers in PCH to reduce problems
@@ -165,7 +209,7 @@ if (NOT DEFINED CMAKE_INSTALL_PREFIX_PREV)
elseif (NOT "${CMAKE_INSTALL_PREFIX_PREV}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
# CMAKE_INSTALL_PREFIX has been changed at previous step
set (CMAKE_INSTALL_PREFIX_PREV "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
# INSTALL_DIR is required to be updated
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
endif()
@@ -177,10 +221,10 @@ elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
# INSTALL_DIR has been changed at previous step
set (INSTALL_DIR_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
# sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
# sync CMAKE_INSTALL_PREFIX with INSTALL_DIR
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
# set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
# set CMAKE_INSTALL_PREFIX_PREV to avoid the reset of structure of the install folder
set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
endif()
@@ -219,7 +263,7 @@ if (NOT DEFINED INSTALL_DIR_BIN)
endif()
endif()
# define folder contaning all shell/batch scripts
# define folder containing all shell/batch scripts
if (NOT DEFINED INSTALL_DIR_SCRIPT)
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
set (INSTALL_DIR_SCRIPT "${INSTALL_DIR_BIN}" CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
@@ -311,7 +355,7 @@ if (NOT DEFINED INSTALL_DIR_DOC)
endif()
endif()
# define folder contaning CMake configuration files
# define folder containing CMake configuration files
if (NOT DEFINED INSTALL_DIR_CMAKE)
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
if (INSTALL_DIR_WITH_VERSION)
@@ -364,12 +408,28 @@ if (MSVC)
endif()
# whether use optional 3rdparty or not
if (APPLE)
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
set (USE_TK ON CACHE BOOL "${USE_TK_DESCR}")
set (USE_FREETYPE ON CACHE BOOL "${USE_FREETYPE_DESCR}")
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}")
set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}")
set (USE_DRACO OFF CACHE BOOL "${USE_DRACO_DESCR}")
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN)
# no Xlib
elseif (APPLE)
set (USE_XLIB OFF CACHE BOOL "${USE_XLIB_DESCR}")
else()
set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
endif()
if (WIN32)
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
else()
set (USE_D3D OFF)
endif()
# Enable/Disable the floating point exceptions (FPE) during runtime.
@@ -383,6 +443,15 @@ else()
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
endif()
# OpenGL
if (ANDROID OR IOS OR EMSCRIPTEN OR "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_OPENGL OFF)
set (USE_GLES2 ON)
else()
set (USE_OPENGL ON CACHE BOOL "${USE_OPENGL_DESCR}")
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
# include the patched or original list of modules
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
# list <OCCT_MODULES> will contain all modules
@@ -406,7 +475,7 @@ if (NOT DEFINED BUILD_DOC_Overview)
set (DO_ONLY_CHECK_FOR_DOXYGEN ON)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
set (DO_ONLY_CHECK_FOR_DOXYGEN OFF)
if (CAN_DOXYGEN_BE_USED)
message (STATUS "Info. Overview building is turned on")
endif()
@@ -414,10 +483,6 @@ if (NOT DEFINED BUILD_DOC_Overview)
set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
endif()
if (NOT USE_D3D)
list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
endif()
# accumulate used toolkits (first level) in BUILD_TOOLKITS variable
list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
@@ -427,12 +492,6 @@ foreach (OCCT_MODULE ${OCCT_MODULES})
endif()
endforeach()
# DRAWEXE excluded when library build is static
if (NOT BUILD_SHARED_LIBS)
list (REMOVE_ITEM BUILD_TOOLKITS DRAWEXE)
message (STATUS "Info: DRAWEXE is not included due to ${BUILD_LIBRARY_TYPE} build library type")
endif()
# accumulate all used toolkits
list (REMOVE_DUPLICATES BUILD_TOOLKITS)
set (RAW_BUILD_TOOLKITS)
@@ -484,35 +543,70 @@ endif()
# search for CSF variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGE)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclTkLibs CAN_USE_TK)
OCCT_IS_PRODUCT_REQUIRED (CSF_XwLibs CAN_USE_XLIB)
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE CAN_USE_FREETYPE)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_OPENGL)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlesLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
# define CSF variable
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
# Tcl (mandatory for Draw Harness)
if (USE_TCL)
message (STATUS "Info: TCL is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
message (STATUS "Info: TK is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TCL")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
OCCT_CHECK_AND_UNSET ("INSTALL_TCL")
endif()
# Tk (optional for Draw Harness)
if (CAN_USE_TK)
if (USE_TK)
message (STATUS "Info: TK is used by OCCT")
add_definitions (-DHAVE_TK)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_TK")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
OCCT_CHECK_AND_UNSET ("INSTALL_TK")
endif()
if (USE_FREETYPE)
message (STATUS "Info: Freetype is used by OCCT")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
# Xlib
if (CAN_USE_XLIB)
if (USE_XLIB)
message (STATUS "Info: Xlib is used by OCCT")
add_definitions (-DHAVE_XLIB)
if (APPLE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
endif()
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_XLIB")
endif()
# FreeType
if (CAN_USE_FREETYPE)
if (USE_FREETYPE)
message (STATUS "Info: FreeType is used by OCCT")
add_definitions (-DHAVE_FREETYPE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_FREETYPE")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
OCCT_CHECK_AND_UNSET ("INSTALL_FREETYPE")
endif()
@@ -523,7 +617,7 @@ if (USE_VTK)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
if (NOT CAN_USE_VTK EQUAL -1)
message (STATUS "Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled")
@@ -532,25 +626,8 @@ else()
endif()
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
endif()
# GLX
if (USE_GLX)
add_definitions (-DMACOSX_USE_GLX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
endif()
# FREEIMAGE
if (CAN_USE_FREEIMAGE)
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
if (USE_FREEIMAGE)
add_definitions (-DHAVE_FREEIMAGE)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimage")
@@ -565,13 +642,29 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
endif()
# OpenVR
# search for CSF_OpenVR variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenVR CAN_USE_OPENVR)
if (CAN_USE_OPENVR)
if (USE_OPENVR)
add_definitions (-DHAVE_OPENVR)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/openvr")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_OPENVR")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENVR")
OCCT_CHECK_AND_UNSET ("INSTALL_OPENVR")
endif()
# FFmpeg
# search for CSF_FFmpeg variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_FFmpeg CAN_USE_FFMPEG)
if (CAN_USE_FFMPEG)
set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}")
if (USE_FFMPEG)
add_definitions (-DHAVE_FFMPEG)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/ffmpeg")
@@ -586,23 +679,33 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
endif()
# OpenGL
if (CAN_USE_OPENGL)
if (USE_OPENGL)
add_definitions (-DHAVE_OPENGL_EXT)
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_OPENGL")
endif()
# OpenGL ES 2.0
if (CAN_USE_GLES2)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_GLES2 ON)
else()
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
if (USE_GLES2)
add_definitions (-DHAVE_GLES2)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
add_definitions (-DHAVE_GLES2_EXT)
if (NOT IOS)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
endif()
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGles)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlesTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_GLES2")
@@ -613,10 +716,19 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
endif()
# TBB
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
if (USE_TBB)
add_definitions (-DHAVE_TBB)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
@@ -637,8 +749,6 @@ endif()
# search for CSF_RapidJSON variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_RapidJSON CAN_USE_RAPIDJSON)
if (CAN_USE_RAPIDJSON)
set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}")
if (USE_RAPIDJSON)
add_definitions (-DHAVE_RAPIDJSON)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/rapidjson")
@@ -653,10 +763,26 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
endif()
# Draco library
# search for CSF_Draco variable in EXTERNLIB of each being used toolkit
OCCT_IS_PRODUCT_REQUIRED (CSF_Draco CAN_USE_DRACO)
if (CAN_USE_DRACO)
if (USE_DRACO)
add_definitions (-DHAVE_DRACO)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/draco")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO")
OCCT_CHECK_AND_UNSET ("INSTALL_DRACO")
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_DRACO")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO")
OCCT_CHECK_AND_UNSET ("INSTALL_DRACO")
endif()
# EIGEN
if (CAN_USE_EIGEN)
set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
if (USE_EIGEN)
add_definitions (-DHAVE_EIGEN)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/eigen")
@@ -694,14 +820,20 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
# bison
# ExpToCasExe
if (EMSCRIPTEN)
list (REMOVE_ITEM BUILD_TOOLKITS TKExpress)
list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
endif()
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
endif()
# flex
# flex
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
else()
@@ -780,7 +912,7 @@ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
if (WIN32)
if (WIN32)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
@@ -849,9 +981,11 @@ if (INSTALL_SAMPLES)
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code" "${INSTALL_DIR_SAMPLES}/OCCTOverview")
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/OCCTOverview" RENAME "env.${SCRIPT_EXT}")
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/Tutorial" RENAME "env.${SCRIPT_EXT}")
endif()
@@ -930,6 +1064,9 @@ if (WIN32)
OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
# install env script
install (FILES "${CMAKE_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}")
# copy build.bat and install.bat scripts to CMake binary folder
OCCT_COPY_FILE_OR_DIR ("adm/templates/build.bat" "${CMAKE_BINARY_DIR}")
OCCT_COPY_FILE_OR_DIR ("adm/templates/install.bat" "${CMAKE_BINARY_DIR}")
else()
set (SUB_ENV_NAME "env.${SCRIPT_EXT}")
set (SUB_ENV_BUILD_NAME "env.install.${SCRIPT_EXT}")
@@ -962,6 +1099,15 @@ if (BUILD_SAMPLES_QT)
OCCT_INSTALL_FILE_OR_DIR ("samples/${RESOURCE}" "${INSTALL_DIR_RESOURCE}/samples")
#message("Copy Sample resources: samples/${RESOURCE} into ${INSTALL_DIR_RESOURCE}/samples")
endforeach()
## Copy sources of OCCTOverview for using in the sample
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
endif()
@@ -1020,14 +1166,8 @@ if (BUILD_SAMPLES_MFC)
add_subdirectory(samples/mfc/standard/mfcsample)
add_subdirectory(samples/mfc/standard/01_Geometry)
add_subdirectory(samples/mfc/standard/02_Modeling)
add_subdirectory(samples/mfc/standard/03_Viewer2d)
add_subdirectory(samples/mfc/standard/04_Viewer3d)
add_subdirectory(samples/mfc/standard/05_ImportExport)
add_subdirectory(samples/mfc/standard/06_Ocaf)
add_subdirectory(samples/mfc/standard/07_Triangulation)
add_subdirectory(samples/mfc/standard/08_HLR)
add_subdirectory(samples/mfc/standard/09_Animation)
add_subdirectory(samples/mfc/standard/10_Convert)
add_subdirectory(samples/mfc/standard/03_ImportExport)
add_subdirectory(samples/mfc/standard/04_HLR)
message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added")
endif()
@@ -1105,6 +1245,9 @@ foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS})
endforeach()
list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED)
list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
# these macros are defined for specific tookits, not globalwise
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_OPENGL)
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_GLES2)
# export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
@@ -1122,7 +1265,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
endforeach()
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
install (CODE "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)")
foreach (OCCT_MODULE ${OCCT_MODULES})
if (BUILD_MODULE_${OCCT_MODULE})
@@ -1158,7 +1301,7 @@ if (WIN32)
set (SET_OpenCASCADE_WITH_D3D "set (OpenCASCADE_WITH_D3D ${USE_D3D})")
endif()
if (APPLE)
set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX ${USE_GLX})")
set (SET_OpenCASCADE_WITH_GLX "set (OpenCASCADE_WITH_GLX ${USE_XLIB})")
endif()
# Configure and install cmake config file
@@ -1179,7 +1322,7 @@ foreach (OCCT_MODULE ${OCCT_MODULES_ENABLED})
install(EXPORT OpenCASCADE${OCCT_MODULE}Targets DESTINATION "${INSTALL_DIR_CMAKE}")
endforeach()
# Update generated OpenCASCADETargets-*.cmake files
# Update generated OpenCASCADETargets-*.cmake files
# to have correct paths to libraries depending on the configuration
OCCT_UPDATE_TARGET_FILE ()

View File

@@ -1,18 +1,18 @@
wnt WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
lin WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
wnt cmplrs_cxx f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx Aspect (wnt cmplrs_cxx b) -D_AFXDLL
wnt cmplrs_cxx (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL
wnt cmplrs_c f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50
lin cmplrs_cxx f -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_cxx b -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_c f -D_GNU_SOURCE=1 -fexceptions
lin cmplrs_c b -D_GNU_SOURCE=1 -fexceptions
wnt WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
lin WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks)
wnt cmplrs_cxx f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_cxx Aspect (wnt cmplrs_cxx b) -D_AFXDLL
wnt cmplrs_cxx (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL
wnt cmplrs_c f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50
lin cmplrs_cxx f -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_cxx b -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL
lin cmplrs_c f -D_GNU_SOURCE=1 -fexceptions
lin cmplrs_c b -D_GNU_SOURCE=1 -fexceptions

View File

@@ -1,7 +1,7 @@
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
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 TKExpress ExpToCasExe
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE

View File

@@ -1,12 +1,12 @@
DrawResources
StdResource
SHMessage
Textures
Shaders
XRResources
XSMessage
XSTEPResource
XmlOcafResource
UnitsAPI/Units.dat
TObj/TObj.msg
BOPAlgo/BOPAlgo.msg
DrawResources
StdResource
SHMessage
Textures
Shaders
XRResources
XSMessage
XSTEPResource
XmlOcafResource
UnitsAPI/Units.dat
TObj/TObj.msg
BOPAlgo/BOPAlgo.msg

View File

@@ -1 +1 @@
qt AndroidQt FuncDemo IESample Tutorial
qt AndroidQt FuncDemo IESample Tutorial OCCTOverview

View File

@@ -1,2 +1,3 @@
qt/Common/res/
qt/Tutorial/res/
qt/Common/res/
qt/Tutorial/res/
qt/OCCTOverview/res/

View File

@@ -1,4 +1,4 @@
TModelingData TKShapeView
TVisualization TKView TKVInspector
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
TModelingData TKShapeView TKMessageModel TKMessageView
TVisualization TKView TKVInspector
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
TTool TKTInspector TKToolsDraw TInspectorEXE

View File

@@ -11,7 +11,6 @@ n Expr
n ExprIntrp
n FSD
n GeomAbs
n MMgt
n Message
n OSD
n PLib
@@ -198,7 +197,6 @@ t TKPrim
t TKShHealing
t TKTopAlgo
t TKXMesh
n InterfaceGraphic
n AIS
n Aspect
n DsgPrs
@@ -208,6 +206,7 @@ n Image
n Media
n MeshVS
n OpenGl
n OpenGles
n D3DHost
n Prs3d
n PrsMgr
@@ -217,6 +216,7 @@ n SelectMgr
n StdPrs
n StdSelect
n V3d
n Wasm
n WNT
n Xw
n Cocoa
@@ -225,6 +225,7 @@ r Shaders
r XRResources
t TKMeshVS
t TKOpenGl
t TKOpenGles
t TKD3DHost
t TKService
t TKV3d
@@ -327,6 +328,7 @@ n RWStepDimTol
n RWStepElement
n RWStepFEA
n RWStepGeom
n RWStepKinematics
n RWStepRepr
n RWStepShape
n RWStepVisual
@@ -346,6 +348,7 @@ n StepDimTol
n StepElement
n StepFEA
n StepGeom
n StepKinematics
n StepRepr
n StepSelect
n StepShape
@@ -381,6 +384,8 @@ t TKSTEPBase
t TKSTL
t TKVRML
t TKXCAF
t TKXDE
t TKXDECascade
t TKXDEIGES
t TKXDESTEP
t TKXSBase
@@ -391,6 +396,9 @@ n DBRep
n DDF
n DDataStd
n DDocStd
n DE
n DEXCAFCascade
n DEBRepCascade
n DNaming
n DPrsStd
n Draw
@@ -403,6 +411,9 @@ n HLRTest
n MeshTest
n SWDRAW
n TObjDRAW
n OpenGlTest
n OpenGlesTest
n D3DHostTest
n ViewerTest
n XDEDRAW
n XSDRAW
@@ -414,6 +425,9 @@ t TKDCAF
t TKDraw
t TKTObjDRAW
t TKTopTest
t TKOpenGlTest
t TKOpenGlesTest
t TKD3DHostTest
t TKViewerTest
t TKXDEDRAW
t TKXSDRAW
@@ -445,6 +459,7 @@ t TKRWMesh
n RWGltf
n RWMesh
n RWObj
n RWPly
n DFBrowser
n DFBrowserPane
n DFBrowserPaneXDE
@@ -465,3 +480,6 @@ n TreeModel
n View
n ViewControl
n VInspector
n Express
t TKExpress
x ExpToCasExe

View File

@@ -1,357 +1,365 @@
##
if(3RDPARTY_MACRO_ALREADY_INCLUDED)
return()
endif()
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME_DEBUG_SUFFIX)
if (NOT DEFINED INSTALL_${PRODUCT_NAME} AND BUILD_SHARED_LIBS)
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify product folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
endif()
else()
#set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
endif()
separate_arguments (${LIBRARY_CSF_NAME})
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME "${LIBRARY_NAME}")
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR PATH "the path to ${PRODUCT_NAME}")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
# set 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to ${HEADER_NAME}" FORCE)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
PATH_SUFFIXES include inc
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATH_SUFFIXES include inc
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
# if (BUILD_SHARED_LIBS)
# library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
if (WIN32)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} win${COMPILER_BITNESS}/${COMPILER}/lib)
endif()
if (ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if ("${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} "${${PRODUCT_NAME}_PATH_SUFFIXES}" SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin
NO_DEFAULT_PATH)
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} bin SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
endif()
endif()
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "")
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${3RDPARTY_${PRODUCT_NAME}_DLL_DIRS}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS}")
endif()
endforeach()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "")
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} REALPATH)
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} NAME)
if (SINGLE_GENERATOR)
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
else()
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${FREEIMLIB}.3)
endif()
endif()
endif()
else()
# the library directory for using by the executable
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
else()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
endif()
endforeach()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
# endif()
endforeach()
endmacro()
macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
if (3RDPARTY_${LIBNAME}_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DIR}")
# include dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
if (BUILD_SHARED_LIBS)
# library dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
# shared library dir
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endif()
if (BUILD_SHARED_LIBS)
# check library
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
# check shared library
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endmacro()
##
if(3RDPARTY_MACRO_ALREADY_INCLUDED)
return()
endif()
set(3RDPARTY_MACRO_ALREADY_INCLUDED 1)
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME_DEBUG_SUFFIX)
if (NOT DEFINED INSTALL_${PRODUCT_NAME} AND BUILD_SHARED_LIBS)
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "${INSTALL_${PRODUCT_NAME}_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify product folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}")
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
if (${PRODUCT_NAME}_DIR_NAME)
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
endif()
else()
#set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE PATH "the path of ${HEADER_NAME}")
endif()
separate_arguments (${LIBRARY_CSF_NAME})
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME "${LIBRARY_NAME}")
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR PATH "the path to ${PRODUCT_NAME}")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} FILEPATH "the path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_${PRODUCT_NAME}_DIR 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"")
endif()
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
# set 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to ${HEADER_NAME}" FORCE)
if (3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}")
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATHS ${3RDPARTY_${PRODUCT_NAME}_DIR}
PATH_SUFFIXES include inc headers
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR NAMES ${HEADER_NAME}
PATH_SUFFIXES include inc headers
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The path to ${HEADER_NAME}" FORCE)
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
# if (BUILD_SHARED_LIBS)
# library
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
if (WIN32)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} win${COMPILER_BITNESS}/${COMPILER}/lib)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/win${COMPILER_BITNESS})
endif()
if (ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
if(UNIX AND NOT APPLE AND NOT ANDROID)
set (${PRODUCT_NAME}_PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES} lib/linux${COMPILER_BITNESS})
endif()
# set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if ("${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} "${${PRODUCT_NAME}_PATH_SUFFIXES}" SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${${PRODUCT_NAME}_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX})
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "The path to ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_${PRODUCT_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_DLL
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND" CACHE FILEPATH "The path to ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
if ((3RDPARTY_${PRODUCT_NAME}_DIR AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DIR}") OR (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}"))
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME}}" "${3RDPARTY_${PRODUCT_NAME}_DIR}"
PATH_SUFFIXES bin win${COMPILER_BITNESS}/${COMPILER}/bin bin/win${COMPILER_BITNESS}
NO_DEFAULT_PATH)
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}-NOTFOUND")
# find directory recursive
FIND_SUBDIRECTORY (${3RDPARTY_${PRODUCT_NAME}_DIR} bin SUBDIR_NAME)
if (NOT "${SUBDIR_NAME}" STREQUAL "")
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME_SUFFIX}
PATHS "${SUBDIR_NAME}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
endif()
endif()
else()
find_library (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} NAMES ${LIBRARY_NAME} PATH_SUFFIXES bin)
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}")
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" PATH)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}" CACHE PATH "The directory containing ${PRODUCT_NAME} library \"${LIBRARY_NAME}\"" FORCE)
else()
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} "" CACHE PATH "The directory containing ${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
set (3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX} "" CACHE FILEPATH "${PRODUCT_NAME} shared library \"${LIBRARY_NAME}\"" FORCE)
endif()
endif()
if (3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX} OR EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX})
endif()
endif()
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "")
endif()
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${3RDPARTY_${PRODUCT_NAME}_DLL_DIRS}")
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}")
else()
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS}")
endif()
endforeach()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "")
if (INSTALL_${PRODUCT_NAME})
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} REALPATH)
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX}} NAME)
if (SINGLE_GENERATOR)
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR_LIB}" RENAME ${FREEIMLIB}.3)
else()
install (FILES "${ABS_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${FREEIMLIB}.3)
install (FILES "${ABS_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${FREEIMLIB}.3)
endif()
endif()
endif()
else()
# the library directory for using by the executable
foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}})
string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}")
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
else()
set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}")
endif()
endforeach()
if (WIN32)
set (USED_3RDPARTY_${PRODUCT_NAME}_DIR ${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}})
endif()
endif()
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX})
# endif()
endforeach()
endmacro()
macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME)
if (3RDPARTY_${LIBNAME}_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DIR}")
# include dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
endif()
if (BUILD_SHARED_LIBS)
# library dir
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
endif()
# shared library dir
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endif()
if (BUILD_SHARED_LIBS)
# check library
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
endif()
# check shared library
if (WIN32)
set (DOES_PATH_CONTAIN FALSE)
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
endif()
endif()
if (NOT DOES_PATH_CONTAIN)
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
endif()
endif()
endif()
endmacro()

View File

@@ -1,20 +1,25 @@
# bison
# execute FindBISON script by "find_package (Bison)" is required to define BISON_TARGET macro
if (NOT DEFINED 3RDPARTY_BISON_EXECUTABLE)
set (3RDPARTY_BISON_EXECUTABLE "" CACHE FILEPATH "The path to the bison command")
endif()
# BISON_EXECUTABLE is required by BISON_TARGET macro and should be defined
set (BISON_EXECUTABLE "${3RDPARTY_BISON_EXECUTABLE}" CACHE FILEPATH "path to the bison executable" FORCE)
find_package (BISON)
if (BISON_FOUND)
set (3RDPARTY_BISON_EXECUTABLE "${BISON_EXECUTABLE}" CACHE FILEPATH "The Path to the bison command" FORCE)
endif()
if (NOT 3RDPARTY_BISON_EXECUTABLE OR NOT EXISTS "${3RDPARTY_BISON_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_BISON_EXECUTABLE)
endif()
# bison
# execute FindBISON script by "find_package (Bison)" is required to define BISON_TARGET macro
# delete obsolete 3RDPARTY_BISON_EXECUTABLE cache variable (not used anymore)
unset (3RDPARTY_BISON_EXECUTABLE CACHE)
# delete BISON_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
# without reasonable diagnostic
if (NOT BISON_EXECUTABLE OR NOT EXISTS "${BISON_EXECUTABLE}")
unset (BISON_EXECUTABLE CACHE)
endif()
# Add paths to 3rdparty subfolders containing name "bison" to CMAKE_PROGRAM_PATH variable to make
# these paths searhed by find_package
if (3RDPARTY_DIR)
file (GLOB BISON_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*bison*/")
foreach (candidate_path ${BISON_PATHS})
if (IS_DIRECTORY ${candidate_path})
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
endif()
endforeach()
endif()
find_package (BISON 3.7.4)

File diff suppressed because it is too large Load Diff

View File

@@ -1,62 +1,62 @@
# doxygen
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
if (DO_ONLY_CHECK_FOR_DOXYGEN)
message (STATUS "Info. Detecting doxygen")
set (DOXYGEN_SKIP_DOT ON)
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
set (CAN_DOXYGEN_BE_USED OFF)
if (DOXYGEN_EXECUTABLE)
set (CAN_DOXYGEN_BE_USED ON)
message (STATUS "Info. Doxygen is found and can be used")
endif()
else()
set (3RDPARTY_DOT_EXECUTABLE_DESCR "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR "The path to the doxygen command")
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
set (3RDPARTY_SKIP_DOT_EXECUTABLE ON CACHE BOOL "Skip trying to find Dot")
endif()
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
endif()
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
endif()
endif()
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (DOXYGEN_SKIP_DOT)
OCCT_CHECK_AND_UNSET (DOXYGEN_EXECUTABLE)
OCCT_CHECK_AND_UNSET (DOXYGEN_DOT_EXECUTABLE)
# doxygen
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
if (DO_ONLY_CHECK_FOR_DOXYGEN)
message (STATUS "Info. Detecting doxygen")
set (DOXYGEN_SKIP_DOT ON)
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
set (CAN_DOXYGEN_BE_USED OFF)
if (DOXYGEN_EXECUTABLE)
set (CAN_DOXYGEN_BE_USED ON)
message (STATUS "Info. Doxygen is found and can be used")
endif()
else()
set (3RDPARTY_DOT_EXECUTABLE_DESCR "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR "The path to the doxygen command")
if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
set (3RDPARTY_SKIP_DOT_EXECUTABLE ON CACHE BOOL "Skip trying to find Dot")
endif()
if (3RDPARTY_SKIP_DOT_EXECUTABLE)
OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
endif()
endif()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
endif()
if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
endif()
endif()
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (DOXYGEN_SKIP_DOT)
OCCT_CHECK_AND_UNSET (DOXYGEN_EXECUTABLE)
OCCT_CHECK_AND_UNSET (DOXYGEN_DOT_EXECUTABLE)

96
adm/cmake/draco.cmake Normal file
View File

@@ -0,0 +1,96 @@
# Draco - a library for a lossy vertex data compression, used as extension to glTF format.
# https://github.com/google/draco
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)
set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR)
set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco")
endif()
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY OR NOT 3RDPARTY_DRACO_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR)
set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library")
endif()
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME)
if (DRACO_DIR_NAME)
set (3RDPARTY_DRACO_DIR "${3RDPARTY_DIR}/${DRACO_DIR_NAME}" CACHE PATH "The directory containing Draco" FORCE)
endif()
endif()
endif()
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
set (DRACO_INCLUDE_PATH "${3RDPARTY_DRACO_DIR}/include")
set (DRACO_LIBRARY_PATH "${3RDPARTY_DRACO_DIR}/lib")
endif()
if (NOT 3RDPARTY_DRACO_INCLUDE_DIR)
if (DRACO_INCLUDE_PATH AND EXISTS "${DRACO_INCLUDE_PATH}")
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 (DRACO_LIBRARY_PATH AND EXISTS "${DRACO_LIBRARY_PATH}")
set (3RDPARTY_DRACO_LIBRARY_DIR "${DRACO_LIBRARY_PATH}" CACHE FILEPATH "The directory containing DRACO library" FORCE)
endif()
endif()
if (3RDPARTY_DRACO_INCLUDE_DIR AND EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_DRACO_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DRACO_INCLUDE_DIR)
endif()
if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}")
if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE)
find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco}
PATHS "${3RDPARTY_DRACO_LIBRARY_DIR}"
PATH_SUFFIXES lib
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
if (3RDPARTY_DRACO_LIBRARY AND EXISTS "${3RDPARTY_DRACO_LIBRARY}")
get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY}" PATH)
set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE)
endif()
endif()
endif()
if (3RDPARTY_DRACO_LIBRARY_DIR AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_DRACO_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_DRACO_LIBRARY_DIR)
endif()
if (INSTALL_DRACO)
get_filename_component(3RDPARTY_DRACO_LIBRARY_REALPATH ${3RDPARTY_DRACO_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()

View File

@@ -1,3 +1,3 @@
# EGL
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlLibs" "")
# EGL
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlesLibs" "")

View File

@@ -1,87 +1,87 @@
# eigen
if (NOT DEFINED INSTALL_EIGEN)
set (INSTALL_EIGEN OFF CACHE BOOL "${INSTALL_EIGEN_DESCR}")
endif()
# eigen directory
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
endif()
# search for eigen in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_EIGEN_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" Eigen EIGEN_DIR_NAME)
if (EIGEN_DIR_NAME)
set (3RDPARTY_EIGEN_DIR "${3RDPARTY_DIR}/${EIGEN_DIR_NAME}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_EIGEN_INCLUDE_DIR)
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the EIGEN")
endif()
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
set (HEADER_NAMES Eigen)
set (3RDPARTY_EIGEN_INCLUDE_DIR "3RDPARTY_EIGEN_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to Eigen header file" FORCE)
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_EIGEN_DIR}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) EIGEN search
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# use 3RDPARTY_EIGEN_DIR if it is specified for eigen search
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (CACHED_EIGEN_DIR $ENV{Eigen3_DIR})
set (ENV{Eigen3_DIR} "${3RDPARTY_EIGEN_DIR}")
endif()
find_package(Eigen3 QUIET)
# restore ENV{Eigen3_DIR}
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (ENV{Eigen3_DIR} ${CACHED_EIGEN_DIR})
endif()
if (${EIGEN3_FOUND})
set (3RDPARTY_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "the path to Eigen header file" FORCE)
set (3RDPARTY_EIGEN_DIR "${EIGEN3_ROOT_DIR}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# Install header files
if (INSTALL_EIGEN)
file(GLOB EIGEN_SUBDIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}/*")
foreach(SUBDIR ${EIGEN_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE PATH "the path to Eigen header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(Eigen3_DIR)
# eigen
if (NOT DEFINED INSTALL_EIGEN)
set (INSTALL_EIGEN OFF CACHE BOOL "${INSTALL_EIGEN_DESCR}")
endif()
# eigen directory
if (NOT DEFINED 3RDPARTY_EIGEN_DIR)
set (3RDPARTY_EIGEN_DIR "" CACHE PATH "The directory containing eigen")
endif()
# search for eigen in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_EIGEN_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" Eigen EIGEN_DIR_NAME)
if (EIGEN_DIR_NAME)
set (3RDPARTY_EIGEN_DIR "${3RDPARTY_DIR}/${EIGEN_DIR_NAME}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_EIGEN_INCLUDE_DIR)
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the EIGEN")
endif()
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
set (HEADER_NAMES Eigen)
set (3RDPARTY_EIGEN_INCLUDE_DIR "3RDPARTY_EIGEN_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to Eigen header file" FORCE)
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_EIGEN_DIR}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_EIGEN_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include eigen3 include/eigen3
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) EIGEN search
if (NOT 3RDPARTY_EIGEN_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# use 3RDPARTY_EIGEN_DIR if it is specified for eigen search
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (CACHED_EIGEN_DIR $ENV{Eigen3_DIR})
set (ENV{Eigen3_DIR} "${3RDPARTY_EIGEN_DIR}")
endif()
find_package(Eigen3 QUIET)
# restore ENV{Eigen3_DIR}
if (3RDPARTY_EIGEN_DIR AND EXISTS "${3RDPARTY_EIGEN_DIR}")
set (ENV{Eigen3_DIR} ${CACHED_EIGEN_DIR})
endif()
if (${EIGEN3_FOUND})
set (3RDPARTY_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "the path to Eigen header file" FORCE)
set (3RDPARTY_EIGEN_DIR "${EIGEN3_ROOT_DIR}" CACHE PATH "The directory containing eigen" FORCE)
endif()
endif()
endif()
if (3RDPARTY_EIGEN_INCLUDE_DIR AND EXISTS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}")
# Install header files
if (INSTALL_EIGEN)
file(GLOB EIGEN_SUBDIRS "${3RDPARTY_EIGEN_INCLUDE_DIR}/*")
foreach(SUBDIR ${EIGEN_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_EIGEN_INCLUDE_DIR)
set (3RDPARTY_EIGEN_INCLUDE_DIR "" CACHE PATH "the path to Eigen header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(Eigen3_DIR)

View File

@@ -1,242 +1,242 @@
# FFmpeg
if (NOT DEFINED INSTALL_FFMPEG)
set (INSTALL_FFMPEG OFF CACHE BOOL "${INSTALL_FFMPEG_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DIR)
set (3RDPARTY_FFMPEG_DIR "" CACHE PATH "The directory containing FFmpeg")
endif()
# include occt macros. compiler_bitness, os_with_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify FFMPEG folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_FFMPEG_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FFMPEG FFMPEG_DIR_NAME)
if (FFMPEG_DIR_NAME)
set (3RDPARTY_FFMPEG_DIR "${3RDPARTY_DIR}/${FFMPEG_DIR_NAME}" CACHE PATH "The directory containing FFmpeg" FORCE)
endif()
endif()
else()
endif()
# define required FFMPEG variables
if (NOT DEFINED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
endif()
separate_arguments (CSF_FFmpeg)
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg framework (${LIBRARY_NAME})" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg framework (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "" CACHE PATH "The directory containing FFmpeg libraries")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg shared libraries (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared libraries (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR)
set (3RDPARTY_FFMPEG_DLL_DIR "" CACHE PATH "The directory containing FFmpeg shared libraries")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_INCLUDE_DIR PATH "the path to FFmpeg")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to FFmpeg framework (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg libraries" FORCE)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg library (${LIBRARY_NAME})")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} FILEPATH "the path to FFmpeg shared library (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared libraries" FORCE)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})")
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_FFMPEG_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
set (HEADER_NAMES avutil.h libavutil/avutil.h)
# set 3RDPARTY_FFMPEG_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_INCLUDE_DIR
set (3RDPARTY_FFMPEG_INCLUDE_DIR "3RDPARTY_FFMPEG_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_FFMPEG_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FFMPEG_INCLUDE_DIR AND EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE FILEPATH "the path to avutil.h" FORCE)
endif()
# libraries
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (FFMPEG_PATH_SUFFIXES lib)
if (ANDROID)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} libs/${ANDROID_ABI})
elseif(APPLE)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} Frameworks)
endif()
# set 3RDPARTY_FFMPEG_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_LIBRARY
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_FFMPEG_DIR}"
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg shared library (${LIBRARY_NAME})" FORCE)
# find FFmpeg shared library
file (GLOB 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DIR}/bin/${LIBRARY_NAME}[-][0-9]*")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CACHE FILEPATH "FFmpeg shared library (${LIBRARY_NAME})" FORCE)
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
endif()
endif()
# install instructions
if (INSTALL_FFMPEG)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (DEFINED INSTALL_BIN_DIR)
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" DESTINATION "${INSTALL_BIN_DIR}")
else()
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
endif()
else()
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} REALPATH)
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_NAME ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} NAME)
if (DEFINED INSTALL_LIB_DIR)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
DESTINATION "${INSTALL_LIB_DIR}"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FFMPEG_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}})
else()
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}})
endif()
endif()
mark_as_advanced (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME})
endforeach()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (FFMPEG_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_DIR)
# FFmpeg
if (NOT DEFINED INSTALL_FFMPEG)
set (INSTALL_FFMPEG OFF CACHE BOOL "${INSTALL_FFMPEG_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DIR)
set (3RDPARTY_FFMPEG_DIR "" CACHE PATH "The directory containing FFmpeg")
endif()
# include occt macros. compiler_bitness, os_with_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify FFMPEG folder in connection with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_FFMPEG_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FFMPEG FFMPEG_DIR_NAME)
if (FFMPEG_DIR_NAME)
set (3RDPARTY_FFMPEG_DIR "${3RDPARTY_DIR}/${FFMPEG_DIR_NAME}" CACHE PATH "The directory containing FFmpeg" FORCE)
endif()
endif()
else()
endif()
# define required FFMPEG variables
if (NOT DEFINED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
endif()
separate_arguments (CSF_FFmpeg)
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg framework (${LIBRARY_NAME})" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg framework (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_LIBRARY_DIR)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "" CACHE PATH "The directory containing FFmpeg libraries")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "" CACHE FILEPATH "FFmpeg shared libraries (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared libraries (${LIBRARY_NAME})")
endif()
if (NOT DEFINED 3RDPARTY_FFMPEG_DLL_DIR)
set (3RDPARTY_FFMPEG_DLL_DIR "" CACHE PATH "The directory containing FFmpeg shared libraries")
endif()
endif()
# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_INCLUDE_DIR PATH "the path to FFmpeg")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} FILEPATH "the path to FFmpeg framework (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg libraries" FORCE)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg library (${LIBRARY_NAME})")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} FILEPATH "the path to FFmpeg shared library (${LIBRARY_NAME})")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared libraries" FORCE)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FFMPEG_DIR 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})")
endif()
endif()
endif()
endforeach()
# header
if (NOT 3RDPARTY_FFMPEG_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
set (HEADER_NAMES avutil.h libavutil/avutil.h)
# set 3RDPARTY_FFMPEG_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_INCLUDE_DIR
set (3RDPARTY_FFMPEG_INCLUDE_DIR "3RDPARTY_FFMPEG_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_FFMPEG_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FFMPEG_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FFMPEG_INCLUDE_DIR AND EXISTS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FFMPEG_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FFMPEG_INCLUDE_DIR)
set (3RDPARTY_FFMPEG_INCLUDE_DIR "" CACHE FILEPATH "the path to avutil.h" FORCE)
endif()
# libraries
foreach (LIBRARY_NAME ${CSF_FFmpeg})
if (NOT 3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (FFMPEG_PATH_SUFFIXES lib)
if (ANDROID)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} libs/${ANDROID_ABI})
elseif(APPLE)
set (FFMPEG_PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES} Frameworks)
endif()
# set 3RDPARTY_FFMPEG_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FFMPEG_LIBRARY
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
if (3RDPARTY_FFMPEG_DIR AND EXISTS "${3RDPARTY_FFMPEG_DIR}")
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATHS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" "${3RDPARTY_FFMPEG_DIR}"
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} NAMES ${LIBRARY_NAME}
PATH_SUFFIXES ${FFMPEG_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}")
get_filename_component (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME})
set (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} "" CACHE FILEPATH "The path to FFmpeg library (${LIBRARY_NAME})" FORCE)
endif()
# shared library
if (WIN32)
if (NOT 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} OR NOT EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}-NOTFOUND" CACHE FILEPATH "The path to FFmpeg shared library (${LIBRARY_NAME})" FORCE)
# find FFmpeg shared library
file (GLOB 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DIR}/bin/${LIBRARY_NAME}[-][0-9]*")
if (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} AND EXISTS "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}")
set (3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CACHE FILEPATH "FFmpeg shared library (${LIBRARY_NAME})" FORCE)
get_filename_component (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" PATH)
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}" CACHE PATH "The directory containing FFmpeg library (${LIBRARY_NAME})" FORCE)
else()
set (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} "" CACHE PATH "The directory containing FFmpeg shared library (${LIBRARY_NAME})" FORCE)
endif()
endif()
if (3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME} OR EXISTS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME})
endif()
endif()
# install instructions
if (INSTALL_FFMPEG)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
if (DEFINED INSTALL_BIN_DIR)
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" DESTINATION "${INSTALL_BIN_DIR}")
else()
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} REALPATH)
get_filename_component(3RDPARTY_FFMPEG_LIBRARY_NAME ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} NAME)
if (DEFINED INSTALL_LIB_DIR)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
DESTINATION "${INSTALL_LIB_DIR}"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libi"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FFMPEG_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
RENAME ${3RDPARTY_FFMPEG_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FFMPEG_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_DLL_DIR_${LIBRARY_NAME}})
else()
set (USED_3RDPARTY_FFMPEG_DIR ${3RDPARTY_FFMPEG_LIBRARY_DIR_${LIBRARY_NAME}})
endif()
endif()
mark_as_advanced (3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME} 3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME})
endforeach()
# unset all redundant variables
OCCT_CHECK_AND_UNSET (FFMPEG_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (FFMPEG_DIR)

View File

@@ -1,20 +1,33 @@
# flex
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
if (NOT DEFINED 3RDPARTY_FLEX_EXECUTABLE)
set (3RDPARTY_FLEX_EXECUTABLE "" CACHE FILEPATH "The Path to the flex command")
endif()
# FLEX_EXECUTABLE is required by FLEX_TARGET macro and should be defined
set (FLEX_EXECUTABLE "${3RDPARTY_FLEX_EXECUTABLE}" CACHE FILEPATH "path to the flex executable" FORCE)
find_package (FLEX)
if (FLEX_FOUND)
set (3RDPARTY_FLEX_EXECUTABLE "${FLEX_EXECUTABLE}" CACHE FILEPATH "The Path to the flex command" FORCE)
endif()
if (NOT 3RDPARTY_FLEX_EXECUTABLE OR NOT EXISTS "${3RDPARTY_FLEX_EXECUTABLE}")
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FLEX_EXECUTABLE)
endif()
# flex
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
# delete obsolete 3RDPARTY_FLEX_EXECUTABLE cache variable (not used anymore)
unset (3RDPARTY_FLEX_EXECUTABLE CACHE)
# delete FLEX_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
# without reasonable diagnostic
if (NOT FLEX_EXECUTABLE OR NOT EXISTS "${FLEX_EXECUTABLE}")
unset (FLEX_EXECUTABLE CACHE)
endif()
if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}")
unset (FLEX_INCLUDE_DIR CACHE)
endif()
# Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH and
# CMAKE_INCLUDE_PATH variables to make these paths searhed by find_package
if (3RDPARTY_DIR)
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
foreach (candidate_path ${FLEX_PATHS})
if (IS_DIRECTORY ${candidate_path})
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
list (APPEND CMAKE_INCLUDE_PATH ${candidate_path})
endif()
endforeach()
endif()
find_package (FLEX 2.6.4)
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)
endif()

View File

@@ -1,3 +1,3 @@
#freeimage
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "CSF_FreeImagePlus" "d")
#freeimage
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "CSF_FreeImagePlus" "d")

View File

@@ -1,363 +1,384 @@
# freetype
if (NOT DEFINED INSTALL_FREETYPE AND BUILD_SHARED_LIBS)
set (INSTALL_FREETYPE OFF CACHE BOOL "${INSTALL_FREETYPE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
# specify freetype folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
if (NOT 3RDPARTY_FREETYPE_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
if (FREETYPE_DIR_NAME)
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
endif()
endif()
else()
#set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype" FORCE)
endif()
# define required freetype variables
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
endif()
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
endif()
endif()
endif()
# check 3RDPARTY_FREETYPE_ paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY_DIR PATH "The directory containing freetype library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL FILEPATH "the path to freetype shared library")
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
endif()
endif()
endif()
endif()
# the FIRST step in search for freetype library and header folders (built-in search engine)
# execute built-in search engine to seek freetype
set (IS_BUILTIN_SEARCH_REQUIRED OFF)
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
#elseif (WIN32)
#if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
# set (IS_BUILTIN_SEARCH_REQUIRED ON)
#endif()
endif()
if (IS_BUILTIN_SEARCH_REQUIRED)
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
find_package(Freetype)
# restore ENV{FREETYPE_DIR}
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
endif()
# check the found paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library")
endif()
endif()
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
endif()
# the SECOND step in search for freetype library and header folders (additional search algorithms)
# ft2build.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (FT2BUILD_NAMES ft2build.h config/ft2build.h freetype/config/ft2build.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build-NOTFOUND" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
# cmake (version < 3.0) doesn't find ft2build.h of freetype (version is >= 2.5.1)
# do search taking into account freetype structure of 2.5.1 version
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include freetype2 include/freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
# ftheader.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (FTHEADER_NAMES ftheader.h config/ftheader.h freetype/config/ftheader.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2-NOTFOUND" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
HINTS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
# freetype library
#if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (FREETYPE_PATH_SUFFIXES lib)
if (ANDROID)
set (FREETYPE_PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_FREETYPE_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_LIBRARY
set (3RDPARTY_FREETYPE_LIBRARY "3RDPARTY_FREETYPE_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to freetype library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
# freetype shared library
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_FREETYPE_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_DLL
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "The path to freetype shared library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATH_SUFFIXES bin)
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FREETYPE_DLL_DIR)
endif()
endif()
# install instructions
if (INSTALL_FREETYPE)
OCCT_MAKE_OS_WITH_BITNESS()
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FREETYPE_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
else()
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
endif()
endif()
#endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY)
if (BUILD_SHARED_LIBS)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
else()
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_FREETYPE)
endif()
# freetype
if (NOT DEFINED INSTALL_FREETYPE AND BUILD_SHARED_LIBS)
set (INSTALL_FREETYPE OFF CACHE BOOL "${INSTALL_FREETYPE_DESCR}")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
# specify freetype folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype")
if (NOT 3RDPARTY_FREETYPE_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
if (FREETYPE_DIR_NAME)
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
endif()
endif()
else()
#set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype" FORCE)
endif()
# define required freetype variables
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "the path of ft2build.h")
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "the path of freetype2")
endif()
if (BUILD_SHARED_LIBS)
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library")
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (WIN32)
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library")
endif()
endif()
endif()
# check 3RDPARTY_FREETYPE_ paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY FILEPATH "the path to freetype library")
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_LIBRARY_DIR PATH "The directory containing freetype library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL FILEPATH "the path to freetype shared library")
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR 3RDPARTY_FREETYPE_DLL_DIR PATH "The directory containing freetype shared library")
endif()
endif()
endif()
endif()
# the FIRST step in search for freetype library and header folders (built-in search engine)
# execute built-in search engine to seek freetype
set (IS_BUILTIN_SEARCH_REQUIRED OFF)
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
elseif (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (IS_BUILTIN_SEARCH_REQUIRED ON)
#elseif (WIN32)
#if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
# set (IS_BUILTIN_SEARCH_REQUIRED ON)
#endif()
endif()
if (IS_BUILTIN_SEARCH_REQUIRED)
# use 3RDPARTY_FREETYPE_DIR if it is specified for freetype search
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
endif()
unset (FREETYPE_LIBRARY_RELEASE)
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}
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
endif()
# check the found paths for consistency with specified 3RDPARTY_FREETYPE_DIR
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY_RELEASE FILEPATH "freetype library")
endif()
endif()
# assign the found paths to corresponding 3RDPARTY_FREETYPE_ variables
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
endif()
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
if (FREETYPE_LIBRARY_RELEASE AND EXISTS "${FREETYPE_LIBRARY_RELEASE}")
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY_RELEASE}" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
endif()
# the SECOND step in search for freetype library and header folders (additional search algorithms)
# ft2build.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
set (FT2BUILD_NAMES ft2build.h config/ft2build.h freetype/config/ft2build.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build-NOTFOUND" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
# cmake (version < 3.0) doesn't find ft2build.h of freetype (version is >= 2.5.1)
# do search taking into account freetype structure of 2.5.1 version
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include freetype2 include/freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build NAMES ${FT2BUILD_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "" CACHE FILEPATH "The directory containing ft2build.h header" FORCE)
endif()
# ftheader.h
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
set (FTHEADER_NAMES ftheader.h config/ftheader.h freetype/config/ftheader.h)
# set 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2-NOTFOUND" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
HINTS ${3RDPARTY_FREETYPE_DIR}
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 NAMES ${FTHEADER_NAMES}
PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware
PATH_SUFFIXES include/freetype2 include freetype2
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
endif()
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "" CACHE FILEPATH "The directory containing ftheader.h header" FORCE)
endif()
# freetype library
#if (BUILD_SHARED_LIBS)
if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
set (FREETYPE_PATH_SUFFIXES lib)
if (ANDROID)
set (FREETYPE_PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES} libs/${ANDROID_ABI})
endif()
# set 3RDPARTY_FREETYPE_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_LIBRARY
set (3RDPARTY_FREETYPE_LIBRARY "3RDPARTY_FREETYPE_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to freetype library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_LIBRARY_DIR}" "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_LIBRARY ${CSF_FREETYPE}
PATH_SUFFIXES ${FREETYPE_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
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}")
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE PATH "The directory containing freetype library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_LIBRARY_DIR AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_FREETYPE_LIBRARY_DIR)
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "The path to freetype library" FORCE)
endif()
# freetype shared library
if (WIN32)
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
# set 3RDPARTY_FREETYPE_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_FREETYPE_DLL
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "The path to freetype shared library" FORCE)
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATHS "${3RDPARTY_FREETYPE_DIR}"
PATH_SUFFIXES bin
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_FREETYPE_DLL ${CSF_FREETYPE}
PATH_SUFFIXES bin)
endif()
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE PATH "The directory containing freetype library" FORCE)
else()
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE PATH "The directory containing freetype shared library" FORCE)
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
endif()
endif()
if (3RDPARTY_FREETYPE_DLL_DIR OR EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_FREETYPE_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_FREETYPE_DLL_DIR)
endif()
endif()
# install instructions
if (INSTALL_FREETYPE)
OCCT_MAKE_OS_WITH_BITNESS()
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${3RDPARTY_FREETYPE_DLL}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_ABS ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_NAME ${3RDPARTY_FREETYPE_LIBRARY} NAME)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
else()
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
install (FILES "${3RDPARTY_FREETYPE_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d"
RENAME ${3RDPARTY_FREETYPE_LIBRARY_NAME}.6)
endif()
endif()
set (USED_3RDPARTY_FREETYPE_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
else()
set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
endif()
endif()
#endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build)
OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2)
OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY_RELEASE)
if (BUILD_SHARED_LIBS)
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
else()
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY)
OCCT_CHECK_AND_UNSET(3RDPARTY_FREETYPE_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_FREETYPE)
endif()

View File

@@ -1,3 +1,3 @@
# OpenGL ES 2.0
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlLibs" "")
# OpenGL ES 2.0
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlesLibs" "")

View File

@@ -1,4 +1,4 @@
# glx
separate_arguments (CSF_OpenGlLibs)
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "CSF_OpenGlLibs" "d")
# glx
separate_arguments (CSF_OpenGlLibs)
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "CSF_OpenGlLibs" "d")

View File

@@ -1,123 +1,150 @@
# CSF variables definition
if(CSFS_ALREADY_INCLUDED)
return()
endif()
set(CSFS_ALREADY_INCLUDED 1)
if (NOT DEFINED USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
endif()
# TBB
if (USE_TBB)
set (CSF_TBB "tbb tbbmalloc")
else()
set (CSF_TBB)
endif()
# FREETYPE
if (USE_FREETYPE)
set (CSF_FREETYPE "freetype")
else()
set (CSF_FREETYPE)
endif()
# FFmpeg
if (USE_FFMPEG)
set (CSF_FFmpeg "avcodec avformat swscale avutil")
else()
set (CSF_FFmpeg)
endif()
# FREEIMAGE
if (USE_FREEIMAGE)
set (CSF_FreeImagePlus "freeimage")
else()
if (WIN32)
set (CSF_FreeImagePlus "windowscodecs")
else()
set (CSF_FreeImagePlus)
endif()
endif()
# TCL/TK
if (USE_TCL)
if (WIN32)
set (CSF_TclLibs "tcl86")
set (CSF_TclTkLibs "tk86")
else()
if(APPLE)
set (CSF_TclTkLibs Tk)
set (CSF_TclLibs Tcl)
elseif(UNIX)
set (CSF_TclLibs "tcl8.6")
set (CSF_TclTkLibs "tk8.6")
endif()
endif()
endif()
if (WIN32)
set (CSF_advapi32 "advapi32.lib")
set (CSF_gdi32 "gdi32.lib")
set (CSF_user32 "user32.lib")
set (CSF_shell32 "shell32.lib")
set (CSF_wsock32 "wsock32.lib")
set (CSF_psapi "psapi.lib")
set (CSF_winmm "winmm.lib")
set (CSF_d3d9 "D3D9.lib")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
set (CSF_OpenGlLibs "libEGL libGLESv2")
else()
set (CSF_OpenGlLibs "opengl32.lib")
endif()
else()
if (APPLE)
set (CSF_objc "objc")
# frameworks
if (IOS)
find_library (Appkit_LIB NAMES UIKit)
set (CSF_Appkit ${Appkit_LIB})
else()
find_library (Appkit_LIB NAMES AppKit)
set (CSF_Appkit ${Appkit_LIB})
endif()
OCCT_CHECK_AND_UNSET (Appkit_LIB)
find_library (IOKit_LIB NAMES IOKit)
set (CSF_IOKit ${IOKit_LIB})
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (IOS)
find_library (OpenGlLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
elseif (USE_GLX)
set (CSF_OpenGlLibs GL)
set (CSF_XwLibs "X11 Xext Xmu Xi")
else()
find_library (OpenGlLibs_LIB NAMES OpenGL)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlLibs "EGL GLESv2")
set (CSF_androidlog "log")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt stdc++")
if (USE_GLES2)
set (CSF_OpenGlLibs "EGL GLESv2")
else()
set (CSF_OpenGlLibs "GL")
endif()
set (CSF_XwLibs "X11 Xext Xmu Xi")
set (CSF_dl "dl")
set (CSF_fontconfig "fontconfig")
endif()
endif()
# CSF variables definition
if(CSFS_ALREADY_INCLUDED)
return()
endif()
set(CSFS_ALREADY_INCLUDED 1)
if (NOT DEFINED USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
endif()
# TBB
if (USE_TBB)
set (CSF_TBB "tbb tbbmalloc")
else()
set (CSF_TBB)
endif()
# FREETYPE
if (USE_FREETYPE)
set (CSF_FREETYPE "freetype")
else()
set (CSF_FREETYPE)
endif()
# FFmpeg
if (USE_FFMPEG)
set (CSF_FFmpeg "avcodec avformat swscale avutil")
else()
set (CSF_FFmpeg)
endif()
# FREEIMAGE
if (USE_FREEIMAGE)
set (CSF_FreeImagePlus "freeimage")
else()
if (WIN32)
set (CSF_FreeImagePlus "windowscodecs")
else()
set (CSF_FreeImagePlus)
endif()
endif()
# OpenVR
if (USE_OPENVR)
set (CSF_OpenVR "openvr_api")
else()
set (CSF_OpenVR)
endif()
# TCL
if (USE_TCL)
if (WIN32)
set (CSF_TclLibs "tcl86")
else()
if(APPLE)
set (CSF_TclLibs Tcl)
elseif(UNIX)
set (CSF_TclLibs "tcl8.6")
endif()
endif()
endif()
# TK
if (USE_TK)
if (WIN32)
set (CSF_TclTkLibs "tk86")
else()
if(APPLE)
set (CSF_TclTkLibs Tk)
elseif(UNIX)
set (CSF_TclTkLibs "tk8.6")
endif()
endif()
endif()
# Draco
if (USE_DRACO)
set (CSF_Draco "draco")
else()
set (CSF_Draco)
endif()
if (WIN32)
set (CSF_advapi32 "advapi32.lib")
set (CSF_gdi32 "gdi32.lib")
set (CSF_user32 "user32.lib")
set (CSF_shell32 "shell32.lib")
set (CSF_wsock32 "wsock32.lib")
set (CSF_psapi "psapi.lib")
set (CSF_winmm "winmm.lib")
set (CSF_d3d9 "D3D9.lib")
set (CSF_OpenGlLibs "opengl32.lib")
set (CSF_OpenGlesLibs "libEGL libGLESv2")
else()
if (APPLE)
set (CSF_objc "objc")
# frameworks
if (IOS)
find_library (Appkit_LIB NAMES UIKit)
set (CSF_Appkit ${Appkit_LIB})
else()
find_library (Appkit_LIB NAMES AppKit)
set (CSF_Appkit ${Appkit_LIB})
endif()
OCCT_CHECK_AND_UNSET (Appkit_LIB)
find_library (IOKit_LIB NAMES IOKit)
set (CSF_IOKit ${IOKit_LIB})
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (IOS)
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
elseif (USE_XLIB)
set (CSF_OpenGlLibs "GL")
set (CSF_XwLibs "X11")
else()
find_library (OpenGlLibs_LIB NAMES OpenGL)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
elseif (EMSCRIPTEN)
set (CSF_ThreadLibs "pthread rt stdc++")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_dl "dl")
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_androidlog "log")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt stdc++")
if (USE_XLIB)
set (CSF_OpenGlLibs "GL")
set (CSF_XwLibs "X11")
else()
set (CSF_OpenGlLibs "GL EGL")
endif()
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_dl "dl")
if (USE_FREETYPE)
set (CSF_fontconfig "fontconfig")
endif()
endif()
endif()

View File

@@ -1,151 +1,159 @@
##
if(FLAGS_ALREADY_INCLUDED)
return()
endif()
set(FLAGS_ALREADY_INCLUDED 1)
# force option /fp:precise for Visual Studio projects.
#
# Note that while this option is default for MSVC compiler, Visual Studio
# project can be switched later to use Intel Compiler (ICC).
# Enforcing -fp:precise ensures that in such case ICC will use correct
# option instead of its default -fp:fast which is harmful for OCCT.
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
endif()
# add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only)
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600)))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
endif()
endif()
if (MSVC)
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC")
add_definitions(-DOCC_CONVERT_SIGNALS)
endif()
# enable structured exceptions for MSVC
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
if (ISFLAG)
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
elseif (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_CXX_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_C_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_C_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove DEBUG flag if it exists
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
if (IS_DEBUG_CXX)
message (STATUS "Info: -DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
if (IS_DEBUG_C)
message (STATUS "Info: -DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
# enable parallel compilation on MSVC 9 and above
if (MSVC AND (MSVC_VERSION GREATER 1400))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
# generate a single response file which enlist all of the object files
if (NOT DEFINED CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
if (NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
if (MSVC)
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if (BUILD_SHARED_LIBS)
if (APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
elseif(NOT WIN32)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
endif()
endif()
if(MINGW)
# Set default release optimization option to O2 instead of O3, since in
# some OCCT related examples, this gives significantly smaller binaries
# at comparable performace with MinGW-w64.
string (REGEX MATCH "-O3" IS_O3_CXX "${CMAKE_CXX_FLAGS_RELEASE}")
if (IS_O3_CXX)
string (REGEX REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
else()
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
endif()
set (CMAKE_CXX_FLAGS "-std=gnu++0x ${CMAKE_CXX_FLAGS}")
add_definitions(-D_WIN32_WINNT=0x0501)
# workaround bugs in mingw with vtable export
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
if (APPLE)
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
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()
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif()
# Optimize size of binaries
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
endif()
if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
endif()
##
if(FLAGS_ALREADY_INCLUDED)
return()
endif()
set(FLAGS_ALREADY_INCLUDED 1)
# force option /fp:precise for Visual Studio projects.
#
# Note that while this option is default for MSVC compiler, Visual Studio
# project can be switched later to use Intel Compiler (ICC).
# Enforcing -fp:precise ensures that in such case ICC will use correct
# option instead of its default -fp:fast which is harmful for OCCT.
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
endif()
# add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only)
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600)))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2")
endif()
endif()
if (MSVC)
# suppress C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"")
# suppress warning on using portable non-secure functions in favor of non-portable secure ones
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC")
add_definitions(-DOCC_CONVERT_SIGNALS)
endif()
# enable structured exceptions for MSVC
string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
if (ISFLAG)
string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
elseif (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
endif()
if (MSVC)
# string pooling (GF), function-level linking (Gy)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy")
if (BUILD_FORCE_RelWithDebInfo)
# generate debug info (Zi), inline expansion level (Ob1)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi /Ob1")
# generate debug info (debug), OptimizeReferences=true (OPT:REF), EnableCOMDATFolding=true (OPT:ICF)
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /debug /OPT:REF /OPT:ICF")
endif()
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_CXX_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
# remove _WINDOWS flag if it exists
string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_C_FLAGS}")
if (IS_WINDOWSFLAG)
message (STATUS "Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/D_WINDOWS" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove WIN32 flag if it exists
string (REGEX MATCH "/DWIN32" IS_WIN32FLAG "${CMAKE_C_FLAGS}")
if (IS_WIN32FLAG)
message (STATUS "Info: /DWIN32 has been removed from CMAKE_C_FLAGS")
string (REGEX REPLACE "/DWIN32" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
# remove DEBUG flag if it exists
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
if (IS_DEBUG_CXX)
message (STATUS "Info: -DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
if (IS_DEBUG_C)
message (STATUS "Info: -DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
# enable parallel compilation on MSVC 9 and above
if (MSVC AND (MSVC_VERSION GREATER 1400))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
# generate a single response file which enlist all of the object files
if (NOT DEFINED CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
if (NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
endif()
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
if (MSVC)
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
endif()
if (BUILD_SHARED_LIBS)
if (APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
elseif(NOT WIN32)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
if (APPLE)
# CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated.
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
endif()
# Optimize size of binaries
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
elseif(MINGW)
add_definitions(-D_WIN32_WINNT=0x0601)
# _WIN32_WINNT=0x0601 (use Windows 7 SDK)
#set (CMAKE_SYSTEM_VERSION "6.1")
# workaround bugs in mingw with vtable export
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
# Optimize size of binaries
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
# Optimize size of binaries
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
endif()
if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -1,78 +1,78 @@
# OCCT resource files generation
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
set (RESOURCE_FILES)
set (isResDirectory FALSE)
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/src/${CurrentResource}")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource}/FILES" RESOURCE_FILES)
set (CurrentResource_Directory "${CurrentResource}")
set (isResDirectory TRUE)
else()
get_filename_component (CurrentResource_Name "${CurrentResource}" NAME)
list (APPEND RESOURCE_FILES "res:::${CurrentResource_Name}")
get_filename_component (CurrentResource_Directory "${CurrentResource}" DIRECTORY)
endif()
# Add current toolkit into RESOURCE_TOOLKITS array to copy it to the BUILD directory
list (APPEND RESOURCE_TOOLKITS "${CurrentResource_Directory}")
list (REMOVE_DUPLICATES RESOURCE_TOOLKITS)
if (BUILD_RESOURCES)
foreach (RESOURCE_FILE ${RESOURCE_FILES})
string (REGEX MATCH "^[^:]+:::" IS_RESOURCE "${RESOURCE_FILE}")
if (IS_RESOURCE)
string (REGEX REPLACE "[^:]+:+" "" RESOURCE_FILE "${RESOURCE_FILE}")
get_filename_component (CurrentResource_FileName "${RESOURCE_FILE}" NAME)
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
set (toProcessResFile TRUE)
if (isResDirectory)
list (FIND RESOURCE_FILES "${HEADER_FILE_NAME}" aResIndex)
if ("${aResIndex}" STREQUAL "-1")
set (toProcessResFile FALSE)
endif()
endif()
if (toProcessResFile)
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}")
# generate content for header file
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file src/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
# read resource file
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
string (REPLACE "\"" "\\\"" line "${line}")
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}\n \"${line}\\n\"")
endforeach()
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};")
# Save generated content to header file
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${HEADER_FILE_NAME}")
if (EXISTS "${HEADER_FILE}")
file (REMOVE "${HEADER_FILE}")
endif()
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
endif()
endif()
endforeach()
endif()
endmacro()
FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
foreach (CurrentResource ${RESOURCES})
get_filename_component (CurrentResource_FileName "${CurrentResource}" NAME)
if ("${CurrentResource_FileName}" STREQUAL TObj.msg OR
"${CurrentResource_FileName}" STREQUAL BOPAlgo.msg OR
"${CurrentResource_FileName}" STREQUAL Units.dat OR
"${CurrentResource}" STREQUAL XSMessage OR
"${CurrentResource}" STREQUAL SHMessage OR
"${CurrentResource}" STREQUAL Shaders)
OCCT_GENERATE_CONTENT_ONLY ("${CurrentResource}")
endif()
endforeach()
# OCCT resource files generation
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
set (RESOURCE_FILES)
set (isResDirectory FALSE)
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/src/${CurrentResource}")
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource}/FILES" RESOURCE_FILES)
set (CurrentResource_Directory "${CurrentResource}")
set (isResDirectory TRUE)
else()
get_filename_component (CurrentResource_Name "${CurrentResource}" NAME)
list (APPEND RESOURCE_FILES "res:::${CurrentResource_Name}")
get_filename_component (CurrentResource_Directory "${CurrentResource}" DIRECTORY)
endif()
# Add current toolkit into RESOURCE_TOOLKITS array to copy it to the BUILD directory
list (APPEND RESOURCE_TOOLKITS "${CurrentResource_Directory}")
list (REMOVE_DUPLICATES RESOURCE_TOOLKITS)
if (BUILD_RESOURCES)
foreach (RESOURCE_FILE ${RESOURCE_FILES})
string (REGEX MATCH "^[^:]+:::" IS_RESOURCE "${RESOURCE_FILE}")
if (IS_RESOURCE)
string (REGEX REPLACE "[^:]+:+" "" RESOURCE_FILE "${RESOURCE_FILE}")
get_filename_component (CurrentResource_FileName "${RESOURCE_FILE}" NAME)
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
set (toProcessResFile TRUE)
if (isResDirectory)
list (FIND RESOURCE_FILES "${HEADER_FILE_NAME}" aResIndex)
if ("${aResIndex}" STREQUAL "-1")
set (toProcessResFile FALSE)
endif()
endif()
if (toProcessResFile)
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}")
# generate content for header file
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file src/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
# read resource file
file (STRINGS "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
string (REPLACE "\"" "\\\"" line "${line}")
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}\n \"${line}\\n\"")
endforeach()
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT};")
# Save generated content to header file
set (HEADER_FILE "${CMAKE_SOURCE_DIR}/src/${CurrentResource_Directory}/${HEADER_FILE_NAME}")
if (EXISTS "${HEADER_FILE}")
file (REMOVE "${HEADER_FILE}")
endif()
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
endif()
endif()
endforeach()
endif()
endmacro()
FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
foreach (CurrentResource ${RESOURCES})
get_filename_component (CurrentResource_FileName "${CurrentResource}" NAME)
if ("${CurrentResource_FileName}" STREQUAL TObj.msg OR
"${CurrentResource_FileName}" STREQUAL BOPAlgo.msg OR
"${CurrentResource_FileName}" STREQUAL Units.dat OR
"${CurrentResource}" STREQUAL XSMessage OR
"${CurrentResource}" STREQUAL SHMessage OR
"${CurrentResource}" STREQUAL Shaders)
OCCT_GENERATE_CONTENT_ONLY ("${CurrentResource}")
endif()
endforeach()

View File

@@ -1,407 +1,500 @@
# script for each OCCT toolkit
# filling some variables by default values(src) or using custom(tools, samples)
set (RELATIVE_SOURCES_DIR "${RELATIVE_DIR}")
if ("${RELATIVE_SOURCES_DIR}" STREQUAL "")
#if it is not defined, use default directory
set (RELATIVE_SOURCES_DIR "src")
endif()
set (OCC_MODULES_LIST "${MODULES_LIST}")
if ("${OCC_MODULES_LIST}" STREQUAL "")
set (OCC_MODULES_LIST ${OCCT_MODULES})
endif()
set (OCC_TARGET_FOLDER "${TARGET_FOLDER}")
if ("${OCC_TARGET_FOLDER}" STREQUAL "")
set (OCC_TARGET_FOLDER "Modules")
endif()
set (OCCT_TOOLKITS_NAME_SUFFIX "${TOOLKITS_NAME_SUFFIX}")
if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "")
set (OCCT_TOOLKITS_NAME_SUFFIX "TOOLKITS")
endif()
# parce PACKAGES file
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
if ("${USED_PACKAGES}" STREQUAL "")
set (USED_PACKAGES ${PROJECT_NAME})
endif()
if (USE_QT)
# Qt dependencies
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
include_directories("${PROJECT_INCLUDES}")
endif(USE_QT)
set (PRECOMPILED_DEFS)
if (NOT BUILD_SHARED_LIBS)
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-DOCCT_STATIC_BUILD")
endif()
endif()
# Get all used packages from toolkit
UNSET(RESOURCE_FILES)
foreach (OCCT_PACKAGE ${USED_PACKAGES})
#remove part after "/" in the OCCT_PACKAGE variable if exists
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif()
# TKService contains platform-dependent packages: Xw and WNT
if ((WIN32 AND "${OCCT_PACKAGE}" STREQUAL "Xw") OR (NOT WIN32 AND "${OCCT_PACKAGE}" STREQUAL "WNT"))
# do nothing
else()
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE_NAME}_DLL")
endif()
set (SOURCE_FILES)
set (HEADER_FILES)
# Generate Flex and Bison files
if (${BUILD_YACCLEX})
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
list (SORT SOURCE_FILES_FLEX)
list (SORT SOURCE_FILES_BISON)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.c)
set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.c)
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${BISON_OUTPUT_FILE} COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME}")
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${FLEX_OUTPUT_FILE} COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME}")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
endif()
endforeach()
endif()
endif()
# header files
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
else()
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
endif()
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
if(APPLE)
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
endif()
foreach(HEADER_FILE ${HEADER_FILES})
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
list (APPEND USED_INCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
else()
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
endif()
endforeach()
foreach(SOURCE_FILE ${SOURCE_FILES})
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
list (APPEND USED_SRCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
else()
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
endif()
endforeach()
if (USE_QT)
FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES)
#message("Qt Resource files are: ${QT_RESOURCE_FILES} in ${OCCT_PACKAGE}")
endif(USE_QT)
#message("Resource files are: ${RESOURCE_FILES} in ${OCCT_PACKAGE}")
foreach(RESOURCE_FILE ${RESOURCE_FILES})
SOURCE_GROUP ("Resource Files\\${OCCT_PACKAGE_NAME}" FILES "${RESOURCE_FILE}")
endforeach()
endif()
endforeach()
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
set (USED_RCFILE "")
if (MSVC)
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
endif()
endif()
set (CURRENT_MODULE)
foreach (OCCT_MODULE ${OCC_MODULES_LIST})
list (FIND ${OCCT_MODULE}_${OCCT_TOOLKITS_NAME_SUFFIX} ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
endif()
endforeach()
if (MSVC)
OCCT_INSERT_CODE_FOR_TARGET ()
endif()
if (USE_QT)
FIND_AND_WRAP_MOC_FILES("${USED_INCFILES}" "${PROJECT_NAME}_MOC_FILES")
#message("MOC files: ${${PROJECT_NAME}_MOC_FILES}")
endif (USE_QT)
if (EXECUTABLE_PROJECT)
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
install (TARGETS ${PROJECT_NAME}
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
if (MSVC)
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
endif()
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
install (TARGETS ${PROJECT_NAME}
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
if (NOT WIN32)
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}")
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
endif()
endif()
endif()
if (CURRENT_MODULE)
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "${OCC_TARGET_FOLDER}/${CURRENT_MODULE}")
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
if (APPLE)
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
endif()
endif()
endif()
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
if (ANDROID)
# do not append version to the filename
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
else()
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
SOVERSION "${OCC_VERSION_MAJOR}"
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
endif()
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
# parce EXTERNLIB file
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
if (NOT COMMENT_FOUND)
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
OCCT_INSTALL_VTK(${USED_ITEM})
endif()
else()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
if ("${CSF_FOUND}" STREQUAL "")
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
set (LIBRARY_FROM_CACHE 0)
separate_arguments (CURRENT_CSF)
foreach (CSF_LIBRARY ${CURRENT_CSF})
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
NOT "x${IS_ENDING}" STREQUAL "x" OR
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}")
set (LIBRARY_FROM_CACHE 1)
endif()
endif()
endforeach()
endforeach()
if (NOT ${LIBRARY_FROM_CACHE})
# prepare a list from a string with whitespaces
separate_arguments (CURRENT_CSF)
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
endif()
endif()
endif()
endif()
endif()
endforeach()
if (APPLE)
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
if (NOT ${IS_X11_FOUND} EQUAL -1)
find_package (X11 COMPONENTS X11 Xext Xmu Xi)
if (NOT X11_FOUND)
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
endif()
endif()
endif()
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
# Add VTK_OPENGL2_BACKEND definition.
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTK_OPENGL2_BACKEND)
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
if(VTK_MAJOR_VERSION GREATER 6)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
endif()
endif()
endif()
endforeach()
else()
if(VTK_MAJOR_VERSION EQUAL 6 AND VTK_MINOR_VERSION GREATER 2 OR VTK_MAJOR_VERSION GREATER 6)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL" IS_VTK_RENDER_FREETYPE_FOUND)
if (NOT ${IS_VTK_RENDER_FREETYPE_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL")
endif()
endif()
endif()
if (BUILD_SHARED_LIBS)
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
endif()
if (USE_QT)
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
target_link_libraries (${PROJECT_NAME} debug ${PROJECT_LIBRARY_DEBUG})
endforeach()
foreach (PROJECT_LIBRARY_RELEASE ${PROJECT_LIBRARIES_RELEASE})
target_link_libraries (${PROJECT_NAME} optimized ${PROJECT_LIBRARY_RELEASE})
endforeach()
endif()
# suppress deprecation warnings inside OCCT itself for old gcc versions with unavailable Standard_DISABLE_DEPRECATION_WARNINGS
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.0)
add_definitions("-DOCCT_NO_DEPRECATED")
message (STATUS "Warning: internal deprecation warnings by Standard_DEPRECATED have been disabled due to old gcc version being used")
endif()
endif()
# use Cotire to accelerate build via usage of precompiled headers
if (BUILD_USE_PCH)
if (WIN32)
# prevent definition of min and max macros through inclusion of Windows.h
# (for cotire builds)
add_definitions("-DNOMINMAX")
# avoid warnings on deprecated names from standard C library (see strsafe.h)
add_definitions("-DSTRSAFE_NO_DEPRECATE")
# avoid "std::Equal1" warning in QANCollection_Stl.cxx in debug mode
# suggesting using msvc "Checked Iterators"
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
endif()
# Exclude system-provided glext.h.
# These macros are already defined within OpenGl_GlFunctions.hxx,
# however we have to duplicate them here for building TKOpenGl with PCH.
add_definitions("-DGL_GLEXT_LEGACY")
add_definitions("-DGLX_GLXEXT_LEGACY")
# workaround for old gcc
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-D__STDC_CONSTANT_MACROS")
add_definitions("-D__STDC_FORMAT_MACROS")
endif()
# unity builds are not used since they do not add speed but cause conflicts
# in TKV3d
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(${PROJECT_NAME})
endif()
# script for each OCCT toolkit
# filling some variables by default values(src) or using custom(tools, samples)
set (RELATIVE_SOURCES_DIR "${RELATIVE_DIR}")
if ("${RELATIVE_SOURCES_DIR}" STREQUAL "")
#if it is not defined, use default directory
set (RELATIVE_SOURCES_DIR "src")
endif()
set (OCC_MODULES_LIST "${MODULES_LIST}")
if ("${OCC_MODULES_LIST}" STREQUAL "")
set (OCC_MODULES_LIST ${OCCT_MODULES})
endif()
set (OCC_TARGET_FOLDER "${TARGET_FOLDER}")
if ("${OCC_TARGET_FOLDER}" STREQUAL "")
set (OCC_TARGET_FOLDER "Modules")
endif()
set (OCCT_TOOLKITS_NAME_SUFFIX "${TOOLKITS_NAME_SUFFIX}")
if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "")
set (OCCT_TOOLKITS_NAME_SUFFIX "TOOLKITS")
endif()
# parse PACKAGES file
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/PACKAGES" USED_PACKAGES)
if ("${USED_PACKAGES}" STREQUAL "")
set (USED_PACKAGES ${PROJECT_NAME})
endif()
if (USE_QT)
# Qt dependencies
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/qt_macro)
FIND_QT_PACKAGE(PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
include_directories("${PROJECT_INCLUDES}")
endif(USE_QT)
set (PRECOMPILED_DEFS)
if (NOT BUILD_SHARED_LIBS)
list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
if (WIN32 AND NOT EXECUTABLE_PROJECT)
list (APPEND PRECOMPILED_DEFS "-DOCCT_STATIC_BUILD")
endif()
endif()
# Get all used packages from toolkit
UNSET(RESOURCE_FILES)
foreach (OCCT_PACKAGE ${USED_PACKAGES})
#remove part after "/" in the OCCT_PACKAGE variable if exists
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif()
if (WIN32)
list (APPEND PRECOMPILED_DEFS "-D__${OCCT_PACKAGE_NAME}_DLL")
endif()
set (SOURCE_FILES)
set (HEADER_FILES)
# Generate Flex and Bison files
if (${BUILD_YACCLEX})
# flex files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX)
list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN)
# bison files
OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON)
list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN)
if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)
list (SORT SOURCE_FILES_FLEX)
list (SORT SOURCE_FILES_BISON)
math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1")
foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN})
list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE)
get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE)
list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE)
get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE)
string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL)
if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})
# Note: files are generated in original source directory (not in patch!)
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}")
# choose appropriate extension for generated files: "cxx" if source file contains
# instruction to generate C++ code, "c" otherwise
set (BISON_OUTPUT_FILE_EXT "c")
set (FLEX_OUTPUT_FILE_EXT "c")
file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT)
foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT})
string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE})
if (CXX_BISON_LANGUAGE_FOUND)
set (BISON_OUTPUT_FILE_EXT "cxx")
endif()
endforeach()
if (EXISTS ${FLEX_BISON_TARGET_DIR}/FlexLexer.h)
message (STATUS "Info: remove old FLEX header file: ${FLEX_BISON_TARGET_DIR}/FlexLexer.h")
file(REMOVE ${FLEX_BISON_TARGET_DIR}/FlexLexer.h)
endif()
file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT)
foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT})
string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE})
if (CXX_FLEX_LANGUAGE_FOUND)
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()
endforeach()
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})
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}"
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}"
COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L")
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE})
endif()
endforeach()
endif()
endif()
# header files
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
else()
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
if(APPLE)
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm")
endif()
endif()
list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX})
list (APPEND SOURCE_FILES ${SOURCE_FILES_C})
if(APPLE)
list (APPEND SOURCE_FILES ${SOURCE_FILES_M})
endif()
foreach(HEADER_FILE ${HEADER_FILES})
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
list (APPEND USED_INCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
else()
list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}")
endif()
endforeach()
foreach(SOURCE_FILE ${SOURCE_FILES})
if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
list (APPEND USED_SRCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
else()
list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}")
endif()
endforeach()
if (USE_QT)
FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES)
#message("Qt Resource files are: ${QT_RESOURCE_FILES} in ${OCCT_PACKAGE}")
endif(USE_QT)
#message("Resource files are: ${RESOURCE_FILES} in ${OCCT_PACKAGE}")
foreach(RESOURCE_FILE ${RESOURCE_FILES})
SOURCE_GROUP ("Resource Files\\${OCCT_PACKAGE_NAME}" FILES "${RESOURCE_FILE}")
endforeach()
endforeach()
string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
set (USED_RCFILE "")
if (MSVC)
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in")
configure_file("${APPLY_OCCT_PATCH_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
else()
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
endif()
endif()
set (CURRENT_MODULE)
foreach (OCCT_MODULE ${OCC_MODULES_LIST})
list (FIND ${OCCT_MODULE}_${OCCT_TOOLKITS_NAME_SUFFIX} ${PROJECT_NAME} CURRENT_PROJECT_IS_BUILT)
if (NOT ${CURRENT_PROJECT_IS_BUILT} EQUAL -1)
set (CURRENT_MODULE ${OCCT_MODULE})
endif()
endforeach()
if (MSVC)
OCCT_INSERT_CODE_FOR_TARGET ()
endif()
if (USE_QT)
FIND_AND_WRAP_MOC_FILES("${USED_INCFILES}" "${PROJECT_NAME}_MOC_FILES")
#message("MOC files: ${${PROJECT_NAME}_MOC_FILES}")
endif (USE_QT)
if (EXECUTABLE_PROJECT)
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}
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
if (EMSCRIPTEN)
install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.wasm DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}")
endif()
else()
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 (BUILD_FORCE_RelWithDebInfo)
set (aReleasePdbConf "Release")
else()
set (aReleasePdbConf)
endif()
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb
CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
endif()
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT ${CMAKE_SHARED_LIBRARY_SUFFIX})
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
install (TARGETS ${PROJECT_NAME}
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
if (NOT WIN32)
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
set (LINK_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX_DEFAULT}")
set (LIBRARY_NAME "${INSTALL_DIR}/${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
OCCT_CREATE_SYMLINK_TO_FILE (${LIBRARY_NAME} ${LINK_NAME})
endif()
endif()
endif()
if (CURRENT_MODULE)
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "${OCC_TARGET_FOLDER}/${CURRENT_MODULE}")
set_target_properties (${PROJECT_NAME} PROPERTIES MODULE "${CURRENT_MODULE}")
if (APPLE)
if (NOT "${INSTALL_NAME_DIR}" STREQUAL "")
set_target_properties (${PROJECT_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "${INSTALL_NAME_DIR}")
endif()
endif()
endif()
get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR)
get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR)
get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE)
set (OCC_SOVERSION "")
if (BUILD_SOVERSION_NUMBERS GREATER 2)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
elseif (BUILD_SOVERSION_NUMBERS GREATER 1)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}")
elseif (BUILD_SOVERSION_NUMBERS GREATER 0)
set (OCC_SOVERSION "${OCC_VERSION_MAJOR}")
endif()
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
SOVERSION "${OCC_SOVERSION}"
VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
set (USED_TOOLKITS_BY_CURRENT_PROJECT)
set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT)
# parse EXTERNLIB file
if (CUSTOM_EXTERNLIB)
set (USED_EXTERNLIB_AND_TOOLKITS ${CUSTOM_EXTERNLIB})
else()
FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS)
endif()
foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM})
if (NOT COMMENT_FOUND)
string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM})
string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM})
if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "")
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM})
if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK)
OCCT_INSTALL_VTK(${USED_ITEM})
endif()
else()
string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM})
if ("${CSF_FOUND}" STREQUAL "")
message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty")
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}")
add_definitions (-DHAVE_OPENGL)
endif()
if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}")
add_definitions (-DHAVE_GLES2)
endif()
set (LIBRARY_FROM_CACHE 0)
separate_arguments (CURRENT_CSF)
foreach (CSF_LIBRARY ${CURRENT_CSF})
string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY)
string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}")
string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}")
get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES)
string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}")
foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES})
set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}})
string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE)
if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}")
string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}")
string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}")
string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}")
if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR
"3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR
NOT "x${IS_ENDING}" STREQUAL "x" OR
NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x")
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}")
set (LIBRARY_FROM_CACHE 1)
endif()
endif()
endforeach()
endforeach()
if (NOT ${LIBRARY_FROM_CACHE})
# prepare a list from a string with whitespaces
separate_arguments (CURRENT_CSF)
list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF})
endif()
endif()
endif()
endif()
endif()
endforeach()
if (APPLE)
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
if (NOT ${IS_X11_FOUND} EQUAL -1)
find_package (X11 COMPONENTS X11)
if (NOT X11_FOUND)
message (STATUS "Warning: X11 is not found. It's required to install The XQuartz project: http://www.xquartz.org")
endif()
endif()
endif()
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
# Add VTK_OPENGL2_BACKEND definition.
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2" OR IS_VTK_9XX)
add_definitions(-DVTK_OPENGL2_BACKEND)
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
if(VTK_MAJOR_VERSION GREATER 6)
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
endif()
endif()
endif()
endforeach()
else()
if(VTK_MAJOR_VERSION EQUAL 6 AND VTK_MINOR_VERSION GREATER 2 OR VTK_MAJOR_VERSION GREATER 6)
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL" IS_VTK_RENDER_FREETYPE_FOUND)
if (NOT ${IS_VTK_RENDER_FREETYPE_FOUND} EQUAL -1)
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "vtkRenderingFreeTypeOpenGL")
endif()
endif()
endif()
if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
if(IS_VTK_9XX)
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
endif()
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
endif()
if (USE_QT)
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
target_link_libraries (${PROJECT_NAME} debug ${PROJECT_LIBRARY_DEBUG})
endforeach()
foreach (PROJECT_LIBRARY_RELEASE ${PROJECT_LIBRARIES_RELEASE})
target_link_libraries (${PROJECT_NAME} optimized ${PROJECT_LIBRARY_RELEASE})
endforeach()
endif()
# suppress deprecation warnings inside OCCT itself for old gcc versions with unavailable Standard_DISABLE_DEPRECATION_WARNINGS
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.0)
add_definitions("-DOCCT_NO_DEPRECATED")
message (STATUS "Warning: internal deprecation warnings by Standard_DEPRECATED have been disabled due to old gcc version being used")
endif()
endif()
# use Cotire to accelerate build via usage of precompiled headers
if (BUILD_USE_PCH)
if (WIN32)
# prevent definition of min and max macros through inclusion of Windows.h
# (for cotire builds)
add_definitions("-DNOMINMAX")
# avoid warnings on deprecated names from standard C library (see strsafe.h)
add_definitions("-DSTRSAFE_NO_DEPRECATE")
# avoid "std::Equal1" warning in QANCollection_Stl.cxx in debug mode
# suggesting using msvc "Checked Iterators"
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
endif()
# Exclude system-provided glext.h.
# These macros are already defined within OpenGl_GlFunctions.hxx,
# however we have to duplicate them here for building TKOpenGl with PCH.
add_definitions("-DGL_GLEXT_LEGACY")
add_definitions("-DGLX_GLXEXT_LEGACY")
# workaround for old gcc
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-D__STDC_CONSTANT_MACROS")
add_definitions("-D__STDC_FORMAT_MACROS")
endif()
# unity builds are not used since they do not add speed but cause conflicts
# in TKV3d
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(${PROJECT_NAME})
endif()

View File

@@ -1,18 +1,18 @@
if ("${TARGET_FOLDER}" STREQUAL "")
set (EXECUTABLE_PROJECT ON)
set (USE_QT ON)
set (RELATIVE_DIR "samples/qt")
set (MODULES_LIST ${OCCT_SAMPLES})
set (TARGET_FOLDER "Samples")
set (TOOLKITS_NAME_SUFFIX "SAMPLES_TOOLKITS")
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (EXECUTABLE_PROJECT)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")
if ("${TARGET_FOLDER}" STREQUAL "")
set (EXECUTABLE_PROJECT ON)
set (USE_QT ON)
set (RELATIVE_DIR "samples/qt")
set (MODULES_LIST ${OCCT_SAMPLES})
set (TARGET_FOLDER "Samples")
set (TOOLKITS_NAME_SUFFIX "SAMPLES_TOOLKITS")
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (EXECUTABLE_PROJECT)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")

View File

@@ -1,13 +1,13 @@
if ("${TARGET_FOLDER}" STREQUAL "")
set (USE_QT ON)
set (RELATIVE_DIR "tools")
set (MODULES_LIST ${OCCT_TOOLS})
set (TARGET_FOLDER "Tools")
set (TOOLKITS_NAME_SUFFIX "TOOL_TOOLKITS")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")
if ("${TARGET_FOLDER}" STREQUAL "")
set (USE_QT ON)
set (RELATIVE_DIR "tools")
set (MODULES_LIST ${OCCT_TOOLS})
set (TARGET_FOLDER "Tools")
set (TOOLKITS_NAME_SUFFIX "TOOL_TOOLKITS")
else()
unset (USE_QT)
unset (RELATIVE_DIR)
unset (MODULES_LIST)
unset (TARGET_FOLDER)
unset (TOOLKITS_NAME_SUFFIX)
endif("${TARGET_FOLDER}" STREQUAL "")

View File

@@ -1,27 +1,27 @@
#OpenCl
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER $ENV{AMDAPPSDKROOT}/include
$ENV{INTELOCLSDKROOT}/include
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/inc
$ENV{ATISTREAMSDKROOT}/include)
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86
$ENV{INTELOCLSDKROOT}/lib/x86
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/Win32
$ENV{ATISTREAMSDKROOT}/lib/x86)
ELSEIF(${COMPILER_BITNESS} STREQUAL 64)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86_64
$ENV{INTELOCLSDKROOT}/lib/x64
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/x64
$ENV{ATISTREAMSDKROOT}/lib/x86_64)
ENDIF()
THIRDPARTY_PRODUCT("OPENCL" "CL/cl.h" "OpenCL" "OpenCLd")
# if CL/cl.h isn't found (and 3RDPARTY_OPENCL_INCLUDE_DIR isn't defined)
# then try to find OpenCL/cl.h (all other variable won't be changed)
IF(NOT 3RDPARTY_OPENCL_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_OPENCL_INCLUDE_DIR}")
THIRDPARTY_PRODUCT("OPENCL" "OpenCL/cl.h" "OpenCL" "OpenCLd")
#OpenCl
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER $ENV{AMDAPPSDKROOT}/include
$ENV{INTELOCLSDKROOT}/include
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/inc
$ENV{ATISTREAMSDKROOT}/include)
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86
$ENV{INTELOCLSDKROOT}/lib/x86
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/Win32
$ENV{ATISTREAMSDKROOT}/lib/x86)
ELSEIF(${COMPILER_BITNESS} STREQUAL 64)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86_64
$ENV{INTELOCLSDKROOT}/lib/x64
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/x64
$ENV{ATISTREAMSDKROOT}/lib/x86_64)
ENDIF()
THIRDPARTY_PRODUCT("OPENCL" "CL/cl.h" "OpenCL" "OpenCLd")
# if CL/cl.h isn't found (and 3RDPARTY_OPENCL_INCLUDE_DIR isn't defined)
# then try to find OpenCL/cl.h (all other variable won't be changed)
IF(NOT 3RDPARTY_OPENCL_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_OPENCL_INCLUDE_DIR}")
THIRDPARTY_PRODUCT("OPENCL" "OpenCL/cl.h" "OpenCL" "OpenCLd")
ENDIF()

5
adm/cmake/openvr.cmake Normal file
View File

@@ -0,0 +1,5 @@
# OpenVR SDK
# OpenVR is an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
# https://github.com/ValveSoftware/openvr
THIRDPARTY_PRODUCT("OPENVR" "openvr.h" "CSF_OpenVR" "")

View File

@@ -1,41 +1,41 @@
#qt
# Qt is searched manually first (just determine root)
message (STATUS "Processing Qt 3-rd party")
if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
endif()
# Combine directory name with absolute path and show in GUI
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
endif()
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
# Without this setting find_package() will not work
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
# Now we can apply standard CMake finder for Qt5. We do this mostly
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
if (NOT ${Qt5_FOUND})
# Now we can apply standard CMake finder for Qt. We do this mostly
# to have qt4_wrap_cpp() function available
find_package(Qt4)
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)
endif()
#qt
# Qt is searched manually first (just determine root)
message (STATUS "Processing Qt 3-rd party")
if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
endif()
# Combine directory name with absolute path and show in GUI
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing Qt" FORCE)
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
endif()
set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")
# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
# Without this setting find_package() will not work
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
# Now we can apply standard CMake finder for Qt5. We do this mostly
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
if (NOT ${Qt5_FOUND})
# Now we can apply standard CMake finder for Qt. We do this mostly
# to have qt4_wrap_cpp() function available
find_package(Qt4)
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)
endif()

View File

@@ -1,117 +1,117 @@
#qt
macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
if ("${3RDPARTY_QT_DIR}" STREQUAL "")
message (FATAL_ERROR "Empty Qt dir")
endif()
if (${Qt5_FOUND})
#message (STATUS "Qt5 cmake configuration")
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}" "${Qt5Xml_INCLUDE_DIRS}")
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
# processing *.ts files to generate *.qm
find_package(Qt5LinguistTools)
get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
mark_as_advanced(QT_LRELEASE_EXECUTABLE)
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
MARK_AS_ADVANCED(QT_BINARY_DIR)
else()
#message (STATUS "Qt4 cmake configuration")
set(PROJECT_INCLUDES ${QT_INCLUDES})
if (WIN32)
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib;${3RDPARTY_QT_DIR}/lib/QtXmld4.lib")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib;${3RDPARTY_QT_DIR}/lib/QtXml4.lib")
else()
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
endif(WIN32)
find_program(QT_LRELEASE_EXECUTABLE lrelease)
endif()
endmacro()
macro (FIND_AND_WRAP_MOC_FILES HEADER_FILES GENERATED_MOC_FILES)
set (GENERATED_MOC_FILES "")
foreach (FILE ${HEADER_FILES})
# processing only files where Q_OBJECT exists
file(STRINGS "${FILE}" LINES REGEX "Q_OBJECT")
if(LINES)
unset (MOC_FILE)
if (${Qt5_FOUND})
qt5_wrap_cpp(MOC_FILE ${FILE})
else()
qt4_wrap_cpp(MOC_FILE ${FILE})
endif()
#message (STATUS "... Info: next MOC file ${MOC_FILE}")
list(APPEND ${GENERATED_MOC_FILES} ${MOC_FILE})
endif(LINES)
endforeach (FILE)
endmacro()
macro (FIND_AND_WRAP_RESOURCE_FILE RESOURCE_FILE_NAME RCC_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
# suppress some GCC warnings coming from source files generated from .qrc resources
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
endif()
endif()
endif()
endmacro()
macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
endif()
endif()
endmacro()
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" TS_FILES REGEX ".+[.]ts")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" QRC_FILES REGEX ".+[.]qrc")
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif(_index GREATER -1)
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
foreach (QRC_FILE ${QRC_FILES})
set (QRC_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${QRC_FILE}")
if (EXISTS ${QRC_FILE_RELATIVE})
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE_RELATIVE} RCC_FILES)
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
endif()
endforeach()
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
foreach (TS_FILE ${TS_FILES})
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
if (EXISTS ${TS_FILE_RELATIVE})
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
endif()
endforeach()
foreach (QM_FILE ${QM_FILES})
INSTALL(FILES ${QM_FILE} DESTINATION "${INSTALL_DIR_RESOURCE}/samples")
#message("install *.qm files (${QM_FILE}) to: ${INSTALL_DIR_RESOURCE}/samples")
endforeach (QM_FILE ${QM_FILES})
endmacro()
#qt
macro (FIND_QT_PACKAGE PROJECT_LIBRARIES_DEBUG PROJECT_LIBRARIES_RELEASE PROJECT_INCLUDES)
if ("${3RDPARTY_QT_DIR}" STREQUAL "")
message (FATAL_ERROR "Empty Qt dir")
endif()
if (${Qt5_FOUND})
#message (STATUS "Qt5 cmake configuration")
set(PROJECT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS}" "${Qt5Quick_INCLUDE_DIRS}" "${Qt5Xml_INCLUDE_DIRS}")
set(PROJECT_LIBRARIES_DEBUG "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
set(PROJECT_LIBRARIES_RELEASE "${Qt5Widgets_LIBRARIES}" "${Qt5Quick_LIBRARIES}" "${Qt5Xml_LIBRARIES}")
# processing *.ts files to generate *.qm
find_package(Qt5LinguistTools)
get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
mark_as_advanced(QT_LRELEASE_EXECUTABLE)
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
MARK_AS_ADVANCED(QT_BINARY_DIR)
else()
#message (STATUS "Qt4 cmake configuration")
set(PROJECT_INCLUDES ${QT_INCLUDES})
if (WIN32)
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/QtCored4.lib;${3RDPARTY_QT_DIR}/lib/QtGuid4.lib;${3RDPARTY_QT_DIR}/lib/QtXmld4.lib")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/QtCore4.lib;${3RDPARTY_QT_DIR}/lib/QtGui4.lib;${3RDPARTY_QT_DIR}/lib/QtXml4.lib")
else()
set(PROJECT_LIBRARIES_DEBUG "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
set(PROJECT_LIBRARIES_RELEASE "${3RDPARTY_QT_DIR}/lib/libQtCore.so;${3RDPARTY_QT_DIR}/lib/libQtGui.so;${3RDPARTY_QT_DIR}/lib/libQtXml.so")
endif(WIN32)
find_program(QT_LRELEASE_EXECUTABLE lrelease)
endif()
endmacro()
macro (FIND_AND_WRAP_MOC_FILES HEADER_FILES GENERATED_MOC_FILES)
set (GENERATED_MOC_FILES "")
foreach (FILE ${HEADER_FILES})
# processing only files where Q_OBJECT exists
file(STRINGS "${FILE}" LINES REGEX "Q_OBJECT")
if(LINES)
unset (MOC_FILE)
if (${Qt5_FOUND})
qt5_wrap_cpp(MOC_FILE ${FILE})
else()
qt4_wrap_cpp(MOC_FILE ${FILE})
endif()
#message (STATUS "... Info: next MOC file ${MOC_FILE}")
list(APPEND ${GENERATED_MOC_FILES} ${MOC_FILE})
endif(LINES)
endforeach (FILE)
endmacro()
macro (FIND_AND_WRAP_RESOURCE_FILE RESOURCE_FILE_NAME RCC_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_resources(RCC_FILES "${RESOURCE_FILE_NAME}")
# suppress some GCC warnings coming from source files generated from .qrc resources
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
endif()
endif()
endif()
endmacro()
macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
if(EXISTS "${RESOURCE_FILE_NAME}")
if (${Qt5_FOUND})
qt5_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
else()
qt4_add_translation(QM_FILES "${RESOURCE_FILE_NAME}")
endif()
endif()
endmacro()
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" TS_FILES REGEX ".+[.]ts")
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" QRC_FILES REGEX ".+[.]qrc")
string (FIND "${OCCT_PACKAGE}" "/" _index)
if (_index GREATER -1)
math (EXPR _index "${_index}")
string (SUBSTRING "${OCCT_PACKAGE}" 0 ${_index} OCCT_PACKAGE_NAME)
else()
set (OCCT_PACKAGE_NAME "${OCCT_PACKAGE}")
endif(_index GREATER -1)
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
foreach (QRC_FILE ${QRC_FILES})
set (QRC_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${QRC_FILE}")
if (EXISTS ${QRC_FILE_RELATIVE})
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE_RELATIVE} RCC_FILES)
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
endif()
endforeach()
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
foreach (TS_FILE ${TS_FILES})
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
if (EXISTS ${TS_FILE_RELATIVE})
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
endif()
endforeach()
foreach (QM_FILE ${QM_FILES})
INSTALL(FILES ${QM_FILE} DESTINATION "${INSTALL_DIR_RESOURCE}/samples")
#message("install *.qm files (${QM_FILE}) to: ${INSTALL_DIR_RESOURCE}/samples")
endforeach (QM_FILE ${QM_FILES})
endmacro()

View File

@@ -1,86 +1,86 @@
# RapidJSON
if (NOT DEFINED INSTALL_RAPIDJSON)
set (INSTALL_RAPIDJSON OFF CACHE BOOL "${INSTALL_RAPIDJSON_DESCR}")
endif()
# RapidJSON directory
if (NOT DEFINED 3RDPARTY_RAPIDJSON_DIR)
set (3RDPARTY_RAPIDJSON_DIR "" CACHE PATH "The directory containing RapidJSON")
endif()
# search for RapidJSON in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_RAPIDJSON_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" RapidJSON RAPIDJSON_DIR_NAME)
if (RAPIDJSON_DIR_NAME)
set (3RDPARTY_RAPIDJSON_DIR "${3RDPARTY_DIR}/${RAPIDJSON_DIR_NAME}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the RAPIDJSON")
endif()
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
set (HEADER_NAMES rapidjson/rapidjson.h)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "3RDPARTY_RAPIDJSON_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to RapidJSON header file" FORCE)
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_RAPIDJSON_DIR}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) RapidJSON search
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (CACHED_RAPIDJSON_DIR $ENV{RapidJSON_DIR})
set (ENV{RapidJSON_DIR} "${3RDPARTY_RAPIDJSON_DIR}")
endif()
find_package(RapidJSON QUIET)
# restore ENV{RapidJSON_DIR}
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (ENV{RapidJSON_DIR} ${CACHED_RAPIDJSON_DIR})
endif()
if (${RAPIDJSON_FOUND})
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_INCLUDE_DIR}" CACHE PATH "the path to RapidJSON header file" FORCE)
set (3RDPARTY_RAPIDJSON_DIR "${RAPIDJSON_ROOT_DIR}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (3RDPARTY_RAPIDJSON_INCLUDE_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
# Install header files
if (INSTALL_RAPIDJSON)
file(GLOB RAPIDJSON_SUBDIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}/*")
foreach(SUBDIR ${RAPIDJSON_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE PATH "the path to RapidJSON header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(RapidJSON_DIR)
# RapidJSON
if (NOT DEFINED INSTALL_RAPIDJSON)
set (INSTALL_RAPIDJSON OFF CACHE BOOL "${INSTALL_RAPIDJSON_DESCR}")
endif()
# RapidJSON directory
if (NOT DEFINED 3RDPARTY_RAPIDJSON_DIR)
set (3RDPARTY_RAPIDJSON_DIR "" CACHE PATH "The directory containing RapidJSON")
endif()
# search for RapidJSON in user defined directory
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
if (NOT 3RDPARTY_RAPIDJSON_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" RapidJSON RAPIDJSON_DIR_NAME)
if (RAPIDJSON_DIR_NAME)
set (3RDPARTY_RAPIDJSON_DIR "${3RDPARTY_DIR}/${RAPIDJSON_DIR_NAME}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (NOT DEFINED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the RAPIDJSON")
endif()
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
set (HEADER_NAMES rapidjson/rapidjson.h)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "3RDPARTY_RAPIDJSON_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to RapidJSON header file" FORCE)
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_RAPIDJSON_DIR}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_RAPIDJSON_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include rapidjson
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
# use default (CMake) RapidJSON search
if (NOT 3RDPARTY_RAPIDJSON_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (CACHED_RAPIDJSON_DIR $ENV{RapidJSON_DIR})
set (ENV{RapidJSON_DIR} "${3RDPARTY_RAPIDJSON_DIR}")
endif()
find_package(RapidJSON QUIET)
# restore ENV{RapidJSON_DIR}
if (3RDPARTY_RAPIDJSON_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_DIR}")
set (ENV{RapidJSON_DIR} ${CACHED_RAPIDJSON_DIR})
endif()
if (${RAPIDJSON_FOUND})
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_INCLUDE_DIR}" CACHE PATH "the path to RapidJSON header file" FORCE)
set (3RDPARTY_RAPIDJSON_DIR "${RAPIDJSON_ROOT_DIR}" CACHE PATH "The directory containing RapidJSON" FORCE)
endif()
endif()
endif()
if (3RDPARTY_RAPIDJSON_INCLUDE_DIR AND EXISTS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}")
# Install header files
if (INSTALL_RAPIDJSON)
file(GLOB RAPIDJSON_SUBDIRS "${3RDPARTY_RAPIDJSON_INCLUDE_DIR}/*")
foreach(SUBDIR ${RAPIDJSON_SUBDIRS})
if(IS_DIRECTORY "${SUBDIR}")
install (DIRECTORY "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
else()
install (FILES "${SUBDIR}" DESTINATION "${INSTALL_DIR_INCLUDE}")
endif()
endforeach()
endif()
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_RAPIDJSON_INCLUDE_DIR)
set (3RDPARTY_RAPIDJSON_INCLUDE_DIR "" CACHE PATH "the path to RapidJSON header file" FORCE)
endif()
# unset all redundant variables
OCCT_CHECK_AND_UNSET(RapidJSON_DIR)

View File

@@ -1,294 +1,240 @@
# 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)
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify TBB folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_TBB_DIR PATH "The directory containing tbb")
if (NOT 3RDPARTY_TBB_DIR OR NOT EXISTS "${3RDPARTY_TBB_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME)
if (TBB_DIR_NAME)
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
endif()
endif()
else()
#set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing TBB" FORCE)
endif()
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB")
endif()
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
# check 3RDPARTY_TBB_INCLUDE_DIR for consictency with specified 3RDPARTY_TBB_DIR
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_TBB_INCLUDE_DIR PATH "The directory containing headers of the TBB")
endif()
# tbb.h
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
set (HEADER_NAMES tbb.h tbb/tbb.h)
# set 3RDPARTY_TBB_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_TBB_INCLUDE_DIR
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to tbb.h" FORCE)
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATHS ${3RDPARTY_TBB_DIR}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES}
PATH_SUFFIXES include
CMAKE_FIND_ROOT_PATH_BOTH)
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()
if (WIN32 AND NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR)
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
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()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library")
endif()
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} shared library")
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH)
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE)
else()
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library")
endif()
endif()
endif()
OCCT_MAKE_COMPILER_SHORT_NAME()
OCCT_MAKE_COMPILER_BITNESS()
if (${COMPILER_BITNESS} EQUAL 32)
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME ia32)
else()
set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME intel64)
endif()
# tbb/tbbmalloc library
if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME})
# set 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
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()
set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
endif()
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
PATHS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}"
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
else()
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME}
PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}
CMAKE_FIND_ROOT_PATH_BOTH)
endif()
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH)
set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
else()
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}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
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()
set (PRODUCT_PATH_SUFFIXES bin bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER})
endif()
if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}")
find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_NAME}
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()
if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_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)
foreach (LIB IN LISTS CSF_TBB)
TBB_PRODUCT_SEARCH (${LIB})
endforeach()
if (INSTALL_TBB)
set (USED_3RDPARTY_TBB_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
else()
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
endif()
endif()
#endif()
# tbb
if (MSVC AND BUILD_SHARED_LIBS)
add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE)
add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE)
endif()
if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS)
set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}")
endif()
# Initialize tbb directory.
if (NOT DEFINED 3RDPARTY_TBB_DIR)
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
endif()
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)
if (TBB_DIR_NAME)
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
endif()
endif()
# Here we have full path name to installation directory of TBB.
# Employ it.
if (EXISTS "${3RDPARTY_TBB_DIR}")
find_package (
TBB 2021.5
PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
REQUIRED
CONFIG)
# 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()
separate_arguments (CSF_TBB)
foreach (LIB IN LISTS CSF_TBB)
string(TOLOWER "${LIB}" LIB_LOWER)
string(TOUPPER "${LIB}" LIB_UPPER)
# Achive *.lib files and directory containing it.
get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE)
# Reserve cache variable for *.lib.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)")
endif()
# Reserve cache variable for directory containing *.lib file.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.lib)")
endif()
if (EXISTS "${TBB_LIB_FILE}")
set (3RDPARTY_${LIB_UPPER}_LIBRARY
"${TBB_LIB_FILE}"
CACHE FILEPATH
"${LIB_UPPER} library (*.lib)"
FORCE)
get_filename_component (TBB_LIB_FILE_DIRECTORY "${TBB_LIB_FILE}" DIRECTORY)
set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR
"${TBB_LIB_FILE_DIRECTORY}"
CACHE PATH
"The directory containing ${LIB_UPPER} library (*.lib)"
FORCE)
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR)
endif()
# Achive *.dll files and directory containing it.
get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
# Reserve cache variable for *.dll.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL)
set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)")
endif()
# Reserve cache variable for directory containing *.dll file.
if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL_DIR)
set (3RDPARTY_${LIB_UPPER}_DLL_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.dll)")
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()
# install *.dll (tbb & tbbmalloc)
if (INSTALL_TBB)
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}")
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")
endif()
endif()
mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL)
endforeach()
if (INSTALL_TBB)
set (USED_3RDPARTY_TBB_DIR "")
else()
# the *.dll/*.so* directory for using by the executable
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
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()
separate_arguments (CSF_TBB)
foreach (LIB IN LISTS CSF_TBB)
string(TOLOWER "${LIB}" LIB_LOWER)
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)
set (USED_3RDPARTY_TBB_DIR "")
else()
# the *.so* directory for using by the executable
set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
endif()
endif()

View File

@@ -1,294 +1,281 @@
# tcl
if (NOT DEFINED INSTALL_TCL AND BUILD_SHARED_LIBS)
set (INSTALL_TCL OFF CACHE BOOL "${INSTALL_TCL_DESCR}")
endif()
# tcl directory
if (NOT DEFINED 3RDPARTY_TCL_DIR)
set (3RDPARTY_TCL_DIR "" CACHE PATH "The directory containing tcl")
endif()
# tcl include directory
if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
endif()
if (BUILD_SHARED_LIBS)
# tcl library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
endif()
# tcl library directory
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
endif()
# tcl shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
endif()
endif()
# tcl shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
endif()
endif()
# search for tcl in user defined directory
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
if (TCL_DIR_NAME)
set (3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "The directory containing tcl" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
endif()
# check tcl include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
# use default (CMake) TCL search
find_package(TCL QUIET)
# tcl include dir
if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
if (TCL_INCLUDE_PATH AND EXISTS "${TCL_INCLUDE_PATH}")
set (3RDPARTY_TCL_INCLUDE_DIR "${TCL_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TCL" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
if (TCL_LIBRARY AND EXISTS "${TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "${TCL_LIBRARY}" CACHE FILEPATH "TCL library" FORCE)
if (NOT 3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
elseif (3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES ${CSF_TclLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
if (BUILD_SHARED_LIBS)
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
set (3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "TCL library" FORCE)
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_LIBRARY OR NOT EXISTS "${3RDPARTY_TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "TCL library" FORCE)
endif()
if (NOT 3RDPARTY_TCL_LIBRARY_DIR AND 3RDPARTY_TCL_LIBRARY)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
set (3RDPARTY_TCL_LIBRARY_VERSION "")
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
get_filename_component (TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY_NAME}")
if (NOT "${TCL_LIBRARY_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
set (3RDPARTY_TCL_LIBRARY_VERSION "${TCL_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TCL version isn't found")
endif()
endif()
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TCL_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TCL_MAJOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TCL_MINOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TCL_MAJOR_VERSION}.${3RDPARTY_TCL_MINOR_VERSION}")
endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
else()
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES tcl${3RDPARTY_TCL_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_DLL OR NOT EXISTS "${3RDPARTY_TCL_DLL}")
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "TCL shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TCL_DLL_DIR AND 3RDPARTY_TCL_DLL)
get_filename_component (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
set (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL_DIR}" CACHE FILEPATH "The directory containing TCL shared library" FORCE)
endif()
endif()
# include found paths to common variables
if (3RDPARTY_TCL_INCLUDE_DIR AND EXISTS "${3RDPARTY_TCL_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TCL_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
endif()
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TCL_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_TCL_DLL OR EXISTS "${3RDPARTY_TCL_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TCL_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TCL_DLL_DIR)
endif()
endif()
# install tcl
if (INSTALL_TCL)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
# tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
# collect and install all dlls from tcl dll dirs
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
if (SINGLE_GENERATOR)
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TCL_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TCL_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TCL_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tcl is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR_LIB}")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tclX.X subdir won't be copyied during the installation process.")
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
endif()
set (USED_3RDPARTY_TCL_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
else()
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
endif()
if (TK_FOUND AND 3RDPARTY_TCL_DIR)
get_filename_component (TK_WISH_ABSOLUTE "${TK_WISH}" ABSOLUTE)
get_filename_component (3RDPARTY_TCL_DIR_ABSOLUTE "${3RDPARTY_TCL_DIR}" ABSOLUTE)
string (FIND "${TK_WISH_ABSOLUTE}" "${3RDPARTY_TCL_DIR_ABSOLUTE}" THE_SAME_FOLDER)
if (${THE_SAME_FOLDER} EQUAL 0)
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
message (STATUS "Info: TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
endif()
endif()
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_DLL)
OCCT_CHECK_AND_UNSET (3RDPARTY_TCL_DLL_DIR)
OCCT_CHECK_AND_UNSET (INSTALL_TCL)
endif()
# tcl
if (NOT DEFINED INSTALL_TCL)
set (INSTALL_TCL OFF CACHE BOOL "${INSTALL_TCL_DESCR}")
endif()
# tcl directory
if (NOT DEFINED 3RDPARTY_TCL_DIR)
set (3RDPARTY_TCL_DIR "" CACHE PATH "The directory containing tcl")
endif()
# tcl include directory
if (NOT DEFINED 3RDPARTY_TCL_INCLUDE_DIR)
set (3RDPARTY_TCL_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tcl")
endif()
# tcl library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
endif()
# tcl library directory
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
endif()
# tcl shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "tcl shared library" FORCE)
endif()
endif()
# tcl shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TCL_DLL_DIR)
set (3RDPARTY_TCL_DLL_DIR "" CACHE FILEPATH "The directory containing tcl shared library")
endif()
# search for tcl in user defined directory
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
if (TCL_DIR_NAME)
set (3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "The directory containing tcl" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
set (TCL_INCLUDE_PATH "${3RDPARTY_TCL_DIR}/include")
endif()
# check tcl include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
# use default (CMake) TCL search
find_package(TCL QUIET)
# tcl include dir
if (NOT 3RDPARTY_TCL_INCLUDE_DIR)
if (TCL_INCLUDE_PATH AND EXISTS "${TCL_INCLUDE_PATH}")
set (3RDPARTY_TCL_INCLUDE_DIR "${TCL_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TCL" FORCE)
endif()
endif()
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
if (TCL_LIBRARY AND EXISTS "${TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "${TCL_LIBRARY}" CACHE FILEPATH "TCL library" FORCE)
if (NOT 3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
elseif (3RDPARTY_TCL_LIBRARY_DIR)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES ${CSF_TclLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TCL)
# tcl dir and library
if (NOT 3RDPARTY_TCL_LIBRARY)
set (3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "TCL library" FORCE)
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TCL_LIBRARY NAMES ${CSF_TclLibs}
PATHS "${3RDPARTY_TCL_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_LIBRARY OR NOT EXISTS "${3RDPARTY_TCL_LIBRARY}")
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "TCL library" FORCE)
endif()
if (NOT 3RDPARTY_TCL_LIBRARY_DIR AND 3RDPARTY_TCL_LIBRARY)
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
set (3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TCL library" FORCE)
endif()
endif()
set (3RDPARTY_TCL_LIBRARY_VERSION "")
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
get_filename_component (TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY_NAME}")
if (NOT "${TCL_LIBRARY_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
set (3RDPARTY_TCL_LIBRARY_VERSION "${TCL_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TCL version isn't found")
endif()
endif()
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TCL_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TCL_MAJOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TCL_MINOR_VERSION "${3RDPARTY_TCL_LIBRARY_VERSION}")
set (3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TCL_MAJOR_VERSION}.${3RDPARTY_TCL_MINOR_VERSION}")
endif()
if (WIN32)
if (NOT 3RDPARTY_TCL_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll .a)
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TCL_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DLL_DIR}")
elseif (3RDPARTY_TCL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
else()
get_filename_component (3RDPARTY_TCL_LIBRARY_DIR_PARENT "${3RDPARTY_TCL_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "TCL shared library" FORCE)
find_library (3RDPARTY_TCL_DLL NAMES tcl${3RDPARTY_TCL_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TCL_DLL OR NOT EXISTS "${3RDPARTY_TCL_DLL}")
set (3RDPARTY_TCL_DLL "" CACHE FILEPATH "TCL shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TCL_DLL_DIR AND 3RDPARTY_TCL_DLL)
get_filename_component (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
set (3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL_DIR}" CACHE FILEPATH "The directory containing TCL shared library" FORCE)
endif()
endif()
# include found paths to common variables
if (3RDPARTY_TCL_INCLUDE_DIR AND EXISTS "${3RDPARTY_TCL_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TCL_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
endif()
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TCL_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_TCL_DLL OR EXISTS "${3RDPARTY_TCL_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TCL_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TCL_DLL_DIR)
endif()
endif()
# install tcl
if (INSTALL_TCL)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
# tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
# collect and install all dlls from tcl dll dirs
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
if (SINGLE_GENERATOR)
install (FILES ${TCL_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TCL_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TCL_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TCL_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tcl is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR_LIB}")
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tclX.X subdir won't be copied during the installation process.")
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
endif()
set (USED_3RDPARTY_TCL_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
else()
set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TCL_DLL)
if (TK_FOUND AND 3RDPARTY_TCL_DIR)
get_filename_component (TK_WISH_ABSOLUTE "${TK_WISH}" ABSOLUTE)
get_filename_component (3RDPARTY_TCL_DIR_ABSOLUTE "${3RDPARTY_TCL_DIR}" ABSOLUTE)
string (FIND "${TK_WISH_ABSOLUTE}" "${3RDPARTY_TCL_DIR_ABSOLUTE}" THE_SAME_FOLDER)
if (${THE_SAME_FOLDER} EQUAL 0)
set (3RDPARTY_TCLTK_DIR "${3RDPARTY_TCL_DIR}")
message (STATUS "Info: TK is used from TCL folder: ${3RDPARTY_TCLTK_DIR}")
endif()
endif()
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)

View File

@@ -1,286 +1,286 @@
# tk
if (NOT DEFINED INSTALL_TK AND BUILD_SHARED_LIBS)
set (INSTALL_TK OFF CACHE BOOL "${INSTALL_TK_DESCR}")
endif()
# tk directory
if (NOT DEFINED 3RDPARTY_TK_DIR)
set (3RDPARTY_TK_DIR "" CACHE PATH "The directory containing tk")
endif ()
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_TCLTK_DIR)
set (3RDPARTY_TK_DIR "${3RDPARTY_TCLTK_DIR}" CACHE PATH "The directory containing tk" FORCE)
endif()
# tk include directory
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
endif()
if (BUILD_SHARED_LIBS)
# tk library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
endif()
# tk library directory
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
endif()
# tk shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
endif()
endif()
# tk shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
endif()
endif()
# search for tk in user defined directory
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tk TK_DIR_NAME)
if (TK_DIR_NAME)
set (3RDPARTY_TK_DIR "${3RDPARTY_DIR}/${TK_DIR_NAME}" CACHE PATH "The directory containing tk" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TK_DIR AND EXISTS "${3RDPARTY_TK_DIR}")
set (TK_INCLUDE_PATH "${3RDPARTY_TK_DIR}/include")
endif()
# check tk include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
# use default (CMake) TCL search
find_package(TCL QUIET)
# tk include dir
if (NOT 3RDPARTY_TK_INCLUDE_DIR)
if (TK_INCLUDE_PATH AND EXISTS "${TK_INCLUDE_PATH}")
set (3RDPARTY_TK_INCLUDE_DIR "${TK_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TK" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
if (TK_LIBRARY AND EXISTS "${TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "${TK_LIBRARY}" CACHE FILEPATH "TK library" FORCE)
if (NOT 3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
elseif (3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES ${CSF_TclTkLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
set (3RDPARTY_TK_LIBRARY "3RDPARTY_TK_LIBRARY-NOTFOUND" CACHE FILEPATH "TK library" FORCE)
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_LIBRARY OR NOT EXISTS "${3RDPARTY_TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "TK library" FORCE)
endif()
if (NOT 3RDPARTY_TK_LIBRARY_DIR AND 3RDPARTY_TK_LIBRARY)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION "")
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
get_filename_component (TK_LIBRARY_NAME "${3RDPARTY_TK_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY_NAME}")
if (NOT "${TK_LIBRARY_VERSION}" STREQUAL "${TK_LIBRARY_NAME}")
set (3RDPARTY_TK_LIBRARY_VERSION "${TK_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TK version isn't found")
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TK_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TK_MAJOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TK_MINOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TK_MAJOR_VERSION}.${3RDPARTY_TK_MINOR_VERSION}")
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
else()
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES tk${3RDPARTY_TK_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_DLL OR NOT EXISTS "${3RDPARTY_TK_DLL}")
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "TK shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TK_DLL_DIR AND 3RDPARTY_TK_DLL)
get_filename_component (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL}" PATH)
set (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL_DIR}" CACHE FILEPATH "The directory containing TK shared library" FORCE)
endif()
endif()
endif()
# include found paths to common variables
if (3RDPARTY_TK_INCLUDE_DIR AND EXISTS "${3RDPARTY_TK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TK_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TK_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_TK_DLL OR EXISTS "${3RDPARTY_TK_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TK_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TK_DLL_DIR)
endif()
endif()
# install tk
if (INSTALL_TK)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
# tk 8.6 requires zlib. install all dlls from tk bin folder that may contain zlib also
# collect and install all dlls from tk dll dirs
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
if (SINGLE_GENERATOR)
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TK_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TK_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TK_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}/")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}/i")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tk is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tkX.X subdir won't be copyied during the installation process.")
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
endif()
set (USED_3RDPARTY_TK_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_DLL_DIR})
else()
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TK_LIBRARY 3RDPARTY_TK_DLL)
endif()
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL_DIR)
OCCT_CHECK_AND_UNSET (INSTALL_TK)
endif()
# tk
if (NOT DEFINED INSTALL_TK AND BUILD_SHARED_LIBS)
set (INSTALL_TK OFF CACHE BOOL "${INSTALL_TK_DESCR}")
endif()
# tk directory
if (NOT DEFINED 3RDPARTY_TK_DIR)
set (3RDPARTY_TK_DIR "" CACHE PATH "The directory containing tk")
endif ()
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_TCLTK_DIR)
set (3RDPARTY_TK_DIR "${3RDPARTY_TCLTK_DIR}" CACHE PATH "The directory containing tk" FORCE)
endif()
# tk include directory
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
endif()
if (BUILD_SHARED_LIBS)
# tk library file (with absolute path)
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
endif()
# tk library directory
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
endif()
# tk shared library (with absolute path)
if (WIN32)
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
endif()
endif()
# tk shared library directory
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
endif()
endif()
# search for tk in user defined directory
if (NOT 3RDPARTY_TK_DIR AND 3RDPARTY_DIR)
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tk TK_DIR_NAME)
if (TK_DIR_NAME)
set (3RDPARTY_TK_DIR "${3RDPARTY_DIR}/${TK_DIR_NAME}" CACHE PATH "The directory containing tk" FORCE)
endif()
endif()
# define paths for default engine
if (3RDPARTY_TK_DIR AND EXISTS "${3RDPARTY_TK_DIR}")
set (TK_INCLUDE_PATH "${3RDPARTY_TK_DIR}/include")
endif()
# check tk include dir, library dir and shared library dir
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
# use default (CMake) TCL search
find_package(TCL QUIET)
# tk include dir
if (NOT 3RDPARTY_TK_INCLUDE_DIR)
if (TK_INCLUDE_PATH AND EXISTS "${TK_INCLUDE_PATH}")
set (3RDPARTY_TK_INCLUDE_DIR "${TK_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of TK" FORCE)
endif()
endif()
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
if (TK_LIBRARY AND EXISTS "${TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "${TK_LIBRARY}" CACHE FILEPATH "TK library" FORCE)
if (NOT 3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
elseif (3RDPARTY_TK_LIBRARY_DIR)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES ${CSF_TclTkLibs}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
endif()
endif()
endif()
COMPLIANCE_PRODUCT_CONSISTENCY(TK)
if (BUILD_SHARED_LIBS)
# tk dir and library
if (NOT 3RDPARTY_TK_LIBRARY)
set (3RDPARTY_TK_LIBRARY "3RDPARTY_TK_LIBRARY-NOTFOUND" CACHE FILEPATH "TK library" FORCE)
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_LIBRARY_DIR}"
NO_DEFAULT_PATH)
# search in another place if previous search doesn't find anything
find_library (3RDPARTY_TK_LIBRARY NAMES ${CSF_TclTkLibs}
PATHS "${3RDPARTY_TK_DIR}/lib"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_LIBRARY OR NOT EXISTS "${3RDPARTY_TK_LIBRARY}")
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "TK library" FORCE)
endif()
if (NOT 3RDPARTY_TK_LIBRARY_DIR AND 3RDPARTY_TK_LIBRARY)
get_filename_component (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY}" PATH)
set (3RDPARTY_TK_LIBRARY_DIR "${3RDPARTY_TK_LIBRARY_DIR}" CACHE FILEPATH "The directory containing TK library" FORCE)
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION "")
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
get_filename_component (TK_LIBRARY_NAME "${3RDPARTY_TK_LIBRARY}" NAME)
string(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY_NAME}")
if (NOT "${TK_LIBRARY_VERSION}" STREQUAL "${TK_LIBRARY_NAME}")
set (3RDPARTY_TK_LIBRARY_VERSION "${TK_LIBRARY_VERSION}")
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
message (STATUS "Info: TK version isn't found")
endif()
endif()
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "")
if (3RDPARTY_TK_LIBRARY_VERSION)
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_TK_MAJOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_TK_MINOR_VERSION "${3RDPARTY_TK_LIBRARY_VERSION}")
set (3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_TK_MAJOR_VERSION}.${3RDPARTY_TK_MINOR_VERSION}")
endif()
if (WIN32)
if (NOT 3RDPARTY_TK_DLL)
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" ".a")
set (DLL_FOLDER_FOR_SEARCH "")
if (3RDPARTY_TK_DLL_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DLL_DIR}")
elseif (3RDPARTY_TK_DIR)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_DIR}/bin")
else()
get_filename_component (3RDPARTY_TK_LIBRARY_DIR_PARENT "${3RDPARTY_TK_LIBRARY_DIR}" PATH)
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TK_LIBRARY_DIR_PARENT}/bin")
endif()
set (3RDPARTY_TK_DLL "3RDPARTY_TK_DLL-NOTFOUND" CACHE FILEPATH "TK shared library" FORCE)
find_library (3RDPARTY_TK_DLL NAMES tk${3RDPARTY_TK_LIBRARY_VERSION}
PATHS "${DLL_FOLDER_FOR_SEARCH}"
NO_DEFAULT_PATH)
if (NOT 3RDPARTY_TK_DLL OR NOT EXISTS "${3RDPARTY_TK_DLL}")
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "TK shared library" FORCE)
endif()
endif()
if (NOT 3RDPARTY_TK_DLL_DIR AND 3RDPARTY_TK_DLL)
get_filename_component (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL}" PATH)
set (3RDPARTY_TK_DLL_DIR "${3RDPARTY_TK_DLL_DIR}" CACHE FILEPATH "The directory containing TK shared library" FORCE)
endif()
endif()
endif()
# include found paths to common variables
if (3RDPARTY_TK_INCLUDE_DIR AND EXISTS "${3RDPARTY_TK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TK_INCLUDE_DIR}")
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_TK_LIBRARY AND EXISTS "${3RDPARTY_TK_LIBRARY}")
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TK_LIBRARY_DIR}")
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TK_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_TK_DLL OR EXISTS "${3RDPARTY_TK_DLL}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_TK_DLL_DIR}")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_TK_DLL_DIR)
endif()
endif()
# install tk
if (INSTALL_TK)
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()
if (WIN32)
# tk 8.6 requires zlib. install all dlls from tk bin folder that may contain zlib also
# collect and install all dlls from tk dll dirs
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
if (SINGLE_GENERATOR)
install (FILES ${TK_DLLS} DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES ${TK_DLLS}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES ${TK_DLLS}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES ${TK_DLLS}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
if (SINGLE_GENERATOR)
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}/")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}/i")
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
if (TCL_TCLSH_VERSION)
# tk is required to install in lib folder (without)
install (DIRECTORY "${3RDPARTY_TK_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR_LIB}")
else()
message (STATUS "\nWarning: tkX.X subdir won't be copied during the installation process.")
message (STATUS "Try seeking tk within another folder by changing 3RDPARTY_TK_DIR variable.")
endif()
set (USED_3RDPARTY_TK_DIR "")
else()
# the library directory for using by the executable
if (WIN32)
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_DLL_DIR})
else()
set (USED_3RDPARTY_TK_DIR ${3RDPARTY_TK_LIBRARY_DIR})
endif()
endif()
mark_as_advanced (3RDPARTY_TK_LIBRARY 3RDPARTY_TK_DLL)
endif()
# unset all redundant variables
#TCL
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
#TK
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
OCCT_CHECK_AND_UNSET (TK_WISH)
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL)
OCCT_CHECK_AND_UNSET (3RDPARTY_TK_DLL_DIR)
OCCT_CHECK_AND_UNSET (INSTALL_TK)
endif()

View File

@@ -1,195 +1,215 @@
# variable description
#
set (BUILD_PATCH_DESCR
"Points to the directory recognized as a 'patch' for OCCT. If specified,
the files from this directory take precedence over the corresponding native
OCCT sources. This way you are able to introduce patches to Open CASCADE
Technology not affecting the original source distribution")
set (BUILD_LIBRARY_TYPE_DESCR
"Specifies the type of library to be created. 'Shared' libraries
are linked dynamically and loaded at runtime. 'Static' libraries
are archives of object files for use when linking other targets")
set (BUILD_YACCLEX_DESCR
"Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
set (BUILD_RESOURCES_DESCR "Enables regeneration of OCCT resource files")
set (BUILD_WITH_DEBUG_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
Applies only for Debug configuration.")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries")
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
"Disables exceptions like Standard_OutOfRange in Release builds.
Defines No_Exception macros for Release builds when enabled (default).
These exceptions are always enabled in Debug builds, but disable in Release for better performance")
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
Corresponding environment variable (CSF_FPE) can be changed manually
in custom.bat/sh scripts without regeneration by CMake.")
set (BUILD_USE_PCH_DESCR
"Use precompiled headers to accelerate the build.
Precompiled headers are generated automatically by Cotire tool.")
# install variables
set (INSTALL_DIR_DESCR
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_TBB and
other similar variables) will be placed during the installation process (building INSTALL project)")
set (INSTALL_DIR_WITH_VERSION_DESCR
"Use OCCT version number as suffix for names of directories")
set (INSTALL_DIR_LAYOUT_DESCR
"Defines structure of OCCT files (binaries, resources, headers etc.) for the install directory.
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
If needed, layout can be customized with INSTALL_DIR_* variables.")
set (INSTALL_DIR_BIN_DESCR
"Subdirectory of INSTALL_DIR where binaries will be installed")
set (INSTALL_DIR_INCLUDE_DESCR
"Subdirectory of INSTALL_DIR where OCCT headers will be installed")
set (INSTALL_DIR_DATA_DESCR
"Subdirectory of INSTALL_DIR where sample data files will be installed")
set (INSTALL_DIR_DOC_DESCR
"Subdirectory of INSTALL_DIR where documentation will be installed")
set (INSTALL_DIR_LIB_DESCR
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
set (INSTALL_DIR_RESOURCE_DESCR
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
set (INSTALL_DIR_SAMPLES_DESCR
"Subdirectory of INSTALL_DIR where samples will be installed")
set (INSTALL_DIR_TESTS_DESCR
"Subdirectory of INSTALL_DIR where test scripts will be installed")
set (INSTALL_DIR_SCRIPT_DESCR
"Subdirectory of INSTALL_DIR where scripts will be installed")
set (INSTALL_DIR_CMAKE_DESCR
"Subdirectory of INSTALL_DIR where CMake configuration files will be installed.
Must be three levels below INSTALL_DIR")
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
set (${INSTALL_TARGET_VARIABLE}_DESCR
"Indicates whether ${INSTALL_TARGET_STRING} should be installed (building INSTALL
project) into the installation directory (INSTALL_DIR variable)")
endmacro()
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files")
INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
INSTALL_MESSAGE (INSTALL_RAPIDJSON "RapidJSON header files")
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
# build variables
macro (BUILD_MODULE_MESSAGE BUILD_MODULE_TARGET_VARIABLE BUILD_MODULE_TARGET_STRING)
set (${BUILD_MODULE_TARGET_VARIABLE}_DESCR
"Indicates whether ${BUILD_MODULE_TARGET_STRING} module should be built or not.
It should be noted that some toolkits of the module can be built even if this module
is not checked (this happens if some other modules depend on these toolkits)")
endmacro()
BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework")
BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange")
BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw")
BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses")
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms")
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingData "ModelingData")
BUILD_MODULE_MESSAGE (BUILD_MODULE_Visualization "Visualization")
set (BUILD_ADDITIONAL_TOOLKITS_DESCR
"Semicolon-separated individual toolkits to include into build process. If you
want to build some particular libraries (toolkits) only, then you may uncheck
all modules in the corresponding BUILD_MODUE_* options and provide the list of
necessary libraries here. Of course, all dependencies will be resolved automatically")
set (BUILD_SAMPLES_MFC_DESCR
"Indicates whether OCCT MFC samples should be built together with OCCT.
These samples show some possibilities of using OCCT and they can be executed
with script samples.bat from the installation directory (INSTALL_DIR)")
set (BUILD_SAMPLES_QT_DESCR
"Indicates whether OCCT Qt samples should be built together with OCCT.
These samples show some possibilities of using OCCT and they can be executed
with script samples.bat from the installation directory (INSTALL_DIR)")
set (BUILD_Inspector_DESCR
"Indicates whether OCCT inspector should be built together with OCCT.
This inspector provides functionality to interactively inspect low-level content
of the OCAF data model, OCCT viewer, etc. have been introduced in OCCT.
It can be executed with script inspector.bat from the installation directory (INSTALL_DIR) or
using 'tinspector' command in DRAW interpretator")
set (BUILD_MODULE_UwpSample_DESCR
"Indicates whether OCCT UWP sample should be built together with OCCT.")
set (BUILD_DOC_Overview_DESCR
"Indicates whether OCCT overview documentation project (Markdown format) should be
created together with OCCT. It is not built together with OCCT. Checking this options
leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command
to generate the documentation in HTML format. The documentation will be available in the
installation directory (overview.bat script) if INSTALL_DOC_Overview variable is checked")
set (3RDPARTY_DIR_DESCR
"The root directory where all required third-party products will be searched. If a
third-party product have been found - corresponding CMake variables will be specified
(VTK: 3RDPARTY_VTK_DIR, 3RDPARTY_VTK_INCLUDE_DIR, 3RDPARTY_VTK_LIBRARY_DIR)")
set (USE_FFMPEG_DESCR
"Indicates whether FFmpeg framework is used or not. FFmpeg stands for
multimedia data handling, open-source software libraries used for video encoding and decoding.")
set (USE_FREEIMAGE_DESCR
"Indicates whether Freeimage product should be used in OCCT visualization
module for support of popular graphics image formats (PNG, BMP etc)")
set (USE_RAPIDJSON_DESCR
"Indicates whether RapidJSON product should be used in OCCT DataExchange
module for support of JSON-based formats like glTF")
set (USE_EGL_DESCR
"Indicates whether EGL should be used in OCCT visualization
module instead of conventional OpenGL context creation APIs")
set (USE_GLES2_DESCR
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization
module instead of desktop OpenGL")
set (USE_TBB_DESCR
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,
the technology of Intel Corp, which comes with different mechanisms and patterns for
injecting parallelism into your application. OCCT remains parallel even without TBB product")
set (USE_VTK_DESCR
"Indicates whether VTK is used or not. VTK stands for Visualization
ToolKit, the technology of Kitware Inc intended for general-purpose scientific
visualization. OCCT comes with a bridge between CAD data representation and
VTK by means of its dedicated VIS component (VTK Integration Services).")
set (USE_GLX_DESCR "Indicates whether X11 OpenGl on OSX is used or not")
set (USE_D3D_DESCR "Indicates whether optional Direct3D wrapper in OCCT visualization module should be build or not")
macro (BUILD_MODULE MODULE_NAME)
set (ENABLE_MODULE TRUE)
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
endmacro()
# variable description
#
set (BUILD_PATCH_DESCR
"Points to the directory recognized as a 'patch' for OCCT. If specified,
the files from this directory take precedence over the corresponding native
OCCT sources. This way you are able to introduce patches to Open CASCADE
Technology not affecting the original source distribution")
set (BUILD_LIBRARY_TYPE_DESCR
"Specifies the type of library to be created. 'Shared' libraries
are linked dynamically and loaded at runtime. 'Static' libraries
are archives of object files for use when linking other targets")
set (BUILD_YACCLEX_DESCR
"Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and
ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
set (BUILD_RESOURCES_DESCR "Enables regeneration of OCCT resource files")
set (BUILD_WITH_DEBUG_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
Applies only for Debug configuration.")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries")
set (BUILD_SOVERSION_NUMBERS_DESCR
"Version numbers to put into SONAME: 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance")
set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR
"Disables exceptions like Standard_OutOfRange in Release builds.
Defines No_Exception macros for Release builds when enabled (default).
These exceptions are always enabled in Debug builds, but disable in Release for better performance")
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR
"Enable/Disable the floating point exceptions (FPE) during DRAW execution only.
Corresponding environment variable (CSF_FPE) can be changed manually
in custom.bat/sh scripts without regeneration by CMake.")
set (BUILD_FORCE_RelWithDebInfo_DESCR
"Generate PDB files within normal Release build.")
set (BUILD_USE_PCH_DESCR
"Use precompiled headers to accelerate the build.
Precompiled headers are generated automatically by Cotire tool.")
# install variables
set (INSTALL_DIR_DESCR
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_TBB and
other similar variables) will be placed during the installation process (building INSTALL project)")
set (INSTALL_DIR_WITH_VERSION_DESCR
"Use OCCT version number as suffix for names of directories")
set (INSTALL_DIR_LAYOUT_DESCR
"Defines structure of OCCT files (binaries, resources, headers etc.) for the install directory.
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
If needed, layout can be customized with INSTALL_DIR_* variables.")
set (INSTALL_DIR_BIN_DESCR
"Subdirectory of INSTALL_DIR where binaries will be installed")
set (INSTALL_DIR_INCLUDE_DESCR
"Subdirectory of INSTALL_DIR where OCCT headers will be installed")
set (INSTALL_DIR_DATA_DESCR
"Subdirectory of INSTALL_DIR where sample data files will be installed")
set (INSTALL_DIR_DOC_DESCR
"Subdirectory of INSTALL_DIR where documentation will be installed")
set (INSTALL_DIR_LIB_DESCR
"Subdirectory of INSTALL_DIR where libraries (.so on Linux, .lib on Windows) will be installed")
set (INSTALL_DIR_RESOURCE_DESCR
"Subdirectory of INSTALL_DIR where OCCT resource files will be installed")
set (INSTALL_DIR_SAMPLES_DESCR
"Subdirectory of INSTALL_DIR where samples will be installed")
set (INSTALL_DIR_TESTS_DESCR
"Subdirectory of INSTALL_DIR where test scripts will be installed")
set (INSTALL_DIR_SCRIPT_DESCR
"Subdirectory of INSTALL_DIR where scripts will be installed")
set (INSTALL_DIR_CMAKE_DESCR
"Subdirectory of INSTALL_DIR where CMake configuration files will be installed.
Must be three levels below INSTALL_DIR")
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
set (${INSTALL_TARGET_VARIABLE}_DESCR
"Indicates whether ${INSTALL_TARGET_STRING} should be installed (building INSTALL
project) into the installation directory (INSTALL_DIR variable)")
endmacro()
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
INSTALL_MESSAGE (INSTALL_DOC_Overview "OCCT overview documentation (HTML format)")
INSTALL_MESSAGE (INSTALL_FFMPEG "FFmpeg binaries")
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
INSTALL_MESSAGE (INSTALL_OPENVR "OpenVR binaries")
INSTALL_MESSAGE (INSTALL_EIGEN "EIGEN header files")
INSTALL_MESSAGE (INSTALL_EGL "EGL binaries")
INSTALL_MESSAGE (INSTALL_GLES2 "OpenGL ES 2.0 binaries")
INSTALL_MESSAGE (INSTALL_FREETYPE "FreeType binaries")
INSTALL_MESSAGE (INSTALL_TBB "TBB binaries")
INSTALL_MESSAGE (INSTALL_RAPIDJSON "RapidJSON header files")
INSTALL_MESSAGE (INSTALL_TCL "TCL binaries")
INSTALL_MESSAGE (INSTALL_TK "TK binaries")
INSTALL_MESSAGE (INSTALL_VTK "VTK binaries ")
# build variables
macro (BUILD_MODULE_MESSAGE BUILD_MODULE_TARGET_VARIABLE BUILD_MODULE_TARGET_STRING)
set (${BUILD_MODULE_TARGET_VARIABLE}_DESCR
"Indicates whether ${BUILD_MODULE_TARGET_STRING} module should be built or not.
It should be noted that some toolkits of the module can be built even if this module
is not checked (this happens if some other modules depend on these toolkits)")
endmacro()
BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework")
BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange")
BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw")
BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses")
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms")
BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingData "ModelingData")
BUILD_MODULE_MESSAGE (BUILD_MODULE_Visualization "Visualization")
set (BUILD_ADDITIONAL_TOOLKITS_DESCR
"Semicolon-separated individual toolkits to include into build process. If you
want to build some particular libraries (toolkits) only, then you may uncheck
all modules in the corresponding BUILD_MODUE_* options and provide the list of
necessary libraries here. Of course, all dependencies will be resolved automatically")
set (BUILD_SAMPLES_MFC_DESCR
"Indicates whether OCCT MFC samples should be built together with OCCT.
These samples show some possibilities of using OCCT and they can be executed
with script samples.bat from the installation directory (INSTALL_DIR)")
set (BUILD_SAMPLES_QT_DESCR
"Indicates whether OCCT Qt samples should be built together with OCCT.
These samples show some possibilities of using OCCT and they can be executed
with script samples.bat from the installation directory (INSTALL_DIR)")
set (BUILD_Inspector_DESCR
"Indicates whether OCCT inspector should be built together with OCCT.
This inspector provides functionality to interactively inspect low-level content
of the OCAF data model, OCCT viewer, etc. have been introduced in OCCT.
It can be executed with script inspector.bat from the installation directory (INSTALL_DIR) or
using 'tinspector' command in DRAW interpretator")
set (BUILD_MODULE_UwpSample_DESCR
"Indicates whether OCCT UWP sample should be built together with OCCT.")
set (BUILD_DOC_Overview_DESCR
"Indicates whether OCCT overview documentation project (Markdown format) should be
created together with OCCT. It is not built together with OCCT. Checking this options
leads to automatic search of Doxygen binaries. Building of it will be call Doxygen command
to generate the documentation in HTML format. The documentation will be available in the
installation directory (overview.bat script) if INSTALL_DOC_Overview variable is checked")
set (3RDPARTY_DIR_DESCR
"The root directory where all required third-party products will be searched. If a
third-party product have been found - corresponding CMake variables will be specified
(VTK: 3RDPARTY_VTK_DIR, 3RDPARTY_VTK_INCLUDE_DIR, 3RDPARTY_VTK_LIBRARY_DIR)")
set (USE_TK_DESCR
"Indicates whether Tk product should be used by Draw Harness for user interface")
set (USE_FREETYPE_DESCR
"Indicates whether FreeType product should be used in OCCT for text rendering using external font files")
set (USE_FFMPEG_DESCR
"Indicates whether FFmpeg framework is used or not. FFmpeg stands for
multimedia data handling, open-source software libraries used for video encoding and decoding.")
set (USE_FREEIMAGE_DESCR
"Indicates whether FreeImage product should be used in OCCT visualization
module for support of popular graphics image formats (PNG, BMP etc)")
set (USE_OPENVR_DESCR
"Indicates whether OpenVR should be used in OCCT visualization module for VR support")
set (USE_RAPIDJSON_DESCR
"Indicates whether RapidJSON product should be used in OCCT DataExchange
module for support of JSON-based formats like glTF")
set (USE_DRACO_DESCR
"Indicates whether Draco mesh decoding library should be used by glTF reader")
set (USE_EGL_DESCR
"Indicates whether EGL should be used in OCCT visualization
module instead of conventional OpenGL context creation APIs")
set (USE_OPENGL_DESCR
"Indicates whether OpenGL desktop should be used in OCCT visualization module")
set (USE_GLES2_DESCR
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module")
set (USE_TBB_DESCR
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,
the technology of Intel Corp, which comes with different mechanisms and patterns for
injecting parallelism into your application. OCCT remains parallel even without TBB product")
set (USE_VTK_DESCR
"Indicates whether VTK is used or not. VTK stands for Visualization
ToolKit, the technology of Kitware Inc intended for general-purpose scientific
visualization. OCCT comes with a bridge between CAD data representation and
VTK by means of its dedicated VIS component (VTK Integration Services).")
set (USE_XLIB_DESCR "Indicates whether X11 is used or not")
set (USE_D3D_DESCR "Indicates whether optional Direct3D wrapper in OCCT visualization module should be build or not")
macro (BUILD_MODULE MODULE_NAME)
set (ENABLE_MODULE TRUE)
set (BUILD_MODULE_${MODULE_NAME} ${ENABLE_MODULE} CACHE BOOL "${BUILD_MODULE_${MODULE_NAME}_DESCR}")
endmacro()

View File

@@ -1,297 +1,307 @@
# vtk
if (NOT DEFINED INSTALL_VTK)
set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
endif()
# vtk directory
if (NOT DEFINED 3RDPARTY_VTK_DIR)
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify VTK folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
if (NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" VTK VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing VTK" FORCE)
endif()
endif()
else()
#set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK" FORCE)
endif()
# vtk include directory
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
endif()
#if (BUILD_SHARED_LIBS)
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
endif()
# vtk dll directory
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
endif()
#endif()
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_INCLUDE_DIR PATH "The directory containing headers of VTK")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
endif()
endif()
endif()
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (CACHED_VTK_DIR $ENV{VTK_DIR})
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
endif()
find_package(VTK QUIET)
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
endif()
if (VTK_FOUND)
# add compiler flags, preprocessor definitions, include and link dirs
include (${VTK_USE_FILE})
if (VTK_LIBRARIES)
set (3RDPARTY_VTK_INCLUDE_DIRS)
# if (BUILD_SHARED_LIBS)
set (3RDPARTY_VTK_LIBRARY_DIRS)
set (3RDPARTY_VTK_DLL_DIRS)
# endif()
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
if (IS_VTK_LIBRARY AND TARGET ${VTK_LIBRARY})
# get paths from corresponding variables
if (${VTK_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
endif()
if (${VTK_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
endif()
if (${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
if (NOT WIN32)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
endif()
endif()
# get paths from corresponding properties
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY} IMPORTED_CONFIGURATIONS)
if (TARGET_VTK_IMPORT_CONFS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# todo: choose configuration in connection with the build type
#if (CMAKE_BUILD_TYPE)
# foreach (IMPORT_CONF ${TARGET_VTK_IMPORT_CONFS})
# endforeach()
#endif()
# Work-around against link failure in case if VTK contains dependency
# on DirectX: its run-time is always present on Windows, but SDK can
# be absent on current workstation, while not actually needed for
# OCCT linking.
# VTK 6.1 for VC 10
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
# VTK 6.1 for VC 12, 14
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} INTERFACE_LINK_LIBRARIES)
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
get_target_property (TARGET_PROPERTY_IMP_PATH ${VTK_LIBRARY} IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
endif()
get_target_property (TARGET_PROPERTY_LOCATION_PATH ${VTK_LIBRARY} IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
if (WIN32)
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
else()
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
endif()
endif()
endif()
endif()
endif()
endforeach()
endif()
if (3RDPARTY_VTK_INCLUDE_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
endif()
# if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
endif()
endif()
# endif()
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_VTK_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_VTK_DLL_DIR)
endif()
endif()
endif()
# Install vtk library using vtk targets
macro (OCCT_INSTALL_VTK VTK_LIBRARY_NAME)
# Check that input library name contains "vtk" prefix
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY_NAME})
# Check that input library was not already installed
list (FIND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME} VTK_LIBRARY_IS_USED)
if (BUILD_SHARED_LIBS AND INSTALL_VTK AND TARGET ${VTK_LIBRARY_NAME} AND VTK_LIBRARY_IS_USED EQUAL -1 AND IS_VTK_LIBRARY)
OCCT_MAKE_OS_WITH_BITNESS()
# Get configuration of vtk
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY_NAME} IMPORTED_CONFIGURATIONS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# Get dependencies for current input library
get_property(VTK_LIBRARY_PATH TARGET ${VTK_LIBRARY_NAME} PROPERTY LOCATION)
get_property(VTK_DEPEND TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_IMPORTED_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY INTERFACE_LINK_LIBRARIES)
list (APPEND VTK_DEPEND ${VTK_INTERFACE} ${VTK_IMPORTED_INTERFACE})
# Install
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${VTK_LIBRARY_PATH}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_VTK_LIBRARY_ABS ${VTK_LIBRARY_PATH} REALPATH)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
set (USED_3RDPARTY_VTK_DIR "")
# Mark current library as already installed
list (APPEND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME})
set (OCCT_VTK_USED_TARGETS "${OCCT_VTK_USED_TARGETS}" CACHE INTERNAL "" FORCE)
# Recursively install all depended libraries
foreach(VTK_TARGET ${VTK_DEPEND})
OCCT_INSTALL_VTK(${VTK_TARGET})
endforeach()
endif()
endmacro()
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_VTK)
endif()
# the library directory for using by the executable
if (NOT INSTALL_VTK)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
endif()
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (VTK_DIR)
# vtk
if (NOT DEFINED INSTALL_VTK)
set (INSTALL_VTK OFF CACHE BOOL "${INSTALL_VTK_DESCR}")
endif()
# vtk directory
if (NOT DEFINED 3RDPARTY_VTK_DIR)
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK")
endif()
# include occt macros. compiler_bitness, os_wiht_bit, compiler
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
# specify VTK folder in connectin with 3RDPARTY_DIR
if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
#CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_VTK_DIR PATH "The directory containing VTK")
if (NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" VTK VTK_DIR_NAME)
if (VTK_DIR_NAME)
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing VTK" FORCE)
endif()
endif()
else()
#set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing VTK" FORCE)
endif()
# vtk include directory
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE PATH "The directory containing headers of VTK")
endif()
#if (BUILD_SHARED_LIBS)
# vtk library directory
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE PATH "The directory containing VTK libraries")
endif()
# vtk dll directory
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "" CACHE PATH "The directory containing VTK shared libraries")
endif()
#endif()
# check 3RDPARTY_VTK_ paths for consistency with specified 3RDPARTY_VTK_DIR
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_INCLUDE_DIR PATH "The directory containing headers of VTK")
if (BUILD_SHARED_LIBS)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_LIBRARY_DIR PATH "The directory containing VTK libraries")
if (WIN32)
CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_VTK_DIR 3RDPARTY_VTK_DLL_DIR PATH "The directory containing VTK shared library")
endif()
endif()
endif()
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (CACHED_VTK_DIR $ENV{VTK_DIR})
set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}")
endif()
find_package(VTK QUIET)
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
set (ENV{VTK_DIR} ${CACHED_VTK_DIR})
endif()
unset (IS_VTK_9XX)
if (VTK_FOUND)
message ("VTK version (${VTK_VERSION})")
if(VTK_MAJOR_VERSION EQUAL 8 AND VTK_MINOR_VERSION GREATER 9 OR VTK_MAJOR_VERSION GREATER 8)
set (IS_VTK_9XX 1)
else()
# add compiler flags, preprocessor definitions, include and link dirs
include (${VTK_USE_FILE})
endif()
if (VTK_LIBRARIES)
set (3RDPARTY_VTK_INCLUDE_DIRS)
# if (BUILD_SHARED_LIBS)
set (3RDPARTY_VTK_LIBRARY_DIRS)
set (3RDPARTY_VTK_DLL_DIRS)
# endif()
foreach (VTK_LIBRARY ${VTK_LIBRARIES})
if (IS_VTK_9XX)
string (REGEX MATCH "^VTK::" IS_VTK_LIBRARY ${VTK_LIBRARY})
else()
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY})
endif()
if (NOT IS_VTK_LIBRARY OR NOT TARGET ${VTK_LIBRARY})
continue()
endif()
# get paths from corresponding variables
if (${VTK_LIBRARY}_INCLUDE_DIRS AND EXISTS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
list (APPEND 3RDPARTY_VTK_INCLUDE_DIRS "${${VTK_LIBRARY}_INCLUDE_DIRS}")
endif()
if (${VTK_LIBRARY}_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_LIBRARY_DIRS}")
endif()
if (${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS AND EXISTS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
if (NOT WIN32)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${${VTK_LIBRARY}_RUNTIME_LIBRARY_DIRS}")
endif()
endif()
# get paths from corresponding properties
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY} IMPORTED_CONFIGURATIONS)
if (TARGET_VTK_IMPORT_CONFS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# todo: choose configuration in connection with the build type
#if (CMAKE_BUILD_TYPE)
# foreach (IMPORT_CONF ${TARGET_VTK_IMPORT_CONFS})
# endforeach()
#endif()
# Work-around against link failure in case if VTK contains dependency
# on DirectX: its run-time is always present on Windows, but SDK can
# be absent on current workstation, while not actually needed for
# OCCT linking.
# VTK 6.1 for VC 10
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF} "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
# VTK 6.1 for VC 12, 14
get_target_property (TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${VTK_LIBRARY} INTERFACE_LINK_LIBRARIES)
if(TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES)
string (REGEX MATCH "[^;]*d3d[0-9]+[.]lib" HARDCODED_D3D9_LIB "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
if (HARDCODED_D3D9_LIB)
message (STATUS "Warning: ${HARDCODED_D3D9_LIB} has been removed from imported dependencies of ${VTK_LIBRARY}")
list (REMOVE_ITEM TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES ${HARDCODED_D3D9_LIB})
set_target_properties (${VTK_LIBRARY} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET_PROPERTY_IMP_LINK_INTERFACE_LIBRARIES}")
endif()
endif()
get_target_property (TARGET_PROPERTY_IMP_PATH ${VTK_LIBRARY} IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_IMP_PATH AND EXISTS "${TARGET_PROPERTY_IMP_PATH}")
get_filename_component (TARGET_PROPERTY_IMP_DIR "${TARGET_PROPERTY_IMP_PATH}" PATH)
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_IMP_DIR}")
endif()
get_target_property (TARGET_PROPERTY_LOCATION_PATH ${VTK_LIBRARY} IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
if(TARGET_PROPERTY_LOCATION_PATH AND EXISTS "${TARGET_PROPERTY_LOCATION_PATH}")
get_filename_component (TARGET_PROPERTY_LOCATION_DIR "${TARGET_PROPERTY_LOCATION_PATH}" PATH)
if (WIN32)
list (APPEND 3RDPARTY_VTK_DLL_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
else()
list (APPEND 3RDPARTY_VTK_LIBRARY_DIRS "${TARGET_PROPERTY_LOCATION_DIR}")
endif()
endif()
endif()
endforeach()
endif()
if (3RDPARTY_VTK_INCLUDE_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_INCLUDE_DIRS)
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIRS})
list (GET 3RDPARTY_VTK_INCLUDE_DIRS 0 3RDPARTY_VTK_INCLUDE_DIR)
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_INCLUDE_DIR}" CACHE PATH "The directory containing headers of VTK" FORCE)
endif()
# if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_LIBRARY_DIRS)
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIRS})
list (GET 3RDPARTY_VTK_LIBRARY_DIRS 0 3RDPARTY_VTK_LIBRARY_DIR)
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_LIBRARY_DIR}" CACHE PATH "The directory containing VTK libraries" FORCE)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_VTK_DLL_DIRS)
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIRS})
list (GET 3RDPARTY_VTK_DLL_DIRS 0 3RDPARTY_VTK_DLL_DIR)
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DLL_DIR}" CACHE PATH "The directory containing VTK shared libraries" FORCE)
endif()
endif()
# endif()
endif()
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
list (APPEND 3RDPARTY_INCLUDE_DIRS ${3RDPARTY_VTK_INCLUDE_DIR})
else()
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
endif()
if (BUILD_SHARED_LIBS)
if (3RDPARTY_VTK_LIBRARY_DIR AND EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
list (APPEND 3RDPARTY_LIBRARY_DIRS ${3RDPARTY_VTK_LIBRARY_DIR})
else()
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_VTK_LIBRARY_DIR)
endif()
if (WIN32)
if (3RDPARTY_VTK_DLL_DIR OR EXISTS "${3RDPARTY_VTK_DLL_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS ${3RDPARTY_VTK_DLL_DIR})
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_VTK_DLL_DIR)
endif()
endif()
endif()
# Install vtk library using vtk targets
macro (OCCT_INSTALL_VTK VTK_LIBRARY_NAME)
# Check that input library name contains "vtk" prefix
string (REGEX MATCH "^vtk" IS_VTK_LIBRARY ${VTK_LIBRARY_NAME})
# Check that input library was not already installed
list (FIND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME} VTK_LIBRARY_IS_USED)
if (BUILD_SHARED_LIBS AND INSTALL_VTK AND TARGET ${VTK_LIBRARY_NAME} AND VTK_LIBRARY_IS_USED EQUAL -1 AND IS_VTK_LIBRARY)
OCCT_MAKE_OS_WITH_BITNESS()
# Get configuration of vtk
get_target_property (TARGET_VTK_IMPORT_CONFS ${VTK_LIBRARY_NAME} IMPORTED_CONFIGURATIONS)
list (GET TARGET_VTK_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
# Get dependencies for current input library
get_property(VTK_LIBRARY_PATH TARGET ${VTK_LIBRARY_NAME} PROPERTY LOCATION)
get_property(VTK_DEPEND TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_IMPORTED_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${CHOSEN_IMPORT_CONF})
get_property(VTK_INTERFACE TARGET ${VTK_LIBRARY_NAME} PROPERTY INTERFACE_LINK_LIBRARIES)
list (APPEND VTK_DEPEND ${VTK_INTERFACE} ${VTK_IMPORTED_INTERFACE})
# Install
if (WIN32)
if (SINGLE_GENERATOR)
install (FILES "${VTK_LIBRARY_PATH}" DESTINATION "${INSTALL_DIR_BIN}")
else()
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_BIN}")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_BIN}i")
install (FILES "${VTK_LIBRARY_PATH}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_BIN}d")
endif()
else()
get_filename_component(3RDPARTY_VTK_LIBRARY_ABS ${VTK_LIBRARY_PATH} REALPATH)
if (SINGLE_GENERATOR)
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
DESTINATION "${INSTALL_DIR_LIB}")
else()
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Release
DESTINATION "${INSTALL_DIR_LIB}")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS RelWithDebInfo
DESTINATION "${INSTALL_DIR_LIB}i")
install (FILES "${3RDPARTY_VTK_LIBRARY_ABS}"
CONFIGURATIONS Debug
DESTINATION "${INSTALL_DIR_LIB}d")
endif()
endif()
set (USED_3RDPARTY_VTK_DIR "")
# Mark current library as already installed
list (APPEND OCCT_VTK_USED_TARGETS ${VTK_LIBRARY_NAME})
set (OCCT_VTK_USED_TARGETS "${OCCT_VTK_USED_TARGETS}" CACHE INTERNAL "" FORCE)
# Recursively install all depended libraries
foreach(VTK_TARGET ${VTK_DEPEND})
OCCT_INSTALL_VTK(${VTK_TARGET})
endforeach()
endif()
endmacro()
if (NOT BUILD_SHARED_LIBS)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL_DIR)
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_LIBRARY_DIR)
OCCT_CHECK_AND_UNSET(INSTALL_VTK)
endif()
# the library directory for using by the executable
if (NOT INSTALL_VTK)
if (WIN32)
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
else()
set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
endif()
endif()
OCCT_CHECK_AND_UNSET (VTK_INCLUDE_DIRS)
OCCT_CHECK_AND_UNSET (VTK_LIBRARY_DIRS)
OCCT_CHECK_AND_UNSET (VTK_DIR)

View File

@@ -56,36 +56,52 @@ lappend ::SYS_PRJNAME_LIST "Qt Creator (.pro)"
set aPrjIndex [lsearch $::SYS_PRJFMT_LIST $::PRJFMT]
set ::PRJNAME [lindex $::SYS_PRJNAME_LIST $aPrjIndex]
set ::CONFIG "Release"
set SYS_VS_LIST {}
set SYS_VC_LIST {}
set SYS_VCVARS_LIST {}
# detect installed Visual Studio 2017+ instances by running vswhere.exe
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
lappend ::SYS_VC_LIST "vc141"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP"
lappend ::SYS_VC_LIST "vc141-uwp"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)"
lappend ::SYS_VC_LIST "vc142"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP"
lappend ::SYS_VC_LIST "vc142-uwp"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] } {
if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)"
lappend ::SYS_VC_LIST "vclang"
lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
lappend ::SYS_VCVARS_LIST "$res\\VC\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143)"
lappend ::SYS_VC_LIST "vc143"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143) UWP"
lappend ::SYS_VC_LIST "vc143-uwp"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset ClangCL)"
lappend ::SYS_VC_LIST "vclang"
lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
# detect installed Visual Studio instances from global environment
@@ -138,6 +154,13 @@ proc wokdep:gui:Close {} {
exit
}
proc wokdep:gui:configSuffix {} {
if { "$::CONFIG" == "Debug" } {
return "D"
}
return ""
}
proc wokdep:gui:SwitchConfig {} {
set ::PRJFMT [lindex $::SYS_PRJFMT_LIST [.myFrame.myPrjFrame.myPrjCombo current]]
set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]]
@@ -148,16 +171,15 @@ proc wokdep:gui:SwitchConfig {} {
set ::CSF_OPT_LIB64 {}
set ::CSF_OPT_BIN32 {}
set ::CSF_OPT_BIN64 {}
set ::CSF_OPT_LIB32D {}
set ::CSF_OPT_LIB64D {}
set ::CSF_OPT_BIN32D {}
set ::CSF_OPT_BIN64D {}
wokdep:gui:UpdateList
}
proc wokdep:gui:SwitchArch {} {
if { "$::ARCH" == "32" } {
wokdep:gui:Show32Bitness ::aRowIter
}
if { "$::ARCH" == "64" } {
wokdep:gui:Show64Bitness ::aRowIter
}
wokdep:gui:Show3264Bitness ::aRowIter
if { [llength [grid info .myFrame.mySave]] != 0 } {
grid forget .myFrame.mySave .myFrame.myClose
@@ -168,6 +190,16 @@ proc wokdep:gui:SwitchArch {} {
grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2
}
# update label text and visibility
font create wokdep:gui:EmptyFont -size -1
proc wokdep:gui:SetLabelText {theLabel theText} {
set aFont TkDefaultFont
if { $theText == "" } {
set aFont wokdep:gui:EmptyFont
}
$theLabel configure -text $theText -font $aFont
}
proc wokdep:gui:UpdateList {} {
set anIncErrs {}
set anLib32Errs {}
@@ -175,7 +207,9 @@ proc wokdep:gui:UpdateList {} {
set anBin32Errs {}
set anBin64Errs {}
wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
if { "$::HAVE_FREETYPE" == "true" } {
wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
if { "$::HAVE_GLES2" == "true" } {
wokdep:SearchEGL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
@@ -225,6 +259,10 @@ proc wokdep:gui:UpdateList {} {
if { "$::HAVE_RAPIDJSON" == "true" } {
wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
if { "$::HAVE_DRACO" == "true" } {
set aDummy {}
wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs aDummy aDummy "draco" "draco/compression/decode.h" "draco" {"draco"}
}
if {"$::BUILD_Inspector" == "true" } {
set ::CHECK_QT "true"
@@ -238,11 +276,28 @@ proc wokdep:gui:UpdateList {} {
wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
}
.myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"]
.myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"]
.myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"]
.myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"]
.myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"]
wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"]
wokdep:gui:SetLabelText .myFrame.myLib32_ErrLbl [join $anLib32Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myLib64_ErrLbl [join $anLib64Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myBin32_ErrLbl [join $anBin32Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myBin64_ErrLbl [join $anBin64Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myLib32D_ErrLbl [join $anLib32Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myLib64D_ErrLbl [join $anLib64Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myBin32D_ErrLbl [join $anBin32Errs "\n"]
wokdep:gui:SetLabelText .myFrame.myBin64D_ErrLbl [join $anBin64Errs "\n"]
# merge duplicates
set ::CSF_OPT_LIB32 [lsort -unique $::CSF_OPT_LIB32]
set ::CSF_OPT_LIB64 [lsort -unique $::CSF_OPT_LIB64]
set ::CSF_OPT_BIN32 [lsort -unique $::CSF_OPT_BIN32]
set ::CSF_OPT_BIN64 [lsort -unique $::CSF_OPT_BIN64]
set ::CSF_OPT_LIB32D [lsort -unique $::CSF_OPT_LIB32D]
set ::CSF_OPT_LIB64D [lsort -unique $::CSF_OPT_LIB64D]
set ::CSF_OPT_BIN32D [lsort -unique $::CSF_OPT_BIN32D]
set ::CSF_OPT_BIN64D [lsort -unique $::CSF_OPT_BIN64D]
}
proc wokdep:gui:BrowseVcVars {} {
@@ -268,34 +323,20 @@ proc wokdep:gui:AddIncPath {} {
}
}
proc wokdep:gui:AddLib32Path {} {
proc wokdep:gui:AddLibPath {} {
set aCfg [wokdep:gui:configSuffix]
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_LIB32 "$aResult"
lappend ::CSF_OPT_LIB${::ARCH}${aCfg} "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddLib64Path {} {
proc wokdep:gui:AddBinPath {} {
set aCfg [wokdep:gui:configSuffix]
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_LIB64 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddBin32Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_BIN32 "$aResult"
wokdep:gui:UpdateList
}
}
proc wokdep:gui:AddBin64Path {} {
set aResult [tk_chooseDirectory -title "Choose a directory"]
if { "$aResult" != "" } {
lappend ::CSF_OPT_BIN64 "$aResult"
lappend ::CSF_OPT_BIN${::ARCH}${aCfg} "$aResult"
wokdep:gui:UpdateList
}
}
@@ -308,34 +349,20 @@ proc wokdep:gui:RemoveIncPath {} {
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveLib32Path {} {
set aSelIndices [.myFrame.myLib32List curselection]
proc wokdep:gui:RemoveLibPath {} {
set aCfg [wokdep:gui:configSuffix]
set aSelIndices [.myFrame.myLib${::ARCH}${aCfg}_List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myLib32List delete [lindex $aSelIndices 0]
.myFrame.myLib${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveLib64Path {} {
set aSelIndices [.myFrame.myLib64List curselection]
proc wokdep:gui:RemoveBinPath {} {
set aCfg [wokdep:gui:configSuffix]
set aSelIndices [.myFrame.myBin${::ARCH}${aCfg}_List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myLib64List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveBin32Path {} {
set aSelIndices [.myFrame.myBin32List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myBin32List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
proc wokdep:gui:RemoveBin64Path {} {
set aSelIndices [.myFrame.myBin64List curselection]
if { [llength $aSelIndices] != 0 } {
.myFrame.myBin64List delete [lindex $aSelIndices 0]
.myFrame.myBin${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0]
}
wokdep:gui:UpdateList
}
@@ -345,109 +372,73 @@ proc wokdep:gui:ResetIncPath {} {
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetLib32Path {} {
set ::CSF_OPT_LIB32 {}
proc wokdep:gui:ResetLibPath {} {
set ::CSF_OPT_LIB${::ARCH} {}
set ::CSF_OPT_LIB${::ARCH}D {}
set ::CSF_OPT_BIN${::ARCH} {}
set ::CSF_OPT_BIN${::ARCH}D {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetLib64Path {} {
set ::CSF_OPT_LIB64 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetBin32Path {} {
set ::CSF_OPT_BIN32 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:ResetBin64Path {} {
set ::CSF_OPT_BIN64 {}
wokdep:gui:UpdateList
}
proc wokdep:gui:Show32Bitness { theRowIter } {
proc wokdep:gui:Show3264Bitness { theRowIter } {
upvar $theRowIter aRowIter
if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } {
grid forget .myFrame.myLib64Lbl .myFrame.myLib64List .myFrame.myLib64Scrl
grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl
grid forget .myFrame.myBin64Lbl .myFrame.myBin64List .myFrame.myBin64Scrl
grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl
set aArchOld ""
set aCfg [wokdep:gui:configSuffix]
if { "$::ARCH" == "32" } {
set aArchOld "64"
} else {
set aArchOld "32"
}
# Additional libraries (32-bit) search paths
grid .myFrame.myLib32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myLib32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myLib32Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myLib32Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myLib32Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional executables (32-bit) search paths
grid .myFrame.myBin32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myBin32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myBin32Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myBin32Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myBin32Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
}
proc wokdep:gui:Show64Bitness { theRowIter } {
upvar $theRowIter aRowIter
if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } {
grid forget .myFrame.myLib32Lbl .myFrame.myLib32List .myFrame.myLib32Scrl
grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl
grid forget .myFrame.myBin32Lbl .myFrame.myBin32List .myFrame.myBin32Scrl
grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl
set aCfgOld "D"
if { "$::CONFIG" == "Debug" } { set aCfgOld "" }
set aDelArch ${aArchOld}${aCfg}
if { [llength [grid info .myFrame.myLib${aDelArch}_Lbl]] != 0 } {
grid forget .myFrame.myLib${aDelArch}_Lbl .myFrame.myLib${aDelArch}_List .myFrame.myLib${aDelArch}_Scrl
grid forget .myFrame.myLib${aDelArch}_Add .myFrame.myLib${aDelArch}_Remove .myFrame.myLib${aDelArch}_Clear .myFrame.myLib${aDelArch}_ErrLbl
grid forget .myFrame.myBin${aDelArch}_Lbl .myFrame.myBin${aDelArch}_List .myFrame.myBin${aDelArch}_Scrl
grid forget .myFrame.myBin${aDelArch}_Add .myFrame.myBin${aDelArch}_Remove .myFrame.myBin${aDelArch}_Clear .myFrame.myBin${aDelArch}_ErrLbl
}
set aDelCfg ${::ARCH}${aCfgOld}
if { [llength [grid info .myFrame.myLib${aDelCfg}_Lbl]] != 0 } {
grid forget .myFrame.myLib${aDelCfg}_Lbl .myFrame.myLib${aDelCfg}_List .myFrame.myLib${aDelCfg}_Scrl
grid forget .myFrame.myLib${aDelCfg}_Add .myFrame.myLib${aDelCfg}_Remove .myFrame.myLib${aDelCfg}_Clear .myFrame.myLib${aDelCfg}_ErrLbl
grid forget .myFrame.myBin${aDelCfg}_Lbl .myFrame.myBin${aDelCfg}_List .myFrame.myBin${aDelCfg}_Scrl
grid forget .myFrame.myBin${aDelCfg}_Add .myFrame.myBin${aDelCfg}_Remove .myFrame.myBin${aDelCfg}_Clear .myFrame.myBin${aDelCfg}_ErrLbl
}
# Additional libraries (64-bit) search paths
grid .myFrame.myLib64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
set aNewCfg ${::ARCH}${aCfg}
# Additional libraries search paths
grid .myFrame.myLib${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myLib64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myLib64Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myLib64Add -row $aRowIter -column 6
grid .myFrame.myLib${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myLib${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myLib${aNewCfg}_Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myLib64Edit -row $aRowIter -column 6
#grid .myFrame.myLib${aNewCfg}_Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64Remove -row $aRowIter -column 6
grid .myFrame.myLib${aNewCfg}_Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64Clear -row $aRowIter -column 6
grid .myFrame.myLib${aNewCfg}_Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
grid .myFrame.myLib${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional executables (64-bit) search paths
grid .myFrame.myBin64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
# Additional executables search paths
grid .myFrame.myBin${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myBin64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myBin64Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myBin64Add -row $aRowIter -column 6
grid .myFrame.myBin${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
grid .myFrame.myBin${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4
grid .myFrame.myBin${aNewCfg}_Add -row $aRowIter -column 6
incr aRowIter
#grid .myFrame.myBin64Edit -row $aRowIter -column 6
#grid .myFrame.myBin${aNewCfg}_Edit -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64Remove -row $aRowIter -column 6
grid .myFrame.myBin${aNewCfg}_Remove -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64Clear -row $aRowIter -column 6
grid .myFrame.myBin${aNewCfg}_Clear -row $aRowIter -column 6
incr aRowIter
grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
grid .myFrame.myBin${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
}
@@ -457,6 +448,7 @@ ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state
ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5}
ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40
ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
ttk::combobox .myFrame.myVsFrame.myConfigCombo -values { {Release} {Debug} } -textvariable CONFIG -state readonly -width 6
entry .myFrame.myVcEntry -textvariable VCVER -width 10
entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
@@ -471,6 +463,8 @@ ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling he
ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH_INPUT -width 80
ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
checkbutton .myFrame.myChecks.myFreeTypeCheck -offvalue "false" -onvalue "true" -variable HAVE_FREETYPE -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myFreeTypeLbl -text "Use FreeType"
checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
@@ -491,9 +485,11 @@ ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON"
checkbutton .myFrame.myChecks.myDracoCheck -offvalue "false" -onvalue "true" -variable HAVE_DRACO -command wokdep:gui:UpdateList
ttk::label .myFrame.myChecks.myDracoLbl -text "Use Draco"
checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
checkbutton .myFrame.myChecks.myXLibCheck -offvalue "false" -onvalue "true" -variable HAVE_XLIB
ttk::label .myFrame.myChecks.myXLibLbl -text "Use X11 for windows drawing"
ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
@@ -525,44 +521,84 @@ ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncP
ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional libraries (32-bit) search paths
ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview"
listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path
ttk::button .myFrame.myLib32Edit -text "Edit"
ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path
ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path
ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
ttk::label .myFrame.myLib32_Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib32_Scrl -command ".myFrame.myLib32_List yview"
listbox .myFrame.myLib32_List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32_Scrl set"
ttk::button .myFrame.myLib32_Add -text "Add" -command wokdep:gui:AddLibPath
ttk::button .myFrame.myLib32_Edit -text "Edit"
ttk::button .myFrame.myLib32_Remove -text "Remove" -command wokdep:gui:RemoveLibPath
ttk::button .myFrame.myLib32_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myLib32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional debug libraries (32-bit) search paths
ttk::label .myFrame.myLib32D_Lbl -text "Additional debug libraries (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib32D_Scrl -command ".myFrame.myLib32D_List yview"
listbox .myFrame.myLib32D_List -listvariable CSF_OPT_LIB32D -width 80 -height 5 -yscrollcommand ".myFrame.myLib32D_Scrl set"
ttk::button .myFrame.myLib32D_Add -text "Add" -command wokdep:gui:AddLibPath
ttk::button .myFrame.myLib32D_Edit -text "Edit"
ttk::button .myFrame.myLib32D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath
ttk::button .myFrame.myLib32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myLib32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional libraries (64-bit) search paths
ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview"
listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path
ttk::button .myFrame.myLib64Edit -text "Edit"
ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path
ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path
ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
ttk::label .myFrame.myLib64_Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib64_Scrl -command ".myFrame.myLib64_List yview"
listbox .myFrame.myLib64_List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64_Scrl set"
ttk::button .myFrame.myLib64_Add -text "Add" -command wokdep:gui:AddLibPath
ttk::button .myFrame.myLib64_Edit -text "Edit"
ttk::button .myFrame.myLib64_Remove -text "Remove" -command wokdep:gui:RemoveLibPath
ttk::button .myFrame.myLib64_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myLib64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional debug libraries (64-bit) search paths
ttk::label .myFrame.myLib64D_Lbl -text "Additional debug libraries (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myLib64D_Scrl -command ".myFrame.myLib64D_List yview"
listbox .myFrame.myLib64D_List -listvariable CSF_OPT_LIB64D -width 80 -height 5 -yscrollcommand ".myFrame.myLib64D_Scrl set"
ttk::button .myFrame.myLib64D_Add -text "Add" -command wokdep:gui:AddLibPath
ttk::button .myFrame.myLib64D_Edit -text "Edit"
ttk::button .myFrame.myLib64D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath
ttk::button .myFrame.myLib64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myLib64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional executables (32-bit) search paths
ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview"
listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path
ttk::button .myFrame.myBin32Edit -text "Edit"
ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path
ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path
ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
ttk::label .myFrame.myBin32_Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin32_Scrl -command ".myFrame.myBin32_List yview"
listbox .myFrame.myBin32_List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32_Scrl set"
ttk::button .myFrame.myBin32_Add -text "Add" -command wokdep:gui:AddBinPath
ttk::button .myFrame.myBin32_Edit -text "Edit"
ttk::button .myFrame.myBin32_Remove -text "Remove" -command wokdep:gui:RemoveBinPath
ttk::button .myFrame.myBin32_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myBin32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional debug executables (32-bit) search paths
ttk::label .myFrame.myBin32D_Lbl -text "Additional debug executables (32-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin32D_Scrl -command ".myFrame.myBin32D_List yview"
listbox .myFrame.myBin32D_List -listvariable CSF_OPT_BIN32D -width 80 -height 5 -yscrollcommand ".myFrame.myBin32D_Scrl set"
ttk::button .myFrame.myBin32D_Add -text "Add" -command wokdep:gui:AddBinPath
ttk::button .myFrame.myBin32D_Edit -text "Edit"
ttk::button .myFrame.myBin32D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath
ttk::button .myFrame.myBin32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myBin32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional executables (64-bit) search paths
ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview"
listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path
ttk::button .myFrame.myBin64Edit -text "Edit"
ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path
ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path
ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
ttk::label .myFrame.myBin64_Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin64_Scrl -command ".myFrame.myBin64_List yview"
listbox .myFrame.myBin64_List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64_Scrl set"
ttk::button .myFrame.myBin64_Add -text "Add" -command wokdep:gui:AddBinPath
ttk::button .myFrame.myBin64_Edit -text "Edit"
ttk::button .myFrame.myBin64_Remove -text "Remove" -command wokdep:gui:RemoveBinPath
ttk::button .myFrame.myBin64_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myBin64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Additional debug executables (64-bit) search paths
ttk::label .myFrame.myBin64D_Lbl -text "Additional debug executables (64-bit) search paths:" -padding {5 5 80 5}
scrollbar .myFrame.myBin64D_Scrl -command ".myFrame.myBin64D_List yview"
listbox .myFrame.myBin64D_List -listvariable CSF_OPT_BIN64D -width 80 -height 5 -yscrollcommand ".myFrame.myBin64D_Scrl set"
ttk::button .myFrame.myBin64D_Add -text "Add" -command wokdep:gui:AddBinPath
ttk::button .myFrame.myBin64D_Edit -text "Edit"
ttk::button .myFrame.myBin64D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath
ttk::button .myFrame.myBin64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath
ttk::label .myFrame.myBin64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
# Bottom
ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom
@@ -573,17 +609,22 @@ ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0
grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1
incr aRowIter
if { "$tcl_platform(platform)" == "windows" } {
incr aRowIter
grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5
grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2
grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 3
incr aRowIter
grid .myFrame.myVcEntry -row $aRowIter -column 0
grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6
incr aRowIter
} else {
grid .myFrame.myVsFrame -row $aRowIter -column 4 -sticky w
grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 0
incr aRowIter
}
#
@@ -604,10 +645,10 @@ incr aRowIter
grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w
grid .myFrame.myChecks.myFreeTypeCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFreeTypeLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 3 -sticky w
if { "$::tcl_platform(os)" != "Darwin" } {
grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myGlesLbl -row $aCheckRowIter -column 5 -sticky w
@@ -621,16 +662,17 @@ grid .myFrame.myChecks.myQtCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myQtLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myDracoCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myDracoLbl -row $aCheckRowIter -column 3 -sticky w
if { "$::tcl_platform(platform)" == "windows" } {
grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
} elseif { "$::tcl_platform(os)" == "Darwin" } {
grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 5 -sticky w
} else {
grid .myFrame.myChecks.myXLibCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myXLibLbl -row $aCheckRowIter -column 5 -sticky w
}
grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
@@ -638,8 +680,10 @@ grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w
grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
grid .myFrame.myChecks.myOpenVrCheck -row $aCheckRowIter -column 4 -sticky e
grid .myFrame.myChecks.myOpenVrLbl -row $aCheckRowIter -column 5 -sticky w
grid .myFrame.myChecks.myE57Check -row $aCheckRowIter -column 6 -sticky e
@@ -652,6 +696,11 @@ if { "$::tcl_platform(platform)" == "windows" } {
incr aCheckRowIter
grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 12 -sticky e
grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 13 -sticky w
incr aCheckRowIter
# Additional headers search paths
grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
@@ -668,15 +717,8 @@ incr aRowIter
grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
incr aRowIter
# Additional 32-bit search paths
if { "$ARCH" == "32" } {
wokdep:gui:Show32Bitness aRowIter
}
# Additional 64-bit search paths
if { "$ARCH" == "64" } {
wokdep:gui:Show64Bitness aRowIter
}
# Additional search paths
wokdep:gui:Show3264Bitness aRowIter
# Bottom section
grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
@@ -692,6 +734,9 @@ bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
wokdep:gui:SwitchArch
}
bind .myFrame.myVsFrame.myConfigCombo <<ComboboxSelected>> {
wokdep:gui:SwitchArch
}
.myFrame.mySrchEntry configure -validate all -validatecommand {
set ::PRODUCTS_PATH [file normalize "$::PRODUCTS_PATH_INPUT"]

View File

@@ -52,6 +52,10 @@ set CSF_OPT_LIB32 [list]
set CSF_OPT_LIB64 [list]
set CSF_OPT_BIN32 [list]
set CSF_OPT_BIN64 [list]
set CSF_OPT_LIB32D [list]
set CSF_OPT_LIB64D [list]
set CSF_OPT_BIN32D [list]
set CSF_OPT_BIN64D [list]
if { "$tcl_platform(pointerSize)" == "4" } {
set ARCH "32"
@@ -68,9 +72,15 @@ if { [info exists ::env(SHORTCUT_HEADERS)] } {
}
# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name
set THE_ENV_VARIABLES {HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENVR HAVE_OPENCL CHECK_QT4 CHECK_JDK MACOSX_USE_GLX HAVE_RelWithDebInfo BUILD_Inspector}
set THE_ENV_VARIABLES { HAVE_TK HAVE_FREETYPE HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK \
HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_DRACO HAVE_OPENVR HAVE_OPENCL \
CHECK_QT4 CHECK_JDK HAVE_XLIB \
HAVE_RelWithDebInfo BUILD_Inspector }
foreach anEnvIter $THE_ENV_VARIABLES { set ${anEnvIter} "false" }
set HAVE_TK "true"
set HAVE_FREETYPE "true"
if { "$tcl_platform(os)" != "Darwin" } { set HAVE_XLIB "true" }
foreach anEnvIter $THE_ENV_VARIABLES {
set ${anEnvIter} "false"
if { [info exists ::env(${anEnvIter})] } {
set ${anEnvIter} "$::env(${anEnvIter})"
}
@@ -78,12 +88,12 @@ foreach anEnvIter $THE_ENV_VARIABLES {
# do not export platform-specific variables
if { "$::tcl_platform(os)" == "Darwin" } {
set HAVE_GLES2 ""
} else {
set MACOSX_USE_GLX ""
}
if { "$tcl_platform(platform)" != "windows" } {
set HAVE_D3D ""
set HAVE_RelWithDebInfo ""
} else {
set HAVE_XLIB ""
}
foreach anEnvIter {ARCH VCVER VCVARS PRJFMT } {
if { [info exists ::env(${anEnvIter})] } {
@@ -110,6 +120,35 @@ if { [info exists ::env(CSF_OPT_BIN64)] } {
set CSF_OPT_BIN64 [split "$::env(CSF_OPT_BIN64)" $::SYS_PATH_SPLITTER]
}
if { [info exists ::env(CSF_OPT_LIB32D)] } {
set CSF_OPT_LIB32D [split "$::env(CSF_OPT_LIB32D)" $::SYS_PATH_SPLITTER]
foreach aLibIter $::CSF_OPT_LIB32 {
set aPos [lsearch -exact $::CSF_OPT_LIB32D $aLibIter]
set ::CSF_OPT_LIB32D [lreplace $::CSF_OPT_LIB32D $aPos $aPos]
}
}
if { [info exists ::env(CSF_OPT_LIB64D)] } {
set CSF_OPT_LIB64D [split "$::env(CSF_OPT_LIB64D)" $::SYS_PATH_SPLITTER]
foreach aLibIter $::CSF_OPT_LIB64 {
set aPos [lsearch -exact $::CSF_OPT_LIB64D $aLibIter]
set ::CSF_OPT_LIB64D [lreplace $::CSF_OPT_LIB64D $aPos $aPos]
}
}
if { [info exists ::env(CSF_OPT_BIN32D)] } {
set CSF_OPT_BIN32D [split "$::env(CSF_OPT_BIN32D)" $::SYS_PATH_SPLITTER]
foreach aLibIter $::CSF_OPT_BIN32 {
set aPos [lsearch -exact $::CSF_OPT_BIN32D $aLibIter]
set ::CSF_OPT_BIN32D [lreplace $::CSF_OPT_BIN32D $aPos $aPos]
}
}
if { [info exists ::env(CSF_OPT_BIN64D)] } {
set CSF_OPT_BIN64D [split "$::env(CSF_OPT_BIN64D)" $::SYS_PATH_SPLITTER]
foreach aLibIter $::CSF_OPT_BIN64 {
set aPos [lsearch -exact $::CSF_OPT_BIN64D $aLibIter]
set ::CSF_OPT_BIN64D [lreplace $::CSF_OPT_BIN64D $aPos $aPos]
}
}
# Search header file in $::CSF_OPT_INC and standard paths
proc wokdep:SearchHeader {theHeader} {
# search in custom paths
@@ -310,6 +349,12 @@ proc wokdep:SearchStandardLibrary {theErrInc theErrLib32 theErrLib64 theErrBin32
lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
set hasLib true
set aLibDPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/libd"]
if { "$aLibDPath" != "" } {
lappend ::CSF_OPT_LIB${anArchIter}D "$aPath/libd"
lappend ::CSF_OPT_BIN${anArchIter}D "$aPath/bind"
}
break
}
}
@@ -735,14 +780,14 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
}
}
if { "$::tcl_platform(platform)" == "windows" } {
set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter"]
set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter"]
if { "$aTbbDllPath" == "" } {
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" != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib"
} 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" }
}
}
@@ -1041,36 +1086,45 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
}
}
}
}
# Search binary path
if { "$::tcl_platform(platform)" == "windows" } {
foreach anArchIter {64 32} {
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter"]
if { "$aVtkBinPath" == "" } {
set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] "$::VCVER" "$anArchIter" ]
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/bin"]
if { "$aVtkBinPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter"]
if { "$aVtkBinPath" == "" } {
set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*]
set aPath [wokdep:Preferred $aPathList "$::VCVER" "$anArchIter" ]
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/bin"]
if { "$aVtkBinPath" != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
} else {
# Try to find in lib path
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/lib"]
if { "$aVtkBinPath" != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib"
} else {
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/lib"]
if { "$aVtkBinPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib" }
# We didn't find preferred binary path => search through all available VTK directories
foreach anIt $aPathList {
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$anIt/bin"]
if { "$aVtkBinPath" != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$anIt/bin"
break
} else {
# Try to find in lib path
set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$anIt/lib"]
if { "$aVtkBinPath" != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$anIt/lib"
}
}
}
if { "$aVtkBinPath" == "" } {
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
set isFound "false"
}
}
}
}
# We didn't find preferred binary path => search through inc path or among all available VTK directories
if { "$aVtkBinPath" == "" } {
# Try to find in lib path
set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/bin"]
if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/bin"
} elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aVtkLibPath/lib"] != "" } {
lappend ::CSF_OPT_BIN$anArchIter "$aVtkLibPath/lib"
} else {
lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
set isFound "false"
}
}
}
}
return "$isFound"
}
@@ -1193,17 +1247,17 @@ proc wokdep:SearchX11 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
upvar $theErrBin64 anErrBin64
set isFound "true"
if { "$::tcl_platform(platform)" == "windows" || ( "$::tcl_platform(os)" == "Darwin" && "$::MACOSX_USE_GLX" != "true" ) } {
if { "$::tcl_platform(platform)" == "windows" || ( "$::tcl_platform(os)" == "Darwin" && "$::HAVE_XLIB" != "true" ) } {
return "$isFound"
}
set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH"]
if { "$aXmuLibPath" == "" } {
set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH" "/usr/X11/lib"]
if { "$aXmuLibPath" != "" } {
set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH"]
if { "$aX11LibPath" == "" } {
set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH" "/usr/X11/lib"]
if { "$aX11LibPath" != "" } {
#lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib"
} else {
lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}Xmu.${::SYS_LIB_SUFFIX}' not found (X11)"
lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}X11.${::SYS_LIB_SUFFIX}' not found (X11)"
set isFound "false"
}
}
@@ -1272,6 +1326,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "rem Additional libraries (32-bit) search paths"
puts $aFile "set \"CSF_OPT_LIB32=$aStringLib32\""
set aStringLib32d [join $::CSF_OPT_LIB32D $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringLib32d [regsub -all "$::PRODUCTS_PATH" $aStringLib32d "%PRODUCTS_PATH%"]
}
puts $aFile ""
puts $aFile "rem Additional debug libraries (32-bit) search paths"
if { "$aStringLib32d" != "" && "$aStringLib32" != "" } {
puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d;%CSF_OPT_LIB32%\""
} else {
puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d\""
}
set aStringLib64 [join $::CSF_OPT_LIB64 $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringLib64 [regsub -all "$::PRODUCTS_PATH" $aStringLib64 "%PRODUCTS_PATH%"]
@@ -1280,6 +1346,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "rem Additional libraries (64-bit) search paths"
puts $aFile "set \"CSF_OPT_LIB64=$aStringLib64\""
set aStringLib64d [join $::CSF_OPT_LIB64D $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringLib64d [regsub -all "$::PRODUCTS_PATH" $aStringLib64d "%PRODUCTS_PATH%"]
}
puts $aFile ""
puts $aFile "rem Additional debug libraries (64-bit) search paths"
if { "$aStringLib64d" != "" && "$aStringLib64" != "" } {
puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d;%CSF_OPT_LIB64%\""
} else {
puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d\""
}
set aStringBin32 [join $::CSF_OPT_BIN32 $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBin32 [regsub -all "$::PRODUCTS_PATH" $aStringBin32 "%PRODUCTS_PATH%"]
@@ -1288,6 +1366,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "rem Additional (32-bit) search paths"
puts $aFile "set \"CSF_OPT_BIN32=$aStringBin32\""
set aStringBin32d [join $::CSF_OPT_BIN32D $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBin32d [regsub -all "$::PRODUCTS_PATH" $aStringBin32d "%PRODUCTS_PATH%"]
}
puts $aFile ""
puts $aFile "rem Additional debug (32-bit) search paths"
if { "$aStringBin32d" != "" && "$aStringBin32" != "" } {
puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d;%CSF_OPT_BIN32%\""
} else {
puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d\""
}
set aStringBin64 [join $::CSF_OPT_BIN64 $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBin64 [regsub -all "$::PRODUCTS_PATH" $aStringBin64 "%PRODUCTS_PATH%"]
@@ -1296,6 +1386,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "rem Additional (64-bit) search paths"
puts $aFile "set \"CSF_OPT_BIN64=$aStringBin64\""
set aStringBin64d [join $::CSF_OPT_BIN64D $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBin64d [regsub -all "$::PRODUCTS_PATH" $aStringBin64d "%PRODUCTS_PATH%"]
}
puts $aFile ""
puts $aFile "rem Additional debug (64-bit) search paths"
if { "$aStringBin64d" != "" && "$aStringBin64" != "" } {
puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d;%CSF_OPT_BIN64%\""
} else {
puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d\""
}
close $aFile
} else {
set aCustomFilePath "./custom.sh"
@@ -1337,6 +1439,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "# Additional libraries ($::ARCH-bit) search paths"
puts $aFile "export CSF_OPT_LIB$::ARCH=\"[set aStringLib]\""
set aStringLibD [join [set ::CSF_OPT_LIB${::ARCH}D] $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringLibD [regsub -all "$::PRODUCTS_PATH" $aStringLibD "\${PRODUCTS_PATH}"]
}
puts $aFile ""
puts $aFile "# Additional debug libraries ($::ARCH-bit) search paths"
if { "$aStringLibD" != "" && "$aStringLib" != "" } {
puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]:\$CSF_OPT_LIB${::ARCH}\""
} else {
puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]\""
}
set aStringBin [join [set ::CSF_OPT_BIN$::ARCH] $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBin [regsub -all "$::PRODUCTS_PATH" $aStringBin "\${PRODUCTS_PATH}"]
@@ -1345,6 +1459,18 @@ proc wokdep:SaveCustom {} {
puts $aFile "# Additional ($::ARCH-bit) search paths"
puts $aFile "export CSF_OPT_BIN$::ARCH=\"[set aStringBin]\""
set aStringBinD [join [set ::CSF_OPT_BIN${::ARCH}D] $::SYS_PATH_SPLITTER]
if { "$::PRODUCTS_PATH" != "" } {
set aStringBinD [regsub -all "$::PRODUCTS_PATH" $aStringBinD "\${PRODUCTS_PATH}"]
}
puts $aFile ""
puts $aFile "# Additional debug ($::ARCH-bit) search paths"
if { "$aStringBinD" != "" && "$aStringBin" != "" } {
puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]:\$CSF_OPT_BIN${::ARCH}\""
} else {
puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]\""
}
close $aFile
}
puts "Configuration saved to file '$aCustomFilePath'"
@@ -1382,6 +1508,27 @@ proc wokdep:SaveCustom {} {
puts $aFile "INCLUDEPATH += \"${anIncPath}\""
}
puts $aFile ""
puts $aFile "CONFIG(debug, debug|release) {"
puts $aFile " # Additional debug libraries search paths"
foreach aLibPath [set ::CSF_OPT_LIB${::ARCH}D] {
if { "$::PRODUCTS_PATH" != "" } {
set aLibPath [regsub -all "$::PRODUCTS_PATH" $aLibPath "\$\$\{PRODUCTS_PATH\}"]
}
puts $aFile " LIBS += -L\"${aLibPath}\""
}
if { "$::tcl_platform(platform)" == "windows" } {
puts $aFile ""
puts $aFile " # Additional debug DLLs search paths"
foreach aDllPath [set ::CSF_OPT_BIN${::ARCH}D] {
if { "$::PRODUCTS_PATH" != "" } {
set aDllPath [regsub -all "$::PRODUCTS_PATH" $aDllPath "\$\$\{PRODUCTS_PATH\}"]
}
puts $aFile " LIBS += -L\"${aDllPath}\""
}
}
puts $aFile "}"
puts $aFile ""
puts $aFile "# Additional libraries search paths"
foreach aLibPath [set ::CSF_OPT_LIB$::ARCH] {

View File

@@ -237,8 +237,10 @@ proc gendoc {args} {
}
} elseif {$arg_n == "s"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
puts "Warning: search is not used with PDF and will be ignored."
continue
}
if {$args_values(s) != "NULL"} {
set SEARCH_MODE $args_values(s)
} else {
@@ -247,16 +249,16 @@ proc gendoc {args} {
}
} elseif {$arg_n == "mathjax"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
puts "Warning: MathJax is not used with PDF and will be ignored."
}
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: MathJax is not used with pdf and will be ignored."
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
} else {
puts "\nWrong argument: $arg_n"
@@ -686,6 +688,17 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
# Write specific options
if { $docType == "REFMAN" } {
# always include optional components
set aHaveD3dBack ""
set aHaveGlesBack ""
set aHaveVtkBack ""
if { [info exists ::env(HAVE_D3D)] } { set aHaveD3dBack "$::env(HAVE_D3D)" }
if { [info exists ::env(HAVE_GLES2)] } { set aHaveGlesBack "$::env(HAVE_GLES2)" }
if { [info exists ::env(HAVE_VTK)] } { set aHaveVtkBack "$::env(HAVE_VTK)" }
set ::env(HAVE_D3D) "true"
set ::env(HAVE_GLES2) "true"
set ::env(HAVE_VTK) "true"
# Load lists of modules scripts
if { $productsPath == "" } {
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/OS/" *.tcl]
@@ -811,12 +824,18 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
puts $doxyFile ""
# restore environment variables
set ::env(HAVE_D3D) "$aHaveD3dBack"
set ::env(HAVE_GLES2) "$aHaveGlesBack"
set ::env(HAVE_VTK) "$aHaveVtkBack"
} elseif { $docType == "OVERVIEW" } {
# Add common options for generation of Overview and User Guides
puts $doxyFile "PROJECT_NUMBER = $occt_version"
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
puts $doxyFile "PROJECT_LOGO = [OCCDoc_GetDoxDir]/resources/occ_logo.png"
puts $doxyFile "EXAMPLE_PATH = [OCCDoc_GetSourceDir $productsPath]"
set PARAM_INPUT "INPUT ="
set PARAM_IMAGEPATH "IMAGE_PATH = [OCCDoc_GetDoxDir]/resources/ "

View File

@@ -129,7 +129,7 @@ proc osutils:isEqualContent { theContent1 theContent2 } {
# Auxiliary function for writing new file content only if it has been actually changed
# (e.g. to preserve file timestamp on no change).
# Useful for automatically (re)generated files.
proc osutils:writeTextFile { theFile theContent {theEol lf} } {
proc osutils:writeTextFile { theFile theContent {theEol lf} {theToBackup false} } {
if {[file exists "${theFile}"]} {
set aFileOld [open "${theFile}" rb]
fconfigure $aFileOld -translation crlf
@@ -143,6 +143,10 @@ proc osutils:writeTextFile { theFile theContent {theEol lf} } {
return false
}
if { $theToBackup == true } {
puts "Warning: file ${theFile} is updated. Old content is saved to ${theFile}.bak"
file copy -force -- "${theFile}" "${theFile}.bak"
}
file delete -force "${theFile}"
}
@@ -256,7 +260,7 @@ proc genAllResources { theSrcDir } {
# Wrapper-function to generate VS project files
proc genproj {theFormat args} {
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vclang" "cbp" "xcd" "pro"}
set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vc143" "vclang" "cbp" "xcd" "pro"}
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
set isHelpRequire false
@@ -320,6 +324,7 @@ proc genproj {theFormat args} {
vc14 - Visual Studio 2015
vc141 - Visual Studio 2017
vc142 - Visual Studio 2019
vc143 - Visual Studio 2022
vclang - Visual Studio with ClangCL toolset
cbp - CodeBlocks
xcd - XCode
@@ -373,29 +378,28 @@ proc copy_with_warning {from to} {
# Generate auxiliary scripts for launching IDE.
proc genprojbat {theFormat thePlatform theSolution} {
set aTargetPlatformExt sh
set aTargetEol lf
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
set aTargetPlatformExt bat
set aTargetEol crlf
}
if {"$theFormat" != "cmake"} {
# copy env.bat/sh only if not yet present
if { ! [file exists "$::path/env.${aTargetPlatformExt}"] } {
set anEnvTmplFile [open "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" "r"]
set anEnvTmpl [read $anEnvTmplFile]
close $anEnvTmplFile
if { [file exists "$::path/src/OS/FoundationClasses.tcl"] || ![file exists "$::path/env.${aTargetPlatformExt}"] } {
# generate env.bat/sh
set anEnvTmplFilePath "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}"
set anEnvTmplFile [open "$anEnvTmplFilePath" "r"]
set anEnvTmpl [read $anEnvTmplFile]
close $anEnvTmplFile
set aCasRoot ""
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
}
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
set anEnvFile [open "$::path/env.${aTargetPlatformExt}" "w"]
puts $anEnvFile $anEnvTmpl
close $anEnvFile
set aCasRoot ""
if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } {
set aCasRoot [relativePath "$::path" "$::THE_CASROOT"]
}
regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl
set aLineList [split $anEnvTmpl "\n"]
osutils:writeTextFile "$::path/env.${aTargetPlatformExt}" $aLineList $aTargetEol true
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
if { "$::BUILD_Inspector" == "true" } {
@@ -557,6 +561,7 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution }
"vc14" -
"vc141" -
"vc142" -
"vc143" -
"vclang" { OS:MKVC $anOutDir $aModules $aTools $theSolution $theFormat $isUWP}
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
"xcd" {
@@ -759,7 +764,7 @@ proc osutils:tk:sort { tklm theSrcDir theSourceDirOther } {
return $lret
}
# close dependencies of ltk. (full wok pathes of toolkits)
# close dependencies of ltk. (full work paths of toolkits)
# The CURRENT WOK LOCATION MUST contains ALL TOOLKITS required.
# (locate not performed.)
proc osutils:tk:close { ltk theSrcDir theSourceDirOther } {
@@ -906,7 +911,7 @@ proc osutils:collectinc {theModules theSrcDir theIncPath} {
# relative anIncPath in connection with aCasRoot/$theSrcDir
set aFromBuildIncToSrcPath [relativePath "$anIncPath" "$aCasRoot/$theSrcDir"]
# create and copy short-cut header files
# create and copy shortcut header files
foreach anUnit $anUnits {
osutils:checksrcfiles ${anUnit} $theSrcDir
@@ -1011,8 +1016,8 @@ proc osutils:vcsolution:header { vcversion } {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 2013\n"
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
"$vcversion" == "vc142" || "$vcversion" == "vclang" } {
} elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
"$vcversion" == "vc142" || "$vcversion" == "vc143" || "$vcversion" == "vclang" } {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 14\n"
@@ -1228,28 +1233,11 @@ proc osutils:convertModules { theModules theSrcDir theSourceDirOther theProjects
lappend aProjectsInModule($aModule) $aToolKit
lappend aDependencies [LibToLink $aToolKit $theSrcDir $theSourceDirOther]
}
# executables, assume one project per cxx file...
# executables
foreach aUnit [OS:executable ${aModule}] {
set aUnitLoc $aUnit
set src_files [_get_used_files $aUnit $theSrcDir false]
set aSrcFiles {}
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 {}
}
}
}
lappend aProjects $aUnit
lappend aProjectsInModule($aModule) $aUnit
lappend aDependencies [LibToLink $aUnit $theSrcDir $theSourceDirOther]
}
}
}
@@ -1287,6 +1275,9 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} {
} elseif { $theVcVer == "vc142" } {
set aVCRTVer "vc14"
set aToolset "v142"
} elseif { $theVcVer == "vc143" } {
set aVCRTVer "vc14"
set aToolset "v143"
} elseif { $theVcVer == "vclang" } {
set aVCRTVer "vc14"
set aToolset "ClangCL"
@@ -1409,9 +1400,13 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
unset theCsfLibsMap
unset theCsfFrmsMap
set aLibsMap(CSF_FREETYPE) "freetype"
if { "$::HAVE_FREETYPE" == "true" } {
set aLibsMap(CSF_FREETYPE) "freetype"
}
set aLibsMap(CSF_TclLibs) "tcl8.6"
set aLibsMap(CSF_TclTkLibs) "tk8.6"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk8.6"
}
if { "$::HAVE_FREEIMAGE" == "true" } {
if { "$theOS" == "wnt" } {
set aLibsMap(CSF_FreeImagePlus) "FreeImage"
@@ -1440,6 +1435,9 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
if { "$::HAVE_LIBLZMA" == "true" } {
set aLibsMap(CSF_LIBLZMA) "liblzma"
}
if { "$::HAVE_DRACO" == "true" } {
set aLibsMap(CSF_Draco) "draco"
}
if { "$::HAVE_OPENVR" == "true" } {
set aLibsMap(CSF_OpenVR) "openvr_api"
}
@@ -1461,15 +1459,15 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
set aLibsMap(CSF_netapi32) "netapi32"
set aLibsMap(CSF_winmm) "winmm"
set aLibsMap(CSF_OpenGlLibs) "opengl32"
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
}
set aLibsMap(CSF_OpenGlesLibs) "libEGL libGLESv2"
set aLibsMap(CSF_psapi) "Psapi"
set aLibsMap(CSF_d3d9) "d3d9"
# the naming is different on Windows
set aLibsMap(CSF_TclLibs) "tcl86"
set aLibsMap(CSF_TclTkLibs) "tk86"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk86"
}
if { "$theRelease" == "true" } {
set aLibsMap(CSF_QT) "Qt5Gui Qt5Widgets Qt5Xml Qt5Core"
} else {
@@ -1484,39 +1482,47 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
}
} else {
set aLibsMap(CSF_dl) "dl"
if { "$::HAVE_XLIB" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "GL"
} else {
set aLibsMap(CSF_OpenGlLibs) "GL EGL"
}
set aLibsMap(CSF_OpenGlesLibs) "EGL GLESv2"
if { "$theOS" == "mac" || "$theOS" == "ios" } {
set aLibsMap(CSF_objc) "objc"
set aLibsMap(CSF_objc) "objc"
set aLibsMap(CSF_OpenGlLibs) ""
set aLibsMap(CSF_OpenGlesLibs) ""
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
set aFrmsMap(CSF_OpenGlesLibs) "OpenGLES"
if { "$theOS" == "ios" } {
set aFrmsMap(CSF_Appkit) "UIKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGLES"
set aFrmsMap(CSF_Appkit) "UIKit"
} else {
set aFrmsMap(CSF_Appkit) "AppKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
set aFrmsMap(CSF_Appkit) "AppKit"
}
set aFrmsMap(CSF_IOKit) "IOKit"
set aFrmsMap(CSF_TclLibs) "Tcl"
set aLibsMap(CSF_TclLibs) ""
set aFrmsMap(CSF_TclTkLibs) "Tk"
set aLibsMap(CSF_TclTkLibs) ""
set aFrmsMap(CSF_TclLibs) "Tcl"
if { "$::HAVE_TK" == "true" } {
set aFrmsMap(CSF_TclTkLibs) "Tk"
}
set aLibsMap(CSF_QT) "QtCore QtGui"
} elseif { "$theOS" == "android" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
set aLibsMap(CSF_androidlog) "log"
} else {
set aLibsMap(CSF_fontconfig) "fontconfig"
if { "$::HAVE_FREETYPE" == "true" } {
set aLibsMap(CSF_fontconfig) "fontconfig"
}
if { "$theOS" == "qnx" } {
# CSF_ThreadLibs - pthread API is part of libc on QNX
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
} else {
set aLibsMap(CSF_ThreadLibs) "pthread rt"
set aLibsMap(CSF_OpenGlLibs) "GL"
set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
set aLibsMap(CSF_MotifLibs) "X11"
}
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
if { "$::HAVE_TK" == "true" } {
set aLibsMap(CSF_TclTkLibs) "tk8.6"
}
if { "$::HAVE_XLIB" == "true" } {
set aLibsMap(CSF_XwLibs) "X11"
}
}
}
}
@@ -1596,11 +1602,6 @@ proc osutils:tk:units { tkloc theSrcDir } {
return $l
}
proc osutils:justwnt { listloc } {
set goaway [list Xw]
return [osutils:juststation $goaway $listloc]
}
# remove from listloc OpenCascade units indesirables on NT
proc osutils:juststation {goaway listloc} {
global path
@@ -1676,7 +1677,7 @@ proc wokUtils:EASY:bs1 { s } {
return $r
}
# Returs for a full path the liste of n last directory part
# Returns for a full path the liste of n last directory part
# n = 1 => tail
# n = 2 => dir/file.c
# n = 3 => sdir/dir/file.c
@@ -1790,9 +1791,14 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
global path
set aHasQtDep "false"
set aTkDefines ""
foreach aCsfElem [osutils:tk:csfInExternlib "$path/$theSrcDir/${theToolKit}/EXTERNLIB"] {
if { "$aCsfElem" == "CSF_QT" } {
set aHasQtDep "true"
} elseif { "$aCsfElem" == "CSF_OpenGlLibs" } {
set aTkDefines "$aTkDefines;HAVE_OPENGL"
} elseif { "$aCsfElem" == "CSF_OpenGlesLibs" } {
set aTkDefines "$aTkDefines;HAVE_GLES2"
}
}
set theProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 0]
@@ -1827,9 +1833,9 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
# depending on VC version
regsub -all -- {__TKDEP__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEFINES__} $theProjTmpl $aTkDefines theProjTmpl
set anIncPaths "..\\..\\..\\inc"
# set aTKDefines ""
set aFilesSection ""
set aVcFilesCxx(units) ""
set aVcFilesHxx(units) ""
@@ -1890,7 +1896,7 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set written([file tail $aSrcFile]) 1
append aFilesSection [osutils:vcxproj:cxxfile $aSrcFile $needparam 3]
} else {
puts "Warning : in vcproj more than one occurences for [file tail $aSrcFile]"
puts "Warning : in vcproj more than one occurrences for [file tail $aSrcFile]"
}
if { ! [info exists aVcFilesCxx($xlo)] } { lappend aVcFilesCxx(units) $xlo }
lappend aVcFilesCxx($xlo) $aSrcFile
@@ -1900,7 +1906,7 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set written([file tail $aHxxFile]) 1
append aFilesSection [osutils:vcxproj:hxxfile $aHxxFile]
} else {
puts "Warning : in vcproj more than one occurences for [file tail $aHxxFile]"
puts "Warning : in vcproj more than one occurrences for [file tail $aHxxFile]"
}
if { ! [info exists aVcFilesHxx($xlo)] } { lappend aVcFilesHxx(units) $xlo }
lappend aVcFilesHxx($xlo) $aHxxFile
@@ -1910,7 +1916,7 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set written([file tail $aGenFile]) 1
append aFilesSection [osutils:vcxproj:cxxfile $aGenFile $needparam 5]
} else {
puts "Warning : in vcproj more than one occurences for [file tail $aGenFile]"
puts "Warning : in vcproj more than one occurrences for [file tail $aGenFile]"
}
if { ! [info exists aVcFilesCxx($xlo)] } { lappend aVcFilesCxx(units) $xlo }
lappend aVcFilesCxx($xlo) $aGenFile
@@ -1924,7 +1930,7 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set written([file tail $aSrcFile]) 1
append aFilesSection [osutils:vcproj:file $theVcVer $aSrcFile $needparam]
} else {
puts "Warning : in vcproj more than one occurences for [file tail $aSrcFile]"
puts "Warning : in vcproj more than one occurrences for [file tail $aSrcFile]"
}
}
append aFilesSection "\t\t\t</Filter>\n"
@@ -2087,97 +2093,106 @@ proc osutils:tk:execfiles { theFiles theOutDir theCommand thePrefix theExtension
# Generate Visual Studio project file for executable
proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } {
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 l_compilable [osutils:compilable wnt]
regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl
set aProjName $theToolKit
set l_compilable [osutils:compilable wnt]
regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl
upvar $theGuidsMap aGuidsMap
if { ! [info exists aGuidsMap($aProjName)] } {
set aGuidsMap($aProjName) [OS:genGUID]
}
regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl
upvar $theGuidsMap aGuidsMap
if { ! [info exists aGuidsMap($aProjName)] } {
set aGuidsMap($aProjName) [OS:genGUID]
}
regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl
set aUsedLibs [list]
foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] {
lappend aUsedLibs "${tkx}.lib"
}
set aUsedLibs [list]
foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] {
lappend aUsedLibs "${tkx}.lib"
}
set anOsReleaseLibs {}
set anOsDebugLibs {}
osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true
osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false
set anOsReleaseLibs {}
set anOsDebugLibs {}
osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true
osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false
set aVCRTVer [string range $theVcVer 0 3]
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
set aVCRTVer [string range $theVcVer 0 3]
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl
set aFilesSection ""
set aVcFilesCxx(units) ""
set aVcFilesHxx(units) ""
set aFilesSection ""
set aVcFilesCxx(units) ""
set aVcFilesHxx(units) ""
if { ![info exists written([file tail $f])] } {
set written([file tail $f]) 1
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } {
foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] {
if { ![info exists written([file tail $f])] } {
set written([file tail $f]) 1
append aFilesSection [osutils:vcxproj:cxxfile $f "" 3]
if { ! [info exists aVcFilesCxx($theToolKit)] } { lappend aVcFilesCxx(units) $theToolKit }
lappend aVcFilesCxx($theToolKit) $f
} else {
append aFilesSection "\t\t\t<Filter\n"
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>"
puts "Warning : in vcproj there are more than one occurrences for [file tail $f]"
}
} else {
puts "Warning : in vcproj there are more than one occurences for [file tail $f]"
}
#puts "$aProjTmpl $aFilesSection"
set anIncPaths "..\\..\\..\\inc"
regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl
regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl
regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl
} else {
append aFilesSection "\t\t\t<Filter\n"
append aFilesSection "\t\t\t\tName=\"$theToolKit\"\n"
append aFilesSection "\t\t\t\t>\n"
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
puts $aFile $aProjTmpl
puts $aFile $aCommonSettingsFileTmpl
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
puts $aFile $aCommonSettingsFileTmpl
close $aFile
lappend aVcFiles "$aCommonSettingsFile"
}
lappend aVcFiles "$aCommonSettingsFile"
}
return $aVcFiles
}
@@ -2267,17 +2282,6 @@ proc wokUtils:FILES:mkdir { d } {
}
}
# remove from listloc OpenCascade units indesirables on Unix
proc osutils:justunix { listloc } {
if { "$::tcl_platform(os)" == "Darwin" } {
set goaway [list Xw WNT]
} else {
set goaway [list WNT]
}
return [osutils:juststation $goaway $listloc]
}
####### CODEBLOCK ###################################################################
# Function to generate Code Blocks workspace and project files
proc OS:MKCBP { theOutDir theModules theAllSolution thePlatform theCmpl } {
@@ -2333,13 +2337,8 @@ proc osutils:cbptk { theCmpl theOutDir theToolKit thePlatform} {
set listloc $theToolKit
}
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
set resultloc [osutils:justwnt $listloc]
} else {
set resultloc [osutils:justunix $listloc]
}
if [array exists written] { unset written }
foreach fxlo $resultloc {
foreach fxlo $listloc {
set xlo $fxlo
set aSrcFiles [osutils:tk:cxxfiles $xlo $thePlatform "src"]
foreach aSrcFile [lsort $aSrcFiles] {
@@ -2347,7 +2346,7 @@ proc osutils:cbptk { theCmpl theOutDir theToolKit thePlatform} {
set written([file tail $aSrcFile]) 1
lappend aTKSrcFiles "../../../[wokUtils:FILES:wtail $aSrcFile 3]"
} else {
puts "Warning : more than one occurences for [file tail $aSrcFile]"
puts "Warning : more than one occurrences for [file tail $aSrcFile]"
}
}
@@ -2467,7 +2466,7 @@ proc osutils:cbpx { theCmpl theOutDir theToolKit thePlatform } {
set written([file tail $aSrcFile]) 1
lappend aTKSrcFiles "../../../[wokUtils:FILES:wtail $aSrcFile 3]"
} else {
puts "Warning : in cbp there are more than one occurences for [file tail $aSrcFile]"
puts "Warning : in cbp there are more than one occurrences for [file tail $aSrcFile]"
}
# macros for correct DLL exports
@@ -2536,6 +2535,7 @@ proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibs
lappend aCmplFlags "-DOCC_CONVERT_SIGNALS"
}
lappend aCmplFlags "-Wall"
lappend aCmplFlags "-Wextra"
lappend aCmplFlags "-fexceptions"
}
lappend aCmplFlagsRelease "-DNDEBUG"
@@ -2928,9 +2928,8 @@ proc osutils:xcdtk:sources {theToolKit theTargetType theSrcFileRefSection theGro
upvar $theIncPaths anIncPaths
set listloc [osutils:tk:units $theToolKit "src"]
set resultloc [osutils:justunix $listloc]
set aBuildFileSection ""
set aPackages [lsort -nocase $resultloc]
set aPackages [lsort -nocase $listloc]
if { "$theTargetType" == "executable" } {
set aPackages [list "$theToolKit"]
}
@@ -2968,7 +2967,7 @@ proc osutils:xcdtk:sources {theToolKit theTargetType theSrcFileRefSection theGro
append aSrcFileGuids "\t\t\t\t$aGuidsMap($aSrcFile) ,\n"
append aSrcFileRefGuids "\t\t\t\t$aGuidsMap($aSrcFileRef) ,\n"
} else {
puts "Warning : more than one occurences for [file tail $aSrcFile]"
puts "Warning : more than one occurrences for [file tail $aSrcFile]"
}
}
@@ -3030,26 +3029,26 @@ proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {t
set aUserDataDir "${aToolkitDir}/xcuserdata"
wokUtils:FILES:mkdir $aUserDataDir
if { ! [file exists $aUserDataDir] } {
puts stderr "Error: Could not create xcuserdata directorty in \"$aToolkitDir\""
puts stderr "Error: Could not create xcuserdata directory in \"$aToolkitDir\""
return
}
set aUserDataDir "${aUserDataDir}/${aUsername}.xcuserdatad"
wokUtils:FILES:mkdir $aUserDataDir
if { ! [file exists $aUserDataDir] } {
puts stderr "Error: Could not create ${aUsername}.xcuserdatad directorty in \"$aToolkitDir\"/xcuserdata"
puts stderr "Error: Could not create ${aUsername}.xcuserdatad directory in \"$aToolkitDir\"/xcuserdata"
return
}
set aSchemesDir "${aUserDataDir}/xcschemes"
wokUtils:FILES:mkdir $aSchemesDir
if { ! [file exists $aSchemesDir] } {
puts stderr "Error: Could not create xcschemes directorty in \"$aUserDataDir\""
puts stderr "Error: Could not create xcschemes directory in \"$aUserDataDir\""
return
}
# End of folders creation.
# Generating GUID for tookit.
# Generating GUID for toolkit.
upvar $theGuidsMap aGuidsMap
if { ! [info exists aGuidsMap($theToolKit)] } {
set aGuidsMap($theToolKit) [OS:genGUID "xcd"]
@@ -3482,26 +3481,26 @@ proc osutils:xcdx { theOutDir theExecutable theGuidsMap } {
set aUserDataDir "${anExecutableDir}/xcuserdata"
wokUtils:FILES:mkdir $aUserDataDir
if { ! [file exists $aUserDataDir] } {
puts stderr "Error: Could not create xcuserdata directorty in \"$anExecutableDir\""
puts stderr "Error: Could not create xcuserdata directory in \"$anExecutableDir\""
return
}
set aUserDataDir "${aUserDataDir}/${aUsername}.xcuserdatad"
wokUtils:FILES:mkdir $aUserDataDir
if { ! [file exists $aUserDataDir] } {
puts stderr "Error: Could not create ${aUsername}.xcuserdatad directorty in \"$anExecutableDir\"/xcuserdata"
puts stderr "Error: Could not create ${aUsername}.xcuserdatad directory in \"$anExecutableDir\"/xcuserdata"
return
}
set aSchemesDir "${aUserDataDir}/xcschemes"
wokUtils:FILES:mkdir $aSchemesDir
if { ! [file exists $aSchemesDir] } {
puts stderr "Error: Could not create xcschemes directorty in \"$aUserDataDir\""
puts stderr "Error: Could not create xcschemes directory in \"$aUserDataDir\""
return
}
# End folders creation.
# Generating GUID for tookit.
# Generating GUID for toolkit.
upvar $theGuidsMap aGuidsMap
if { ! [info exists aGuidsMap($theExecutable)] } {
set aGuidsMap($theExecutable) [OS:genGUID "xcd"]

View File

@@ -16,7 +16,7 @@
# commercial license or contractual agreement.
# =======================================================================
# This script contains auxilary functions which can be used
# This script contains auxiliary functions which can be used
# in documentation generation process
# =======================================================================
@@ -179,8 +179,10 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
}
if {"$is_win" == "yes"} {
set exe ".exe"
set com ".com"
} else {
set exe ""
set com ""
}
set g_flag "no"
@@ -224,11 +226,11 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
}
}
if {$i_flag == "no"} {
if { [file exists $path/inkscape$exe] } {
if { [file exists $path/inkscape$com] } {
catch { exec $path/inkscape -V } version
puts "Info: $version "
puts " found in $path."
set inkscape_path "$path/inkscape$exe"
set inkscape_path "$path/inkscape$com"
set i_flag "yes"
}
}
@@ -356,15 +358,29 @@ proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH H
# Convert SVG files to PDF format to allow including them to PDF
# (requires InkScape to be in PATH)
proc OCCDoc_ProcessSvg {latexDir verboseMode} {
set anSvgList [glob -nocomplain $latexDir/*.svg]
if { $anSvgList == {} } {
return
}
foreach file [glob -nocomplain $latexDir/*.svg] {
catch { exec inkscape -V } anInkVer
set isOldSyntax 0
if {[string match "Inkscape 0.*" $anInkVer]} { set isOldSyntax 1 }
foreach file $anSvgList {
if {$verboseMode == "YES"} {
puts "Info: Converting file $file..."
}
set pdffile "[file rootname $file].pdf"
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
#puts "Error: $res."
return
if { $isOldSyntax == 1 } {
if { [catch {exec inkscape -z -D --file=$file --export-pdf=$pdffile} res] } {
#puts "Error: $res."
return
}
} else {
if { [catch {exec inkscape $file --export-area-drawing --export-type=pdf --export-filename=$pdffile} res] } {
#puts "Error: $res."
return
}
}
}
}
@@ -619,7 +635,7 @@ proc OCCDoc_MakeMainPage {outDir outFile modules {theProductsDir ""} } {
foreach mod $modules {
puts $fd "\\li \\subpage [string tolower $module_prefix$mod]"
}
# insert modules relationship diagramm
# insert modules relationship diagram
puts $fd "\\dotfile [OCCDoc_CreateModulesDependencyGraph $outDir/html schema_all_modules $modules $module_prefix]"
puts $fd "**/\n"
}
@@ -899,4 +915,4 @@ proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
file delete -force $TEX
file rename $TMPFILENAME $TEX
}
}
}

View File

@@ -1,157 +1,165 @@
# This is project defines C++ compilation rules for building an OCCT Toolkit.
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
# Disable some dummy Qt defaults
QT -= core gui
CONFIG -= qt app_bundle
CONFIG -= qml_debug
CONFIG -= debug_and_release
OccGitRoot = $$_PRO_FILE_PWD_/../../../..
# Define compilation flags
CONFIG += warn_on
QMAKE_CFLAGS_WARN_ON = -Wall
QMAKE_CXXFLAGS_WARN_ON = -Wall
win32 {
QMAKE_CFLAGS_WARN_ON = -W4
QMAKE_CXXFLAGS_WARN_ON = -W4
QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
QMAKE_CXXFLAGS_STL_ON = /EHa
QMAKE_CXXFLAGS += -fp:precise
#QMAKE_CXXFLAGS -= -Zc:throwingNew
#QMAKE_CXXFLAGS -= -Zc:rvalueCast
QMAKE_LFLAGS += -INCREMENTAL:NO
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += -Od
QMAKE_CXXFLAGS += -Ob1
}
DEFINES -= WIN32
DEFINES -= WIN64
DEFINES += _CRT_SECURE_NO_WARNINGS
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
DEFINES += _SCL_SECURE_NO_WARNINGS
} else {
CONFIG += c++11
QMAKE_CFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fvisibility=default
DEFINES += OCC_CONVERT_SIGNALS
mac {
iphoneos {
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
} else {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
}
}
}
!CONFIG(debug, debug|release) {
# disable exceptions in Release builds
DEFINES += No_Exception
HAVE_RelWithDebInfo {
win32 {
CONFIG += force_debug_info
}
}
}
# Define output folder depending on compiler name
MY_BITNESS = 32
equals(QMAKE_TARGET.arch, x86_64) | equals(QMAKE_HOST.arch, x86_64) { MY_BITNESS = 64 }
equals(ANDROID_TARGET_ARCH, arm64-v8a) { MY_BITNESS = 64 }
has64Target = $$find(QMAKE_TARGET.arch, "x64")
count(has64Target, 1) { MY_BITNESS = 64 }
MY_PLATFORM = platform
CONFIG(iphonesimulator, iphoneos|iphonesimulator) { MY_PLATFORM = iphonesimulator
} else:CONFIG(iphoneos, iphoneos|iphonesimulator) { MY_PLATFORM = iphoneos
} else:android { MY_PLATFORM = android-$$ANDROID_TARGET_ARCH
} else:win32 { MY_PLATFORM = win$$MY_BITNESS
} else:mac { MY_PLATFORM = mac
} else:linux { MY_PLATFORM = lin
} else:unix { MY_PLATFORM = unix
} else { warning (Unknown platform. "$$MY_PLATFORM" is used) }
MY_COMPILER = compiler
MY_VC_VER = 0
android-g++ {
MY_COMPILER = gcc
} else:clang {
MY_COMPILER = clang
} else:gcc {
MY_COMPILER = gcc
} else:win32-msvc2010 {
MY_COMPILER = vc10
MY_VC_VER = 10
} else:win32-msvc2012 {
MY_COMPILER = vc11
MY_VC_VER = 11
} else:win32-msvc2013 {
MY_COMPILER = vc12
MY_VC_VER = 12
} else:win32-msvc2015 {
MY_COMPILER = vc14
MY_VC_VER = 14
} else:win32-msvc2017 {
MY_COMPILER = vc14
MY_VC_VER = 14
} else:win32-msvc {
MY_COMPILER = vc14
MY_VC_VER = 14
aMsvcVer = $$(VisualStudioVersion)
equals(aMsvcVer, 14.0){
# VS2015, vc140
} else:equals(aMsvcVer, 15.0){
# VS2015, vc141
} else:equals(aMsvcVer, 16.0){
# VS2019, vc142
} else {
warning (Unknown msvc version. "$$MY_COMPILER" is used)
}
} else {
warning (Unknown compiler. "$$MY_COMPILER" is used)
}
MY_PLATFORM_AND_COMPILER = $$MY_PLATFORM/$$MY_COMPILER
#warning (The platform is "$$MY_PLATFORM"; bitness is "$$MY_BITNESS"; compiler is "$$MY_COMPILER")
CONFIG(debug, debug|release) { MY_BUILDTYPE = d }
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/lib$${MY_BUILDTYPE}
win32 {
DESTDIR = $$OccGitRoot/win$${MY_BITNESS}/vc$${MY_VC_VER}/bin$${MY_BUILDTYPE}
aLibDest = $$DESTDIR/../lib$${MY_BUILDTYPE}
#DLLDESTDIR = $$DESTDIR/../bin$${MY_BUILDTYPE}
# dummy target creating lib/libd folder
occtkgen_libfolder.input = $$_PRO_FILE_PWD_/../../OcctDummy.in
occtkgen_libfolder.output = $$aLibDest/dummy.tmp
occtkgen_libfolder.config = verbatim
QMAKE_SUBSTITUTES += occtkgen_libfolder
LIBS += -L$$aLibDest
equals(TEMPLATE, lib) {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.dll
QMAKE_CLEAN += $$aLibDest/$${TARGET}.lib
QMAKE_CLEAN += $$aLibDest/$${TARGET}.exp
} else {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.exe
}
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.pdb
QMAKE_LFLAGS += -PDB:"$$DESTDIR/$${TARGET}.pdb"
QMAKE_LFLAGS += -IMPLIB:"$$aLibDest/$${TARGET}.lib"
} else {
LIBS += -L$$DESTDIR
equals(TEMPLATE, app) {
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/bin$${MY_BUILDTYPE}
}
}
#OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}
# This is project defines C++ compilation rules for building an OCCT Toolkit.
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
# Disable some dummy Qt defaults
QT -= core gui
CONFIG -= qt app_bundle
CONFIG -= qml_debug
CONFIG -= debug_and_release
OccGitRoot = $$_PRO_FILE_PWD_/../../../..
# Define compilation flags
CONFIG += warn_on
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CXXFLAGS_WARN_ON = -Wall -Wextra
win32 {
QMAKE_CFLAGS_WARN_ON = -W4
QMAKE_CXXFLAGS_WARN_ON = -W4
QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
QMAKE_CXXFLAGS_STL_ON = /EHa
QMAKE_CXXFLAGS += -fp:precise
#QMAKE_CXXFLAGS -= -Zc:throwingNew
#QMAKE_CXXFLAGS -= -Zc:rvalueCast
QMAKE_LFLAGS += -INCREMENTAL:NO
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += -Od
QMAKE_CXXFLAGS += -Ob1
}
DEFINES -= WIN32
DEFINES -= WIN64
DEFINES += _CRT_SECURE_NO_WARNINGS
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
DEFINES += _SCL_SECURE_NO_WARNINGS
} else {
CONFIG += c++11
clang {
QMAKE_CFLAGS_WARN_ON += -Wshorten-64-to-32
QMAKE_CXXFLAGS_WARN_ON += -Wshorten-64-to-32
}
QMAKE_CFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fvisibility=default
DEFINES += OCC_CONVERT_SIGNALS
mac {
iphoneos {
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
} else {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
}
} else:gcc {
# ask linker to report missing library dependencies
QMAKE_LFLAGS += -Wl,-z,defs
}
}
!CONFIG(debug, debug|release) {
# disable exceptions in Release builds
DEFINES += No_Exception
HAVE_RelWithDebInfo {
win32 {
CONFIG += force_debug_info
}
}
}
# Define output folder depending on compiler name
MY_BITNESS = 32
equals(QMAKE_TARGET.arch, x86_64) | equals(QMAKE_HOST.arch, x86_64) { MY_BITNESS = 64 }
equals(ANDROID_TARGET_ARCH, arm64-v8a) { MY_BITNESS = 64 }
has64Target = $$find(QMAKE_TARGET.arch, "x64")
count(has64Target, 1) { MY_BITNESS = 64 }
MY_PLATFORM = platform
CONFIG(iphonesimulator, iphoneos|iphonesimulator) { MY_PLATFORM = iphonesimulator
} else:CONFIG(iphoneos, iphoneos|iphonesimulator) { MY_PLATFORM = iphoneos
} else:android { MY_PLATFORM = android-$$ANDROID_TARGET_ARCH
} else:win32 { MY_PLATFORM = win$$MY_BITNESS
} else:mac { MY_PLATFORM = mac
} else:linux { MY_PLATFORM = lin
} else:unix { MY_PLATFORM = unix
} else { warning (Unknown platform. "$$MY_PLATFORM" is used) }
MY_COMPILER = compiler
MY_VC_VER = 0
android-g++ {
MY_COMPILER = gcc
} else:clang {
MY_COMPILER = clang
} else:gcc {
MY_COMPILER = gcc
} else:win32-msvc2010 {
MY_COMPILER = vc10
MY_VC_VER = 10
} else:win32-msvc2012 {
MY_COMPILER = vc11
MY_VC_VER = 11
} else:win32-msvc2013 {
MY_COMPILER = vc12
MY_VC_VER = 12
} else:win32-msvc2015 {
MY_COMPILER = vc14
MY_VC_VER = 14
} else:win32-msvc2017 {
MY_COMPILER = vc14
MY_VC_VER = 14
} else:win32-msvc {
MY_COMPILER = vc14
MY_VC_VER = 14
aMsvcVer = $$(VisualStudioVersion)
equals(aMsvcVer, 14.0){
# VS2015, vc140
} else:equals(aMsvcVer, 15.0){
# VS2015, vc141
} else:equals(aMsvcVer, 16.0){
# VS2019, vc142
} else:equals(aMsvcVer, 17.0){
# VS2022, vc143
} else {
warning (Unknown msvc version. "$$MY_COMPILER" is used)
}
} else {
warning (Unknown compiler. "$$MY_COMPILER" is used)
}
MY_PLATFORM_AND_COMPILER = $$MY_PLATFORM/$$MY_COMPILER
#warning (The platform is "$$MY_PLATFORM"; bitness is "$$MY_BITNESS"; compiler is "$$MY_COMPILER")
CONFIG(debug, debug|release) { MY_BUILDTYPE = d }
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/lib$${MY_BUILDTYPE}
win32 {
DESTDIR = $$OccGitRoot/win$${MY_BITNESS}/vc$${MY_VC_VER}/bin$${MY_BUILDTYPE}
aLibDest = $$DESTDIR/../lib$${MY_BUILDTYPE}
#DLLDESTDIR = $$DESTDIR/../bin$${MY_BUILDTYPE}
# dummy target creating lib/libd folder
occtkgen_libfolder.input = $$_PRO_FILE_PWD_/../../OcctDummy.in
occtkgen_libfolder.output = $$aLibDest/dummy.tmp
occtkgen_libfolder.config = verbatim
QMAKE_SUBSTITUTES += occtkgen_libfolder
LIBS += -L$$aLibDest
equals(TEMPLATE, lib) {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.dll
QMAKE_CLEAN += $$aLibDest/$${TARGET}.lib
QMAKE_CLEAN += $$aLibDest/$${TARGET}.exp
} else {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.exe
}
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.pdb
QMAKE_LFLAGS += -PDB:"$$DESTDIR/$${TARGET}.pdb"
QMAKE_LFLAGS += -IMPLIB:"$$aLibDest/$${TARGET}.lib"
} else {
LIBS += -L$$DESTDIR
equals(TEMPLATE, app) {
DESTDIR = $$OccGitRoot/$${MY_PLATFORM_AND_COMPILER}/bin$${MY_BUILDTYPE}
}
}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}

View File

@@ -1,36 +1,42 @@
# This is a project template file defining an OCCT Module.
# This project should be included with predefined OCC_MODULE_NAME variable.
TEMPLATE = subdirs
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
# Iterate over Toolkits within current Module and generate sub-project per Toolkit
aModuleList = $$cat(../MODULES, lines)
for (aModuleIter, aModuleList) {
#aTkList = $$list($$aModuleIter) - this doesn't work, qmake bug?
aModule = $$first($$list($$aModuleIter))
equals (aModule, $$OCC_MODULE_NAME) {
for (aToolKit, $$list($$aModuleIter)) {
toSkipToolkit = 0
equals (aToolKit, $$OCC_MODULE_NAME) { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtk") { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHost") { toSkipToolkit = 1 }
equals (toSkipToolkit, 0) {
#warning(aToolKit($$OCC_MODULE_NAME)=$$aToolKit)
eval(occtkgen_$${aToolKit}.input = $$_PRO_FILE_PWD_/../OccToolkit.pro.in)
eval(occtkgen_$${aToolKit}.output = $$_PRO_FILE_PWD_/$${aToolKit}/$${aToolKit}.pro)
eval(occtkgen_$${aToolKit}.config = verbatim)
eval(QMAKE_SUBSTITUTES += occtkgen_$${aToolKit})
SUBDIRS += $${aToolKit}
aModExtList = $$cat(../../src/$${aToolKit}/EXTERNLIB, lines)
aTkDepends = $${aToolKit}.depends
for (aModExtIter, aModExtList) {
contains ($$list($$aModuleIter), $$aModExtIter) { eval ($${aTkDepends} += $$aModExtIter) }
}
#warning($$aToolKit depends on: $$reverse($${aTkDepends}))
}
}
}
}
# This is a project template file defining an OCCT Module.
# This project should be included with predefined OCC_MODULE_NAME variable.
TEMPLATE = subdirs
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
# Iterate over Toolkits within current Module and generate sub-project per Toolkit
aModuleList = $$cat(../MODULES, lines)
for (aModuleIter, aModuleList) {
#aTkList = $$list($$aModuleIter) - this doesn't work, qmake bug?
aModule = $$first($$list($$aModuleIter))
equals (aModule, $$OCC_MODULE_NAME) {
for (aToolKit, $$list($$aModuleIter)) {
toSkipToolkit = 0
equals (aToolKit, $$OCC_MODULE_NAME) { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtk") { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGl") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGlTest") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGles") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGlesTest") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHost") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHostTest") { toSkipToolkit = 1 }
equals (toSkipToolkit, 0) {
#warning(aToolKit($$OCC_MODULE_NAME)=$$aToolKit)
eval(occtkgen_$${aToolKit}.input = $$_PRO_FILE_PWD_/../OccToolkit.pro.in)
eval(occtkgen_$${aToolKit}.output = $$_PRO_FILE_PWD_/$${aToolKit}/$${aToolKit}.pro)
eval(occtkgen_$${aToolKit}.config = verbatim)
eval(QMAKE_SUBSTITUTES += occtkgen_$${aToolKit})
SUBDIRS += $${aToolKit}
aModExtList = $$cat(../../src/$${aToolKit}/EXTERNLIB, lines)
aTkDepends = $${aToolKit}.depends
for (aModExtIter, aModExtList) {
contains ($$list($$aModuleIter), $$aModExtIter) { eval ($${aTkDepends} += $$aModExtIter) }
}
#warning($$aToolKit depends on: $$reverse($${aTkDepends}))
}
}
}
}

View File

@@ -1,2 +1,2 @@
OCC_MODULE_NAME = \$\$TARGET
include(../OccModule.pri)
OCC_MODULE_NAME = \$\$TARGET
include(../OccModule.pri)

View File

@@ -1,144 +1,166 @@
# This is a project template file defining an OCCT Toolkit.
# This project should be included with predefined OCC_TOOLKIT_NAME variable.
TEMPLATE = lib
!exists(../../src/$$OCC_TOOLKIT_NAME/PACKAGES) {
TEMPLATE = app
CONFIG += console
}
win32 {
# do not append version to DLL name
CONFIG += skip_target_version_ext
}
include(OccCppConfig.pri)
aSrcRoot = $$OccGitRoot/src
aHxxRoot = $$OccGitRoot/inc
INCLUDEPATH += $$aHxxRoot
# CSF variables
CSF_FREETYPE = -lfreetype
CSF_TclLibs = -ltcl8.6
CSF_TclTkLibs = -ltk8.6
HAVE_FREEIMAGE { CSF_FreeImagePlus = -lfreeimage } else:win32 { CSF_FreeImagePlus = -lwindowscodecs -lole32 }
HAVE_FFMPEG { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil }
HAVE_TBB { CSF_TBB = -ltbb -ltbbmalloc }
HAVE_ZLIB { CSF_ZLIB = -lzlib }
HAVE_LIBLZMA { CSF_LIBLZMA = -lliblzma }
win32 {
CSF_kernel32 = -lkernel32
CSF_advapi32 = -ladvapi32
CSF_gdi32 = -lgdi32
CSF_user32 = -luser32 -lcomdlg32
CSF_shell32 = -lShell32
CSF_opengl32 = -lopengl32
CSF_wsock32 = -lwsock32
CSF_netapi32 = -lnetapi32
CSF_OpenGlLibs = -lopengl32
HAVE_GLES2 { CSF_OpenGlLibs = -llibEGL -llibGLESv2 }
CSF_psapi = -lPsapi
CSF_winmm = -lwinmm
CSF_d3d9 = -ld3d9
CSF_TclLibs = -ltcl86
CSF_TclTkLibs = -ltk86
CSF_TBB =
} else:mac {
CSF_dl = -ldl
CSF_objc = -lobjc
iphoneos {
CSF_Appkit = -framework UIKit
CSF_OpenGlLibs = -framework OpenGLES
} else {
CSF_Appkit = -framework AppKit
CSF_OpenGlLibs = -framework OpenGL
}
CSF_IOKit = -framework IOKit
CSF_TclLibs = -framework Tcl
CSF_TclTkLibs = -framework Tk
} else {
CSF_dl = -ldl
CSF_ThreadLibs = -lpthread -lrt
CSF_OpenGlLibs = -lGL
CSF_TclTkLibs = -lX11 -ltk8.6
CSF_XwLibs = -lX11 -lXext -lXmu -lXi
CSF_MotifLibs = -lX11
CSF_fontconfig = -lfontconfig
HAVE_GLES2 { CSF_OpenGlLibs = -lEGL -lGLESv2 }
}
for (aCfgIter, CONFIG) {
aRes = $$find(aCfgIter, "^HAVE_")
count(aRes, 1) {
DEFINES += $$aCfgIter
}
}
# Define the list of standard OCCT file extensions
aHxxRegex = ^.*\.(hxx|h|lxx|gxx)$
aPxxRegex = ^.*\.(pxx)$
aCxxRegex = ^.*\.(cxx|c)$
mac { aCxxRegex = ^.*\.(cxx|c|m|mm)$ }
# Auxiliary function for probing file extension
defineTest (occCheckExtension) {
aProbe = $$find(1, "$$2")
count(aProbe, 1) { return(true) } else { return(false) }
}
# Auxiliary function for probing compilable files
defineTest (occIsCxxFile) { occCheckExtension ($$1, $$aCxxRegex) { return(true) } else { return(false) } }
# Auxiliary function for probing header files
defineTest (occIsHxxFile) { occCheckExtension ($$1, $$aHxxRegex) { return(true) } else { return(false) } }
aTkFiles = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/FILES, lines)
aTkFiles += CMakeLists.txt
aPackages = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/PACKAGES, lines)
anExternLibs = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/EXTERNLIB, lines)
for (aTkFileIter, aTkFiles) { OTHER_FILES += $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aTkFileIter }
for (anExternLib, anExternLibs) {
hasCsf = $$find(anExternLib, CSF_)
count(hasCsf, 1) {
aList = $$split($$anExternLib, "\n")
LIBS += $$aList
} else {
LIBS += -l$$anExternLib
}
}
# Iterate over Packages and add compilable files into this project
isEmpty (aPackages) { aPackages = $$OCC_TOOLKIT_NAME }
for (aPackage, aPackages) {
aPackageFolder = $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aPackage
aPackageFiles = $$cat($$aSrcRoot/$$aPackage/FILES, lines)
for (aFileIter, aPackageFiles) {
occIsCxxFile($$aFileIter) {
SOURCES += $$aSrcRoot/$$aPackage/$$aFileIter
}
}
}
# extend clean with versioned .so files
!win32 {
aVerList = $$split(VERSION, ".")
aVerMaj = $$member(aVerList, 0)
aVerMin = $$member(aVerList, 1)
aVerMic = $$member(aVerList, 2)
equals(TEMPLATE, app) {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}
} else {
mac {
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib
} else {
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}.$${aVerMic}
}
}
}
# This is a project template file defining an OCCT Toolkit.
# This project should be included with predefined OCC_TOOLKIT_NAME variable.
TEMPLATE = lib
!exists(../../src/$$OCC_TOOLKIT_NAME/PACKAGES) {
TEMPLATE = app
CONFIG += console
}
win32 {
# do not append version to DLL name
CONFIG += skip_target_version_ext
}
include(OccCppConfig.pri)
aSrcRoot = $$OccGitRoot/src
aHxxRoot = $$OccGitRoot/inc
INCLUDEPATH += $$aHxxRoot
# CSF variables
HAVE_FREETYPE { CSF_FREETYPE = -lfreetype }
CSF_TclLibs = -ltcl8.6
CSF_TclTkLibs = -ltk8.6
HAVE_FREEIMAGE { CSF_FreeImagePlus = -lfreeimage } else:win32 { CSF_FreeImagePlus = -lwindowscodecs -lole32 }
HAVE_FFMPEG { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil }
HAVE_TBB { CSF_TBB = -ltbb -ltbbmalloc }
HAVE_ZLIB { CSF_ZLIB = -lzlib }
HAVE_LIBLZMA { CSF_LIBLZMA = -lliblzma }
HAVE_DRACO { CSF_Draco = -ldraco }
win32 {
CSF_kernel32 = -lkernel32
CSF_advapi32 = -ladvapi32
CSF_gdi32 = -lgdi32
CSF_user32 = -luser32 -lcomdlg32
CSF_shell32 = -lShell32
CSF_opengl32 = -lopengl32
CSF_wsock32 = -lwsock32
CSF_netapi32 = -lnetapi32
CSF_OpenGlLibs = -lopengl32
CSF_OpenGlesLibs = -llibEGL -llibGLESv2
CSF_psapi = -lPsapi
CSF_winmm = -lwinmm
CSF_d3d9 = -ld3d9
CSF_TclLibs = -ltcl86
CSF_TclTkLibs = -ltk86
CSF_TBB =
} else:mac {
CSF_dl = -ldl
CSF_objc = -lobjc
CSF_OpenGlLibs = -framework OpenGL
CSF_OpenGlesLibs = -framework OpenGLES
iphoneos {
CSF_Appkit = -framework UIKit
} else {
CSF_Appkit = -framework AppKit
}
CSF_IOKit = -framework IOKit
CSF_TclLibs = -framework Tcl
CSF_TclTkLibs = -framework Tk
} else {
CSF_dl = -ldl
CSF_ThreadLibs = -lpthread -lrt
CSF_OpenGlesLibs = -lEGL -lGLESv2
CSF_TclTkLibs = -ltk8.6
HAVE_XLIB {
CSF_OpenGlLibs = -lGL
CSF_XwLibs = -lX11
} else {
CSF_OpenGlLibs = -lGL -lEGL
}
HAVE_FREETYPE { CSF_fontconfig = -lfontconfig }
}
for (aCfgIter, CONFIG) {
aRes = $$find(aCfgIter, "^HAVE_")
!equals(aCfgIter, "HAVE_GLES2") {
count(aRes, 1) {
DEFINES += $$aCfgIter
}
}
}
# Define the list of standard OCCT file extensions
aHxxRegex = ^.*\.(hxx|h|lxx|gxx)$
aPxxRegex = ^.*\.(pxx)$
aCxxRegex = ^.*\.(cxx|cpp|c)$
mac { aCxxRegex = ^.*\.(cxx|cpp|c|m|mm)$ }
# Auxiliary function for probing file extension
defineTest (occCheckExtension) {
aProbe = $$find(1, "$$2")
count(aProbe, 1) { return(true) } else { return(false) }
}
# Auxiliary function for probing compilable files
defineTest (occIsCxxFile) { occCheckExtension ($$1, $$aCxxRegex) { return(true) } else { return(false) } }
# Auxiliary function for probing header files
defineTest (occIsHxxFile) { occCheckExtension ($$1, $$aHxxRegex) { return(true) } else { return(false) } }
aTkFiles = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/FILES, lines)
aTkFiles += CMakeLists.txt
aPackages = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/PACKAGES, lines)
anExternLibs = $$cat($$aSrcRoot/$$OCC_TOOLKIT_NAME/EXTERNLIB, lines)
for (aTkFileIter, aTkFiles) { OTHER_FILES += $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aTkFileIter }
for (anExternLib, anExternLibs) {
hasCsf = $$find(anExternLib, CSF_)
count(hasCsf, 1) {
aList = $$split($$anExternLib, "\n")
LIBS += $$aList
equals(anExternLib, "CSF_OpenGlLibs") {
DEFINES += "HAVE_OPENGL"
}
equals(anExternLib, "CSF_OpenGlesLibs") {
DEFINES += "HAVE_GLES2"
}
} else {
LIBS += -l$$anExternLib
}
}
# Iterate over Packages and add compilable files into this project
isEmpty (aPackages) { aPackages = $$OCC_TOOLKIT_NAME }
for (aPackage, aPackages) {
aPackageFolder = $$aSrcRoot/$$OCC_TOOLKIT_NAME/$$aPackage
aPackageFiles = $$cat($$aSrcRoot/$$aPackage/FILES, lines)
for (aFileIter, aPackageFiles) {
occIsCxxFile($$aFileIter) {
SOURCES += $$aSrcRoot/$$aPackage/$$aFileIter
}
}
}
!win32 {
aVerList = $$split(VERSION, ".")
aVerMaj = $$member(aVerList, 0)
aVerMin = $$member(aVerList, 1)
aVerMic = $$member(aVerList, 2)
equals(TEMPLATE, app) {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}
} else {
mac {
# override qmake soname versionong logic
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.dylib.$${aVerMaj}.$${aVerMin}
# extend clean with versioned .dylib files
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib
} else {
# override qmake soname versionong logic
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
# extend clean with versioned .so files
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}
QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin}.$${aVerMic}
}
}
}

View File

@@ -1,2 +1,2 @@
OCC_TOOLKIT_NAME = \$\$TARGET
include(../../OccToolkit.pri)
OCC_TOOLKIT_NAME = \$\$TARGET
include(../../OccToolkit.pri)

View File

@@ -1,41 +1,45 @@
# This is an experimental Solution project for building entire OCCT framework using qmake.
# It can be also used for just source code navigation in Qt Creator without actually building OCCT.
# Note, as this is an experimental project, compiler flags might differ from official builds - use it on your own risk!
# Building OCCT using CMake is a preferred solution.
#
# This project GENERATES sub-projects (OCCT modules) dynamically, so to start using it:
# - Launch genconf, select Project Format "Qt Project" and configure dependencies; this will also generate "custom.auto.pri".
# - Launch genproj to fill in "inc" folder with links to header files.
# - Open project in Qt Creator, and call "Run qmake".
# - Close the project in Qt Creator, open it again so that you should see the sub-modules in Project tree; call "Run qmake" again.
# - "Run qmake" and perform Build.
TEMPLATE = subdirs
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
OTHER_FILES += OccModule.pro.in \
OcctHeaderLink.hxx.in \
OccToolkit.pro.in \
OccCppConfig.pri \
OccModule.pri \
OccToolkit.pri \
custom.pri.template
# Iterate over Modules and generate sub-projects
aSolModuleList = $$cat(../MODULES, lines)
for (aSolModuleIter, aSolModuleList) {
aSolModule = $$first($$list($$aSolModuleIter))
eval(occtkgen_$${aSolModule}.input = $$_PRO_FILE_PWD_/OccModule.pro.in)
eval(occtkgen_$${aSolModule}.output = $$_PRO_FILE_PWD_/$${aSolModule}/$${aSolModule}.pro)
eval(occtkgen_$${aSolModule}.config = verbatim)
eval(QMAKE_SUBSTITUTES += occtkgen_$${aSolModule})
SUBDIRS += $${aSolModule}
}
# These dependencies are manually defined
ModelingData.depends = FoundationClasses
ModelingAlgorithms.depends = FoundationClasses ModelingData
Visualization.depends = FoundationClasses ModelingData ModelingAlgorithms
ApplicationFramework.depends = FoundationClasses ModelingData ModelingAlgorithms Visualization
DataExchange.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework
Draw.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework DataExchange Visualization
# This is an experimental Solution project for building entire OCCT framework using qmake.
# It can be also used for just source code navigation in Qt Creator without actually building OCCT.
# Note, as this is an experimental project, compiler flags might differ from official builds - use it on your own risk!
# Building OCCT using CMake is a preferred solution.
#
# This project GENERATES sub-projects (OCCT modules) dynamically, so to start using it:
# - Launch genconf, select Project Format "Qt Project" and configure dependencies; this will also generate "custom.auto.pri".
# - Launch genproj to fill in "inc" folder with links to header files.
# - Open project in Qt Creator, and call "Run qmake".
# - Close the project in Qt Creator, open it again so that you should see the sub-modules in Project tree; call "Run qmake" again.
# - "Run qmake" and perform Build.
#
# Within Debian-based Linux repository Qt Creator can be installed like this:
# > sudo apt-get install qtcreator qtbase5-dev
TEMPLATE = subdirs
exists(custom.auto.pri) { include(custom.auto.pri) }
exists(custom.pri) { include(custom.pri) }
OTHER_FILES += OccModule.pro.in \
OcctHeaderLink.hxx.in \
OccToolkit.pro.in \
OccCppConfig.pri \
OccModule.pri \
OccToolkit.pri \
custom.pri.template
# Iterate over Modules and generate sub-projects
aSolModuleList = $$cat(../MODULES, lines)
for (aSolModuleIter, aSolModuleList) {
aSolModule = $$first($$list($$aSolModuleIter))
eval(occtkgen_$${aSolModule}.input = $$_PRO_FILE_PWD_/OccModule.pro.in)
eval(occtkgen_$${aSolModule}.output = $$_PRO_FILE_PWD_/$${aSolModule}/$${aSolModule}.pro)
eval(occtkgen_$${aSolModule}.config = verbatim)
eval(QMAKE_SUBSTITUTES += occtkgen_$${aSolModule})
SUBDIRS += $${aSolModule}
}
# These dependencies are manually defined
ModelingData.depends = FoundationClasses
ModelingAlgorithms.depends = FoundationClasses ModelingData
Visualization.depends = FoundationClasses ModelingData ModelingAlgorithms
ApplicationFramework.depends = FoundationClasses ModelingData ModelingAlgorithms Visualization
DataExchange.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework
Draw.depends = FoundationClasses ModelingData ModelingAlgorithms ApplicationFramework DataExchange Visualization

View File

@@ -1 +1 @@
#include \"../src/$${OCCT_PACKAGE}/$${OCCT_HEADER}\"
#include \"../src/$${OCCT_PACKAGE}/$${OCCT_HEADER}\"

View File

@@ -1,17 +1,17 @@
PRODUCTS_PATH = c:/3rdparty/vc14
#CONFIG += HAVE_FREEIMAGE
#CONFIG += HAVE_FFMPEG
#CONFIG += HAVE_TBB
#CONFIG += HAVE_GLES2
#CONFIG += HAVE_D3D
#CONFIG += HAVE_VTK
aFreeType = $$PRODUCTS_PATH/freetype-2.5.5-vc14-64
aTclTk = $$PRODUCTS_PATH/tcltk-86-64
INCLUDEPATH += $$aFreeType/include
LIBS += -L$$aFreeType/lib
INCLUDEPATH += $$aTclTk/include
LIBS += -L$$aTclTk/lib
PRODUCTS_PATH = c:/3rdparty/vc14
#CONFIG += HAVE_FREEIMAGE
#CONFIG += HAVE_FFMPEG
#CONFIG += HAVE_TBB
#CONFIG += HAVE_GLES2
#CONFIG += HAVE_D3D
#CONFIG += HAVE_VTK
aFreeType = $$PRODUCTS_PATH/freetype-2.5.5-vc14-64
aTclTk = $$PRODUCTS_PATH/tcltk-86-64
INCLUDEPATH += $$aFreeType/include
LIBS += -L$$aFreeType/lib
INCLUDEPATH += $$aTclTk/include
LIBS += -L$$aTclTk/lib

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorCodeStyle>
<!-- Written by QtCreator 3.6.1, 2016-05-19T14:46:43. -->
<qtcreator>
<data>
<variable>CodeStyleData</variable>
<valuemap type="QVariantMap">
<value type="bool" key="AlignAssignments">true</value>
<value type="bool" key="AutoSpacesForTabs">false</value>
<value type="bool" key="BindStarToIdentifier">false</value>
<value type="bool" key="BindStarToLeftSpecifier">true</value>
<value type="bool" key="BindStarToRightSpecifier">false</value>
<value type="bool" key="BindStarToTypeName">true</value>
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
<value type="bool" key="IndentAccessSpecifiers">false</value>
<value type="bool" key="IndentBlockBody">true</value>
<value type="bool" key="IndentBlockBraces">false</value>
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentClassBraces">false</value>
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
<value type="bool" key="IndentEnumBraces">false</value>
<value type="bool" key="IndentFunctionBody">true</value>
<value type="bool" key="IndentFunctionBraces">false</value>
<value type="bool" key="IndentNamespaceBody">true</value>
<value type="bool" key="IndentNamespaceBraces">false</value>
<value type="int" key="IndentSize">2</value>
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentSwitchLabels">true</value>
<value type="int" key="PaddingMode">2</value>
<value type="bool" key="SpacesForTabs">true</value>
<value type="int" key="TabSize">2</value>
</valuemap>
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">occt</value>
</data>
</qtcreator>

2
adm/scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*custom.bat
*custom.sh

View File

@@ -0,0 +1,267 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for Android platform.
rem android_custom.bat should be configured with paths
rem to CMake, 3rd-parties, Android NDK and MinGW make tool.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "anNdkPath="
set "aFreeType="
set "aRapidJson="
set "aDraco="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=1"
set "isStatic=0"
rem Minimal Android platform and CPU architectures
set "anNdkApiLevel=21"
set "anNdkAbiList=armeabi-v7a x86 arm64-v8a x86_64"
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
rem Optional 3rd-party libraries to enable
set "USE_FREETYPE=ON"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0android_custom.bat" call "%~dp0android_custom.bat"
set "aCompiler=gcc"
set "aCppLib=gnustl_shared"
if not exist "%anNdkPath%/sources/cxx-stl/gnu-libstdc++" (
if exist "%anNdkPath%/sources/cxx-stl/llvm-libc++" (
set "aCompiler=clang"
set "aCppLib=c++_shared"
)
)
set "aLibType=Shared"
if ["%isStatic%"] == ["1"] set "aLibType=Static"
set "aDestDir=%aBuildRoot%\android-%aCompiler%"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aDestDir%"
)
)
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
for %%s in (%anNdkAbiList%) do (
call :cmakeGenerate "%anNdkApiLevel%" "%%s"
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-android"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "anApi=%~1"
set "anAbi=%~2"
if ["%anApi%"] == [""] (
set "anApi=21"
if ["%anAbi%"] == ["armeabi-v7a"] ( set "anApi=16" )
if ["%anAbi%"] == ["x86"] ( set "anApi=16" )
)
set "aPlatformAndCompiler=android-%anAbi%-%aCompiler%"
set "aWorkDir=%aBuildRoot%\%aPlatformAndCompiler%-make"
set "aLogFile=%aBuildRoot%\build-%aPlatformAndCompiler%.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%, API level %anApi%>> %aLogFile%
pushd "%aWorkDir%"
set "aFreeTypeLibName=libfreetype.so"
if exist "%aFreeType%/libs/%anAbi%/libfreetype.a" ( set "aFreeTypeLibName=libfreetype.a" )
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for Android %anAbi%, API level %anApi%...
cmake -G "MinGW Makefiles" ^
-D CMAKE_SYSTEM_NAME:STRING="Android" ^
-D CMAKE_ANDROID_NDK="%anNdkPath%" ^
-D CMAKE_BUILD_TYPE:STRING="Release" ^
-D CMAKE_ANDROID_ARCH_ABI:STRING="%anAbi%" ^
-D CMAKE_SYSTEM_VERSION:STRING="%anApi%" ^
-D CMAKE_ANDROID_STL_TYPE="%aCppLib%" ^
-D BUILD_LIBRARY_TYPE:STRING="%aLibType%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_LIB:STRING="libs/%anAbi%" ^
-D INSTALL_DIR_CMAKE:STRING="libs/%anAbi%/cmake/opencascade" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_Draw:BOOL="OFF" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="%aFreeType%/libs/%anAbi%" ^
-D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="%aFreeType%/libs/%anAbi%/%aFreeTypeLibName%" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR_draco:PATH="%aDraco%/libs/%anAbi%" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

View File

@@ -0,0 +1,33 @@
rem Environment configuration template for android_build.bat (to be renamed as android_custom.bat)
rem Paths to 3rd-party tools and libraries
rem call c:\TDM-GCC-64\mingwvars.bat
rem set "PATH=c:\CMake\bin;%PATH%"
rem set "anNdkPath=c:/android-ndk-r12"
rem set "aFreeType=c:/freetype-2.7.1-android"
rem set "aRapidJson=c:/rapidjson-1.1.0"
rem set "aDraco=c:/draco-1.4.1-android"
rem Uncomment to customize building steps
rem set "aBuildRoot=%~dp0..\..\work"
rem set "toCMake=1"
rem set "toClean=0"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "isStatic=0"
rem Minimal Android platform and CPU architectures
rem set "anNdkApiLevel=21"
rem set "anNdkAbiList=arm64-v8a x86_64"
rem OCCT Modules to build
rem set "BUILD_ModelingData=ON"
rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem Optional 3rd-party libraries to enable
rem set "USE_RAPIDJSON=ON"
rem set "USE_DRACO=ON"

View File

@@ -0,0 +1,48 @@
rem Environment configuration template for cmake_gen.bat (to be renamed as cmake_gen_custom.bat)
set "OCCT3RDPARTY=%SrcRoot%\..\3rdparty"
set VS=14
set VSDATA=2015
rem Leave VSPLATFORM empty to build for x86 platform
set VSPLATFORM=Win64
rem ------------------------------------
rem Uncomment to customize building steps
rem ------------------------------------
rem set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
rem set "INSTALL_DIR=%SrcRoot%\install"
rem set BUILD_DOC_Overview=OFF
rem set BUILD_Inspector=OFF
rem set BUILD_LIBRARY_TYPE=Shared
rem set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
rem set BUILD_WITH_DEBUG=OFF
rem set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
rem set BUILD_USE_PCH=OFF
rem set BUILD_FORCE_RelWithDebInfo=OFF
rem Use semicolon-separated list of toolkits if you want to disable all modules
rem and build only some toolkits.
rem set BUILD_ADDITIONAL_TOOLKITS=
rem Set a directory recognized as a patch for OCCT.
rem set BUILD_PATCH=
rem set BUILD_MODULE_ApplicationFramework=ON
rem set BUILD_MODULE_DataExchange=ON
rem set BUILD_MODULE_Draw=ON
rem set BUILD_MODULE_ModelingAlgorithms=ON
rem set BUILD_MODULE_ModelingData=ON
rem set BUILD_MODULE_Visualization=ON
rem set USE_D3D=OFF
rem set USE_FFMPEG=OFF
rem set USE_FREEIMAGE=OFF
rem set USE_GLES2=OFF
rem set USE_RAPIDJSON=OFF
rem set USE_DRACO=OFF
rem set USE_TBB=OFF
rem set USE_VTK=OFF

View File

@@ -0,0 +1,43 @@
# Environment configuration template for cmake_gen.sh (to be renamed as cmake_gen_custom.sh)
OCCT3RDPARTY="$SrcRoot/../3rdparty"
FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
# ------------------------------------
# Uncomment to customize building steps
# ------------------------------------
#BUILD_DIR=build
#INSTALL_DIR="$SrcRoot/install"
#BUILD_DOC_Overview=OFF
#BUILD_Inspector=OFF
#BUILD_LIBRARY_TYPE=Shared
#BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
#BUILD_WITH_DEBUG=OFF
#BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
# Use semicolon-separated list of toolkits if you want to disable all modules
# and build only some toolkits.
#BUILD_ADDITIONAL_TOOLKITS=
# Set a directory recognized as a patch for OCCT.
#BUILD_PATCH=
#BUILD_MODULE_ApplicationFramework=ON
#BUILD_MODULE_DataExchange=ON
#BUILD_MODULE_Draw=ON
#BUILD_MODULE_ModelingAlgorithms=ON
#BUILD_MODULE_ModelingData=ON
#BUILD_MODULE_Visualization=ON
#USE_FFMPEG=OFF
#USE_FREEIMAGE=OFF
#USE_GLES2=OFF
#USE_RAPIDJSON=OFF
#USE_DRACO=OFF
#USE_TBB=OFF
#USE_VTK=OFF
# This is to add any additional arguments to cmake
#AUX_ARGS=

88
adm/scripts/cmake_gen.bat Normal file
View File

@@ -0,0 +1,88 @@
@echo off
rem Auxiliary script for semi-automated building of OCCT using cmake.
rem cmake_custom.bat should be configured with VS version and path to 3rd-parties.
rem OCCT3RDPARTY must be specified as mandatory dependency.
setlocal
set "SrcRoot=%~dp0..\.."
set VS=14
set VSDATA=2015
set VSPLATFORM=Win64
set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
set "OCCT3RDPARTY="
set "INSTALL_DIR=%SrcRoot%\install"
set BUILD_ADDITIONAL_TOOLKITS=
set BUILD_DOC_Overview=OFF
set BUILD_Inspector=OFF
set BUILD_LIBRARY_TYPE=Shared
set BUILD_PATCH=
set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
set BUILD_WITH_DEBUG=OFF
set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
set BUILD_USE_PCH=OFF
set BUILD_FORCE_RelWithDebInfo=OFF
set BUILD_MODULE_ApplicationFramework=ON
set BUILD_MODULE_DataExchange=ON
set BUILD_MODULE_Draw=ON
set BUILD_MODULE_ModelingAlgorithms=ON
set BUILD_MODULE_ModelingData=ON
set BUILD_MODULE_Visualization=ON
set USE_D3D=OFF
set USE_FFMPEG=OFF
set USE_FREEIMAGE=OFF
set USE_GLES2=OFF
set USE_RAPIDJSON=OFF
set USE_DRACO=OFF
set USE_TBB=OFF
set USE_VTK=OFF
if exist "%~dp0cmake_custom.bat" call "%~dp0cmake_custom.bat"
if not "%VSPLATFORM%"=="" set "arch_compile=Visual Studio %VS% %VSDATA% %VSPLATFORM%"
if "%VSPLATFORM%"=="" set "arch_compile=Visual Studio %VS% %VSDATA%"
set "INSTALL_DIR=%INSTALL_DIR:\=/%"
set "OCCT3RDPARTY=%OCCT3RDPARTY:\=/%"
set "BUILD_DIR=%SrcRoot%\%BUILD_DIR%"
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
pushd "%BUILD_DIR%"
cmake -G "%arch_compile%" ^
-D 3RDPARTY_DIR:STRING="%OCCT3RDPARTY%" ^
-D BUILD_ADDITIONAL_TOOLKITS:STRING="%BUILD_ADDITIONAL_TOOLKITS%" ^
-D BUILD_DOC_Overview:BOOL=%BUILD_DOC_Overview% ^
-D BUILD_Inspector:BOOL=%BUILD_Inspector% ^
-D BUILD_LIBRARY_TYPE:STRING=%BUILD_LIBRARY_TYPE% ^
-D BUILD_MODULE_ApplicationFramework:BOOL=%BUILD_MODULE_ApplicationFramework% ^
-D BUILD_MODULE_DataExchange:BOOL=%BUILD_MODULE_DataExchange% ^
-D BUILD_MODULE_Draw:BOOL=%BUILD_MODULE_Draw% ^
-D BUILD_MODULE_FoundationClasses:BOOL=ON ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL=%BUILD_MODULE_ModelingAlgorithms% ^
-D BUILD_MODULE_ModelingData:BOOL=%BUILD_MODULE_ModelingData% ^
-D BUILD_MODULE_Visualization:BOOL=%BUILD_MODULE_Visualization% ^
-D BUILD_PATCH:PATH="%BUILD_PATCH%" ^
-D BUILD_RELEASE_DISABLE_EXCEPTIONS:BOOL=%BUILD_RELEASE_DISABLE_EXCEPTIONS% ^
-D BUILD_WITH_DEBUG:BOOL=%BUILD_WITH_DEBUG% ^
-D BUILD_ENABLE_FPE_SIGNAL_HANDLER:BOOL=%BUILD_ENABLE_FPE_SIGNAL_HANDLER% ^
-D BUILD_USE_PCH:BOOL=%BUILD_USE_PCH% ^
-D BUILD_FORCE_RelWithDebInfo:BOOL=%BUILD_FORCE_RelWithDebInfo% ^
-D INSTALL_DIR:PATH="%INSTALL_DIR%" ^
-D USE_D3D:BOOL=%USE_D3D% ^
-D USE_FFMPEG:BOOL=%USE_FFMPEG% ^
-D USE_FREEIMAGE:BOOL=%USE_FREEIMAGE% ^
-D USE_GLES2:BOOL=%USE_GLES2% ^
-D USE_RAPIDJSON:BOOL=%USE_RAPIDJSON% ^
-D USE_DRACO:BOOL=%USE_DRACO% ^
-D USE_TBB:BOOL=%USE_TBB% ^
-D USE_VTK:BOOL=%USE_VTK% ^
"%SrcRoot%"
popd
endlocal

88
adm/scripts/cmake_gen.sh Executable file
View File

@@ -0,0 +1,88 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT using cmake.
# cmake_custom.sh should be configured with path to 3rd-parties.
# OCCT3RDPARTY and FREETYPE_DIR must be specified as mandatory dependencies.
ScriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SrcRoot="${ScriptDir}/../.."
INSTALL_DIR="$SrcRoot/install"
BUILD_DIR=build
DEB=
CMAKE_BUILD_TYPE=Release
if [ "$1" = "-d" ]; then
DEB=d
BUILD_DIR=${BUILD_DIR}-deb
CMAKE_BUILD_TYPE=Debug
fi
INSTALL_DIR_BIN=lin64/gcc/bin$DEB
INSTALL_DIR_LIB=lin64/gcc/lib$DEB
BUILD_ADDITIONAL_TOOLKITS=
BUILD_DOC_Overview=OFF
BUILD_Inspector=OFF
BUILD_LIBRARY_TYPE=Shared
BUILD_PATCH=
BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
BUILD_WITH_DEBUG=OFF
BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
BUILD_MODULE_ApplicationFramework=ON
BUILD_MODULE_DataExchange=ON
BUILD_MODULE_Draw=ON
BUILD_MODULE_ModelingAlgorithms=ON
BUILD_MODULE_ModelingData=ON
BUILD_MODULE_Visualization=ON
USE_FFMPEG=OFF
USE_FREEIMAGE=OFF
USE_GLES2=OFF
USE_RAPIDJSON=OFF
USE_DRACO=OFF
USE_TBB=OFF
USE_VTK=OFF
AUX_ARGS=
if [ -f "${ScriptDir}/cmake_custom.sh" ]; then
. "${ScriptDir}/cmake_custom.sh"
fi
BUILD_DIR="$SrcRoot/$BUILD_DIR"
if [ ! -d "$BUILD_DIR" ]; then mkdir -p "$BUILD_DIR"; fi
pushd "$BUILD_DIR"
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-D 3RDPARTY_DIR:PATH="$OCCT3RDPARTY" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$FREETYPE_DIR" \
-D BUILD_ADDITIONAL_TOOLKITS:STRING="$BUILD_ADDITIONAL_TOOLKITS" \
-D BUILD_DOC_Overview:BOOL=$BUILD_DOC_Overview \
-D BUILD_Inspector:BOOL=$BUILD_Inspector \
-D BUILD_LIBRARY_TYPE:STRING=$BUILD_LIBRARY_TYPE \
-D BUILD_MODULE_ApplicationFramework:BOOL=$BUILD_MODULE_ApplicationFramework \
-D BUILD_MODULE_DataExchange:BOOL=$BUILD_MODULE_DataExchange \
-D BUILD_MODULE_Draw:BOOL=$BUILD_MODULE_Draw \
-D BUILD_MODULE_FoundationClasses:BOOL=ON \
-D BUILD_MODULE_ModelingAlgorithms:BOOL=$BUILD_MODULE_ModelingAlgorithms \
-D BUILD_MODULE_ModelingData:BOOL=$BUILD_MODULE_ModelingData \
-D BUILD_MODULE_Visualization:BOOL=$BUILD_MODULE_Visualization \
-D BUILD_PATCH:PATH="$BUILD_PATCH" \
-D BUILD_RELEASE_DISABLE_EXCEPTIONS:BOOL=$BUILD_RELEASE_DISABLE_EXCEPTIONS \
-D BUILD_WITH_DEBUG:BOOL=$BUILD_WITH_DEBUG \
-D BUILD_ENABLE_FPE_SIGNAL_HANDLER:BOOL=$BUILD_ENABLE_FPE_SIGNAL_HANDLER \
-D INSTALL_DIR:PATH="$INSTALL_DIR" \
-D INSTALL_DIR_LAYOUT:STRING=Windows \
-D INSTALL_DIR_BIN:STRING=$INSTALL_DIR_BIN \
-D INSTALL_DIR_LIB:STRING=$INSTALL_DIR_LIB \
-D USE_FFMPEG:BOOL=$USE_FFMPEG \
-D USE_FREEIMAGE:BOOL=$USE_FREEIMAGE \
-D USE_GLES2:BOOL=$USE_GLES2 \
-D USE_RAPIDJSON:BOOL=$USE_RAPIDJSON \
-D USE_DRACO:BOOL=$USE_DRACO \
-D USE_TBB:BOOL=$USE_TBB \
-D USE_VTK:BOOL=$USE_VTK \
$AUX_ARGS "$SrcRoot"
popd

267
adm/scripts/ios_build.sh Executable file
View File

@@ -0,0 +1,267 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for iOS platform.
# macos_custom.sh should be configured with paths to CMake and other 3rd-parties.
# FreeType should be specified as mandatory dependency.
aScriptDir=${BASH_SOURCE%/*}
if [ -d "$aScriptDir" ]; then cd "$aScriptDir"; fi
aScriptDir="$PWD"
aCasSrc=${aScriptDir}/../..
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
export aBuildRoot=work
# paths to pre-built 3rd-parties
export aFreeType=
export aFreeImage=
export aRapidJson=
export aDraco=
# build stages to perform
export isStatic=1
export toCMake=1
export toClean=1
export toMake=1
export toInstall=1
export toPack=0
export toPackFat=0
export toDebug=0
export BUILD_ModelingData=ON
export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
export USE_FREETYPE=ON
export USE_FREEIMAGE=OFF
export USE_RAPIDJSON=OFF
export USE_DRACO=OFF
export IPHONEOS_DEPLOYMENT_TARGET=8.0
#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64"
export anAbiList="iPhoneOS|arm64"
if [[ -f "${aScriptDir}/ios_custom.sh" ]]; then
source "${aScriptDir}/ios_custom.sh"
fi
anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
aGitBranch=`git symbolic-ref --short HEAD`
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
DAY=$(date +"%d")
aRevision=-${YEAR}-${MONTH}-${DAY}
#aRevision=-${aGitBranch}
set -o pipefail
aBuildType="Release"
aBuildTypePrefix=
if [[ $toDebug == 1 ]]; then
aBuildType="Debug"
aBuildTypePrefix="-debug"
fi
aLibType="Shared"
if [[ $isStatic == 1 ]]; then
aLibType="Static"
fi
function buildArch {
anAbi=$1
aPlatformSdk=$2
aPlatformAndCompiler=${aPlatformSdk}-${anAbi}${aBuildTypePrefix}-clang
aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make"
aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}"
aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then
rm -r -f "$aWorkDir"
rm -r -f "$aDestDir"
fi
mkdir -p "$aWorkDir"
mkdir -p "$aDestDir"
rm -f "$aLogFile"
# include some information about OCCT into archive
echo \<pre\>> "${aWorkDir}/VERSION.html"
git status >> "${aWorkDir}/VERSION.html"
git log -n 100 >> "${aWorkDir}/VERSION.html"
echo \</pre\>>> "${aWorkDir}/VERSION.html"
pushd "$aWorkDir"
aTimeZERO=$SECONDS
function logDuration {
if [[ $1 == 1 ]]; then
aDur=$(($4 - $3))
echo $2 time: $aDur sec>> "$aLogFile"
fi
}
aSysRoot="/Applications/Xcode.app/Contents/Developer/Platforms/${aPlatformSdk}.platform/Developer/SDKs/${aPlatformSdk}.sdk"
# (re)generate Make files
if [[ $toCMake == 1 ]]; then
echo Configuring OCCT for iOS...
cmake -G "Unix Makefiles" \
-D CMAKE_SYSTEM_NAME="iOS" \
-D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \
-D CMAKE_OSX_DEPLOYMENT_TARGET:STRING="$IPHONEOS_DEPLOYMENT_TARGET" \
-D CMAKE_OSX_SYSROOT:PATH="$aSysRoot" \
-D CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \
-D CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \
-D CMAKE_BUILD_TYPE:STRING="$aBuildType" \
-D BUILD_LIBRARY_TYPE:STRING="$aLibType" \
-D INSTALL_DIR:PATH="$aDestDir" \
-D INSTALL_DIR_INCLUDE:STRING="inc" \
-D INSTALL_DIR_LIB:STRING="lib" \
-D INSTALL_DIR_RESOURCE:STRING="src" \
-D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \
-D USE_FREETYPE:BOOL="$USE_FREETYPE" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \
-D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \
-D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \
-D USE_DRACO:BOOL="$USE_DRACO" \
-D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \
-D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \
-D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="$aFreeImage/lib" \
-D 3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH="$aFreeImage/lib/libfreeimage.a" \
-D BUILD_MODULE_FoundationClasses:BOOL="ON" \
-D BUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-D BUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-D BUILD_MODULE_Draw:BOOL="OFF" \
-D BUILD_DOC_Overview:BOOL="OFF" \
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeGEN=$SECONDS
logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN
# clean up from previous build
if [[ $toClean == 1 ]]; then
make clean
fi
# build the project
if [[ $toMake == 1 ]]; then
echo Building...
make -j $aNbJobs 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeBUILD=$SECONDS
logDuration $toMake "Building" $aTimeGEN $aTimeBUILD
logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD
# install the project
if [[ $toInstall == 1 ]]; then
echo Installing OCCT into $aDestDir...
make install 2>&1 | tee -a "$aLogFile"
cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html"
echo Platform: ${aPlatformSdk} ABI: ${anAbi} Build: ${aBuildType} IPHONEOS_DEPLOYMENT_TARGET: ${IPHONEOS_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt"
fi
aTimeINSTALL=$SECONDS
logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL
# create an archive
if [[ $toPack == 1 ]]; then
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aDestDir}/../${anArchName} &>/dev/null
pushd "$aDestDir"
tar -jcf ${aDestDir}/../${anArchName} *
popd
fi
aTimePACK=$SECONDS
logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK
# finished
DURATION=$(($aTimePACK - $aTimeZERO))
echo Total time: $DURATION sec
logDuration 1 "Total" $aTimeZERO $aTimePACK
popd
}
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
echo Platform: ${aPlatform} ABI: ${anArch} Build: ${aBuildType}
buildArch $anArch $aPlatform
done
# create a FAT archive
if [[ $toPackFat == 1 ]]; then
for aPlatIter in iPhoneOS iPhoneSimulator
do
aSuffixFat=${aPlatIter}${aBuildTypePrefix}-clang
aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}"
# merge per-arch builds into fat builds
hasPlatform=0
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
if [[ $aPlatIter != ${aPlatform} ]]; then
continue
fi
aSuffixThin=${aPlatform}-${anArch}${aBuildTypePrefix}-clang
anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}"
if [[ $hasPlatform == 0 ]]; then
hasPlatform=1
echo Packing FAT archive for platform: ${aPlatform}
rm -r -f "$aFatDir"
mkdir -p "$aFatDir"
rsync -r --exclude '*.a' "$anArchDir/" "$aFatDir"
rm -f "$aFatDir/build_target.txt"
for aLibIter in $anArchDir/lib/*.a; do
aLibName=`basename $aLibIter`
lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
done
else
for aLibIter in $aFatDir/lib/*.a; do
aLibName=`basename $aLibIter`
lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
#lipo -info "$aFatDir/lib/$aLibName"
done
fi
cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt"
done
# create an archive
for anArchIter in $anAbiList
do
IFS="|" read -r aPlatform anArch <<< "$anArchIter"
if [[ $aPlatIter != ${aPlatform} ]]; then
continue
fi
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aFatDir}/../${anArchName} &>/dev/null
pushd "$aFatDir"
tar -jcf ${aFatDir}/../${anArchName} *
popd
break
done
done
fi

View File

@@ -0,0 +1,30 @@
# environment configuration template for ios_build.sh (to be renamed as ios_custom_env.sh)
export PATH=/Applications/CMake.app/Contents/bin:$PATH
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-ios"
export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-ios"
export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0"
export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios"
# Uncomment to customize building steps
#export isStatic=0
#export toCMake=1
#export toClean=1
#export toMake=1
#export toInstall=1
#export toPack=0
#export toPackFat=1
#export toDebug=0
#export BUILD_ModelingData=ON
#export BUILD_ModelingAlgorithms=ON
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export USE_RAPIDJSON=ON
#export USE_DRACO=ON
#export USE_FREEIMAGE=ON
#export IPHONEOS_DEPLOYMENT_TARGET=8.0
#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64"
#export anAbiList="iPhoneOS|arm64"

268
adm/scripts/macos_build.sh Executable file
View File

@@ -0,0 +1,268 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for macOS platform.
# macos_custom.sh should be configured with paths to CMake and other 3rd-parties.
# FreeType should be specified as mandatory dependency.
aScriptDir=${BASH_SOURCE%/*}
if [ -d "$aScriptDir" ]; then cd "$aScriptDir"; fi
aScriptDir="$PWD"
aCasSrc=${aScriptDir}/../..
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
export aBuildRoot=work
# paths to pre-built 3rd-parties
export aFreeType=
export aFreeImage=
export aRapidJson=
export aDraco=
# build stages to perform
export isStatic=0
export toCMake=1
export toClean=1
export toMake=1
export toInstall=1
export toPack=0
export toPackFat=0
export toDebug=0
export BUILD_ModelingData=ON
export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
export BUILD_Draw=ON
export USE_FREETYPE=ON
export USE_FREEIMAGE=ON
export USE_RAPIDJSON=OFF
export USE_DRACO=OFF
export MACOSX_DEPLOYMENT_TARGET=10.10
#export anAbiList="arm64 x86_64"
export anAbiList="x86_64"
aPlatform="macos"
if [[ -f "${aScriptDir}/macos_custom.sh" ]]; then
source "${aScriptDir}/macos_custom.sh"
fi
anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs`
aGitBranch=`git symbolic-ref --short HEAD`
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
DAY=$(date +"%d")
aRevision=-${YEAR}-${MONTH}-${DAY}
#aRevision=-${aGitBranch}
set -o pipefail
aBuildType="Release"
aBuildTypePrefix=
if [[ $toDebug == 1 ]]; then
aBuildType="Debug"
aBuildTypePrefix="-debug"
fi
aLibType="Shared"
aLibExt="dylib"
if [[ $isStatic == 1 ]]; then
aLibType="Static"
aLibExt="a"
fi
function buildArch {
anAbi=$1
aPlatformAndCompiler=${aPlatform}-${anAbi}${aBuildTypePrefix}-clang
aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make"
aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}"
aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then
rm -r -f "$aWorkDir"
rm -r -f "$aDestDir"
fi
mkdir -p "$aWorkDir"
mkdir -p "$aDestDir"
rm -f "$aLogFile"
# include some information about OCCT into archive
echo \<pre\>> "${aWorkDir}/VERSION.html"
git status >> "${aWorkDir}/VERSION.html"
git log -n 100 >> "${aWorkDir}/VERSION.html"
echo \</pre\>>> "${aWorkDir}/VERSION.html"
pushd "$aWorkDir"
aTimeZERO=$SECONDS
function logDuration {
if [[ $1 == 1 ]]; then
aDur=$(($4 - $3))
echo $2 time: $aDur sec>> "$aLogFile"
fi
}
# (re)generate Make files
if [[ $toCMake == 1 ]]; then
echo Configuring OCCT for macOS...
cmake -G "Unix Makefiles" \
-D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \
-D CMAKE_BUILD_TYPE:STRING="$aBuildType" \
-D BUILD_LIBRARY_TYPE:STRING="$aLibType" \
-D INSTALL_DIR:PATH="$aDestDir" \
-D INSTALL_DIR_INCLUDE:STRING="inc" \
-D INSTALL_DIR_LIB:STRING="lib" \
-D INSTALL_DIR_RESOURCE:STRING="src" \
-D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \
-D USE_FREETYPE:BOOL="$USE_FREETYPE" \
-D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \
-D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="$aFreeType/lib/libfreetype.dylib" \
-D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \
-D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \
-D USE_DRACO:BOOL="$USE_DRACO" \
-D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \
-D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \
-D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="$aFreeImage/lib" \
-D 3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH="$aFreeImage/lib/libfreeimage.a" \
-D BUILD_MODULE_FoundationClasses:BOOL="ON" \
-D BUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-D BUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \
-D BUILD_DOC_Overview:BOOL="OFF" \
"$aCasSrc" 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeGEN=$SECONDS
logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN
# clean up from previous build
if [[ $toClean == 1 ]]; then
make clean
fi
# build the project
if [[ $toMake == 1 ]]; then
echo Building OCCT...
make -j $aNbJobs 2>&1 | tee -a "$aLogFile"
aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeBUILD=$SECONDS
logDuration $toMake "Building" $aTimeGEN $aTimeBUILD
logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD
# install the project
if [[ $toInstall == 1 ]]; then
echo Installing OCCT into $aDestDir...
make install 2>&1 | tee -a "$aLogFile"
cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html"
echo Platform: macOS ABI: ${anAbi} Build: ${aBuildType} MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt"
fi
aTimeINSTALL=$SECONDS
logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL
# create an archive
if [[ $toPack == 1 ]]; then
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aDestDir}/../${anArchName} &>/dev/null
pushd "$aDestDir"
tar -jcf ${aDestDir}/../${anArchName} *
popd
fi
aTimePACK=$SECONDS
logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK
# finished
DURATION=$(($aTimePACK - $aTimeZERO))
echo Total time: $DURATION sec
logDuration 1 "Total" $aTimeZERO $aTimePACK
popd
}
for anArchIter in $anAbiList
do
echo Platform: macOS ABI: ${anArchIter} Build: ${aBuildType}
buildArch $anArchIter
done
# create a FAT archive
if [[ $toPackFat == 1 ]]; then
aSuffixFat=${aPlatform}${aBuildTypePrefix}-clang
aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}"
# merge per-arch builds into fat builds
hasPlatform=0
for anArchIter in $anAbiList
do
aSuffixThin=${aPlatform}-${anArchIter}${aBuildTypePrefix}-clang
anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}"
if [[ $hasPlatform == 0 ]]; then
hasPlatform=1
echo Packing FAT archive
rm -r -f "$aFatDir"
mkdir -p "$aFatDir"
if [[ $isStatic == 1 ]]; then
rsync -r -l --exclude '*.a' "$anArchDir/" "$aFatDir"
else
rsync -r -l --exclude '*.dylib' "$anArchDir/" "$aFatDir"
fi
rm -f "$aFatDir/build_target.txt"
if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then
aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE")
rm $aFatDir/bin/$aDrawExe
lipo "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create
fi
for aLibIter in $anArchDir/lib/*.$aLibExt; do
aLibName=`basename $aLibIter`
if [[ -L "$anArchDir/lib/$aLibName" ]]; then
cp -a "$anArchDir/lib/$aLibName" "$aFatDir/lib/"
else
lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
fi
done
else
if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then
aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE")
lipo "$aFatDir/bin/$aDrawExe" "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create
fi
for aLibIter in $aFatDir/lib/*.$aLibExt; do
aLibName=`basename $aLibIter`
if [[ ! -L "$anArchDir/lib/$aLibName" ]]; then
lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create
#lipo -info "$aFatDir/lib/$aLibName"
fi
done
fi
cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt"
done
# create an archive
anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2
echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}...
rm ${aFatDir}/../${anArchName} &>/dev/null
pushd "$aFatDir"
tar -jcf ${aFatDir}/../${anArchName} *
popd
fi

View File

@@ -0,0 +1,31 @@
# environment configuration template for macos_build.sh (to be renamed as macos_custom_env.sh)
export PATH=/Applications/CMake.app/Contents/bin:$PATH
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-macos"
export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-macos"
export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0"
export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos"
# Uncomment to customize building steps
#export aBuildRoot=work
#export toCMake=1
#export toClean=1
#export toMake=1
#export toInstall=1
#export toPack=1
#export toPackFat=1
#export BUILD_ModelingData=ON
#export BUILD_ModelingAlgorithms=ON
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON
#export BUILD_Draw=ON
#export USE_RAPIDJSON=ON
#export USE_DRACO=ON
#export USE_FREEIMAGE=ON
#export MACOSX_DEPLOYMENT_TARGET=10.10
#export anAbiList=arm64
#export anAbiList=x86_64
#export anAbiList="arm64 x86_64"

267
adm/scripts/mingw_build.bat Normal file
View File

@@ -0,0 +1,267 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for Mingw-w64 platform.
rem mingw_custom.bat should be configured with paths to CMake, 3rd-parties and MinGW.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aMingwVars="
set "aFreeType="
set "aFreeImage="
set "aRapidJson="
set "aDraco="
set "aTclTk="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=0"
set "toDebug=0"
set "isStatic=0"
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
set "BUILD_Draw=ON"
rem Optional 3rd-party libraries to enable
set "USE_FREETYPE=ON"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
set "USE_FREEIMAGE=ON"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0mingw_custom.bat" call "%~dp0mingw_custom.bat"
if not ["%aMingwVars%"] == [""] ( call "%aMingwVars%" )
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "aLibType=Shared"
if ["%isStatic%"] == ["1"] set "aLibType=Static"
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=-debug"
)
call :cmakeGenerate
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-mingw64%aBuildTypePrefix%"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
echo Copying dependencies...
for %%i in (libstdc++-6.dll libwinpthread-1.dll libgcc_s_seh-1.dll) do (
if "%%~$PATH:i" == "" (
echo "Error: could not find %%i"
) else (
xcopy /Y "%%~$PATH:i" "%aTarget%\win64\gcc\bin"
)
)
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=mingw64%aBuildTypePrefix%"
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make"
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
rmdir /S /Q %aDestDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%>> %aLogFile%
pushd "%aWorkDir%"
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for MinGW-w64...
cmake -G "MinGW Makefiles" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D BUILD_LIBRARY_TYPE:STRING="%aLibType%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
-D 3RDPARTY_TCL_DIR:PATH="%aTclTk%" ^
-D 3RDPARTY_TCL_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^
-D 3RDPARTY_TCL_LIBRARY_DIR:PATH="%aTclTk%/lib" ^
-D 3RDPARTY_TCL_DLL_DIR:PATH="%aTclTk%/bin" ^
-D 3RDPARTY_TK_DIR:PATH="%aTclTk%" ^
-D 3RDPARTY_TK_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^
-D 3RDPARTY_TK_LIBRARY_DIR:PATH="%aTclTk%/lib" ^
-D 3RDPARTY_TK_DLL_DIR:PATH="%aTclTk%/bin" ^
-D USE_D3D:BOOL="ON" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="%aFreeType%/lib" ^
-D USE_FREEIMAGE:BOOL="%USE_FREEIMAGE%" ^
-D 3RDPARTY_FREEIMAGE_DIR:PATH="%aFreeImage%" ^
-D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="%aFreeImage%/include" ^
-D 3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH="%aFreeImage%/lib" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

View File

@@ -0,0 +1,29 @@
rem Environment configuration template for mingw_build.bat (to be renamed as mingw_custom.bat)
set "aCmakeBin=%ProgramW6432%\CMake\bin"
set "aFreeType=%aCasSrc%/../3rdparty/freetype-2.6.3-mingw-64"
set "aTclTk=%aCasSrc%/../3rdparty/tcltk-8.6.4-mingw-64"
set "aFreeImage=%aCasSrc%/../3rdparty/freeimage-3.17-0-mingw-64"
set "aRapidJson=%aCasSrc%/../3rdparty/rapidjson-1.1.0"
set "aDraco=%aCasSrc%/../3rdparty/draco-1.4-1-mingw-64"
set "aMingwVars=c:\mingw-8.3.0-msys2\mingwvars.bat"
rem Uncomment to customize building steps
rem set "aBuildRoot=work"
rem set "toCMake=1"
rem set "toClean=1"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "toDebug=0"
rem set "BUILD_ModelingData=ON"
rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem set "BUILD_Draw=ON"
rem set "USE_RAPIDJSON=ON"
rem set "USE_DRACO=ON"
rem set "USE_FREEIMAGE=ON"

333
adm/scripts/wasm_build.bat Normal file
View File

@@ -0,0 +1,333 @@
@echo OFF
rem Auxiliary script for semi-automated building of OCCT for WASM platform.
rem wasm_custom.bat should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
rem FreeType should be specified as mandatory dependency.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aFreeType="
set "aRapidJson="
set "aDraco="
set "aTcl="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toPack=0"
set "toDebug=0"
set "toBuildSample=0"
set "sourceMapBase="
rem OCCT Modules to build
set "BUILD_ModelingData=ON"
set "BUILD_ModelingAlgorithms=ON"
set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=ON"
set "BUILD_DataExchange=ON"
set "BUILD_Draw=OFF"
rem Optional 3rd-party libraries to enable
set "USE_FREETYPE=ON"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
set "USE_PTHREADS=OFF"
rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
call "%EMSDK_ROOT%\emsdk_env.bat"
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "anOcctVerSuffix="
set "anOcctVersion=0.0.0"
set "aGitBranch="
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_DEVELOPMENT" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVerSuffix=%%i" )
for /f tokens^=2^ delims^=^" %%i in ('findstr /b /c:"#define OCC_VERSION_COMPLETE" "%aCasSrc%\src\Standard\Standard_Version.hxx"') do ( set "anOcctVersion=%%i" )
for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "anExtraCxxFlags="
if /I ["%USE_PTHREADS%"] == ["ON"] (
set "anExtraCxxFlags=-pthread"
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
)
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
)
call :cmakeGenerate
if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1
goto :eof
)
for /F "skip=1 delims=" %%F in ('
wmic PATH Win32_LocalTime GET Day^,Month^,Year /FORMAT:TABLE
') do (
for /F "tokens=1-3" %%L in ("%%F") do (
set DAY00=0%%L
set MONTH00=0%%M
set YEAR=%%N
)
)
set DAY00=%DAY00:~-2%
set MONTH00=%MONTH00:~-2%
set "aRevision=-%YEAR%-%MONTH00%-%DAY00%"
rem set "aRevision=-%aGitBranch%"
set "anArchName=occt-%anOcctVersion%%anOcctVerSuffix%%aRevision%-wasm32%aBuildTypePrefix%"
set "aTarget=%aBuildRoot%\%anArchName%"
if ["%toPack%"] == ["1"] (
echo Creating archive %anArchName%.7z
rmdir /S /Q "%aTarget%"
if not exist "%aTarget%" ( mkdir "%aTarget%" )
if exist "%aBuildRoot%/%anArchName%.7z" del "%aBuildRoot%/%anArchName%.7z"
xcopy /S /Y "%aDestDir%\*" "%aTarget%\"
if ["%toBuildSample%"] == ["1"] (
if not exist "%aTarget%\sample" ( mkdir "%aTarget%\sample" )
xcopy /S /Y "%aDestDirSmpl%\*" "%aTarget%\sample\"
)
"%THE_7Z_PATH%" a -r %THE_7Z_PARAMS% "%aBuildRoot%/%anArchName%.7z" "%aTarget%"
)
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%"
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make"
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDir%"
rmdir /S /Q %aDestDir%"
)
)
if not exist "%aWorkDir%" ( mkdir "%aWorkDir%" )
if exist "%aLogFile%" ( del "%aLogFile%" )
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make"
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%"
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
if ["%toBuildSample%"] == ["1"] (
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDirSmpl%"
rmdir /S /Q %aDestDirSmpl%"
)
)
if not exist "%aWorkDirSmpl%" ( mkdir "%aWorkDirSmpl%" )
if exist "%aLogFileSmpl%" ( del "%aLogFileSmpl%" )
)
rem include some information about OCCT into archive
echo ^<pre^>> "%aWorkDir%\VERSION.html"
git status >> "%aWorkDir%\VERSION.html"
git log -n 100 >> "%aWorkDir%\VERSION.html"
echo ^</pre^>>> "%aWorkDir%\VERSION.html"
echo Start building OCCT for %aPlatformAndCompiler%
echo Start building OCCT for %aPlatformAndCompiler%>> %aLogFile%
echo --->> %aLogFile%
call emcc --version >> %aLogFile%
echo --->> %aLogFile%
pushd "%aWorkDir%"
set "aTimeZERO=%TIME%"
if ["%toCMake%"] == ["1"] (
echo Configuring OCCT for WASM...
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D BUILD_LIBRARY_TYPE:STRING="Static" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D INSTALL_DIR:PATH="%aDestDir%" ^
-D INSTALL_DIR_INCLUDE:STRING="inc" ^
-D INSTALL_DIR_RESOURCE:STRING="src" ^
-D BUILD_MODULE_FoundationClasses:BOOL="ON" ^
-D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^
-D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^
-D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^
-D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^
-D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^
-D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^
-D BUILD_DOC_Overview:BOOL="OFF" ^
-D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^
-D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^
-D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^
-D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^
-D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^
-D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^
-D USE_DRACO:BOOL="%USE_DRACO%" ^
-D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^
-D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^
-D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^
-D 3RDPARTY_DRACO_LIBRARY:FILEPATH="%aDraco%/lib/libdraco.a" ^
-D USE_TK:BOOL="OFF" ^
-D 3RDPARTY_TCL_DIR:PATH="%aTcl%" ^
-D 3RDPARTY_TCL_INCLUDE_DIR:PATH="%aTcl%/include" ^
-D 3RDPARTY_TCL_LIBRARY_DIR:PATH="%aTcl%/lib" ^
-D 3RDPARTY_TCL_LIBRARY:FILEPATH="%aTcl%/lib/libtcl.a" ^
"%aCasSrc%"
if errorlevel 1 (
popd
exit /B 1
goto :eof
)
)
set "aTimeGEN=%TIME%"
call :computeDuration %aTimeZERO% %aTimeGEN%
if ["%toCMake%"] == ["1"] (
echo Generation time: %DURATION%
echo Generation time: %DURATION%>> "%aLogFile%"
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFile%"
if errorlevel 1 (
type "%aLogFile%"
popd
exit /B 1
goto :eof
)
type "%aLogFile%"
)
set "aTimeBUILD=%TIME%"
call :computeDuration %aTimeGEN% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Building time: %DURATION%
echo Building time: %DURATION%>> "%aLogFile%"
)
call :computeDuration %aTimeZERO% %aTimeBUILD%
if ["%toMake%"] == ["1"] (
echo Total building time: %DURATION%
echo Total building time: %DURATION%>> "%aLogFile%"
)
if ["%toInstall%"] == ["1"] (
echo Installing into %aDestDir%...
mingw32-make install 2>> "%aLogFile%"
copy /Y "%aWorkDir%\VERSION.html" "%aDestDir%\VERSION.html"
)
set "aTimeINSTALL=%TIME%"
call :computeDuration "%aTimeBUILD%" "%aTimeINSTALL%"
if ["%toInstall%"] == ["1"] (
echo Install time: %DURATION%
echo Install time: %DURATION%>> "%aLogFile%"
)
call :computeDuration "%aTimeZERO%" "%aTimeINSTALL%"
echo Total time: %DURATION%
echo Total time: %DURATION%>> "%aLogFile%"
popd
if ["%toBuildSample%"] == ["0"] (
goto :eof
)
pushd "%aWorkDirSmpl%"
if ["%toCMake%"] == ["1"] (
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
-D OpenCASCADE_DIR:PATH="%aDestDir%/lib/cmake/opencascade" ^
-D freetype_DIR:PATH="%aFreeType%/lib/cmake/freetype" ^
"%aSrcRootSmpl%"
if errorlevel 1 (
popd
pause
exit /B
goto :eof
)
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
type "%aLogFileSmpl%"
)
if ["%toInstall%"] == ["1"] (
mingw32-make install 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
)
popd
goto :eof
:computeDuration
set "aTimeFrom=%~1"
set "aTimeEnd=%~2"
rem handle time before 10AM (win10 - remove empty space at the beginning)
if "%aTimeFrom:~0,1%"==" " set "aTimeFrom=%aTimeFrom:~1%"
if "%aTimeEnd:~0,1%"==" " set "aTimeEnd=%aTimeEnd:~1%"
rem handle time before 10AM (win7 - add 0 at the beginning)
if "%aTimeFrom:~1,1%"==":" set "aTimeFrom=0%aTimeFrom%"
if "%aTimeEnd:~1,1%"==":" set "aTimeEnd=0%aTimeEnd%"
rem convert hours:minutes:seconds:ms into duration
set /A aTimeFrom=(1%aTimeFrom:~0,2%-100)*360000 + (1%aTimeFrom:~3,2%-100)*6000 + (1%aTimeFrom:~6,2%-100)*100 + (1%aTimeFrom:~9,2%-100)
set /A aTimeEnd= (1%aTimeEnd:~0,2%-100)*360000 + (1%aTimeEnd:~3,2%-100)*6000 + (1%aTimeEnd:~6,2%-100)*100 + (1%aTimeEnd:~9,2%-100)
set /A aDurTotalSec=%aTimeEnd%-%aTimeFrom%
if %aTimeEnd% LSS %aTimeFrom% set set /A aDurTotalSec=%aTimeFrom%-%aTimeEnd%
set /A aDurHH=%aDurTotalSec% / 360000
set /A aDurMM=(%aDurTotalSec% - %aDurHH%*360000) / 6000
set /A aDurSS=(%aDurTotalSec% - %aDurHH%*360000 - %aDurMM%*6000) / 100
if %aDurHH% LSS 10 set aDurHH=0%aDurHH%
if %aDurMM% LSS 10 set aDurMM=0%aDurMM%
if %aDurSS% LSS 10 set aDurSS=0%aDurSS%
set "DURATION=%aDurHH%:%aDurMM%:%aDurSS%"
goto :eof

126
adm/scripts/wasm_build.sh Executable file
View File

@@ -0,0 +1,126 @@
#!/bin/bash
# Auxiliary script for semi-automated building of OCCT for WASM platform.
# wasm_custom.sh should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
# FreeType should be specified as mandatory dependency.
export aScriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export aSrcRoot="${aScriptDir}/../.."
export aBuildRoot=work
export aNbJobs=${NUMBER_OF_PROCESSORS}
export toCMake=1
export toClean=0
export toMake=1
export toInstall=1
export BUILD_ModelingData=ON
export BUILD_ModelingAlgorithms=ON
export BUILD_Visualization=ON
export BUILD_ApplicationFramework=ON
export BUILD_DataExchange=ON
if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then
. "${aScriptDir}/wasm_custom.sh"
fi
. "${EMSDK_ROOT}/emsdk_env.sh"
export aToolchain="${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
export aGitBranch=`git symbolic-ref --short HEAD`
echo "Compilation OCCT branch : $aGitBranch"
export aPlatformAndCompiler=wasm
export aWorkDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}-make"
if [ ! -d "${aWorkDir}" ]; then
mkdir -p "${aWorkDir}"
fi
export aDestDir="${aSrcRoot}/${aBuildRoot}/${aPlatformAndCompiler}"
if [ ! -d "${aDestDir}" ]; then
mkdir -p "${aDestDir}"
fi
export aLogFile="${aSrcRoot}/${aBuildRoot}/build-${aPlatformAndCompiler}.log"
if [ -f "${aLogFile}" ]; then
rm "${aLogFile}"
fi
echo Start building OCCT for ${aPlatformAndCompiler}
echo Start building OCCT for ${aPlatformAndCompiler}>> "${aLogFile}"
pushd "${aWorkDir}"
pwd
echo toCMake=${toCMake}
if [ "${toCMake}" = "1" ]; then
echo "Configuring OCCT for WASM..."
echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DBUILD_LIBRARY_TYPE:STRING="Static" \
-DINSTALL_DIR:PATH="${aDestDir}" \
-DINSTALL_DIR_INCLUDE:STRING="inc" \
-DINSTALL_DIR_RESOURCE:STRING="src" \
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-DBUILD_MODULE_Draw:BOOL="OFF" \
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DBUILD_LIBRARY_TYPE:STRING="Static" \
-DINSTALL_DIR:PATH="${aDestDir}" \
-DINSTALL_DIR_INCLUDE:STRING="inc" \
-DINSTALL_DIR_RESOURCE:STRING="src" \
-D3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
-D3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
-DBUILD_MODULE_FoundationClasses:BOOL="ON" \
-DBUILD_MODULE_ModelingData:BOOL="${BUILD_ModelingData}" \
-DBUILD_MODULE_ModelingAlgorithms:BOOL="${BUILD_ModelingAlgorithms}" \
-DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \
-DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \
-DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \
-DBUILD_MODULE_Draw:BOOL="OFF" \
-DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}"
if [ $? -ne 0 ]; then
echo "Problem during configuration"
popd
exit 1
fi
fi
if [ "${toClean}" = "1" ]; then
make clean
fi
if [ "${toMake}" = "1" ]; then
echo Building...
make -j ${aNbJobs} 2>> "${aLogFile}"
if [ $? -ne 0 ]; then
echo "Problem during make operation"
popd
exit 1
fi
echo "${aLogFile}"
fi
if [ "${toInstall}" = "1" ]; then
echo Installing into ${aDestDir}
make install 2>> "${aLogFile}"
fi
popd

View File

@@ -0,0 +1,29 @@
rem Environment configuration template for wasm_build.bat (to be renamed as wasm_custom.bat)
set "EMSDK_ROOT=%aCasSrc%\..\emsdk"
set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm32"
rem set "aRapidJson=%aCasSrc%\..\3rdparty\rapidjson-1.1.0"
rem set "aDraco=%aCasSrc%\..\3rdparty\draco-1.4.1-wasm32"
rem set "aCmakeBin=%ProgramW6432%\CMake\bin"
rem Uncomment to customize building steps
rem set "aBuildRoot=work"
rem set "toCMake=1"
rem set "toClean=1"
rem set "toMake=1"
rem set "toInstall=1"
rem set "toPack=1"
rem set "toDebug=1"
rem set "toBuildSample=1"
rem Source map base (should point to server where C++ sources will be copied)
rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger.
rem set "sourceMapBase=http://localhost:9090/"
rem set "BUILD_ModelingData=ON"
rem set "BUILD_ModelingAlgorithms=ON"
rem set "BUILD_Visualization=ON"
rem set "BUILD_ApplicationFramework=ON"
rem set "BUILD_DataExchange=ON"
rem set "USE_RAPIDJSON=ON"
rem set "USE_DRACO=ON"
rem set "USE_PTHREADS=ON"

View File

@@ -0,0 +1,16 @@
# environment configuration template for occ_build_wasm.sh (to be renamed as wasm_custom_env.sh)
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.7.1-wasm"
export EMSDK_ROOT="$aSrcRoot/../emsdk"
# Uncomment to customize building steps
#export aBuildRoot=work
#export toCMake=1
#export toClean=0
#export toMake=1
#export toInstall=1
#export BUILD_ModelingData=ON
#export BUILD_ModelingAlgorithms=ON
#export BUILD_Visualization=ON
#export BUILD_ApplicationFramework=ON
#export BUILD_DataExchange=ON

View File

@@ -0,0 +1,117 @@
@echo OFF
rem Auxiliary script for semi-automated building of WebGL sample.
rem wasm_custom.bat should be configured with paths to CMake, 3rd-parties and Emscripten SDK.
rem FreeType should be specified as mandatory dependency.
set "aCasSrc=%~dp0..\.."
set "aBuildRoot=%aCasSrc%\work"
set aNbJobs=%NUMBER_OF_PROCESSORS%
rem Paths to 3rd-party tools and libraries
set "aCmakeBin="
set "aFreeType="
rem Build stages to perform
set "toCMake=1"
set "toClean=0"
set "toMake=1"
set "toInstall=1"
set "toDebug=0"
set "sourceMapBase="
set "USE_PTHREADS=OFF"
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
call "%EMSDK_ROOT%\emsdk_env.bat"
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" )
set "aBuildType=Release"
set "aBuildTypePrefix="
set "anExtraCxxFlags="
if /I ["%USE_PTHREADS%"] == ["ON"] (
set "anExtraCxxFlags=-pthread"
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
)
if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
)
call :cmakeGenerate
if not ["%1"] == ["-nopause"] (
pause
)
goto :eof
:cmakeGenerate
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%"
set "aDestDirOcct=%aBuildRoot%\occt-%aPlatformAndCompiler%"
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make"
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%"
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
if ["%toCMake%"] == ["1"] (
if ["%toClean%"] == ["1"] (
rmdir /S /Q %aWorkDirSmpl%"
rmdir /S /Q %aDestDirSmpl%"
)
)
if not exist "%aWorkDirSmpl%" ( mkdir "%aWorkDirSmpl%" )
if exist "%aLogFileSmpl%" ( del "%aLogFileSmpl%" )
pushd "%aWorkDirSmpl%"
if ["%toCMake%"] == ["1"] (
cmake -G "MinGW Makefiles" ^
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^
-D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^
-D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^
-D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^
-D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^
-D OpenCASCADE_DIR:PATH="%aDestDirOcct%/lib/cmake/opencascade" ^
-D freetype_DIR:PATH="%aFreeType%/lib/cmake/freetype" ^
"%aSrcRootSmpl%"
if errorlevel 1 (
popd
pause
exit /B
goto :eof
)
)
if ["%toClean%"] == ["1"] (
mingw32-make clean
)
if ["%toMake%"] == ["1"] (
echo Building...
mingw32-make -j %aNbJobs% 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
type "%aLogFileSmpl%"
)
if ["%toInstall%"] == ["1"] (
mingw32-make install 2>> "%aLogFileSmpl%"
if errorlevel 1 (
type "%aLogFileSmpl%"
popd
pause
exit /B
goto :eof
)
)
popd
goto :eof

View File

@@ -1,14 +1,14 @@
#-----------------------------------------------------------------------------
#
# OpenCASCADECompileDefinitionsAndFlags-@OCCT_CONFIGURATION_LOWER@.cmake - OpenCASCADE CMake file
# with compile definitions and C/C++ flags for @OCCT_CONFIGURATION@ configuration.
#
# This file is configured by OpenCASCADE.
#
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_CXX_FLAGS@")
# The compile definitions used by OpenCASCADE.
@SET_OpenCASCADE_COMPILE_DEFINITIONS@
#-----------------------------------------------------------------------------
#
# OpenCASCADECompileDefinitionsAndFlags-@OCCT_CONFIGURATION_LOWER@.cmake - OpenCASCADE CMake file
# with compile definitions and C/C++ flags for @OCCT_CONFIGURATION@ configuration.
#
# This file is configured by OpenCASCADE.
#
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS_@OCCT_CONFIGURATION_UPPER@ "@SET_OpenCASCADE_CMAKE_CXX_FLAGS@")
# The compile definitions used by OpenCASCADE.
@SET_OpenCASCADE_COMPILE_DEFINITIONS@

View File

@@ -1,89 +1,94 @@
#-----------------------------------------------------------------------------
#
# OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects.
#
# This file is configured by OpenCASCADE.
#
if(OpenCASCADE_ALREADY_INCLUDED)
return()
endif()
set(OpenCASCADE_ALREADY_INCLUDED 1)
# The OpenCASCADE version number
set (OpenCASCADE_MAJOR_VERSION "@OCC_VERSION_MAJOR@")
set (OpenCASCADE_MINOR_VERSION "@OCC_VERSION_MINOR@")
set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@")
set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
# Compute the installation prefix from this OpenCASCADEConfig.cmake file
# location, by going up one level + one level if "cmake" + one level if "lib".
# This is made to support different locations of CMake files:
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
# - in Windows style: $INSTALL_DIR/cmake
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
# Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_BIN@")
set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_LIB@")
set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_SCRIPT@")
set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_INCLUDE@")
set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_RESOURCE@")
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS "@CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
@SET_OpenCASCADE_LINKER_FLAGS@
# List of available OpenCASCADE modules.
set (OpenCASCADE_MODULES @OCCT_MODULES_ENABLED@)
@SET_OpenCASCADE_MODULES_TOOLKITS@
# List of available OpenCASCADE libraries.
set (OpenCASCADE_LIBRARIES @OCCT_LIBRARIES@)
# OpenCASCADE global configuration options.
set (OpenCASCADE_COMPILER "@COMPILER@")
set (OpenCASCADE_BUILD_WITH_DEBUG @BUILD_WITH_DEBUG@)
set (OpenCASCADE_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
@SET_OpenCASCADE_BUILD_TYPE@
# Use of third-party libraries.
set (OpenCASCADE_WITH_TCL @USE_TCL@)
set (OpenCASCADE_WITH_FREETYPE @USE_FREETYPE@)
set (OpenCASCADE_WITH_FREEIMAGE @USE_FREEIMAGE@)
set (OpenCASCADE_WITH_TBB @USE_TBB@)
set (OpenCASCADE_WITH_VTK @USE_VTK@)
set (OpenCASCADE_WITH_FFMPEG @USE_FFMPEG@)
set (OpenCASCADE_WITH_GLES2 @USE_GLES2@)
@SET_OpenCASCADE_WITH_D3D@
@SET_OpenCASCADE_WITH_GLX@
# Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
if (NOT OpenCASCADE_FIND_COMPONENTS)
set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES})
endif ()
# Import OpenCASCADE targets.
foreach(_comp ${OpenCASCADE_FIND_COMPONENTS})
if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}")
set(OpenCASCADE_FOUND False)
set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}")
if (NOT OpenCASCADE_FIND_QUIETLY)
message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}")
endif()
else()
include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake")
endif()
endforeach()
#-----------------------------------------------------------------------------
#
# OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects.
#
# This file is configured by OpenCASCADE.
#
if(OpenCASCADE_ALREADY_INCLUDED)
return()
endif()
set(OpenCASCADE_ALREADY_INCLUDED 1)
# The OpenCASCADE version number
set (OpenCASCADE_MAJOR_VERSION "@OCC_VERSION_MAJOR@")
set (OpenCASCADE_MINOR_VERSION "@OCC_VERSION_MINOR@")
set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@")
set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
# Compute the installation prefix from this OpenCASCADEConfig.cmake file
# location, by going up one level + one level if "cmake" + one level if "lib".
# This is made to support different locations of CMake files:
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
# - in Windows style: $INSTALL_DIR/cmake
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
# Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_BIN@")
set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_LIB@")
set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_SCRIPT@")
set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_INCLUDE@")
set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_RESOURCE@")
# The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
set (OpenCASCADE_C_FLAGS "@CMAKE_C_FLAGS@")
set (OpenCASCADE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
@SET_OpenCASCADE_LINKER_FLAGS@
# List of available OpenCASCADE modules.
set (OpenCASCADE_MODULES @OCCT_MODULES_ENABLED@)
@SET_OpenCASCADE_MODULES_TOOLKITS@
# List of available OpenCASCADE libraries.
set (OpenCASCADE_LIBRARIES @OCCT_LIBRARIES@)
# OpenCASCADE global configuration options.
set (OpenCASCADE_COMPILER "@COMPILER@")
set (OpenCASCADE_BUILD_WITH_DEBUG @BUILD_WITH_DEBUG@)
set (OpenCASCADE_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
@SET_OpenCASCADE_BUILD_TYPE@
# Use of third-party libraries.
set (OpenCASCADE_WITH_TCL @USE_TCL@)
set (OpenCASCADE_WITH_FREETYPE @USE_FREETYPE@)
set (OpenCASCADE_WITH_FREEIMAGE @USE_FREEIMAGE@)
set (OpenCASCADE_WITH_TBB @USE_TBB@)
set (OpenCASCADE_WITH_VTK @USE_VTK@)
set (OpenCASCADE_WITH_FFMPEG @USE_FFMPEG@)
set (OpenCASCADE_WITH_GLES2 @USE_GLES2@)
@SET_OpenCASCADE_WITH_D3D@
@SET_OpenCASCADE_WITH_GLX@
# Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
if (NOT OpenCASCADE_FIND_COMPONENTS)
set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES})
endif ()
# Import OpenCASCADE targets.
foreach(_comp ${OpenCASCADE_FIND_COMPONENTS})
if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}")
set(OpenCASCADE_FOUND False)
set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}")
if (NOT OpenCASCADE_FIND_QUIETLY)
message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}")
endif()
else()
include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake")
endif()
endforeach()

View File

@@ -1,8 +1,8 @@
# A toolchain file to configure a Makefile Generators or the Ninja generator to target Android for cross-compiling.
# Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
set (CMAKE_SYSTEM_NAME Android)
set (CMAKE_SYSTEM_VERSION 15) # API level
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set (CMAKE_ANDROID_NDK "")
set (CMAKE_ANDROID_STL_TYPE gnustl_shared)
# A toolchain file to configure a Makefile Generators or the Ninja generator to target Android for cross-compiling.
# Set CMAKE_ANDROID_NDK variable equal to your Android NDK path.
set (CMAKE_SYSTEM_NAME Android)
set (CMAKE_SYSTEM_VERSION 15) # API level
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set (CMAKE_ANDROID_NDK "")
set (CMAKE_ANDROID_STL_TYPE gnustl_shared)

40
adm/templates/build.bat Normal file
View File

@@ -0,0 +1,40 @@
@echo off
setlocal
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
rem Define path to project file
set "PRJFILE=%~dp0OCCT.sln"
if "%VCVER%" == "vc8" (
call "%VS80COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc9" (
call "%VS90COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc10" (
call "%VS100COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc11" (
call "%VS110COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc12" (
call "%VS120COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc14" (
call "%VS140COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc141" (
call "%VS141COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc142" (
call "%VS142COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc143" (
call "%VS143COMNTOOLS%/vsvars32.bat" > nul
) else (
echo Error: wrong VS identifier
exit /B
)
set BUILDCONFIG=Release
if "%CASDEB%"=="i" set BUILDCONFIG=RelWithDebInfo
if "%CASDEB%"=="d" set BUILDCONFIG=Debug
if "%ARCH%"=="32" set PLATFORM=win32
if "%ARCH%"=="64" set PLATFORM=x64
msbuild "%PRJFILE%" /m /fl /flp:LogFile="build_%BUILDCONFIG%.log" /p:Configuration=%BUILDCONFIG% /p:Platform=%PLATFORM% /p:BuildProjectReferences=false
endlocal

View File

@@ -1,5 +1,5 @@
echo off
rem include other custom.bat files with specific 3rdparty paths
@ADDITIONAL_CUSTOM_CONTENT@
echo off
rem include other custom.bat files with specific 3rdparty paths
@ADDITIONAL_CUSTOM_CONTENT@

View File

@@ -1,45 +1,46 @@
echo off
if /I "%VCVER%" == "@COMPILER@" (
if "%ARCH%" == "@COMPILER_BITNESS@" (
rem set environment variables used by OCCT
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
set "TK_DIR=@3RDPARTY_TK_DLL_DIR@"
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIRS@"
set "EGL_DIR=@3RDPARTY_EGL_DLL_DIRS@"
set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIRS@"
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
if not "@3RDPARTY_QT_DIR@" == "" (
set "QTDIR=@3RDPARTY_QT_DIR@"
)
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
rem CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
rem multiple and single configuration builds
set "CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
if ["@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"] == [""] (
set "CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/bin%3"
)
set "CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
if ["@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"] == [""] (
set "CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/lib%3"
)
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/inc"
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src"
set "CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data"
set "CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples"
set "CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests"
set "CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc"
rem for compatability with external application using CASROOT
set "CASROOT=@CMAKE_SOURCE_DIR@"
)
)
echo off
if /I "%VCVER%" == "@COMPILER@" (
if "%ARCH%" == "@COMPILER_BITNESS@" (
rem set environment variables used by OCCT
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
set "TK_DIR=@3RDPARTY_TK_DLL_DIR@"
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIRS@"
set "EGL_DIR=@3RDPARTY_EGL_DLL_DIRS@"
set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIRS@"
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
if not "@3RDPARTY_QT_DIR@" == "" (
set "QTDIR=@3RDPARTY_QT_DIR@"
)
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
rem CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
rem multiple and single configuration builds
set "CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
if ["@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"] == [""] (
set "CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/bin%3"
)
set "CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
if ["@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"] == [""] (
set "CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/lib%3"
)
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/inc"
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/src"
set "CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data"
set "CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples"
set "CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests"
set "CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc"
rem for compatibility with external application using CASROOT
set "CASROOT=@CMAKE_SOURCE_DIR@"
)
)

View File

@@ -1,36 +1,36 @@
#!/bin/bash
if [ "$1" == "@BIN_LETTER@" ]; then
if [ "$2" == "@COMPILER_BITNESS@" ]; then
# set environment variables used by OCCT
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@"
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIRS@"
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
export QTDIR="@3RDPARTY_QT_DIR@"
fi
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/inc"
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/src"
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
export CSF_OCCTTestsPath="@CMAKE_SOURCE_DIR@/tests"
export CSF_OCCTDocPath="@CMAKE_SOURCE_DIR@/doc"
# for compatability with external application using CASROOT
export CASROOT="@CMAKE_SOURCE_DIR@"
fi
fi
#!/bin/bash
if [ "$1" == "@BIN_LETTER@" ]; then
if [ "$2" == "@COMPILER_BITNESS@" ]; then
# set environment variables used by OCCT
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@"
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIRS@"
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
export QTDIR="@3RDPARTY_QT_DIR@"
fi
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/inc"
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/src"
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
export CSF_OCCTTestsPath="@CMAKE_SOURCE_DIR@/tests"
export CSF_OCCTDocPath="@CMAKE_SOURCE_DIR@/doc"
# for compatibility with external application using CASROOT
export CASROOT="@CMAKE_SOURCE_DIR@"
fi
fi

View File

@@ -1,37 +1,38 @@
echo off
rem CASDEB comes as third argument
if /I "%VCVER%" == "@COMPILER@" (
if "%ARCH%" == "@COMPILER_BITNESS@" (
rem set environment variables used by OCCT
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
set "TK_DIR=@USED_3RDPARTY_TK_DIR@"
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIRS@"
set "EGL_DIR=@USED_3RDPARTY_EGL_DIRS@"
set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIRS@"
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
if not "@USED_3RDPARTY_QT_DIR@" == "" (
set "QTDIR=@USED_3RDPARTY_QT_DIR@"
)
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
set "CSF_OCCTBinPath=%CASROOT%/@INSTALL_DIR_BIN@%3"
set "CSF_OCCTLibPath=%CASROOT%/@INSTALL_DIR_LIB@%3"
set "CSF_OCCTIncludePath=%CASROOT%/@INSTALL_DIR_INCLUDE@"
set "CSF_OCCTResourcePath=%CASROOT%/@INSTALL_DIR_RESOURCE@"
set "CSF_OCCTDataPath=%CASROOT%/@INSTALL_DIR_DATA@"
set "CSF_OCCTSamplesPath=%CASROOT%/@INSTALL_DIR_SAMPLES@"
set "CSF_OCCTTestsPath=%CASROOT%/@INSTALL_DIR_TESTS@"
set "CSF_OCCTDocPath=%CASROOT%/@INSTALL_DIR_DOC@"
)
)
echo off
rem CASDEB comes as third argument
if /I "%VCVER%" == "@COMPILER@" (
if "%ARCH%" == "@COMPILER_BITNESS@" (
rem set environment variables used by OCCT
set CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
set "TK_DIR=@USED_3RDPARTY_TK_DIR@"
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
set "EGL_DIR=@USED_3RDPARTY_EGL_DIRS@"
set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIRS@"
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@"
if not "@USED_3RDPARTY_QT_DIR@" == "" (
set "QTDIR=@USED_3RDPARTY_QT_DIR@"
)
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
set "CSF_OCCTBinPath=%CASROOT%/@INSTALL_DIR_BIN@%3"
set "CSF_OCCTLibPath=%CASROOT%/@INSTALL_DIR_LIB@%3"
set "CSF_OCCTIncludePath=%CASROOT%/@INSTALL_DIR_INCLUDE@"
set "CSF_OCCTResourcePath=%CASROOT%/@INSTALL_DIR_RESOURCE@"
set "CSF_OCCTDataPath=%CASROOT%/@INSTALL_DIR_DATA@"
set "CSF_OCCTSamplesPath=%CASROOT%/@INSTALL_DIR_SAMPLES@"
set "CSF_OCCTTestsPath=%CASROOT%/@INSTALL_DIR_TESTS@"
set "CSF_OCCTDocPath=%CASROOT%/@INSTALL_DIR_DOC@"
)
)

View File

@@ -1,33 +1,33 @@
#!/bin/bash
if [ "$1" == "@BIN_LETTER@" ]; then
if [ "$2" == "@COMPILER_BITNESS@" ]; then
# set environment variables used by OCCT
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIRS@"
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
export FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@"
if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then
export QTDIR="@USED_3RDPARTY_QT_DIR@"
fi
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
export CSF_OCCTBinPath="${CASROOT}/@INSTALL_DIR_BIN@"
export CSF_OCCTLibPath="${CASROOT}/@INSTALL_DIR_LIB@"
export CSF_OCCTIncludePath="${CASROOT}/@INSTALL_DIR_INCLUDE@"
export CSF_OCCTResourcePath="${CASROOT}/@INSTALL_DIR_RESOURCE@"
export CSF_OCCTDataPath="${CASROOT}/@INSTALL_DIR_DATA@"
export CSF_OCCTSamplesPath="${CASROOT}/@INSTALL_DIR_SAMPLES@"
export CSF_OCCTTestsPath="${CASROOT}/@INSTALL_DIR_TESTS@"
export CSF_OCCTDocPath="${CASROOT}/@INSTALL_DIR_DOC@"
fi
fi
#!/bin/bash
if [ "$1" == "@BIN_LETTER@" ]; then
if [ "$2" == "@COMPILER_BITNESS@" ]; then
# set environment variables used by OCCT
export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
export TK_DIR="@USED_3RDPARTY_TK_DIR@"
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIRS@"
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
export FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@"
if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then
export QTDIR="@USED_3RDPARTY_QT_DIR@"
fi
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
export CSF_OCCTBinPath="${CASROOT}/@INSTALL_DIR_BIN@"
export CSF_OCCTLibPath="${CASROOT}/@INSTALL_DIR_LIB@"
export CSF_OCCTIncludePath="${CASROOT}/@INSTALL_DIR_INCLUDE@"
export CSF_OCCTResourcePath="${CASROOT}/@INSTALL_DIR_RESOURCE@"
export CSF_OCCTDataPath="${CASROOT}/@INSTALL_DIR_DATA@"
export CSF_OCCTSamplesPath="${CASROOT}/@INSTALL_DIR_SAMPLES@"
export CSF_OCCTTestsPath="${CASROOT}/@INSTALL_DIR_TESTS@"
export CSF_OCCTDocPath="${CASROOT}/@INSTALL_DIR_DOC@"
fi
fi

View File

@@ -1,4 +1,4 @@
#!/bin/bash
@ADDITIONAL_CUSTOM_CONTENT@
#!/bin/bash
@ADDITIONAL_CUSTOM_CONTENT@

View File

@@ -17,6 +17,8 @@ set "ARCH=64"
set "VCVARS="
set "HAVE_TBB=false"
set "HAVE_OPENCL=false"
set "HAVE_TK=true"
set "HAVE_FREETYPE=true"
set "HAVE_FREEIMAGE=false"
set "HAVE_FFMPEG=false"
set "HAVE_VTK=false"
@@ -25,6 +27,7 @@ set "HAVE_D3D=false"
set "HAVE_ZLIB=false"
set "HAVE_LIBLZMA=false"
set "HAVE_RAPIDJSON=false"
set "HAVE_DRACO=false"
set "HAVE_OPENVR=false"
set "HAVE_E57=false"
set "CSF_OPT_INC="
@@ -32,6 +35,14 @@ set "CSF_OPT_LIB32="
set "CSF_OPT_LIB64="
set "CSF_OPT_BIN32="
set "CSF_OPT_BIN64="
set "CSF_OPT_LIB32D="
set "CSF_OPT_LIB64D="
set "CSF_OPT_BIN32D="
set "CSF_OPT_BIN64D="
set "CSF_OPT_LIB32I="
set "CSF_OPT_LIB64I="
set "CSF_OPT_BIN32I="
set "CSF_OPT_BIN64I="
set "CSF_DEFINES=%CSF_DEFINES_EXTRA%"
if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
@@ -56,9 +67,9 @@ rem Decode VCVER variable and define related ones:
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder contining binaries
rem VCLIB - name of folder containing binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem VCPROP - name of required Visual Studio Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
@@ -110,8 +121,12 @@ if not "%DevEnvDir%" == "" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "vc143" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "vclang" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
@@ -126,6 +141,7 @@ if not "%DevEnvDir%" == "" (
echo vc14 = VS 2015
echo vc141 = VS 2017
echo vc142 = VS 2019
echo vc143 = VS 2022
echo vclang = VS 2019 with ClangCL toolset
exit /B
)
@@ -156,10 +172,15 @@ if /I "%VCFMT%" == "vc9" (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v142"
) else if /I "%VCFMT%" == "vclang" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
) else if /I "%VCFMT%" == "vc143" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v143"
) else if /I "%VCFMT%" == "vclang" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=ClangCL"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
@@ -168,28 +189,31 @@ if /I "%VCFMT%" == "vc9" (
exit /B
)
set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%"
set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%"
set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%"
set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%"
set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%"
set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%"
set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%"
set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
if ["%CSF_OPT_LIB32D%"] == [""] set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%"
if ["%CSF_OPT_LIB64D%"] == [""] set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%"
if ["%CSF_OPT_BIN32D%"] == [""] set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%"
if ["%CSF_OPT_BIN64D%"] == [""] set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%"
if ["%CSF_OPT_LIB32I%"] == [""] set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%"
if ["%CSF_OPT_LIB64I%"] == [""] set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%"
if ["%CSF_OPT_BIN32I%"] == [""] set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%"
if ["%CSF_OPT_BIN64I%"] == [""] set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
set "CSF_OPT_CMPL="
set "PRODUCTS_DEFINES="
if ["%HAVE_TBB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TBB" & set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL" & set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
if ["%HAVE_TK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_TK" & set "CSF_DEFINES=HAVE_TK;%CSF_DEFINES%"
if ["%HAVE_FREETYPE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREETYPE;%CSF_DEFINES%"
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
if ["%HAVE_FFMPEG%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FFMPEG" & set "CSF_DEFINES=HAVE_FFMPEG;%CSF_DEFINES%"
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK" & set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2" & set "CSF_DEFINES=HAVE_GLES2;%CSF_DEFINES%"
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2_EXT" & set "CSF_DEFINES=HAVE_GLES2_EXT;%CSF_DEFINES%"
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D" & set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
if ["%HAVE_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%"
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"
if ["%HAVE_RAPIDJSON%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_RAPIDJSON" & set "CSF_DEFINES=HAVE_RAPIDJSON;%CSF_DEFINES%"
if ["%HAVE_DRACO%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_DRACO" & set "CSF_DEFINES=HAVE_DRACO;%CSF_DEFINES%"
if ["%HAVE_OPENVR%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENVR" & set "CSF_DEFINES=HAVE_OPENVR;%CSF_DEFINES%"
if ["%HAVE_E57%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_E57" & set "CSF_DEFINES=HAVE_E57;%CSF_DEFINES%"
@@ -199,20 +223,20 @@ if ["%CSF_DEFINES%"] == [""] set "CSF_DEFINES=;"
rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
if not ["%PRODUCTS_DEFINES%"] == [""] set "CSF_OPT_CMPL=%CSF_OPT_CMPL% %PRODUCTS_DEFINES%"
rem ----- Colect 3rd-parties additional include paths into compiler options -----
rem ----- Collect 3rd-parties additional include paths into compiler options -----
for %%a in ("%CSF_OPT_INC:;=";"%") do (
set "anItem=%%~a"
if not ["%%~a"] == [""] call :concatCmplInc %%~a
)
rem ----- Colect 3rd-parties additional library paths (32-bit) into linker options -----
rem ----- Collect 3rd-parties additional library paths (32-bit) into linker options -----
set "OPT_LIB32="
for %%a in ("%CSF_OPT_LIB32:;=";"%") do (
set "anItem=%%~a"
if not ["%%~a"] == [""] call :concatLib32 %%~a
)
rem ----- Colect 3rd-parties additional library paths (64-bit) into linker options -----
rem ----- Collect 3rd-parties additional library paths (64-bit) into linker options -----
set "OPT_LIB64="
for %%a in ("%CSF_OPT_LIB64:;=";"%") do (
set "anItem=%%~a"
@@ -244,7 +268,7 @@ if ["%CASDEB%"] == ["d"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64D%;%PAT
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32I%;%PATH%"
if ["%CASDEB%"] == ["i"] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64I%;%PATH%"
rem ----- Set envoronment variables used by OCCT -----
rem ----- Set environment variables used by OCCT -----
set CSF_LANGUAGE=us
set MMGT_CLEAR=1
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"

View File

@@ -1,179 +1,195 @@
echo off
set "SCRIPTROOT=%~dp0"
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
rem ----- Reset values to defaults -----
set "VCVER=@COMPILER@"
set "ARCH=@COMPILER_BITNESS@"
set "CASDEB="
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
if /I ["%3"] == ["debug"] set "CASDEB=d"
if /I ["%3"] == ["d"] set "CASDEB=d"
if /I ["%3"] == ["i"] set "CASDEB=i"
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
rem ----- Decode VCVER variable and define related ones -----
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder contining binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
rem any more, we can only use vswhere.exe tool to find Visual Studio.
rem Add path to vswhere.exe
if /I not "%VCFMT%" == "gcc" (
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
)
rem for vc10-12, interpretation is trivial
set VCFMT=%VCVER%
set VCLIB=%VCVER:~0,4%
set VCPROP=NativeDesktop
rem vc14 and later can have optional suffix "-uwp"
if "%VCVER:~-4%" == "-uwp" (
set VCFMT=%VCVER:~0,-4%
set VCLIB=%VCLIB%-uwp
set VCPROP=Universal
)
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
rem ----- Parsing of Visual Studio platform -----
set "VisualStudioExpressName=VCExpress"
if not "%DevEnvDir%" == "" (
rem If DevEnvDir is already defined (e.g. in custom.bat), use that value
) else if /I "%VCFMT%" == "vc9" (
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc10" (
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc11" (
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
rem and has a new name for executable - WDExpress
set "VisualStudioExpressName=WDExpress"
) else if /I "%VCFMT%" == "vc12" (
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
set "VisualStudioExpressName=WDExpress"
) else if /I "%VCFMT%" == "vc14" (
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc141" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "vc142" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: wrong VS identifier
exit /B
)
rem ----- Parsing vcvarsall for qt samples and define PlatformToolset -----
if /I "%VCFMT%" == "vc9" (
set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v90"
) else if /I "%VCFMT%" == "vc10" (
set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v100"
) else if /I "%VCFMT%" == "vc11" (
set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v110"
) else if /I "%VCFMT%" == "vc12" (
set "VCVARS=%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v120"
) else if /I "%VCFMT%" == "vc14" (
set "VCVARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v140"
) else if /I "%VCFMT%" == "vc141" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v141"
) else if /I "%VCFMT%" == "vc142" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v142"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++,
echo one of: vc10 ^(VS 2010 SP3^), vc11 ^(VS 2012 SP3^), vc12 ^(VS 2013^) or vc14 ^(VS 2015^)
exit
)
rem ----- For compatability with external application using CASROOT -----
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
rem ----- Define path to 3rdparty products -----
set "THIRDPARTY_DIR=@3RDPARTY_DIR@"
if ["%ARCH%"] == ["32"] set VCARCH=x86
if ["%ARCH%"] == ["64"] set VCARCH=amd64
if /I ["%1"] == ["vc141"] set "VCVER=vc14"
if exist "%CASROOT%\custom.bat" (
call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB%
)
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
if not ["%EGL_DIR%"] == [""] set "PATH=%EGL_DIR%;%PATH%"
if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%"
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
if not ["%QTDIR%"] == [""] set "PATH=%QTDIR%/bin;%PATH%"
rem ----- Set path to 3rd party and OCCT libraries -----
if not "%CSF_OCCTBinPath%" == "" (
set "PATH=%CSF_OCCTBinPath%;%PATH%"
)
if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
if not ["%TK_DIR%"] == [""] set "TK_LIBRARY=%TK_DIR%/../lib/tk%TK_VERSION_WITH_DOT%"
if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl%TCL_VERSION_WITH_DOT%"
)
rem ----- Set envoronment variables used by OCCT -----
set CSF_LANGUAGE=us
set MMGT_CLEAR=1
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"
set "CSF_MDTVTexturesDirectory=%CSF_OCCTResourcePath%\Textures"
set "CSF_ShadersDirectory=%CSF_OCCTResourcePath%\Shaders"
set "CSF_XSMessage=%CSF_OCCTResourcePath%\XSMessage"
set "CSF_TObjMessage=%CSF_OCCTResourcePath%\TObj"
set "CSF_StandardDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
set "CSF_MIGRATION_TYPES=%CSF_OCCTResourcePath%\StdResource\MigrationSheet.txt"
rem ----- Draw Harness special stuff -----
if exist "%CSF_OCCTResourcePath%\DrawResources" (
set "DRAWHOME=%CSF_OCCTResourcePath%\DrawResources"
set "CSF_DrawPluginDefaults=%CSF_OCCTResourcePath%\DrawResources"
if exist "%CSF_OCCTResourcePath%\DrawResources\DrawDefault" (
set "DRAWDEFAULT=%CSF_OCCTResourcePath%\DrawResources\DrawDefault"
)
)
echo off
set "SCRIPTROOT=%~dp0"
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
rem ----- Reset values to defaults -----
set "VCVER=@COMPILER@"
set "ARCH=@COMPILER_BITNESS@"
set "CASDEB="
if not ["%1"] == [""] set "VCVER=%1"
if not ["%2"] == [""] set "ARCH=%2"
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
if /I ["%3"] == ["debug"] set "CASDEB=d"
if /I ["%3"] == ["d"] set "CASDEB=d"
if /I ["%3"] == ["i"] set "CASDEB=i"
if /I ["%3"] == ["relwithdeb"] set "CASDEB=i"
rem ----- Decode VCVER variable and define related ones -----
rem
rem VCFMT - "vc" followed by full version number of Visual Studio toolset
rem (same as VCVER without optional suffix "-uwp")
rem VCLIB - name of folder contining binaries
rem (same as VCVER except without third version in number)
rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
rem
rem Note that for VS before 2015 (vc14) always
rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
rem any more, we can only use vswhere.exe tool to find Visual Studio.
rem Add path to vswhere.exe
if /I not "%VCFMT%" == "gcc" (
set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
)
rem for vc10-12, interpretation is trivial
set VCFMT=%VCVER%
set VCLIB=%VCVER:~0,4%
set VCPROP=NativeDesktop
rem vc14 and later can have optional suffix "-uwp"
if "%VCVER:~-4%" == "-uwp" (
set VCFMT=%VCVER:~0,-4%
set VCLIB=%VCLIB%-uwp
set VCPROP=Universal
)
rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%
rem ----- Parsing of Visual Studio platform -----
set "VisualStudioExpressName=VCExpress"
if not "%DevEnvDir%" == "" (
rem If DevEnvDir is already defined (e.g. in custom.bat), use that value
) else if /I "%VCFMT%" == "vc9" (
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc10" (
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc11" (
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
rem and has a new name for executable - WDExpress
set "VisualStudioExpressName=WDExpress"
) else if /I "%VCFMT%" == "vc12" (
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
set "VisualStudioExpressName=WDExpress"
) else if /I "%VCFMT%" == "vc14" (
set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
) else if /I "%VCFMT%" == "vc141" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "vc142" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "vc143" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: wrong VS identifier
exit /B
)
rem ----- Parsing vcvarsall for qt samples and define PlatformToolset -----
if /I "%VCFMT%" == "vc9" (
set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v90"
) else if /I "%VCFMT%" == "vc10" (
set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v100"
) else if /I "%VCFMT%" == "vc11" (
set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v110"
) else if /I "%VCFMT%" == "vc12" (
set "VCVARS=%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v120"
) else if /I "%VCFMT%" == "vc14" (
set "VCVARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
set "VCPlatformToolSet=v140"
) else if /I "%VCFMT%" == "vc141" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v141"
) else if /I "%VCFMT%" == "vc142" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v142"
) else if /I "%VCFMT%" == "vc143" (
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v142"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW
) else (
echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++,
echo one of: vc10 ^(VS 2010 SP3^), vc11 ^(VS 2012 SP3^), vc12 ^(VS 2013^) or vc14 ^(VS 2015^)
exit
)
rem ----- For compatibility with external application using CASROOT -----
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
rem ----- Define path to 3rdparty products -----
if ["%THIRDPARTY_DIR%"] == [""] set "THIRDPARTY_DIR=@3RDPARTY_DIR@"
if ["%ARCH%"] == ["32"] set VCARCH=x86
if ["%ARCH%"] == ["64"] set VCARCH=amd64
if /I ["%1"] == ["vc141"] set "VCVER=vc14"
if /I ["%1"] == ["vc142"] set "VCVER=vc14"
if /I ["%1"] == ["vc143"] set "VCVER=vc14"
if exist "%CASROOT%\custom.bat" (
call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB%
)
if not ["%QTDIR%"] == [""] (
set "PATH=%QTDIR%/bin;%PATH%"
set "QT_PLUGIN_PATH=%QTDIR%/plugins"
)
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
if not ["%EGL_DIR%"] == [""] set "PATH=%EGL_DIR%;%PATH%"
if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%"
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
rem ----- Set path to 3rd party and OCCT libraries -----
if not "%CSF_OCCTBinPath%" == "" (
set "PATH=%CSF_OCCTBinPath%;%PATH%"
)
if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
if not ["%TK_DIR%"] == [""] set "TK_LIBRARY=%TK_DIR%/../lib/tk%TK_VERSION_WITH_DOT%"
if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl%TCL_VERSION_WITH_DOT%"
)
rem ----- Set envoronment variables used by OCCT -----
set CSF_LANGUAGE=us
set MMGT_CLEAR=1
set "CSF_SHMessage=%CSF_OCCTResourcePath%\SHMessage"
set "CSF_MDTVTexturesDirectory=%CSF_OCCTResourcePath%\Textures"
set "CSF_ShadersDirectory=%CSF_OCCTResourcePath%\Shaders"
set "CSF_XSMessage=%CSF_OCCTResourcePath%\XSMessage"
set "CSF_TObjMessage=%CSF_OCCTResourcePath%\TObj"
set "CSF_StandardDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_PluginDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_XCAFDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_TObjDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_StandardLiteDefaults=%CSF_OCCTResourcePath%\StdResource"
set "CSF_IGESDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
set "CSF_STEPDefaults=%CSF_OCCTResourcePath%\XSTEPResource"
set "CSF_XmlOcafResource=%CSF_OCCTResourcePath%\XmlOcafResource"
set "CSF_MIGRATION_TYPES=%CSF_OCCTResourcePath%\StdResource\MigrationSheet.txt"
rem ----- Draw Harness special stuff -----
if exist "%CSF_OCCTResourcePath%\DrawResources" (
set "DRAWHOME=%CSF_OCCTResourcePath%\DrawResources"
set "CSF_DrawPluginDefaults=%CSF_OCCTResourcePath%\DrawResources"
if exist "%CSF_OCCTResourcePath%\DrawResources\DrawDefault" (
set "DRAWDEFAULT=%CSF_OCCTResourcePath%\DrawResources\DrawDefault"
)
)

View File

@@ -1,137 +1,137 @@
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
# ----- For compatability with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="${aScriptPath}"
fi
# ----- Define path to 3rdparty products -----
export THIRDPARTY_DIR="@3RDPARTY_DIR@"
# ----- Read script arguments -----
shopt -s nocasematch
export CASDEB="";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
shopt -u nocasematch
# ----- Set path to 3rd party and OCCT libraries -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
else
export WOKSTATION="lin";
fi
# ----- Set local settings -----
if [ -e "${CASROOT}/custom.sh" ]; then
source "${CASROOT}/custom.sh" "${CASDEB}" "${ARCH}"
fi
THRDPARTY_PATH=""
if [ "$TCL_DIR" != "" ]; then
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "" ]; then
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREETYPE_DIR" != "" ]; then
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREEIMAGE_DIR" != "" ]; then
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TBB_DIR" != "" ]; then
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
fi
if [ "$VTK_DIR" != "" ]; then
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FFMPEG_DIR" != "" ]; then
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "$TCL_DIR" ]; then
if [ "$TK_DIR" != "" ]; then
export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
fi
if [ "$TCL_DIR" != "" ]; then
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
fi
fi
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
fi
if [ "$CSF_OCCTBinPath" != "" ]; then
export PATH="${CSF_OCCTBinPath}:${PATH}"
fi
if [ "$CSF_OCCTLibPath" != "" ]; then
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
fi
fi
if [ "$WOKSTATION" == "mac" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
fi
# ----- Set envoronment variables used by OCCT -----
export CSF_LANGUAGE=us
export MMGT_CLEAR=1
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
# ----- Draw Harness special stuff -----
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
fi
fi
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
# ----- For compatibility with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="${aScriptPath}"
fi
# ----- Define path to 3rdparty products -----
export THIRDPARTY_DIR="@3RDPARTY_DIR@"
# ----- Read script arguments -----
shopt -s nocasematch
export CASDEB="";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
shopt -u nocasematch
# ----- Set path to 3rd party and OCCT libraries -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
else
export WOKSTATION="lin";
fi
# ----- Set local settings -----
if [ -e "${CASROOT}/custom.sh" ]; then
source "${CASROOT}/custom.sh" "${CASDEB}" "${ARCH}"
fi
THRDPARTY_PATH=""
if [ "$TCL_DIR" != "" ]; then
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "" ]; then
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREETYPE_DIR" != "" ]; then
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREEIMAGE_DIR" != "" ]; then
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TBB_DIR" != "" ]; then
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
fi
if [ "$VTK_DIR" != "" ]; then
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FFMPEG_DIR" != "" ]; then
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "$TCL_DIR" ]; then
if [ "$TK_DIR" != "" ]; then
export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
fi
if [ "$TCL_DIR" != "" ]; then
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
fi
fi
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
fi
if [ "$CSF_OCCTBinPath" != "" ]; then
export PATH="${CSF_OCCTBinPath}:${PATH}"
fi
if [ "$CSF_OCCTLibPath" != "" ]; then
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
fi
fi
if [ "$WOKSTATION" == "mac" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
fi
# ----- Set envoronment variables used by OCCT -----
export CSF_LANGUAGE=us
export MMGT_CLEAR=1
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
# ----- Draw Harness special stuff -----
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
fi
fi

View File

@@ -1,137 +1,139 @@
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
# ----- For compatability with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="@INSTALL_DIR@"
fi
# ----- Define path to 3rdparty products -----
export THIRDPARTY_DIR="@3RDPARTY_DIR@"
# ----- Read script arguments -----
shopt -s nocasematch
export CASDEB="";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
shopt -u nocasematch
# ----- Set path to 3rd party and OCCT libraries -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
else
export WOKSTATION="lin";
fi
# ----- Set local settings -----
if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
fi
THRDPARTY_PATH=""
if [ "$TCL_DIR" != "" ]; then
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "" ]; then
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREETYPE_DIR" != "" ]; then
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREEIMAGE_DIR" != "" ]; then
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TBB_DIR" != "" ]; then
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
fi
if [ "$VTK_DIR" != "" ]; then
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FFMPEG_DIR" != "" ]; then
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "$TCL_DIR" ]; then
if [ "$TK_DIR" != "" ]; then
export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
fi
if [ "$TCL_DIR" != "" ]; then
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
fi
fi
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
fi
if [ "$CSF_OCCTBinPath" != "" ]; then
export PATH="${CSF_OCCTBinPath}:${PATH}"
fi
if [ "$CSF_OCCTLibPath" != "" ]; then
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
fi
fi
if [ "$WOKSTATION" == "mac" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
fi
# ----- Set envoronment variables used by OCCT -----
export CSF_LANGUAGE=us
export MMGT_CLEAR=1
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
# ----- Draw Harness special stuff -----
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
fi
fi
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
# ----- For compatibility with external application using CASROOT -----
if [ "${CASROOT}" == "" ]; then
export CASROOT="@INSTALL_DIR@"
fi
# ----- Define path to 3rdparty products -----
if [ "${THIRDPARTY_DIR}" == "" ]; then
export THIRDPARTY_DIR="@3RDPARTY_DIR@"
fi
# ----- Read script arguments -----
shopt -s nocasematch
export CASDEB="";
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
shopt -u nocasematch
# ----- Set path to 3rd party and OCCT libraries -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
else
export WOKSTATION="lin";
fi
# ----- Set local settings -----
if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
fi
THRDPARTY_PATH=""
if [ "$TCL_DIR" != "" ]; then
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "" ]; then
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREETYPE_DIR" != "" ]; then
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FREEIMAGE_DIR" != "" ]; then
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
fi
if [ "$TBB_DIR" != "" ]; then
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
fi
if [ "$VTK_DIR" != "" ]; then
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
fi
if [ "$FFMPEG_DIR" != "" ]; then
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
if [ "$TK_DIR" != "$TCL_DIR" ]; then
if [ "$TK_DIR" != "" ]; then
export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
fi
if [ "$TCL_DIR" != "" ]; then
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
fi
fi
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
fi
if [ "$CSF_OCCTBinPath" != "" ]; then
export PATH="${CSF_OCCTBinPath}:${PATH}"
fi
if [ "$CSF_OCCTLibPath" != "" ]; then
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
fi
fi
if [ "$WOKSTATION" == "mac" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
fi
# ----- Set envoronment variables used by OCCT -----
export CSF_LANGUAGE=us
export MMGT_CLEAR=1
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
# ----- Draw Harness special stuff -----
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
fi
fi

View File

@@ -1,28 +1,32 @@
@echo off
if exist "%~dp0custom.bat" (
call "%~dp0custom.bat" %1 %2 %3
)
call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
if /I ["%1"] == ["vc141"] set "VCVER=vc141"
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
if ["%CASDEB%"] == [""] (
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
set "LIB_DIR=win%ARCH%\%VCVER%\lib"
)
set "PATH=%~dp0%BIN_DIR%;%PATH%"
if not "%QTDIR%" == "" (
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
set "CSF_ResourcesDefaults=!RES_DIR!"
set "CSF_TutorialResourcesDefaults=!RES_DIR!"
set "CSF_IEResourcesDefaults=!RES_DIR!"
set "PATH=%QTDIR%/bin;%PATH%"
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
)
@echo off
if exist "%~dp0custom.bat" (
call "%~dp0custom.bat" %1 %2 %3
)
call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3
if /I ["%1"] == ["vc141"] set "VCVER=vc141"
if /I ["%1"] == ["vc142"] set "VCVER=vc142"
if /I ["%1"] == ["vc143"] set "VCVER=vc143"
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
if ["%CASDEB%"] == [""] (
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
set "LIB_DIR=win%ARCH%\%VCVER%\lib"
)
set "PATH=%~dp0%BIN_DIR%;%PATH%"
if not "%QTDIR%" == "" (
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
set "CSF_ResourcesDefaults=!RES_DIR!"
set "CSF_TutorialResourcesDefaults=!RES_DIR!"
set "CSF_IEResourcesDefaults=!RES_DIR!"
set "PATH=%QTDIR%/bin;%PATH%"
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
)
set "CSF_OCCTOverviewSampleCodePath=%~dp0..\..\OCCTOverview\code"

View File

@@ -1,22 +1,24 @@
#!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "custom.sh" ]; then
source "custom.sh";
fi
if [ -e "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
source "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh";
fi
if test "${QTDIR}" == ""; then
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
exit 1
fi
host=`uname -s`
export STATION=$host
export RES_DIR=${aSamplePath}/${STATION}/res
export PATH=${QTDIR}/bin:${PATH}
#!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "custom.sh" ]; then
source "custom.sh";
fi
if [ -e "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh" ]; then
source "@INSTALL_DIR_ABSOLUTE@/@INSTALL_DIR_SCRIPT@/env.sh";
fi
if test "${QTDIR}" == ""; then
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
exit 1
fi
host=`uname -s`
export STATION=$host
export RES_DIR=${aSamplePath}/${STATION}/res
export PATH=${QTDIR}/bin:${PATH}
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../OCCTOverview/code"

View File

@@ -3,12 +3,16 @@
# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
aSystem=`uname -s`
# Reset values
export CASROOT="__CASROOT__"
export CASDEB=""
export PRJFMT="";
export HAVE_TBB="false";
export HAVE_OPENCL="false";
export HAVE_TK="true";
export HAVE_FREETYPE="true";
export HAVE_FREEIMAGE="false";
export HAVE_FFMPEG="false";
export HAVE_VTK="false";
@@ -16,9 +20,13 @@ export HAVE_GLES2="false";
export HAVE_ZLIB="false";
export HAVE_LIBLZMA="false";
export HAVE_RAPIDJSON="false";
export HAVE_DRACO="false";
export HAVE_OPENVR="false";
export HAVE_E57="false";
export MACOSX_USE_GLX="false";
export HAVE_XLIB="true";
if [ "$aSystem" == "Darwin" ]; then
export HAVE_XLIB="false";
fi
export CSF_OPT_INC=""
export CSF_OPT_LIB32=""
export CSF_OPT_LIB64=""
@@ -58,7 +66,6 @@ else
export ARCH="64";
fi
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
export ARCH="64";
@@ -100,17 +107,19 @@ export CSF_OPT_CMPL=""
# Optiona 3rd-parties should be enabled by HAVE macros
if [ "$HAVE_TBB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"; fi
if [ "$HAVE_OPENCL" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"; fi
if [ "$HAVE_TK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TK"; fi
if [ "$HAVE_FREETYPE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREETYPE"; fi
if [ "$HAVE_FREEIMAGE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"; fi
if [ "$HAVE_FFMPEG" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FFMPEG"; fi
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2"; fi
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2_EXT"; fi
if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"; fi
if [ "$HAVE_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi
if [ "$HAVE_RAPIDJSON" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_RAPIDJSON"; fi
if [ "$HAVE_DRACO" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_DRACO"; fi
if [ "$HAVE_OPENVR" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENVR"; fi
if [ "$HAVE_E57" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_E57"; fi
# Option to compile OCCT with X11 libs on Mac OS X
if [ "$MACOSX_USE_GLX" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"; fi
if [ "$HAVE_XLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_XLIB"; fi
# To split string into array
aDelimBack=$IFS

View File

@@ -1 +1 @@
@OCCT_HEADER_FILE_CONTENT@
@OCCT_HEADER_FILE_CONTENT@

40
adm/templates/install.bat Normal file
View File

@@ -0,0 +1,40 @@
@echo off
setlocal
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
rem Define path to project file
set "PRJFILE=%~dp0INSTALL.vcxproj"
if "%VCVER%" == "vc8" (
call "%VS80COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc9" (
call "%VS90COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc10" (
call "%VS100COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc11" (
call "%VS110COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc12" (
call "%VS120COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc14" (
call "%VS140COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc141" (
call "%VS141COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc142" (
call "%VS142COMNTOOLS%/vsvars32.bat" > nul
) else if "%VCVER%" == "vc143" (
call "%VS143COMNTOOLS%/vsvars32.bat" > nul
) else (
echo Error: wrong VS identifier
exit /B
)
set BUILDCONFIG=Release
if "%CASDEB%"=="i" set BUILDCONFIG=RelWithDebInfo
if "%CASDEB%"=="d" set BUILDCONFIG=Debug
if "%ARCH%"=="32" set PLATFORM=win32
if "%ARCH%"=="64" set PLATFORM=x64
msbuild "%PRJFILE%" /m /fl /flp:LogFile="install_%BUILDCONFIG%.log" /p:Configuration=%BUILDCONFIG% /p:Platform=%PLATFORM% /p:BuildProjectReferences=false
endlocal

View File

@@ -1,30 +1,30 @@
#include <windows.h>
#include <Standard_Version.hxx>
VS_VERSION_INFO VERSIONINFO
FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#endif
FILEOS VOS_NT
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4)
BEGIN
VALUE "FileDescription", "@PROJECT_NAME@ Toolkit\000"
VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000"
VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000"
VALUE "ProductName", "Open CASCADE Technology\000"
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
VALUE "OfficialSite", "www.opencascade.com\000"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04E4
END
END
#include <windows.h>
#include <Standard_Version.hxx>
VS_VERSION_INFO VERSIONINFO
FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#endif
FILEOS VOS_NT
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4)
BEGIN
VALUE "FileDescription", "@PROJECT_NAME@ Toolkit\000"
VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000"
VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000"
VALUE "ProductName", "Open CASCADE Technology\000"
VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000"
VALUE "OfficialSite", "www.opencascade.com\000"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04E4
END
END

View File

@@ -19,6 +19,7 @@ if ["%1"] == [""] (
echo AndroidQt
echo FuncDemo
echo IESample
echo OCCTOverview
echo Tutorial
PAUSE
exit /B
@@ -35,5 +36,8 @@ if not exist "%EXE_PATH%" (
exit /B
)
rem Set path to location where sample code is installed
set "CSF_OCCTOverviewSampleCodePath=%CSF_OCCTSamplesPath%\OCCTOverview\code"
"%EXE_PATH%"

View File

@@ -8,6 +8,7 @@ if [ "$1" == "" ]; then
echo available samples:
echo FuncDemo
echo IESample
echo OCCTOverview
echo Tutorial
fi
@@ -31,5 +32,7 @@ if [ ! -f "$EXE_PATH" ]; then
exit 1
fi
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/OCCTOverview/code"
cd ${aCurrentPath}
"$EXE_PATH"
"$EXE_PATH"

View File

@@ -1,278 +1,278 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
__UWP_PROPERTIES__
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\obj\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\objd\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\obj\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\objd\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<OutputFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
__VCLNKREL__
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<OutputFile>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<OutputFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
__VCLNKREL__
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<OutputFile>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemGroup>
__FILES__
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="__TKNAM__.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
__UWP_PROPERTIES__
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
<CharacterSet>__VCCHARSET__</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\obj\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\objd\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\obj\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\objd\__TKNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<OutputFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
__VCLNKREL__
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<OutputFile>.\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<OutputFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__TKNAM__.lib</ImportLibrary>
__VCLNKREL__
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<OutputFile>.\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__TKNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__TKNAM__.lib</ImportLibrary>
__UWP_GENERATE_METADATA__
</Link>
</ItemDefinitionGroup>
<ItemGroup>
__FILES__
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="__TKNAM__.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,259 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\obj\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\objd\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\obj\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\objd\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
<AdditionalOptions>/LARGEADDRESSAWARE %(AdditionalOptions)</AdditionalOptions>
__VCLNKREL__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bind\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__XQTNAM__.lib</ImportLibrary>
<AdditionalOptions>/LARGEADDRESSAWARE %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
__VCLNKREL__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bind\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__XQTNAM__.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
__FILES__
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="__XQTNAM__.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>__PROJECT_GUID__</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>__CONF__</ConfigurationType>
<PlatformToolset>__VCVEREXT__</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\win32\__VCVER__\obj\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\win32\__VCVER__\objd\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\win64\__VCVER__\obj\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\bind\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\win64\__VCVER__\objd\__XQTNAM__\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win32\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
<AdditionalOptions>/LARGEADDRESSAWARE %(AdditionalOptions)</AdditionalOptions>
__VCLNKREL__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win32\__VCVER__\bind\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win32\__VCVER__\bind\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win32\__VCVER__\libd\__XQTNAM__.lib</ImportLibrary>
<AdditionalOptions>/LARGEADDRESSAWARE %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>__VCReleasePDB__</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\..\win64\__VCVER__\bin\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\lib\__XQTNAM__.lib</ImportLibrary>
__VCLNKREL__
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>x64</TargetEnvironment>
<TypeLibraryName>.\..\..\..\win64\__VCVER__\bind\__XQTNAM__.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>..\..\..\win64\__VCVER__\bind\__XQTNAM__.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>..\..\..\win64\__VCVER__\libd\__XQTNAM__.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
__FILES__
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="__XQTNAM__.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,160 +1,160 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="__TKNAM__"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bin"
IntermediateDirectory=".\..\..\..\win32\vc7\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\..\..\..\win32\vc7\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc7\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc7\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc7\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc7\lib\__TKNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bin\__TKNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bind"
IntermediateDirectory=".\..\..\..\win32\vc7\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
ManagedExtensions="FALSE"
WholeProgramOptimization="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\win32\vc7\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc7\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc7\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\win32\vc7\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc7\libd\__TKNAM__.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bind\__TKNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
Filter="">
__FILES__
<File RelativePath="__TKNAM__.rc"></File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="__TKNAM__"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bin"
IntermediateDirectory=".\..\..\..\win32\vc7\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\..\..\..\win32\vc7\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc7\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc7\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc7\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc7\lib\__TKNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bin\__TKNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bind"
IntermediateDirectory=".\..\..\..\win32\vc7\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
ManagedExtensions="FALSE"
WholeProgramOptimization="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\win32\vc7\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc7\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc7\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="..\..\..\win32\vc7\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc7\libd\__TKNAM__.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bind\__TKNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
Filter="">
__FILES__
<File RelativePath="__TKNAM__.rc"></File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,152 +1,152 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="__XQTNAM__"
ProjectGUID="{193A5B07-7F8B-4280-9F4E-32D5F326DFC5}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bind"
IntermediateDirectory=".\..\..\..\win32\vc7\objd\__XQTNAM__"
ConfigurationType="__CONF__"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
ObjectFile=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bind\__XQTNAM__.pdb"
SubSystem="1"
ImportLibrary="..\..\..\win32\vc7\libd\__XQTNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bind\__XQTNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bin"
IntermediateDirectory=".\..\..\..\win32\vc7\obj\__XQTNAM__"
ConfigurationType="__CONF__"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
AssemblerListingLocation=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
ObjectFile=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bin\__XQTNAM__.pdb"
SubSystem="1"
ImportLibrary="..\..\..\win32\vc7\lib\__XQTNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bin\__XQTNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="">
__FILES__
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="__XQTNAM__"
ProjectGUID="{193A5B07-7F8B-4280-9F4E-32D5F326DFC5}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bind"
IntermediateDirectory=".\..\..\..\win32\vc7\objd\__XQTNAM__"
ConfigurationType="__CONF__"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
ObjectFile=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\objd\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bind\__XQTNAM__.pdb"
SubSystem="1"
ImportLibrary="..\..\..\win32\vc7\libd\__XQTNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bind\__XQTNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc7\bin"
IntermediateDirectory=".\..\..\..\win32\vc7\obj\__XQTNAM__"
ConfigurationType="__CONF__"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
AssemblerListingLocation=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
ObjectFile=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc7\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\..\win32\vc7\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc7\bin\__XQTNAM__.pdb"
SubSystem="1"
ImportLibrary="..\..\..\win32\vc7\lib\__XQTNAM__.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc7\bin\__XQTNAM__.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="">
__FILES__
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,428 +1,428 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="__TKNAM__"
ProjectGUID="__PROJECT_GUID__"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc8\bin"
IntermediateDirectory=".\..\..\..\win32\vc8\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc8\bin\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win32\vc8\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc8\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc8\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
EnableEnhancedInstructionSet="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc8\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win32\vc8\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc8\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc8\lib\__TKNAM__.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc8\bind"
IntermediateDirectory=".\..\..\..\win32\vc8\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
ManagedExtensions="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc8\bind\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win32\vc8\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc8\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc8\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
EnableEnhancedInstructionSet="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc8\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win32\vc8\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="true"
ProgramDatabaseFile="..\..\..\win32\vc8\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc8\libd\__TKNAM__.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory=".\..\..\..\win64\vc8\bin"
IntermediateDirectory=".\..\..\..\win64\vc8\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win64\vc8\bin\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win64\vc8\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win64\vc8\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win64\vc8\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win64\vc8\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win64\vc8\lib;$(CSF_OPT_LIB64)"
ProgramDatabaseFile=".\..\..\..\win64\vc8\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win64\vc8\lib\__TKNAM__.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\..\..\..\win64\vc8\bind"
IntermediateDirectory=".\..\..\..\win64\vc8\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
ManagedExtensions="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win64\vc8\bind\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win64\vc8\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win64\vc8\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win64\vc8\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win64\vc8\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win64\vc8\libd;$(CSF_OPT_LIB64D)"
GenerateDebugInformation="true"
ProgramDatabaseFile="..\..\..\win64\vc8\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win64\vc8\libd\__TKNAM__.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
>
__FILES__
<File RelativePath="__TKNAM__.rc"></File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="__TKNAM__"
ProjectGUID="__PROJECT_GUID__"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\win32\vc8\bin"
IntermediateDirectory=".\..\..\..\win32\vc8\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc8\bin\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win32\vc8\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc8\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc8\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
EnableEnhancedInstructionSet="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc8\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win32\vc8\lib;$(CSF_OPT_LIB32)"
ProgramDatabaseFile=".\..\..\..\win32\vc8\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc8\lib\__TKNAM__.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\win32\vc8\bind"
IntermediateDirectory=".\..\..\..\win32\vc8\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
ManagedExtensions="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win32\vc8\bind\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win32\vc8\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win32\vc8\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win32\vc8\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
EnableEnhancedInstructionSet="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win32\vc8\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win32\vc8\libd;$(CSF_OPT_LIB32D)"
GenerateDebugInformation="true"
ProgramDatabaseFile="..\..\..\win32\vc8\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win32\vc8\libd\__TKNAM__.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory=".\..\..\..\win64\vc8\bin"
IntermediateDirectory=".\..\..\..\win64\vc8\obj\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win64\vc8\bin\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win64\vc8\obj\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win64\vc8\obj\__TKNAM__/"
ObjectFile=".\..\..\..\win64\vc8\obj\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win64\vc8\bin\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win64\vc8\lib;$(CSF_OPT_LIB64)"
ProgramDatabaseFile=".\..\..\..\win64\vc8\bin\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win64\vc8\lib\__TKNAM__.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\..\..\..\win64\vc8\bind"
IntermediateDirectory=".\..\..\..\win64\vc8\objd\__TKNAM__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
ManagedExtensions="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\win64\vc8\bind\__TKNAM__.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
FloatingPointModel="0"
PrecompiledHeaderFile=".\..\..\..\win64\vc8\objd\__TKNAM__\__TKNAM__.pch"
AssemblerListingLocation=".\..\..\..\win64\vc8\objd\__TKNAM__/"
ObjectFile=".\..\..\..\win64\vc8\objd\__TKNAM__/"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\objd\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\inc;$(CSF_OPT_INC)"
PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)"
Culture="1036"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="__TKDEP__ opengl32.lib ws2_32.lib odbc32.lib odbccp32.lib"
OutputFile=".\..\..\..\win64\vc8\bind\__TKNAM__.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\win64\vc8\libd;$(CSF_OPT_LIB64D)"
GenerateDebugInformation="true"
ProgramDatabaseFile="..\..\..\win64\vc8\bind\__TKNAM__.pdb"
SubSystem="2"
ImportLibrary="..\..\..\win64\vc8\libd\__TKNAM__.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
>
__FILES__
<File RelativePath="__TKNAM__.rc"></File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Some files were not shown because too many files have changed in this diff Show More