Compare commits
1128 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
82b4c24940 | ||
|
32d5cd7b98 | ||
|
7f2debb25f | ||
|
80eb96707a | ||
|
c088aa932f | ||
|
46c99a694f | ||
|
db348d8c53 | ||
|
93e572caa0 | ||
|
49cfd13dca | ||
|
2fa97a4304 | ||
|
2dc8b7cc5b | ||
|
947085567f | ||
|
2caff0b32f | ||
|
e3573bb9ec | ||
|
c827ea3a68 | ||
|
00ea319b16 | ||
|
f3fb84ce21 | ||
|
18006a0f10 | ||
|
b350f6ee1e | ||
|
2958244411 | ||
|
2c5b6d9c12 | ||
|
a806787bd6 | ||
|
5e5ce65be4 | ||
|
6fb3418ea1 | ||
|
0797d9d30a | ||
|
a507ffd9d7 | ||
|
3edc7eea42 | ||
|
dbf0485ef0 | ||
|
43dbdb15db | ||
|
3908084224 | ||
|
e98e39903b | ||
|
05e2200bbf | ||
|
524a5f7aa7 | ||
|
1ccc9700f8 | ||
|
2b111fe8ba | ||
|
db91484119 | ||
|
02effd356b | ||
|
b858a6984e | ||
|
32c3693332 | ||
|
6e953e43f6 | ||
|
3798da68bc | ||
|
2da38dd24c | ||
|
fcc61cc4c9 | ||
|
4084fb643c | ||
|
db4d439c8f | ||
|
1eaf1cc1dc | ||
|
e1aa24d84b | ||
|
a0c202521d | ||
|
032d027214 | ||
|
50d0e1cefd | ||
|
67e36f0c7a | ||
|
1c9d151726 | ||
|
09f5e48e01 | ||
|
28746337be | ||
|
afbdee68fa | ||
|
5e6a855aa9 | ||
|
9256a43d09 | ||
|
7a13ab2df1 | ||
|
ac730776d8 | ||
|
903f7584b8 | ||
|
09c597c998 | ||
|
8591531065 | ||
|
905428003c | ||
|
7c58a2abc0 | ||
|
75827e7628 | ||
|
3fb72902ea | ||
|
876d1f2a2c | ||
|
0cc44c4730 | ||
|
e21b2bc603 | ||
|
3415763e74 | ||
|
0e0f7a7cde | ||
|
ba9e14dfb9 | ||
|
191082ac71 | ||
|
a69a08ee9e | ||
|
5e452c37ee | ||
|
86766b0ee0 | ||
|
bc67757515 | ||
|
40f70ac929 | ||
|
25ef750e44 | ||
|
f82a9555dc | ||
|
ed06327034 | ||
|
e1cbc34c5f | ||
|
196b01482b | ||
|
ba4feb7629 | ||
|
0644bfa483 | ||
|
4292bee12a | ||
|
83a8694888 | ||
|
aefdc31bf0 | ||
|
a520f6eb9a | ||
|
9e20ed5793 | ||
|
63c629aa3a | ||
|
7aa1b65c2a | ||
|
54a16ee447 | ||
|
058f130eff | ||
|
01d5be80b8 | ||
|
6d17debbe9 | ||
|
94dea18e8b | ||
|
6262a3032c | ||
|
5203f74183 | ||
|
4691b61a72 | ||
|
2a2e3ecdc7 | ||
|
d46546cdcd | ||
|
f0ecc0cc24 | ||
|
5b37e9d143 | ||
|
8e1e79f052 | ||
|
7d9e854bdc | ||
|
c60370656c | ||
|
256f9ac0ad | ||
|
2c2cebb3f7 | ||
|
eb46b12346 | ||
|
ab860031bd | ||
|
2bc75a1bce | ||
|
e3709f1d0a | ||
|
ab91ab6fea | ||
|
fcf15f5ca3 | ||
|
15534713ba | ||
|
2ab7a755c2 | ||
|
09711f3720 | ||
|
beb18c1f6e | ||
|
d81101039f | ||
|
de6f281fe9 | ||
|
4a350f9410 | ||
|
e2fd181c29 | ||
|
432a8df015 | ||
|
6e24232219 | ||
|
fb4b684a95 | ||
|
b6d587e35a | ||
|
519b544671 | ||
|
ab1469893c | ||
|
3910bc6501 | ||
|
4716247158 | ||
|
679d38788d | ||
|
0ef61b502b | ||
|
3a7a70135c | ||
|
30d33e7141 | ||
|
cca0f261aa | ||
|
39ef94f8f5 | ||
|
61aa7f3d3c | ||
|
cddbf6a985 | ||
|
a0fc422a3a | ||
|
50b830a09b | ||
|
ada5f62195 | ||
|
c7ccbb77a0 | ||
|
9df7f42944 | ||
|
848fa7e315 | ||
|
d9ff84e8ea | ||
|
d3dfddaebc | ||
|
8625ef7e94 | ||
|
25b97fac40 | ||
|
6b62b2da81 | ||
|
fe551aef6c | ||
|
8316c618a4 | ||
|
9c0b61f308 | ||
|
735dc1d26e | ||
|
0499eb0670 | ||
|
52d4584155 | ||
|
8e7c8ccf3a | ||
|
c19dd45ee0 | ||
|
1c1e319d1e | ||
|
e322db461d | ||
|
d32dc118f1 | ||
|
a6844d20f1 | ||
|
01a7df1b18 | ||
|
973001bfce | ||
|
008297e1e8 | ||
|
476e84b169 | ||
|
868dbdbae4 | ||
|
8e8070c47d | ||
|
59427cbc91 | ||
|
92ae0f2fe3 | ||
|
7277133aa9 | ||
|
c1e18dd843 | ||
|
ceb418e13f | ||
|
709e97a0c1 | ||
|
ec661e4333 | ||
|
f99b44099f | ||
|
f1c9c9d76b | ||
|
d2388a818c | ||
|
7a8c6a36e6 | ||
|
b89b1e0816 | ||
|
d538d7a221 | ||
|
d8726c7c6b | ||
|
ca3c13d1e8 | ||
|
7dc9a40776 | ||
|
a2ca2a304f | ||
|
0d1b4a2271 | ||
|
d780e37a83 | ||
|
4f93349381 | ||
|
5792217118 | ||
|
71598a83cd | ||
|
07dd6e9bee | ||
|
59af51e3c1 | ||
|
53f532f5ed | ||
|
3e594885aa | ||
|
d33222c108 | ||
|
a9b30f0acb | ||
|
d804b26d77 | ||
|
ba4181452c | ||
|
955b3e7102 | ||
|
418864aea1 | ||
|
eaf5c5e010 | ||
|
c1c03615f6 | ||
|
34028c1ff3 | ||
|
de10d8b144 | ||
|
9bf6baed3c | ||
|
aaf512f112 | ||
|
7d3e64ef5e | ||
|
9f33b387e2 | ||
|
8aeeca44df | ||
|
4e18052b7d | ||
|
1521659a7d | ||
|
9ffd84adf5 | ||
|
6303cb1205 | ||
|
963532f8a2 | ||
|
b353b9b435 | ||
|
f6d08024e1 | ||
|
a347ef35b4 | ||
|
0179bbc641 | ||
|
6aa39ac3ad | ||
|
53c888d174 | ||
|
7cf07fa506 | ||
|
e6cd097703 | ||
|
3e9b53cbf9 | ||
|
24b40f605a | ||
|
52f99d93a9 | ||
|
913a4c4ab0 | ||
|
1ffd3d70c2 | ||
|
2bd4bfac0d | ||
|
6e0fd076ae | ||
|
1e2fb24474 | ||
|
d9bd2bf756 | ||
|
03155c18a5 | ||
|
71b73fde24 | ||
|
1f205411c1 | ||
|
66190a47bb | ||
|
189062565f | ||
|
31cf9c5f7d | ||
|
2a78ec6a07 | ||
|
a315743983 | ||
|
0bd2a43ff5 | ||
|
0717ddc132 | ||
|
e3e895af61 | ||
|
10b9c7dfc0 | ||
|
4769a39529 | ||
|
6da50d2610 | ||
|
fd0344601b | ||
|
17d84c0ae8 | ||
|
ecc4f1489d | ||
|
d15f387afa | ||
|
eab2c8518e | ||
|
bedd79c434 | ||
|
8a8be2aabe | ||
|
38deba5d7f | ||
|
d91b3986ed | ||
|
73920cd481 | ||
|
95a2cf2f74 | ||
|
a967f10410 | ||
|
fc88faf18a | ||
|
1d33d22bd7 | ||
|
10ee997695 | ||
|
21678ea94a | ||
|
1ba5bcdc40 | ||
|
da8bb41da6 | ||
|
aeb722e31a | ||
|
53b15292f1 | ||
|
0304f71151 | ||
|
72b11796c5 | ||
|
c398b00ed8 | ||
|
5b98e25d8e | ||
|
7a76337e89 | ||
|
5a89733fd4 | ||
|
1951a27c98 | ||
|
de9a2842e1 | ||
|
6d1dc3e82c | ||
|
5402ccdda6 | ||
|
353474f083 | ||
|
616d8d0a78 | ||
|
2d7b28ac98 | ||
|
bc02c7cab1 | ||
|
576f8b111b | ||
|
9d0fc01b3f | ||
|
ffc26091ca | ||
|
2961777a50 | ||
|
f07434e2cc | ||
|
e4b5c45aa6 | ||
|
870722965d | ||
|
9a05760b6b | ||
|
5435450fc5 | ||
|
6a442250c4 | ||
|
1fa7cb8c3a | ||
|
8e007da7af | ||
|
d4f1753b9c | ||
|
37ac4a67fc | ||
|
14434f3e6c | ||
|
846c92e0f5 | ||
|
9cc773b5ad | ||
|
0e330c8cf5 | ||
|
7d7ddef39f | ||
|
16aec6a441 | ||
|
95f8573c29 | ||
|
2df4b1d33d | ||
|
ac83e94f8b | ||
|
c67cd62ecf | ||
|
cd7c40f5af | ||
|
113493b0f1 | ||
|
5a44311151 | ||
|
797d11c6f5 | ||
|
6bc6a6fc07 | ||
|
9dba391d4c | ||
|
f29db51421 | ||
|
c308fbd7c7 | ||
|
90cdb15d4a | ||
|
214df550f6 | ||
|
ecc1d911d1 | ||
|
a7b491fc50 | ||
|
8d3f219f5d | ||
|
3c64852756 | ||
|
0272e74033 | ||
|
347423b2c2 | ||
|
fe9fc66996 | ||
|
2a40d51c15 | ||
|
7ed22e71e0 | ||
|
d4d12e8b20 | ||
|
9a148b08df | ||
|
1aa6b1c9e2 | ||
|
87f42a3fb6 | ||
|
a987c2f484 | ||
|
fc9b36d630 | ||
|
b6c0b841ec | ||
|
a9568545f1 | ||
|
74618acf3d | ||
|
ebfb9ce298 | ||
|
01a6e62bc2 | ||
|
0e9d3b83b8 | ||
|
595a42a43f | ||
|
069eca4f44 | ||
|
d58d4282a6 | ||
|
8106f9bc2c | ||
|
dbe51192a3 | ||
|
9f2e7daaa9 | ||
|
0d4e350159 | ||
|
9cbe629085 | ||
|
1e07a0faf2 | ||
|
e6087fad55 | ||
|
5493d33411 | ||
|
5b14f80036 | ||
|
a89742cf17 | ||
|
8d3865d870 | ||
|
89e5391a31 | ||
|
57ad5cbd5d | ||
|
0a36ca0a40 | ||
|
623c29a5b6 | ||
|
aade732dda | ||
|
c9fb852983 | ||
|
b1574471ff | ||
|
75c5def578 | ||
|
af4b4ba9e5 | ||
|
465d1fba7c | ||
|
2d2aa6f1a6 | ||
|
b7cd4ba795 | ||
|
c1c1aefa71 | ||
|
2c5643b6a7 | ||
|
31c0e2194e | ||
|
7bbe90f2a7 | ||
|
7d0496dd6d | ||
|
e01907f12a | ||
|
9bdafcbe2d | ||
|
0ae61cf3b3 | ||
|
44a87d6967 | ||
|
a060129f78 | ||
|
f49c31097c | ||
|
0c67424831 | ||
|
acbb658afe | ||
|
e9216c6acf | ||
|
8bcb4f55cc | ||
|
26e17b5721 | ||
|
e3a6386d18 | ||
|
655fddc854 | ||
|
a4e383e1b8 | ||
|
f284355851 | ||
|
36f4947b8d | ||
|
9b0fb8cdd0 | ||
|
c764e804ba | ||
|
5e5b6f81c1 | ||
|
3a01a933af | ||
|
ddf2fe8eeb | ||
|
598fcce93c | ||
|
774d889744 | ||
|
2ad228f691 | ||
|
16c7b64236 | ||
|
8696d65d2c | ||
|
dc244065a9 | ||
|
9fae8c7367 | ||
|
f379643fc0 | ||
|
2fe0e897e3 | ||
|
79a35943dd | ||
|
574d723693 | ||
|
70167e6982 | ||
|
ff8178ef85 | ||
|
bdd1223f46 | ||
|
69b43824ac | ||
|
1e143abba6 | ||
|
68bd84a5f0 | ||
|
d92035598f | ||
|
ab58a62baa | ||
|
2a54ebbf29 | ||
|
cae42e78e5 | ||
|
b6a21c7e6d | ||
|
6e33d3ced2 | ||
|
99c68ea35f | ||
|
c7ac7603b0 | ||
|
bc8c79bbd5 | ||
|
dc9ef964d2 | ||
|
4bc0bb8ab1 | ||
|
3ae590318e | ||
|
f56518cdbe | ||
|
59495dbe8a | ||
|
0734c53d68 | ||
|
f1baf495b6 | ||
|
945c35291e | ||
|
48cc825e83 | ||
|
5ad539d2e0 | ||
|
0e93d9e5b8 | ||
|
63def8e679 | ||
|
6268cc68d7 | ||
|
011b361de5 | ||
|
1ee621b661 | ||
|
8e81749770 | ||
|
c471a1ba18 | ||
|
16a1f26537 | ||
|
72952ef2b8 | ||
|
3f5bebe804 | ||
|
8581b51995 | ||
|
76e9222246 | ||
|
7b3ce7dc84 | ||
|
44c7c33eb0 | ||
|
013a854956 | ||
|
29d778bf16 | ||
|
004e846676 | ||
|
4bbaf12b67 | ||
|
97385d6142 | ||
|
a096a7a58a | ||
|
fab29dc11a | ||
|
9efc0d1470 | ||
|
a34f083b8c | ||
|
6421543502 | ||
|
b1a3427054 | ||
|
c2a388f884 | ||
|
6a43d224e4 | ||
|
82fc327c7d | ||
|
7ccd27ca04 | ||
|
e97a6598fe | ||
|
18f4e8e28d | ||
|
eb1ebea490 | ||
|
fc8eab5e09 | ||
|
550f3b8b22 | ||
|
372ceec4ce | ||
|
7389f96df0 | ||
|
54f7544df6 | ||
|
6af4fe1c46 | ||
|
bd2de3965e | ||
|
3125ebb6f3 | ||
|
b439bc5856 | ||
|
73192b3746 | ||
|
db3cb1cede | ||
|
5546828378 | ||
|
c26b5a34bc | ||
|
85bcc07243 | ||
|
66fb4d9a40 | ||
|
21761b6feb | ||
|
1a25084d99 | ||
|
242da3e5ef | ||
|
32856b630d | ||
|
33839ae65b | ||
|
b8d1c74226 | ||
|
74be04cbbf | ||
|
7719318359 | ||
|
a73267f24b | ||
|
86b03c9774 | ||
|
bf4bf038c8 | ||
|
5ec5d80d0e | ||
|
69b558c435 | ||
|
7759e404df | ||
|
d8a24e8394 | ||
|
53ca691b7b | ||
|
475604b446 | ||
|
276130e701 | ||
|
a874a4a076 | ||
|
790a8bbcbf | ||
|
857ffd5e57 | ||
|
6fc9d72d9d | ||
|
9a86ffeb7e | ||
|
a743e2e5e8 | ||
|
6092c0c8c4 | ||
|
2a62d88323 | ||
|
5c08e1988c | ||
|
819f58c71f | ||
|
c29a9290af | ||
|
26fd0d96ea | ||
|
5dc2ede9ad | ||
|
871fa1038d | ||
|
c002793be1 | ||
|
f18ccc8cd6 | ||
|
46aed280cc | ||
|
e28d7e62f9 | ||
|
31249d1967 | ||
|
a20983607c | ||
|
8620e18d6e | ||
|
d7515f9afb | ||
|
2cb4424136 | ||
|
c5751993f2 | ||
|
1a457208fe | ||
|
77906c4cef | ||
|
4ee1bdf4e9 | ||
|
828fb3291f | ||
|
4fc7830275 | ||
|
ca0c0b11ac | ||
|
927513c009 | ||
|
f62de37212 | ||
|
84c71f29e4 | ||
|
ea095e0edb | ||
|
e30616a780 | ||
|
ba06f8bbee | ||
|
87696ff746 | ||
|
622d7f53f5 | ||
|
d41f6af3f2 | ||
|
91720fc5f3 | ||
|
90e82f7007 | ||
|
aa74e2352f | ||
|
0e4e12407f | ||
|
d01cc61d44 | ||
|
65812bd0e4 | ||
|
e6c9f595cf | ||
|
3c15cf3d8b | ||
|
5cff985ad0 | ||
|
762b6cecec | ||
|
11500a8529 | ||
|
ced8e75119 | ||
|
f58f9b92cb | ||
|
0fbfbd6029 | ||
|
fbdb9e838c | ||
|
1cc4346c77 | ||
|
fc73a20256 | ||
|
54e37688ef | ||
|
578ce4bebf | ||
|
0b85f9a605 | ||
|
e2065c2fb9 | ||
|
424cd6bb64 | ||
|
4a6165733f | ||
|
c858bb1084 | ||
|
acc625609d | ||
|
ad3217cd8d | ||
|
8abada55ca | ||
|
7da5f7b1c2 | ||
|
a0a3f6aca4 | ||
|
c0ade4c610 | ||
|
544da5a477 | ||
|
af324faa80 | ||
|
4349c10e18 | ||
|
80db570166 | ||
|
dd8f1b191b | ||
|
900f72291b | ||
|
2cb0e21313 | ||
|
b64d84be99 | ||
|
6b1fe48c8a | ||
|
9ba2c30f1a | ||
|
b9cd9e62c3 | ||
|
07b5cb8f23 | ||
|
15173a087b | ||
|
3497d55234 | ||
|
505abfb89f | ||
|
ca1028006d | ||
|
30194ce331 | ||
|
bbd47d8f35 | ||
|
a104bb8fe2 | ||
|
04f7bd75e3 | ||
|
0a58bfe2c3 | ||
|
630ab8c7fe | ||
|
e6804ff7c0 | ||
|
1704c57631 | ||
|
47cbf13472 | ||
|
ebc93ae74f | ||
|
df80c6ddda | ||
|
65b88edb4b | ||
|
b56dd33fbd | ||
|
9873027959 | ||
|
679ecdeeac | ||
|
01ca42b2c1 | ||
|
228de226a1 | ||
|
d399d3c36b | ||
|
91b16a64ca | ||
|
5432891550 | ||
|
b4747b2976 | ||
|
785a954097 | ||
|
0d19eb340e | ||
|
fa84b8ffc4 | ||
|
9764ccbb78 | ||
|
7c8090aa6c | ||
|
be8d29f50a | ||
|
63bcc44896 | ||
|
3dfe95cdb9 | ||
|
34db9c0093 | ||
|
2cd138b878 | ||
|
cb389a77e4 | ||
|
519d35d81e | ||
|
db71702d4b | ||
|
971c281b11 | ||
|
3d68eaf52b | ||
|
67335dfc1e | ||
|
f8eb9b179e | ||
|
197ac94e72 | ||
|
e618b52683 | ||
|
d16b64f1ec | ||
|
a942f2da6a | ||
|
decdfc9499 | ||
|
b92f35729a | ||
|
f10da91dab | ||
|
5064550f11 | ||
|
93cb31a607 | ||
|
8e3ebc7a63 | ||
|
f376ac72de | ||
|
d53ae65f65 | ||
|
62684c43f6 | ||
|
d5c3f40613 | ||
|
f8c8ba7a6d | ||
|
938bb74003 | ||
|
bf12f0763e | ||
|
ca2edbb237 | ||
|
89f18cb939 | ||
|
67e1d45b60 | ||
|
bf5b529346 | ||
|
49663e13f0 | ||
|
ca0f3082a0 | ||
|
e8181411e6 | ||
|
d4faf9e945 | ||
|
c5face6f3a | ||
|
cc88c2f65b | ||
|
1d18c75e70 | ||
|
6f31882ada | ||
|
e16f61a62f | ||
|
362dec17cf | ||
|
1896126e35 | ||
|
03e04ead37 | ||
|
6a240ff87d | ||
|
7eb732b683 | ||
|
ecba6de3cc | ||
|
d5f74e42d6 | ||
|
9bd37e127c | ||
|
7075ef95b6 | ||
|
69fd2d1b53 | ||
|
12fc400cf8 | ||
|
45f8c99462 | ||
|
01ee00d90b | ||
|
1b7602c84a | ||
|
02fe718cde | ||
|
c2c2f2b62c | ||
|
8bb96a9760 | ||
|
5495fa7e65 | ||
|
816d03eef3 | ||
|
6b371aa564 | ||
|
f52d1b53c4 | ||
|
af203d549a | ||
|
3b010a7435 | ||
|
8cb69787f2 | ||
|
feb2743f11 | ||
|
97f7a9d875 | ||
|
38e756a1f1 | ||
|
eb77c7dbd2 | ||
|
5291af9fd3 | ||
|
50ba108c2a | ||
|
4abae870a8 | ||
|
dda67c1ca2 | ||
|
eddb9c7c00 | ||
|
00302ba4e7 | ||
|
ec0cdc0e65 | ||
|
5322131bd1 | ||
|
f1a5afa25c | ||
|
124021462e | ||
|
8b1ad7e012 | ||
|
ee7b5544a9 | ||
|
3c946c3825 | ||
|
8a6db25a62 | ||
|
e226a50679 | ||
|
6788f42398 | ||
|
a5deedd07b | ||
|
d77256d181 | ||
|
682c9d0682 | ||
|
51f8f60c7a | ||
|
be7c077ac5 | ||
|
f38896916f | ||
|
a86d3ec04b | ||
|
091232bae7 | ||
|
265d4508bd | ||
|
05d7de534a | ||
|
82e10785dd | ||
|
b5ac8292b0 | ||
|
1190746b3c | ||
|
4d9421a970 | ||
|
545ef510a7 | ||
|
3804f298a1 | ||
|
cb78155f10 | ||
|
73ccc151fd | ||
|
861a7b03e1 | ||
|
c5d477170e | ||
|
200ed75578 | ||
|
9278cd60ac | ||
|
3c4e78f24f | ||
|
68333c8f16 | ||
|
3b1817a9e2 | ||
|
fd03ee4b3b | ||
|
504a896866 | ||
|
191478a581 | ||
|
e92240458e | ||
|
561ea68e96 | ||
|
513d3443c7 | ||
|
e3096decb6 | ||
|
bb0e6b9bcb | ||
|
a3ef6605e0 | ||
|
18d25b93a6 | ||
|
c8ea5b8e3f | ||
|
e89e2d67ba | ||
|
db8e4b9aa6 | ||
|
15cea4ef7a | ||
|
7e7c2f0b6f | ||
|
b3a7aa39a1 | ||
|
96a95605cd | ||
|
b467a87036 | ||
|
5640d65355 | ||
|
6aca4d3977 | ||
|
7eed5d29a9 | ||
|
547702a15d | ||
|
b24ac89262 | ||
|
b7357c8b55 | ||
|
6a866b3268 | ||
|
9c06009aa5 | ||
|
ceaa5e27eb | ||
|
859f26ae84 | ||
|
a24c75d908 | ||
|
12a45e038f | ||
|
c5a855f8b5 | ||
|
b5eb716691 | ||
|
30ecd5f8bf | ||
|
5a07b8e1c4 | ||
|
47d9074abb | ||
|
480bf81e37 | ||
|
973c2be1e1 | ||
|
3693361422 | ||
|
4a0c5c25a4 | ||
|
a0726e55a7 | ||
|
38fd051164 | ||
|
243fc66226 | ||
|
5396d9ca17 | ||
|
4e7bb26301 | ||
|
60bf98ae02 | ||
|
e04db19958 | ||
|
de88958f6e | ||
|
7551feda20 | ||
|
4efafd1f3a | ||
|
0c4033b4d1 | ||
|
0adbd30f1d | ||
|
0794c042bd | ||
|
0929d0ef20 | ||
|
fe83e1ea69 | ||
|
73cd8a8afd | ||
|
6bf1bdbd22 | ||
|
eef7fc6447 | ||
|
6c7ddf00ce | ||
|
44d7c4080a | ||
|
9e8804b6db | ||
|
b3837d74e0 | ||
|
ef2d8af761 | ||
|
d4a2c5155a | ||
|
94218044fe | ||
|
12c76beeb0 | ||
|
89c4bca846 | ||
|
52e6db9d8a | ||
|
7470608360 | ||
|
dd21889ecf | ||
|
2e9fd4bc0d | ||
|
75259fc556 | ||
|
9f37b47ddd | ||
|
32b6a53fd8 | ||
|
5cc18856ae | ||
|
566f84411f | ||
|
ebeff0a2bc | ||
|
c4edd925fd | ||
|
941a7a240c | ||
|
f823def059 | ||
|
b3cb7aa21b | ||
|
0221b126ee | ||
|
2bc29cdf9e | ||
|
408e0d5cf1 | ||
|
d04f068b7f | ||
|
142a761f11 | ||
|
0f8c0fb8c8 | ||
|
1d7ca641c7 | ||
|
d7bffd44ea | ||
|
938d454409 | ||
|
62b6361a46 | ||
|
725ef85e1e | ||
|
4889b44e3e | ||
|
de09d2a2a0 | ||
|
e5b32824c4 | ||
|
659b232a7c | ||
|
51b10cd466 | ||
|
28cec2ba3e | ||
|
3cb19cf162 | ||
|
aa094b3e6e | ||
|
5c573e69d3 | ||
|
95eef64da2 | ||
|
b92a64cc68 | ||
|
d5af86261d | ||
|
bf62b306ab | ||
|
f6e968a70e | ||
|
10173e7f92 | ||
|
668c2575c8 | ||
|
df32346f5f | ||
|
bb27b80720 | ||
|
234e52be90 | ||
|
ad211ad33b | ||
|
01eaf6549b | ||
|
64c759f898 | ||
|
f85399e5df | ||
|
c90e941f78 | ||
|
4fe9ad57df | ||
|
79d580f2ea | ||
|
f9032cf2ee | ||
|
4058ef10a9 | ||
|
62afa5c9e0 | ||
|
8b0857f8c0 | ||
|
e1b0e44248 | ||
|
ed8cad74ad | ||
|
74f5f8df5d | ||
|
c24d401753 | ||
|
e79a94b9a5 | ||
|
23b894f730 | ||
|
7893b2faf8 | ||
|
e5bd0d984c | ||
|
38962ba6f3 | ||
|
6a0964c23e | ||
|
821edd22a9 | ||
|
1238134135 | ||
|
e91d202a72 | ||
|
262bf46d18 | ||
|
9293178ba0 | ||
|
aa65144716 | ||
|
543f0db099 | ||
|
05dd08ce63 | ||
|
765b3e07de | ||
|
08060d8851 | ||
|
dba69de2f0 | ||
|
4df5470212 | ||
|
7ae4a3072a | ||
|
392ac9808e | ||
|
65993a9537 | ||
|
618d8e6135 | ||
|
47afc36788 | ||
|
0eb6f69ba3 | ||
|
4e3aa6b76e | ||
|
b794b14197 | ||
|
6a7ca55848 | ||
|
78c66ef1c9 | ||
|
a6eb515f9d | ||
|
7c633a3eab | ||
|
e276548b09 | ||
|
008aef40eb | ||
|
2b3ac0cf2d | ||
|
06c13a57cf | ||
|
9f6931fb8a | ||
|
ec2eeb2dfa | ||
|
d0cc1cb7e0 | ||
|
be6e564e79 | ||
|
f24125b9e5 | ||
|
9447f91258 | ||
|
429a6c4d2c | ||
|
aa4b5679ca | ||
|
d1a2fee8ed | ||
|
c4a8a6bb7b | ||
|
bd0b3e6097 | ||
|
796a784d36 | ||
|
426dc099e9 | ||
|
bf6acfe656 | ||
|
bc228f7757 | ||
|
61043d3fe7 | ||
|
465d1a2c7e | ||
|
6699377892 | ||
|
30f0ad2866 | ||
|
30bf45dc70 | ||
|
fd4a696350 | ||
|
ab2db9a59e | ||
|
14b04bd216 | ||
|
78fdb3d3fe | ||
|
2f6cb3ac69 | ||
|
84f4830127 | ||
|
62f225930c | ||
|
8da5fb19a9 | ||
|
37e640d5bd | ||
|
3054a9f4df | ||
|
b0bd9ad0c6 | ||
|
72b7576f48 | ||
|
4d42a1a548 | ||
|
b70bbe5845 | ||
|
2bc5e8f1e0 | ||
|
199416879d | ||
|
6ff736d802 | ||
|
8fa64b522f | ||
|
1da5279e08 | ||
|
af4e6dabcb | ||
|
2b21c64155 | ||
|
f933f9cf88 | ||
|
a55f92813e | ||
|
b859a34d22 | ||
|
cbf1862449 | ||
|
8be24f106b | ||
|
fc73450dcd | ||
|
d20d815bbe | ||
|
012d92b631 | ||
|
617cf08207 | ||
|
11fca7c177 | ||
|
fcdbe2010e | ||
|
9be3a89476 | ||
|
0e09ee8ee5 | ||
|
eb7c351adf | ||
|
229c0b6a3b | ||
|
b514beda8a | ||
|
c63628e845 | ||
|
1c9cffdb4b | ||
|
830d849f94 | ||
|
f92826ebaa | ||
|
8335fd2061 | ||
|
367988e89c | ||
|
c74961a0e1 | ||
|
bcb1adc56d | ||
|
4798010403 | ||
|
1665a85a84 | ||
|
7c4e9501b4 | ||
|
b1c5c4e6a6 | ||
|
59fcbcaeaa | ||
|
89d8607f13 | ||
|
91bb31f35e | ||
|
3cb77da46e | ||
|
9d1c5188ae | ||
|
b2197f9397 | ||
|
eb4320f2d9 | ||
|
3ed30348aa | ||
|
d9ec7d1d09 | ||
|
09126f1631 | ||
|
aeaf53d5ed | ||
|
42ff8f5bd3 | ||
|
acccace3fb | ||
|
b045e6a40b | ||
|
cccf81ea2a | ||
|
b4109929d6 | ||
|
abe4607711 | ||
|
e4b1d802ad | ||
|
198753532d | ||
|
7dc9e04716 | ||
|
b62b3e079f | ||
|
c884a2681d | ||
|
8b381bc3a3 | ||
|
0ebaa4dbc9 | ||
|
e97ea58f01 | ||
|
4269bd1b11 | ||
|
788cbaf4c4 | ||
|
bb58e462ad | ||
|
c7a422d893 | ||
|
c7b6656812 | ||
|
5d99f2c887 | ||
|
295cb05393 | ||
|
74d80fb976 | ||
|
b6abaec0c8 | ||
|
258ff83bb6 | ||
|
eafb234bf1 | ||
|
105aae761e | ||
|
498ce76bde | ||
|
39aac5778a | ||
|
d5aedb2c6d | ||
|
3cdfdc9a2b | ||
|
6dc54e56bf | ||
|
b569f2a3ba | ||
|
4552136784 | ||
|
18e8557466 | ||
|
5a29f57e9b | ||
|
45e81bbf67 | ||
|
f23d022c2f | ||
|
75262f0647 | ||
|
b58dfc5e92 | ||
|
f01a69c8c7 | ||
|
744511c845 | ||
|
a577aaabf9 | ||
|
aabe3a17dd | ||
|
08398024d0 | ||
|
e9b037efd2 | ||
|
58655684c0 | ||
|
5e1e45fc69 | ||
|
4355f260b0 | ||
|
0f180c0c18 | ||
|
c151c0f1f5 | ||
|
b45c727b8d | ||
|
8b7c5e4715 | ||
|
22774b6295 | ||
|
6f005d2afc | ||
|
1d47d8d066 | ||
|
99d99a6db2 | ||
|
29cb310ae9 | ||
|
80cd454f1d | ||
|
d3c5411b48 | ||
|
cc9d78dbca | ||
|
d2d893b809 | ||
|
b28e7cc6d1 | ||
|
6f94f1dff9 | ||
|
f4ea2ca675 | ||
|
7dcac1dfa0 | ||
|
602952413f | ||
|
1da6ad3265 | ||
|
d390b16690 | ||
|
128dba6fb7 | ||
|
4e18e72a22 | ||
|
7ff8f0197e | ||
|
72e88cf7a8 | ||
|
fa13a85d92 | ||
|
8263fcd384 | ||
|
673693f1cf | ||
|
773f53f1ec | ||
|
304c45c83f | ||
|
55f1e74d75 | ||
|
fdabc2117e | ||
|
a9e4846fe4 | ||
|
63fb818eb7 | ||
|
440906ef6a | ||
|
66deda1eea | ||
|
da0e82aac3 | ||
|
efef9da8e5 | ||
|
35e08fe886 | ||
|
92a4955951 | ||
|
cf6625bdc6 | ||
|
ee9451aba5 | ||
|
fa748d099f | ||
|
95978b2851 | ||
|
381a6d0e99 | ||
|
a44902efd1 | ||
|
03c69aec69 | ||
|
d3f26155b5 | ||
|
c1746a0ac9 | ||
|
9733d9b31b | ||
|
f7e3c52fcc | ||
|
302f96fb0d | ||
|
a8195d65ba | ||
|
96a85238fb | ||
|
64531d9c98 | ||
|
bda8360543 | ||
|
97acf541ac | ||
|
c1fe53c64e | ||
|
388fc344c9 | ||
|
1145e2bc72 | ||
|
4bee43a928 | ||
|
9c9a29ea5c | ||
|
093bfc493b | ||
|
b20eeb13fe | ||
|
e656bcbe59 | ||
|
afed7fd721 | ||
|
03679c4858 | ||
|
404d419daa | ||
|
9d109e39c2 | ||
|
166d6cd76a | ||
|
3f4689a163 | ||
|
5549deff05 | ||
|
d42d186778 | ||
|
c8c37c2879 | ||
|
3f65725b8b | ||
|
d7223c763e | ||
|
8ba3c5e073 | ||
|
6e88a46c01 | ||
|
8405834525 | ||
|
799e449136 | ||
|
3f16d97046 | ||
|
f03671a0c4 | ||
|
3830895866 | ||
|
32ca7a5106 | ||
|
71797c62f1 | ||
|
18d715bde0 | ||
|
da8536ad43 | ||
|
c5e9fb8bad | ||
|
85c44a05a0 | ||
|
fee4fa0f01 | ||
|
bd0c22ce9f | ||
|
310659466b | ||
|
bbf847ad1b | ||
|
c6df241cea | ||
|
a9926dd8dd | ||
|
f8fc2b2a2d | ||
|
04cbc9d384 | ||
|
470ebb43f2 | ||
|
a0f8845f56 | ||
|
80482e0178 | ||
|
1ef32e96ee | ||
|
416d012709 | ||
|
20b1ae2c3c | ||
|
034b4775dc | ||
|
eb57b012e8 | ||
|
8fd76287f8 | ||
|
f404c5c215 | ||
|
c15398ab70 | ||
|
f7b4312f04 | ||
|
5a77460e4a | ||
|
6a7d83c480 | ||
|
f14190252b | ||
|
8b7c9cb469 | ||
|
d633fd7069 | ||
|
db56cc2d24 | ||
|
2a141d40f0 | ||
|
ac4aaa9821 | ||
|
ab87e6fc2e | ||
|
ac29d56ac7 | ||
|
12f139fde8 | ||
|
cf3327f417 | ||
|
244587f413 | ||
|
1939140c23 | ||
|
2361d7e861 | ||
|
bbd048069d | ||
|
ee1e83b94b | ||
|
fa523cddc5 | ||
|
d18bedc711 | ||
|
ed6a9c100b | ||
|
ed6afcbdcf | ||
|
5879dab46b | ||
|
b4def8937f | ||
|
d0e4e57891 |
6
.gitattributes
vendored
@@ -12,6 +12,7 @@
|
||||
*.jxx eol=lf
|
||||
*.lxx eol=lf
|
||||
*.pxx eol=lf
|
||||
*.cl eol=lf
|
||||
*.cdl eol=lf
|
||||
*.edl eol=lf
|
||||
*.yacc eol=lf
|
||||
@@ -34,10 +35,15 @@
|
||||
*.brep eol=lf
|
||||
*.rle eol=lf
|
||||
*.vrml eol=lf
|
||||
*.md eol=lf
|
||||
*.natvis eol=lf
|
||||
FILES eol=lf
|
||||
PACKAGES eol=lf
|
||||
EXTERNLIB eol=lf
|
||||
UDLIST eol=lf
|
||||
tests/* eol=lf
|
||||
tests/*/* eol=lf
|
||||
tests/*/*/* eol=lf
|
||||
*.bat eol=crlf
|
||||
*.cmd eol=crlf
|
||||
*.rc eol=crlf
|
||||
|
5
.gitignore
vendored
@@ -7,6 +7,7 @@
|
||||
/ao1
|
||||
/sil
|
||||
/wnt
|
||||
/doc
|
||||
/drv
|
||||
/inc
|
||||
/work
|
||||
@@ -33,6 +34,9 @@ Release
|
||||
*.ncb
|
||||
*.suo
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.ipch
|
||||
*.aps
|
||||
|
||||
# test results
|
||||
/results*
|
||||
@@ -41,7 +45,6 @@ Release
|
||||
*~
|
||||
|
||||
#Generated files
|
||||
*.in
|
||||
/*.am
|
||||
/*.m4
|
||||
/*.ac
|
||||
|
343
CMakeLists.txt
Normal file
@@ -0,0 +1,343 @@
|
||||
cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR)
|
||||
|
||||
set (CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
# set build configurations list
|
||||
if (NOT BUILD_CONFIGURATION)
|
||||
set (BUILD_CONFIGURATION "Release" CACHE STRING "Build type of OCCT" FORCE)
|
||||
SET_PROPERTY(CACHE BUILD_CONFIGURATION PROPERTY STRINGS Release Debug RelWithDebInfo)
|
||||
endif()
|
||||
|
||||
set (CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE)
|
||||
|
||||
# the name of the project
|
||||
project (OCCT)
|
||||
|
||||
# Solution folder property
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
set (CMAKE_BUILD_TYPE ${BUILD_CONFIGURATION} CACHE INTERNAL "Build type of OCCT" FORCE )
|
||||
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "Directory that will contain install files of OCCT" )
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
# whether install test bundle or not
|
||||
set (INSTALL_TESTS OFF CACHE BOOL "Is tests copy to install directory")
|
||||
|
||||
set (BUILD_PATCH_DIR "" CACHE PATH "directory with OCCT patch")
|
||||
|
||||
# the list of being built toolkits
|
||||
set (BUILD_TOOLKITS "" CACHE STRING "Toolkits are also included in OCCT")
|
||||
separate_arguments (BUILD_TOOLKITS)
|
||||
|
||||
if (MSVC)
|
||||
set (BUILD_MFC_SAMPLES OFF CACHE BOOL "OCCT samples building")
|
||||
endif()
|
||||
|
||||
# whether use optional 3rdparty or not
|
||||
if (APPLE)
|
||||
set (USE_GLX OFF CACHE BOOL "Are X11 OpenGL used on OSX or not")
|
||||
endif()
|
||||
|
||||
set (USE_FREEIMAGE OFF CACHE BOOL "Is freeimage used or not")
|
||||
set (USE_VTK OFF CACHE BOOL "Is VTK used or not")
|
||||
|
||||
if (NOT DEFINED ANDROID)
|
||||
set (USE_GL2PS OFF CACHE BOOL "Is gl2ps used or not")
|
||||
set (USE_TBB OFF CACHE BOOL "Is tbb used or not")
|
||||
set (USE_OPENCL OFF CACHE BOOL "Is OpenCL used or not")
|
||||
endif()
|
||||
|
||||
# macro: include patched file if it exists
|
||||
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
||||
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake")
|
||||
include(${BUILD_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
else()
|
||||
include(${BEING_INCLUDED_FILE}.cmake)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
|
||||
|
||||
# BUILD_POSTFIX variable is used by all toolkit cmakelists.txt projects
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# include the patched or original list of modules
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_modules")
|
||||
|
||||
# include the list of being used toolkits. USED_TOOLKITS variable
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_toolkits")
|
||||
|
||||
# include the patched or original list of definitions and flags
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_defs_flags")
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/3rdparty_macro")
|
||||
|
||||
set (3RDPARTY_DIR_LABEL "The directory containing required 3rdparty products")
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_LABEL})
|
||||
endif()
|
||||
|
||||
# search for 3rdparty dir
|
||||
if ("${3RDPARTY_DIR}" STREQUAL "")
|
||||
if (DEFINED ENV{3RDPARTY_DIR})
|
||||
set (3RDPARTY_DIR "$ENV{3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_LABEL} FORCE)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/../")
|
||||
# in version 6.7.0 and above, occt parent directory contains 3rdparties
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/../" ABSOLUTE)
|
||||
SET(3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_LABEL} FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# search for CSF_TclLibs variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED(CSF_TclLibs USE_TCL)
|
||||
|
||||
if ("${USE_TCL}" STREQUAL ON)
|
||||
message (STATUS "Info: tcl is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/tcl")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_DIR")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_INCLUDE_DIR")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_LIBRARY")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TCL_LIBRARY_DIR")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_INCLUDE_DIR")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_LIBRARY")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_TK_LIBRARY_DIR")
|
||||
endif()
|
||||
|
||||
# search for CSF_FREETYPE variable in EXTERNLIB of each being used toolkit
|
||||
OCCT_IS_PRODUCT_REQUIRED(CSF_FREETYPE USE_FREETYPE)
|
||||
|
||||
if ("${USE_FREETYPE}" STREQUAL ON)
|
||||
message (STATUS "Info: freetype is used by OCCT")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freetype")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_DIR")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_LIBRARY")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_LIBRARY_DIR")
|
||||
endif()
|
||||
|
||||
# VTK
|
||||
if (USE_VTK)
|
||||
add_definitions (-DHAVE_VTK)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/vtk")
|
||||
endif()
|
||||
|
||||
# GLX
|
||||
if (USE_GLX)
|
||||
add_definitions (-DMACOSX_USE_GLX)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/glx")
|
||||
endif()
|
||||
|
||||
# FREEIMAGE
|
||||
if (USE_FREEIMAGE)
|
||||
add_definitions (-DHAVE_FREEIMAGE)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freeimage")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/freeimageplus")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
|
||||
endif()
|
||||
|
||||
# GL2PS
|
||||
if (USE_GL2PS)
|
||||
add_definitions (-DHAVE_GL2PS)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/gl2ps")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
|
||||
endif()
|
||||
|
||||
# OPENCL
|
||||
if (USE_OPENCL)
|
||||
add_definitions (-DHAVE_OPENCL)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/opencl")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENCL")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER")
|
||||
OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_OPENCL")
|
||||
endif()
|
||||
|
||||
# TBB
|
||||
if (USE_TBB)
|
||||
ADD_DEFINITIONS(-DHAVE_TBB)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/tbb")
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
|
||||
endif()
|
||||
|
||||
string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
|
||||
|
||||
# check all 3rdparty paths
|
||||
if (3RDPARTY_NOT_INCLUDED)
|
||||
message (FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
|
||||
endif()
|
||||
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
|
||||
message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
|
||||
include_directories (${3RDPARTY_INCLUDE_DIRS})
|
||||
|
||||
list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
|
||||
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
|
||||
message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# build directories
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib${BUILD_POSTFIX})
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib${BUILD_POSTFIX})
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/bin${BUILD_POSTFIX})
|
||||
|
||||
if ("${INSTALL_DIR}" STREQUAL "")
|
||||
message (FATAL_ERROR "INSTALL_DIR variable is empty. It's required to define installation directory")
|
||||
else()
|
||||
# inc,data,tests DIRECTORY
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/inc" DESTINATION "${INSTALL_DIR}")
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/data" DESTINATION "${INSTALL_DIR}")
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/samples/tcl" DESTINATION "${INSTALL_DIR}/samples")
|
||||
if (INSTALL_TESTS)
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
|
||||
endif()
|
||||
|
||||
# install patch inc, data, tests folder
|
||||
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "")
|
||||
if (EXISTS "${BUILD_PATCH_DIR}/inc")
|
||||
install (DIRECTORY "${BUILD_PATCH_DIR}/inc" DESTINATION "${INSTALL_DIR}" )
|
||||
endif()
|
||||
|
||||
if (EXISTS "${BUILD_PATCH_DIR}/data")
|
||||
install (DIRECTORY "${BUILD_PATCH_DIR}/data" DESTINATION "${INSTALL_DIR}" )
|
||||
endif()
|
||||
|
||||
if (INSTALL_TESTS)
|
||||
if (EXISTS "${BUILD_PATCH_DIR}/tests")
|
||||
install (DIRECTORY "${BUILD_PATCH_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (SCRIPT_EXT bat)
|
||||
else()
|
||||
set (SCRIPT_EXT sh)
|
||||
endif()
|
||||
|
||||
# DRAW.BAT or DRAW.SH
|
||||
IF(NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install(FILES "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
ELSE()
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
ENDIF()
|
||||
|
||||
# set compiler short name
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
SET(SUB_CUSTOM "custom_${COMPILER}_${COMPILER_BITNESS}_${BUILD_POSTFIX}.${SCRIPT_EXT}")
|
||||
|
||||
if (WIN32)
|
||||
SET (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM}\" (\n call \"%~dp0${SUB_CUSTOM}\" %1 %2 %3 \n)")
|
||||
else()
|
||||
SET (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
|
||||
endif()
|
||||
|
||||
# change custom.bat/sh
|
||||
if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
|
||||
file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
||||
|
||||
set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
||||
|
||||
file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
||||
else()
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# write current custom.bat/sh
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.in" "${SUB_CUSTOM}" "${INSTALL_DIR}")
|
||||
|
||||
if (BUILD_MFC_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# RESOURCES
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/DrawResources" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/StdResource" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/SHMessage" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/Textures" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/Shaders" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/XSMessage" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/XSTEPResource" "${INSTALL_DIR}/src")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/XmlOcafResource" "${INSTALL_DIR}/src")
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/UnitsAPI/Lexi_Expr.dat" "${INSTALL_DIR}/src/UnitsAPI")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/UnitsAPI/Units.dat" "${INSTALL_DIR}/src/UnitsAPI")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("src/TObj/TObj.msg" "${INSTALL_DIR}/src/TObj")
|
||||
|
||||
|
||||
#Toolkits uses variables: INSTALL_DIR, OS_WITH_BIT, COMPILER, BUILD_POSTFIX
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
|
||||
# consider for patch existence
|
||||
set (IS_PATCH_CURRENT "NO")
|
||||
set (TK_ROOT_DIR ${CMAKE_SOURCE_DIR})
|
||||
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "")
|
||||
set (IS_PATCH_CURRENT "YES")
|
||||
set (TK_ROOT_DIR ${BUILD_PATCH_DIR})
|
||||
endif()
|
||||
|
||||
# include patched toolkit projects or original ones
|
||||
set (UNSUBDIRS "")
|
||||
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/adm/cmake/occt_inc_toolkits.cmake")
|
||||
set (TK_ROOT_DIR ${BUILD_PATCH_DIR})
|
||||
include (${BUILD_PATCH_DIR}/adm/cmake/occt_inc_toolkits.cmake)
|
||||
else()
|
||||
set (IS_PATCH_CURRENT "NO")
|
||||
set (TK_ROOT_DIR ${CMAKE_SOURCE_DIR})
|
||||
include (adm/cmake/occt_inc_toolkits.cmake)
|
||||
endif()
|
||||
|
||||
# include some required original occt_inc_toolkits
|
||||
if (NOT "${UNSUBDIRS}" STREQUAL "")
|
||||
set (IS_PATCH_CURRENT "NO")
|
||||
# add required subdirs
|
||||
foreach (UNSUBDIR ${UNSUBDIRS})
|
||||
add_subdirectory (${CMAKE_SOURCE_DIR}/${UNSUBDIR})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# samples do not support patch usage
|
||||
IF (BUILD_MFC_SAMPLES)
|
||||
SET (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
|
||||
SET (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
|
||||
SET (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
|
||||
|
||||
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)
|
||||
ENDIF()
|
151
LICENSE
@@ -1,151 +0,0 @@
|
||||
Open CASCADE Technology Public License
|
||||
License version: 6.6 March, 2013
|
||||
|
||||
Open CASCADE S.A.S. releases and makes publicly available the source code of the software Open CASCADE Technology to the free software development community under the terms and conditions of this license.
|
||||
|
||||
It is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this license has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
|
||||
Please read this license carefully and completely before downloading this software. By downloading, using, modifying, distributing and sublicensing this software, you indicate your acceptance to be bound by the terms and conditions of this license. If you do not want to accept or cannot accept for any reasons the terms and conditions of this license, please do not download or use in any manner this software.
|
||||
|
||||
1. Definitions
|
||||
|
||||
Unless there is something in the subject matter or in the context inconsistent therewith, the capitalized terms used in this License shall have the following meaning.
|
||||
|
||||
"Applicable Intellectual Property Rights" means (a) with respect to the Initial Developer, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to the Initial Developer and that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce, modify, distribute or sublicense the Original Code without infringement; and (b) with respect to You or any Contributor, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to You or to such Contributor and that cover subject matter contained in Your Modifications or in such Contributor's Modifications, taken alone or in combination with Original Code.
|
||||
|
||||
"Contributor" means each individual or legal entity that creates or contributes to the creation of any Modification, including the Initial Developer.
|
||||
|
||||
"Derivative Program": means a new program combining the Software or portions thereof with other source code not governed by the terms of this License.
|
||||
|
||||
"Initial Developer": means Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France.
|
||||
|
||||
"Modifications": mean any addition to, deletion from or change to the substance or the structure of the Software. When source code of the Software is released as a series of files, a Modification is: (a) any addition to, deletion from or change to the contents of a file containing the Software or (b) any new file or other representation of computer program statements that contains any part of the Software. By way of example, Modifications include any debug of, or improvement to, the Original Code or any of its components or portions as well as its next versions or releases thereof.
|
||||
|
||||
"Original Code": means (a) the source code of the software Open CASCADE Technology originally made available by the Initial Developer under this License, including the source code of any updates or upgrades of the Original Code and (b) the object code compiled from such source code and originally made available by Initial Developer under this License.
|
||||
|
||||
"Software": means the Original Code, the Modifications, the combination of Original Code and any Modifications or any respective portions thereof.
|
||||
|
||||
"You" or "Your": means an individual or a legal entity exercising rights under this License.
|
||||
|
||||
|
||||
2. Acceptance of license
|
||||
|
||||
By using, reproducing, modifying, distributing or sublicensing the Software or any portion thereof, You expressly indicate Your acceptance of the terms and conditions of this License and undertake to act in accordance with all the provisions of this License applicable to You.
|
||||
|
||||
|
||||
3. Scope and purpose
|
||||
|
||||
This License applies to the Software and You may not use, reproduce, modify, distribute, sublicense or circulate the Software, or any portion thereof, except as expressly provided under this License. Any attempt to otherwise use, reproduce, modify, distribute or sublicense the Software is void and will automatically terminate Your rights under this License.
|
||||
|
||||
|
||||
4. Contributor license
|
||||
|
||||
Subject to the terms and conditions of this License, the Initial Developer and each of the Contributors hereby grant You a world-wide, royalty-free, irrevocable and non-exclusive license under the Applicable Intellectual Property Rights they own or control, to use, reproduce, modify, distribute and sublicense the Software provided that:
|
||||
|
||||
You reproduce in all copies of the Software the copyright and other proprietary notices and disclaimers of the Initial Developer as they appear in the Original Code and attached hereto as Schedule "A" and any other notices or disclaimers attached to the Software and keep intact all notices in the Original Code that refer to this License and to the absence of any warranty;
|
||||
You include a copy of this License with every copy of the Software You distribute;
|
||||
If you distribute or sublicense the Software (as modified by You or on Your behalf as the case may be), You cause such Software to be licensed as a whole, at no charge, to all third parties, under the terms and conditions of the License, making in particular available to all third parties the source code of the Software;
|
||||
You document all Your Modifications, indicate the date of each such Modifications, designate the version of the Software You used, prominently include a file carrying such information with respect to the Modifications and duplicate the copyright and other proprietary notices and disclaimers attached hereto as Schedule "B" or any other notices or disclaimers attached to the Software with your Modifications.
|
||||
|
||||
For greater certainty, it is expressly understood that You may freely create Derivative Programs (without any obligation to publish such Derivative Program) and distribute same as a single product. In such case, You must ensure that all the requirements of this License are fulfilled for the Software or any portion thereof.
|
||||
|
||||
|
||||
5. Your license
|
||||
|
||||
You hereby grant all Contributors and anyone who becomes a party under this License a world-wide, non-exclusive, royalty-free and irrevocable license under the Applicable Intellectual Property Rights owned or controlled by You, to use, reproduce, modify, distribute and sublicense all Your Modifications under the terms and conditions of this License.
|
||||
|
||||
|
||||
6. Software subject to license
|
||||
|
||||
Your Modifications shall be governed by the terms and conditions of this License. You are not authorized to impose any other terms or conditions than those prevailing under this License when You distribute and/or sublicense the Software, save and except as permitted under Section 7 hereof.
|
||||
|
||||
|
||||
7. Additional terms
|
||||
|
||||
You may choose to offer, on a non-exclusive basis, and to charge a fee for any warranty, support, maintenance, liability obligations or other rights consistent with the scope of this License with respect to the Software (the "Additional Terms") to the recipients of the Software. However, You may do so only on Your own behalf and on Your sole and exclusive responsibility. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold the Initial Developer and any Contributor harmless for any liability incurred by or claims asserted against the Initial Developer or any Contributors with respect to any such Additional Terms.
|
||||
|
||||
|
||||
8. Disclaimer of warranty
|
||||
|
||||
The Software is provided under this License on an "as is" basis, without warranty of any kind, including without limitation, warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Software is with You.
|
||||
|
||||
|
||||
9. Liability
|
||||
|
||||
Under no circumstances shall You, the Initial Developer or any Contributor be liable to any person for any direct or indirect damages of any kind including, without limitation, damages for loss of goodwill, loss of data, work stoppage, computer failure or malfunction or any and all other commercial damages or losses resulting from or relating to this License or indirectly to the use of the Software.
|
||||
|
||||
|
||||
10. Trademark
|
||||
|
||||
This License does not grant any rights to use the trademarks, trade names and domain names "MATRA", "EADS Matra Datavision", "CAS.CADE", "Open CASCADE", "opencascade.com" and "opencascade.org" or any other trademarks, trade names or domain names used or owned by the Initial Developer.
|
||||
|
||||
|
||||
11. Copyright
|
||||
|
||||
The Initial Developer retains all rights, title and interest in and to the Original Code. You may not remove the copyright <20> notice which appears when You download the Software.
|
||||
|
||||
|
||||
12. Term
|
||||
|
||||
This License is granted to You for a term equal to the remaining period of protection covered by the intellectual property rights applicable to the Original Code.
|
||||
|
||||
|
||||
13. Termination
|
||||
|
||||
In case of termination, as provided in Section 3 above, You agree to immediately stop any further use, reproduction, modification, distribution and sublicensing of the Software and to destroy all copies of the Software that are in Your possession or control. All sublicenses of the Software which have been properly granted prior to termination shall survive any termination of this License. In addition, Sections 5, 8 to 11, 13.2 and 15.2 of this License, in reason of their nature, shall survive the termination of this License for a period of fifteen (15) years.
|
||||
|
||||
|
||||
14. Versions of the license
|
||||
|
||||
The Initial Developer may publish new versions of this License from time to time. Once Original Code has been published under a particular version of this License, You may choose to continue to use it under the terms and conditions of that version or use the Original Code under the terms of any subsequent version of this License published by the Initial Developer.
|
||||
|
||||
|
||||
15. Miscellaneous
|
||||
|
||||
15.1 Relationship of Parties
|
||||
|
||||
This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and the Initial Developer, and You will not represent to the contrary, whether expressly, by implication or otherwise.
|
||||
|
||||
15.2 Independent Development
|
||||
|
||||
Nothing in this License will impair the Initial Developer's right to acquire, license, develop, have others develop for it, market or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Derivative Programs, technology or products that You may develop, produce, market or distribute.
|
||||
|
||||
15.3 Severability
|
||||
|
||||
If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and extent.
|
||||
|
||||
|
||||
END OF THE TERMS AND
|
||||
CONDITIONS OF THIS LICENSE
|
||||
|
||||
|
||||
Open CASCADE S.A.S. is a French soci<63>t<EFBFBD> par actions simplifi<66>e having its main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France. Its web site is located at the following address www.opencascade.com
|
||||
|
||||
|
||||
Open CASCADE Technology Public License
|
||||
|
||||
Schedule "A"
|
||||
|
||||
The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file.
|
||||
|
||||
The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France. The Original Code is copyright <20> Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
"The Original Code and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
End of Schedule "A"
|
||||
|
||||
|
||||
Open CASCADE Technology Public License
|
||||
|
||||
Schedule "B"
|
||||
|
||||
"The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file.
|
||||
|
||||
The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France. The Original Code is copyright <20> Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
Modifications to the Original Code have been made by ________________________. Modifications are copyright <20> [Year to be included]. All rights reserved.
|
||||
|
||||
The software Open CASCADE Technology and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
End of Schedule "B"
|
502
LICENSE_LGPL_21.txt
Executable file
@@ -0,0 +1,502 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
10
OCCT_LGPL_EXCEPTION.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Open CASCADE exception (version 1.0) to GNU LGPL version 2.1.
|
||||
|
||||
The object code (i.e. not a source) form of a "work that uses the Library"
|
||||
can incorporate material from a header file that is part of the Library.
|
||||
As a special exception to the GNU Lesser General Public License version 2.1,
|
||||
you may distribute such object code incorporating material from header files
|
||||
provided with the Open CASCADE Technology libraries (including code of CDL
|
||||
generic classes) under terms of your choice, provided that you give
|
||||
prominent notice in supporting documentation to this code that it makes use
|
||||
of or is based on facilities provided by the Open CASCADE Technology software.
|
44
README
@@ -1,44 +0,0 @@
|
||||
Open CASCADE Technology source repository
|
||||
-----------------------------------------
|
||||
|
||||
This directory contains sources of Open CASCADE Technology (OCCT), a collection
|
||||
of C++ libraries providing services for 3D surface and solid modeling, CAD data
|
||||
exchange, and visualization. OCCT can be best applied in development of
|
||||
software dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or
|
||||
numerical simulation (CAE).
|
||||
|
||||
The OCCT code is subject to the Open CASCADE Technology Public License Version
|
||||
6.5 (the "License"). You may not use the content of the relevant files except in
|
||||
compliance with the License. Please see the LICENSE file or obtain a copy of the
|
||||
License at http://www.opencascade.org and read it completely before using this
|
||||
software.
|
||||
|
||||
In order to build OCCT libraries from these sources for use in your program,
|
||||
you need to:
|
||||
|
||||
1. Download, build, and install the required third-party libraries.
|
||||
|
||||
Follow the instructions provided in the documents titled "Building 3rd party
|
||||
products for OCCT" on http://dev.opencascade.org/?q=home/resources for
|
||||
installation and building.
|
||||
|
||||
2. Install and configure WOK development environment.
|
||||
|
||||
See http://dev.opencascade.org/?q=home/resources for the latest build of the
|
||||
WOK and instructions of configuring it.
|
||||
|
||||
3. Use WOK to generate build scripts or project files for your compiler,
|
||||
then build the libraries.
|
||||
|
||||
Note that you may use also the pre-processed source packages that include
|
||||
makefiles and projects, or binary packages, available for official releases of
|
||||
OCCT at http://www.opencascade.org. In this case however you will not be able
|
||||
to re-generate derived files after changing the CDL files (requires WOK).
|
||||
|
||||
The current version of OCCT can be consulted in the file
|
||||
src/Standard/Standard_Version.hxx
|
||||
|
||||
For more information regarding OCCT code development please consult the official
|
||||
OCCT Collaborative Development Portal:
|
||||
|
||||
http://dev.opencascade.org
|
90
README.txt
Normal file
@@ -0,0 +1,90 @@
|
||||
Open CASCADE Technology
|
||||
=======================
|
||||
|
||||
This directory contains sources of Open CASCADE Technology (OCCT), a software
|
||||
development platform providing services for 3D surface and solid modeling, CAD
|
||||
data exchange, and visualization. Most of OCCT functionality is available in
|
||||
the form of C++ libraries. OCCT can be best applied in development of software
|
||||
dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical
|
||||
simulation (CAE).
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Open CASCADE Technology is free software; you can redistribute it and / or
|
||||
modify it under the terms of the GNU Lesser General Public version 2.1 as
|
||||
published by the Free Software Foundation, with special exception defined in
|
||||
the file OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included
|
||||
in OCCT distribution for complete text of the license.
|
||||
|
||||
Alternatively, Open CASCADE Technology may be used under the terms of Open
|
||||
CASCADE commercial license or contractual agreement.
|
||||
|
||||
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
|
||||
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
|
||||
materials is on you. See the license text for formal disclaimer.
|
||||
|
||||
Packaging
|
||||
---------
|
||||
|
||||
You can receive certified version of OCCT code in different packages.
|
||||
|
||||
- Snapshot of Git repository: contains only bare sources of OCCT; many C++
|
||||
files, HTML documentation, and project files / makefiles for building OCCT
|
||||
need to be generated.
|
||||
|
||||
- Complete source archive: contains all sources of OCCT, including C++ files
|
||||
generated by WOK, HTML and PDF documentation, and projects / makefiles for
|
||||
building on all officially supported platforms.
|
||||
|
||||
- Binary package (platform-specific): in addition to complete source archive,
|
||||
it includes binaries of OCCT and third-party libraries built on one platform.
|
||||
This package allows using OCCT immediately after installation.
|
||||
|
||||
Certified versions of OCCT can be downloaded from http://www.opencascade.org
|
||||
|
||||
You can also find OCCT pre-installed on your system, or install it from
|
||||
packages provided by a third party. Note that packaging and functionality
|
||||
of such versions can be different from certified releases. Please consult
|
||||
documentation accompanyog your version for details.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Open file doc/html/index.html to browse HTML documentation.
|
||||
|
||||
If HTML documentation is not available in your package, you can:
|
||||
|
||||
- Generate it from sources.
|
||||
|
||||
You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system.
|
||||
and accessible in your environment (check environment variable PATH).
|
||||
Run batch file *gendoc.bat* on Windows or Bash scriot *gendoc.sh* on Linux
|
||||
or Mac OS X to (re)generate documentation.
|
||||
|
||||
- Read documentation in source plain text (MarkDown) format found in
|
||||
subfolder *dox*
|
||||
|
||||
See *dox/dev_guides/documentation/documentation.md* for details.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
In most cases you need to rebuild OCCT on your platform (OS, compiler) before
|
||||
using it in your project, to ensure binary compatibility.
|
||||
|
||||
Consult the file *dox/dev_guides/building/building.md* for instructions on
|
||||
building OCCT from sources on supported platforms.
|
||||
|
||||
Version
|
||||
-------
|
||||
|
||||
The current version of OCCT can be consulted in the file
|
||||
*src/Standard/Standard_Version.hxx*
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
For information regarding OCCT code development please consult the official
|
||||
OCCT Collaborative Development Portal:
|
||||
http://dev.opencascade.org
|
30
adm/UDLIST
@@ -1,22 +1,18 @@
|
||||
n IncludeLibrary
|
||||
n NCollection
|
||||
p BSplCLib
|
||||
p BSplSLib
|
||||
p Bnd
|
||||
p BVH
|
||||
p CSLib
|
||||
p Convert
|
||||
p Dico
|
||||
p Dynamic
|
||||
p ElCLib
|
||||
p ElSLib
|
||||
p Expr
|
||||
p ExprIntrp
|
||||
p FSD
|
||||
p GeomAbs
|
||||
p GraphDS
|
||||
p GraphTools
|
||||
p MMgt
|
||||
p Materials
|
||||
p Message
|
||||
p OSD
|
||||
p PLib
|
||||
@@ -39,7 +35,6 @@ p UnitsAPI
|
||||
p gp
|
||||
p math
|
||||
r OS
|
||||
t TKAdvTools
|
||||
t TKMath
|
||||
t TKernel
|
||||
p Adaptor2d
|
||||
@@ -110,7 +105,7 @@ p BRepGProp
|
||||
p BRepIntCurveSurface
|
||||
p BRepLib
|
||||
p BRepMAT2d
|
||||
p BRepMesh
|
||||
n BRepMesh
|
||||
p BRepOffset
|
||||
p BRepOffsetAPI
|
||||
p BRepPrim
|
||||
@@ -132,9 +127,7 @@ p FairCurve
|
||||
p FilletSurf
|
||||
p GccAna
|
||||
p GccEnt
|
||||
p GccGeo
|
||||
p GccInt
|
||||
p GccIter
|
||||
p Geom2dAPI
|
||||
p Geom2dGcc
|
||||
p Geom2dHatch
|
||||
@@ -146,6 +139,7 @@ p GeomPlate
|
||||
p HLRAlgo
|
||||
p HLRBRep
|
||||
p HLRTopoBRep
|
||||
p HLRAppli
|
||||
p Hatch
|
||||
p HatchGen
|
||||
p IntCurve
|
||||
@@ -154,7 +148,6 @@ p IntCurvesFace
|
||||
p IntImp
|
||||
p IntImpParGen
|
||||
p IntPatch
|
||||
p IntPoly
|
||||
p IntPolyh
|
||||
p IntRes2d
|
||||
p IntStart
|
||||
@@ -170,7 +163,6 @@ p MAT
|
||||
p MAT2d
|
||||
p NLPlate
|
||||
p Plate
|
||||
p Primitives
|
||||
p ShapeAlgo
|
||||
p ShapeAnalysis
|
||||
p ShapeBuild
|
||||
@@ -190,7 +182,7 @@ p TopOpeBRepBuild
|
||||
p TopOpeBRepDS
|
||||
p TopOpeBRepTool
|
||||
p TopTrans
|
||||
p XBRepMesh
|
||||
n XBRepMesh
|
||||
t TKBO
|
||||
t TKBool
|
||||
t TKFeat
|
||||
@@ -205,7 +197,6 @@ t TKTopAlgo
|
||||
t TKXMesh
|
||||
n InterfaceGraphic
|
||||
p AIS
|
||||
p AlienImage
|
||||
p Aspect
|
||||
p DsgPrs
|
||||
p Graphic3d
|
||||
@@ -228,6 +219,7 @@ p WNT
|
||||
p Xw
|
||||
p Cocoa
|
||||
r Textures
|
||||
r Shaders
|
||||
t TKMeshVS
|
||||
t TKNIS
|
||||
t TKOpenGl
|
||||
@@ -272,8 +264,6 @@ p ObjMgt
|
||||
p PBRep
|
||||
p PCDM
|
||||
p PCDMShape
|
||||
p PColPGeom
|
||||
p PColPGeom2d
|
||||
p PColStd
|
||||
p PColgp
|
||||
p PCollection
|
||||
@@ -473,13 +463,11 @@ t TKViewerTest
|
||||
t TKXDEDRAW
|
||||
t TKXSDRAW
|
||||
x DRAWEXE
|
||||
p DebugTools
|
||||
p QADraw
|
||||
p QANCollection
|
||||
p QANewBRepNaming
|
||||
p QANewDBRepNaming
|
||||
p QANewModTopOpe
|
||||
r QAResources
|
||||
t TKQADraw
|
||||
p QADNaming
|
||||
p QABugs
|
||||
@@ -487,4 +475,10 @@ p Font
|
||||
p BOPAlgo
|
||||
p BOPDS
|
||||
p BOPCol
|
||||
p BOPInt
|
||||
p IVtk
|
||||
p IVtkOCC
|
||||
p IVtkVTK
|
||||
p IVtkTools
|
||||
t TKIVtk
|
||||
p IVtkDraw
|
||||
t TKIVtkDraw
|
825
adm/gendoc.tcl
Normal file
@@ -0,0 +1,825 @@
|
||||
# =======================================================================
|
||||
# Created on: 2014-03-21
|
||||
# Created by: OMY
|
||||
# Copyright (c) 1996-1999 Matra Datavision
|
||||
# Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
#
|
||||
# This file is part of Open CASCADE Technology software library.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
# by the Free Software Foundation, with special exception defined in the file
|
||||
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
# distribution for complete text of the license and disclaimer of any warranty.
|
||||
#
|
||||
# Alternatively, this file may be used under the terms of Open CASCADE
|
||||
# commercial license or contractual agreement.
|
||||
#
|
||||
# Brief: This script compiles OCCT documents from *.md files to HTML pages
|
||||
# =======================================================================
|
||||
|
||||
# ======================================
|
||||
# Common functions
|
||||
# ======================================
|
||||
|
||||
# Prints help message
|
||||
proc OCCDoc_PrintHelpMessage {} {
|
||||
puts "\nUsage: gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]"
|
||||
puts ""
|
||||
puts "Options are:"
|
||||
puts ""
|
||||
puts "choice of documentation to be generated:"
|
||||
puts " -overview : To generate Overview and User Guides"
|
||||
puts " (cannot be used with -refman)"
|
||||
puts " -refman : To generate class Reference Manual"
|
||||
puts " (cannot be used with -overview)"
|
||||
puts ""
|
||||
puts "choice of output format:"
|
||||
puts " -html : To generate HTML files"
|
||||
puts " (default, cannot be used with -pdf or -chm)"
|
||||
puts " -pdf : To generate PDF files"
|
||||
puts " (cannot be used with -refman, -html, or -chm)"
|
||||
puts " -chm : To generate CHM files"
|
||||
puts " (cannot be used with -html or -pdf)"
|
||||
puts ""
|
||||
puts "additional options:"
|
||||
puts " -m=<modules_list> : List of OCCT modules (separated with comma),"
|
||||
puts " for generation of Reference Manual"
|
||||
puts " -ug=<docs_list> : List of MarkDown documents (separated with comma),"
|
||||
puts " to use for generation of Overview / User Guides"
|
||||
puts " -mathjax=<path> : To use local or alternative copy of MathJax"
|
||||
puts " -s=<search_mode> : Specifies the Search mode of HTML documents"
|
||||
puts " Can be: none | local | server | external"
|
||||
puts " -h : Prints this help message"
|
||||
puts " -v : Enables more verbose output"
|
||||
}
|
||||
|
||||
# A command for User Documentation compilation
|
||||
proc gendoc {args} {
|
||||
|
||||
# Parameters
|
||||
set DOC_TYPE "REFMAN"
|
||||
set GEN_MODE "HTML_ONLY"
|
||||
set DOCFILES {}
|
||||
set MODULES {}
|
||||
set DOCLABEL ""
|
||||
set VERB_MODE "NO"
|
||||
set SEARCH_MODE "none"
|
||||
set MATHJAX_LOCATION "http://cdn.mathjax.org/mathjax/latest"
|
||||
set mathjax_js_name "MathJax.js"
|
||||
set DOCTYPE_COMBO_FLAG 0
|
||||
set GENMODE_COMBO_FLAG 0
|
||||
set GENERATE_PRODUCTS_REFMAN "NO"
|
||||
|
||||
global available_docfiles; # The full list of md files for HTML or CHM generation
|
||||
global available_pdf; # The full list of md files for PDF generation
|
||||
global tcl_platform
|
||||
global args_names
|
||||
global args_values
|
||||
global env
|
||||
|
||||
# Load list of docfiles
|
||||
if { [OCCDoc_LoadFilesList] != 0 } {
|
||||
puts "Error: File FILES_HTML.txt or FILES_PDF.txt was not found on this computer.\nAborting..."
|
||||
return -1
|
||||
}
|
||||
|
||||
# Parse CL arguments
|
||||
if {[OCCDoc_ParseArguments $args] == 1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Print help message if no arguments provided
|
||||
if {[llength $args_names] == 0} {
|
||||
OCCDoc_PrintHelpMessage
|
||||
return 0
|
||||
}
|
||||
|
||||
foreach arg_n $args_names {
|
||||
if {$arg_n == "h"} {
|
||||
OCCDoc_PrintHelpMessage
|
||||
return 0
|
||||
} elseif {$arg_n == "html"} {
|
||||
if { ([ lsearch $args_names "refman" ] == -1) &&
|
||||
([ lsearch $args_names "overview" ] == -1) } {
|
||||
puts "Warning: Please specify -refman or -overview argument."
|
||||
return -1
|
||||
}
|
||||
if { [ lsearch $args_names "refman" ] != -1 } {
|
||||
continue
|
||||
}
|
||||
if { $GENMODE_COMBO_FLAG != 1 } {
|
||||
set GEN_MODE "HTML_ONLY"
|
||||
set GENMODE_COMBO_FLAG 1
|
||||
} else {
|
||||
puts "Error: Options -html, -pdf and -chm can not be combined."
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "chm"} {
|
||||
if { ([ lsearch $args_names "refman" ] == -1) &&
|
||||
([ lsearch $args_names "overview" ] == -1) } {
|
||||
puts "Warning: Please specify -refman or -overview argument."
|
||||
return -1
|
||||
}
|
||||
if { [ lsearch $args_names "refman" ] != -1 } {
|
||||
continue
|
||||
}
|
||||
if { $GENMODE_COMBO_FLAG != 1 } {
|
||||
set GEN_MODE "CHM_ONLY"
|
||||
set GENMODE_COMBO_FLAG 1
|
||||
} else {
|
||||
puts "Error: Options -html, -pdf and -chm cannot be combined."
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "pdf"} {
|
||||
if { ([ lsearch $args_names "refman" ] == -1) &&
|
||||
([ lsearch $args_names "overview" ] == -1) } {
|
||||
puts "Warning: Please specify -refman or -overview argument."
|
||||
return -1
|
||||
}
|
||||
if { [ lsearch $args_names "refman" ] != -1 } {
|
||||
continue
|
||||
}
|
||||
if { $GENMODE_COMBO_FLAG != 1 } {
|
||||
set GEN_MODE "PDF_ONLY"
|
||||
set GENMODE_COMBO_FLAG 1
|
||||
} else {
|
||||
puts "Error: Options -html, -pdf and -chm cannot be combined."
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "overview"} {
|
||||
if { $DOCTYPE_COMBO_FLAG != 1 } {
|
||||
set DOC_TYPE "OVERVIEW"
|
||||
set DOCTYPE_COMBO_FLAG 1
|
||||
} else {
|
||||
puts "Error: Options -refman and -overview cannot be combined."
|
||||
return -1
|
||||
}
|
||||
|
||||
# Print ignored options
|
||||
if { [ lsearch $args_names "m" ] != -1 } {
|
||||
puts "\nInfo: The following options will be ignored: \n"
|
||||
puts " * -m"
|
||||
}
|
||||
puts ""
|
||||
} elseif {$arg_n == "refman"} {
|
||||
if { $DOCTYPE_COMBO_FLAG != 1 } {
|
||||
set DOC_TYPE "REFMAN"
|
||||
set DOCTYPE_COMBO_FLAG 1
|
||||
if { [file exists [pwd]/src/VAS/Products.tcl] } {
|
||||
set GENERATE_PRODUCTS_REFMAN "YES"
|
||||
}
|
||||
} else {
|
||||
puts "Error: Options -refman and -overview cannot be combined."
|
||||
return -1
|
||||
}
|
||||
# Print ignored options
|
||||
if { ([ lsearch $args_names "pdf" ] != -1) ||
|
||||
([ lsearch $args_names "chm" ] != -1) ||
|
||||
([ lsearch $args_names "ug" ] != -1) } {
|
||||
puts "\nInfo: The following options will be ignored: \n"
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
puts " * -pdf"
|
||||
}
|
||||
if { [ lsearch $args_names "chm" ] != -1 } {
|
||||
puts " * -chm"
|
||||
}
|
||||
if { [ lsearch $args_names "ug" ] != -1 } {
|
||||
puts " * -ug"
|
||||
}
|
||||
puts ""
|
||||
}
|
||||
|
||||
if { $GENERATE_PRODUCTS_REFMAN == "YES" } {
|
||||
if { [ lsearch $args_names "m" ] == -1 } {
|
||||
puts "\nError: Cannot generate Reference Manual for the whole set of OCC Products."
|
||||
puts "Aborting..."
|
||||
return -1
|
||||
}
|
||||
}
|
||||
} elseif {$arg_n == "v"} {
|
||||
set VERB_MODE "YES"
|
||||
} elseif {$arg_n == "ug"} {
|
||||
if { ([ lsearch $args_names "refman" ] != -1) } {
|
||||
continue
|
||||
}
|
||||
if {$args_values(ug) != "NULL"} {
|
||||
set DOCFILES $args_values(ug)
|
||||
} else {
|
||||
puts "Error in argument ug."
|
||||
return -1
|
||||
}
|
||||
# Check if all chosen docfiles are correct
|
||||
foreach docfile $DOCFILES {
|
||||
if { [ lsearch $args_names "pdf" ] == -1 } {
|
||||
# Check to generate HTMLs
|
||||
if { [lsearch $available_docfiles $docfile] == -1 } {
|
||||
puts "Error: File \"$docfile\" is not presented in the list of available docfiles."
|
||||
puts " Please specify the correct docfile name."
|
||||
return -1
|
||||
}
|
||||
} else {
|
||||
# Check to generate PDFs
|
||||
if { [lsearch $available_pdf $docfile] == -1 } {
|
||||
puts "Error: File \"$docfile\" is not presented in the list of generic PDFs."
|
||||
puts " Please specify the correct pdf name."
|
||||
return -1
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif {$arg_n == "m"} {
|
||||
if { [ lsearch $args_names "overview" ] != -1 } {
|
||||
continue
|
||||
}
|
||||
if {$args_values(m) != "NULL"} {
|
||||
set MODULES $args_values(m)
|
||||
} else {
|
||||
puts "Error in argument m."
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "s"} {
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
continue
|
||||
}
|
||||
if {$args_values(s) != "NULL"} {
|
||||
set SEARCH_MODE $args_values(s)
|
||||
} else {
|
||||
puts "Error in argument s."
|
||||
return -1
|
||||
}
|
||||
} 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"
|
||||
}
|
||||
} else {
|
||||
puts "Warning: MathJax is not used with pdf and will be ignored."
|
||||
}
|
||||
} else {
|
||||
puts "\nWrong argument: $arg_n"
|
||||
OCCDoc_PrintHelpMessage
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
# Check the existence of the necessary tools
|
||||
set DOXYGEN_PATH ""
|
||||
set GRAPHVIZ_PATH ""
|
||||
set INKSCAPE_PATH ""
|
||||
set PDFLATEX_PATH ""
|
||||
set HHC_PATH ""
|
||||
|
||||
OCCDoc_DetectNecessarySoftware $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH $PDFLATEX_PATH
|
||||
|
||||
if {$DOXYGEN_PATH == ""} {
|
||||
puts " Aborting..."
|
||||
return -1
|
||||
}
|
||||
|
||||
if {"$::tcl_platform(platform)" == "windows"} {
|
||||
if { ($GEN_MODE == "CHM_ONLY") && ($HHC_PATH == "") } {
|
||||
puts " Aborting..."
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
if { ($PDFLATEX_PATH == "") && ($GEN_MODE == "PDF_ONLY") } {
|
||||
puts " Aborting..."
|
||||
return -1
|
||||
}
|
||||
|
||||
# If we do not specify list for docfiles with -m argument,
|
||||
# we assume that we have to generate all docfiles
|
||||
if { [llength $DOCFILES] == 0 } {
|
||||
if { $GEN_MODE != "PDF_ONLY" } {
|
||||
set DOCFILES $available_docfiles
|
||||
} else {
|
||||
set DOCFILES $available_pdf
|
||||
}
|
||||
}
|
||||
|
||||
puts ""
|
||||
|
||||
# Clean logfiles
|
||||
set OUTDIR [OCCDoc_GetRootDir]/doc/
|
||||
set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log
|
||||
set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log
|
||||
|
||||
file delete -force $PDFLOG
|
||||
file delete -force $DOXYLOG
|
||||
|
||||
# Start main activities
|
||||
if { $GEN_MODE != "PDF_ONLY" } {
|
||||
OCCDoc_Main $DOC_TYPE $DOCFILES $MODULES $GEN_MODE $VERB_MODE $SEARCH_MODE $MATHJAX_LOCATION $GENERATE_PRODUCTS_REFMAN $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
} else {
|
||||
puts "Generating OCCT User Guides in PDF format...\n"
|
||||
foreach pdf $DOCFILES {
|
||||
|
||||
puts "Info: Processing file $pdf\n"
|
||||
|
||||
# Some values are hardcoded because they are related only to PDF generation
|
||||
OCCDoc_Main "OVERVIEW" [list $pdf] {} "PDF_ONLY" $VERB_MODE "none" $MATHJAX_LOCATION "NO" $DOXYGEN_PATH $GRAPHVIZ_PATH $INKSCAPE_PATH $HHC_PATH
|
||||
}
|
||||
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generation completed."
|
||||
puts "\nPDF files are generated in \n[file normalize [OCCDoc_GetRootDir]/doc/pdf]"
|
||||
}
|
||||
}
|
||||
|
||||
# Main procedure for documents compilation
|
||||
proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode searchMode mathjaxLocation generateProductsRefman DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH} {
|
||||
|
||||
global available_docfiles
|
||||
global available_pdf
|
||||
|
||||
set PRODPATH ""
|
||||
if { [string compare -nocase $generateProductsRefman "YES"] == 0 } {
|
||||
set PRODPATH [pwd]
|
||||
}
|
||||
|
||||
set ROOTDIR [OCCDoc_GetRootDir $PRODPATH]
|
||||
set INDIR [OCCDoc_GetDoxDir]
|
||||
set OUTDIR $ROOTDIR/doc
|
||||
set PDFDIR $OUTDIR/pdf
|
||||
set UGDIR $PDFDIR/user_guides
|
||||
set DGDIR $PDFDIR/dev_guides
|
||||
set TAGFILEDIR $OUTDIR/refman
|
||||
set HTMLDIR $OUTDIR/overview/html
|
||||
set LATEXDIR $OUTDIR/overview/latex
|
||||
set DOXYFILE $OUTDIR/OCCT.cfg
|
||||
|
||||
# Create or cleanup the output folders
|
||||
if { [string compare -nocase $generateProductsRefman "YES"] != 0 } {
|
||||
if { ![file exists $OUTDIR] } {
|
||||
file mkdir $OUTDIR
|
||||
}
|
||||
if { ![file exists $HTMLDIR] } {
|
||||
file mkdir $HTMLDIR
|
||||
}
|
||||
if { ![file exists $PDFDIR] } {
|
||||
file mkdir $PDFDIR
|
||||
}
|
||||
if { ![file exists $UGDIR] } {
|
||||
file mkdir $UGDIR
|
||||
}
|
||||
if { ![file exists $DGDIR] } {
|
||||
file mkdir $DGDIR
|
||||
}
|
||||
if { [file exists $LATEXDIR] } {
|
||||
file delete -force $LATEXDIR
|
||||
}
|
||||
file mkdir $LATEXDIR
|
||||
}
|
||||
if { $docType == "REFMAN" } {
|
||||
if { ![file exists $TAGFILEDIR] } {
|
||||
file mkdir $TAGFILEDIR
|
||||
}
|
||||
}
|
||||
|
||||
# is MathJax HLink?
|
||||
set mathjax_relative_location $mathjaxLocation
|
||||
if { [file isdirectory "$mathjaxLocation"] } {
|
||||
if { $generatorMode == "HTML_ONLY" } {
|
||||
# related path
|
||||
set mathjax_relative_location [OCCDoc_GetRelPath $HTMLDIR $mathjaxLocation]
|
||||
} elseif { $generatorMode == "CHM_ONLY" } {
|
||||
# absolute path
|
||||
set mathjax_relative_location [file normalize $mathjaxLocation]
|
||||
}
|
||||
}
|
||||
|
||||
if { $generateProductsRefman == "YES" } {
|
||||
set DOCDIR "$OUTDIR/refman"
|
||||
puts "\nGenerating OCC Products Reference Manual\n"
|
||||
} else {
|
||||
if { $docType == "REFMAN"} {
|
||||
set DOCDIR "$OUTDIR/refman"
|
||||
puts "\nGenerating Open CASCADE Reference Manual\n"
|
||||
} elseif { $docType == "OVERVIEW" } {
|
||||
set DOCDIR "$OUTDIR/overview"
|
||||
set FORMAT ""
|
||||
if { ($generatorMode == "HTML_ONLY") || ($generatorMode == "CHM_ONLY") } {
|
||||
if { $generatorMode == "HTML_ONLY" } {
|
||||
set FORMAT " in HTML format..."
|
||||
} elseif { $generatorMode == "CHM_ONLY" } {
|
||||
set FORMAT " in CHM format..."
|
||||
}
|
||||
puts "Generating OCCT User Guides$FORMAT\n"
|
||||
}
|
||||
} else {
|
||||
puts "Error: Invalid documentation type: $docType. Can not process."
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
# Generate Doxyfile
|
||||
puts "[clock format [clock seconds] -format {%Y-%m-%d %H:%M}] Generating Doxyfile..."
|
||||
|
||||
if { [OCCDoc_MakeDoxyfile $docType $DOCDIR $TAGFILEDIR $DOXYFILE $generatorMode $docfiles $modules $verboseMode $searchMode $HHC_PATH $mathjax_relative_location $GRAPHVIZ_PATH $PRODPATH] == -1 } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Run doxygen tool
|
||||
set starttimestamp [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
|
||||
|
||||
if { ($generatorMode == "HTML_ONLY") || ($docType == "REFMAN") } {
|
||||
puts "$starttimestamp Generating HTML files..."
|
||||
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file copy -force $INDIR/resources/index.html $DOCDIR/index.html
|
||||
} elseif { $generatorMode == "CHM_ONLY" } {
|
||||
puts "$starttimestamp Generating CHM file..."
|
||||
} elseif { $generatorMode == "PDF_ONLY" } {
|
||||
puts "$starttimestamp Generating PDF file..."
|
||||
}
|
||||
|
||||
set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log
|
||||
set RESULT [catch {exec $DOXYGEN_PATH $DOXYFILE >> $OUTDIR/doxygen_out.log} DOX_ERROR]
|
||||
if {$RESULT != 0} {
|
||||
set NbErrors [regexp -all -line {^\s*[^\s]+} $DOX_ERROR]
|
||||
if {$NbErrors > 0} {
|
||||
puts "\nWarning: Doxygen reported $NbErrors messages."
|
||||
puts "See log in $DOXYLOG\n"
|
||||
set DOX_ERROR_FILE [open $DOXYLOG "a"]
|
||||
if {$generatorMode == "PDF_ONLY"} {
|
||||
puts $DOX_ERROR_FILE "\n===================================================="
|
||||
puts $DOX_ERROR_FILE "Logfile for $docfiles"
|
||||
puts $DOX_ERROR_FILE "====================================================\n"
|
||||
}
|
||||
puts $DOX_ERROR_FILE $DOX_ERROR
|
||||
close $DOX_ERROR_FILE
|
||||
}
|
||||
}
|
||||
|
||||
# Close the Doxygen application
|
||||
after 300
|
||||
|
||||
# Start Post Processing
|
||||
set curtime [clock format [clock seconds] -format {%Y-%m-%d %H:%M}]
|
||||
if { $docType == "REFMAN" } {
|
||||
# Post Process generated HTML pages and draw dependency graphs
|
||||
if {[OCCDoc_PostProcessor $DOCDIR] == 0} {
|
||||
puts "$curtime Generation completed."
|
||||
puts "\nInfo: doxygen log file is located in:"
|
||||
puts "$OUTDIR/doxygen_out.log."
|
||||
puts "\nReference Manual is generated in \n$DOCDIR"
|
||||
}
|
||||
} elseif { $docType == "OVERVIEW" } {
|
||||
# Start PDF generation routine
|
||||
if { $generatorMode == "PDF_ONLY" } {
|
||||
set OS $::tcl_platform(platform)
|
||||
if { $OS == "unix" } {
|
||||
set PREFIX ".sh"
|
||||
} elseif { $OS == "windows" } {
|
||||
set PREFIX ".bat"
|
||||
}
|
||||
|
||||
# Prepare a list of TeX files, generated by Doxygen
|
||||
cd $LATEXDIR
|
||||
|
||||
set TEXFILES [glob $LATEXDIR -type f -directory $LATEXDIR -tails "*.tex" ]
|
||||
foreach path $TEXFILES {
|
||||
if { [string compare -nocase $path $LATEXDIR] == 0 } {
|
||||
set DEL_IDX [lsearch $TEXFILES $path]
|
||||
if { $DEL_IDX != -1 } {
|
||||
set TEXFILES [lreplace $TEXFILES $DEL_IDX $DEL_IDX]
|
||||
}
|
||||
}
|
||||
}
|
||||
set TEXFILES [string map [list refman.tex ""] $TEXFILES]
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Preprocessing generated TeX files..."
|
||||
}
|
||||
OCCDoc_ProcessTex $TEXFILES $LATEXDIR $verboseMode
|
||||
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Converting SVG images to PNG format..."
|
||||
}
|
||||
|
||||
if { $INKSCAPE_PATH != "" } {
|
||||
OCCDoc_ProcessSvg $LATEXDIR $verboseMode
|
||||
} else {
|
||||
puts "Warning: SVG images will be lost in PDF documents."
|
||||
}
|
||||
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Generating PDF file from TeX files..."
|
||||
}
|
||||
foreach TEX $TEXFILES {
|
||||
# Rewrite existing REFMAN.tex file...
|
||||
set TEX [lindex [split $TEX "."] 0]
|
||||
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Generating PDF file from $TEX..."
|
||||
}
|
||||
|
||||
OCCDoc_MakeRefmanTex $TEX $LATEXDIR $verboseMode $available_pdf
|
||||
|
||||
if {"$::tcl_platform(platform)" == "windows"} {
|
||||
set is_win "yes"
|
||||
} else {
|
||||
set is_win "no"
|
||||
}
|
||||
if {$verboseMode == "YES"} {
|
||||
# ...and use it to generate PDF from TeX...
|
||||
if {$is_win == "yes"} {
|
||||
puts "Info: Executing $LATEXDIR/make.bat..."
|
||||
} else {
|
||||
puts "Info: Executing $LATEXDIR/Makefile..."
|
||||
}
|
||||
}
|
||||
set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log
|
||||
|
||||
if {"$is_win" == "yes"} {
|
||||
set RESULT [catch {eval exec [auto_execok $LATEXDIR/make.bat] >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
|
||||
} else {
|
||||
set RESULT [catch {eval exec "make -f $LATEXDIR/Makefile" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
|
||||
|
||||
# Small workaround for *nix stations
|
||||
set prev_loc [pwd]
|
||||
cd $LATEXDIR
|
||||
set RESULT [catch {eval exec "pdflatex refman.tex" >> "$OUTDIR/pdflatex_out.log"} LaTeX_ERROR]
|
||||
cd $prev_loc
|
||||
}
|
||||
|
||||
if {$RESULT != 0} {
|
||||
set NbErrors [regexp -all -line {^\s*[^\s]+} $LaTeX_ERROR]
|
||||
if {$NbErrors > 0} {
|
||||
puts "\nWarning: PDFLaTeX reported $NbErrors messages.\nSee log in $PDFLOG\n"
|
||||
set LaTeX_ERROR_FILE [open $PDFLOG "a"]
|
||||
puts $LaTeX_ERROR_FILE "\n===================================================="
|
||||
puts $LaTeX_ERROR_FILE "Logfile of file $TEX:"
|
||||
puts $LaTeX_ERROR_FILE "====================================================\n"
|
||||
puts $LaTeX_ERROR_FILE $LaTeX_ERROR
|
||||
close $LaTeX_ERROR_FILE
|
||||
}
|
||||
}
|
||||
|
||||
# ...and place it to the specific folder
|
||||
if {![file exists "$LATEXDIR/refman.pdf"]} {
|
||||
puts "Fatal: PDFLaTeX failed to create output file, stopping!"
|
||||
return -1
|
||||
}
|
||||
|
||||
set destFolder $PDFDIR
|
||||
set parsed_string [split $TEX "_"]
|
||||
if { [lsearch $parsed_string "tutorial"] != -1 } {
|
||||
set TEX [string map [list occt__ occt_] $TEX]
|
||||
set destFolder $PDFDIR
|
||||
} elseif { [lsearch $parsed_string "user"] != -1 } {
|
||||
set TEX [string map [list user_guides__ ""] $TEX]
|
||||
set destFolder $UGDIR
|
||||
} elseif { [lsearch $parsed_string "dev"] != -1 } {
|
||||
set TEX [string map [list dev_guides__ ""] $TEX]
|
||||
set destFolder $DGDIR
|
||||
}
|
||||
file rename -force $LATEXDIR/refman.pdf "$destFolder/$TEX.pdf"
|
||||
|
||||
}
|
||||
} elseif { $generatorMode == "CHM_ONLY" } {
|
||||
file rename $OUTDIR/overview.chm $OUTDIR/occt_overview.chm
|
||||
}
|
||||
cd $INDIR
|
||||
|
||||
if { $generatorMode == "HTML_ONLY" } {
|
||||
puts "\nHTML documentation is generated in \n$DOCDIR"
|
||||
}
|
||||
if { $generatorMode == "CHM_ONLY" } {
|
||||
puts "\nGenerated CHM documentation is in \n$OUTDIR/overview.chm"
|
||||
}
|
||||
|
||||
puts ""
|
||||
}
|
||||
|
||||
# Remove temporary Doxygen files
|
||||
set deleteList [glob -nocomplain -type f "*.tmp"]
|
||||
foreach file $deleteList {
|
||||
file delete $file
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
# Generates Doxygen configuration file for Overview documentation
|
||||
proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMode ""} {DocFilesList {}} {ModulesList {}} verboseMode searchMode hhcPath mathjaxLocation graphvizPath productsPath} {
|
||||
|
||||
set inputDir [OCCDoc_GetDoxDir]
|
||||
set TEMPLATES_DIR $inputDir/resources
|
||||
set occt_version [OCCDoc_DetectCasVersion]
|
||||
|
||||
# Delete existent doxyfile
|
||||
file delete $doxyFileName
|
||||
|
||||
# Copy specific template to the target folder
|
||||
if { $docType == "REFMAN" } {
|
||||
file copy "$TEMPLATES_DIR/occt_rm.doxyfile" $doxyFileName
|
||||
} elseif { $docType == "OVERVIEW" } {
|
||||
if { $generatorMode == "HTML_ONLY" || $generatorMode == "CHM_ONLY" } {
|
||||
file copy "$TEMPLATES_DIR/occt_ug_html.doxyfile" $doxyFileName
|
||||
} elseif { $generatorMode == "PDF_ONLY"} {
|
||||
file copy "$TEMPLATES_DIR/occt_ug_pdf.doxyfile" $doxyFileName
|
||||
} else {
|
||||
puts "Error: Unknown generation mode"
|
||||
return -1
|
||||
}
|
||||
} else {
|
||||
puts "Error: Cannot generate unknown document type"
|
||||
return -1
|
||||
}
|
||||
|
||||
set doxyFile [open $doxyFileName "a"]
|
||||
# Write specific options
|
||||
if { $docType == "REFMAN" } {
|
||||
|
||||
# Load lists of modules scripts
|
||||
if { $productsPath == "" } {
|
||||
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/OS/" *.tcl]
|
||||
} else {
|
||||
set modules_scripts [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $productsPath]/VAS/" *.tcl]
|
||||
}
|
||||
if { [llength $modules_scripts] != 0} {
|
||||
foreach module_file $modules_scripts {
|
||||
source $module_file
|
||||
}
|
||||
}
|
||||
|
||||
set ALL_MODULES [OCCDoc_GetModulesList $productsPath]
|
||||
if { [llength $ModulesList] == 0 } {
|
||||
# by default take all modules
|
||||
set modules $ALL_MODULES
|
||||
} else {
|
||||
set modules $ModulesList
|
||||
}
|
||||
|
||||
# Detect invalid names of modules
|
||||
foreach module $modules {
|
||||
if { $module == "" } {
|
||||
continue
|
||||
}
|
||||
if {[lsearch $ALL_MODULES $module] == -1 } {
|
||||
puts "Error: No module $module is known. Aborting..."
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
# Set context
|
||||
set one_module [expr [llength $modules] == 1]
|
||||
if { $one_module } {
|
||||
set title "OCCT [$modules:name]"
|
||||
set name $modules
|
||||
} else {
|
||||
set title "Open CASCADE Technology"
|
||||
set name OCCT
|
||||
}
|
||||
|
||||
# Get list of header files in the specified modules
|
||||
set filelist {}
|
||||
foreach module $modules {
|
||||
if { $module == "" } {
|
||||
continue
|
||||
}
|
||||
foreach tk [$module:toolkits] {
|
||||
foreach pk [split [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $productsPath]]] {
|
||||
if { [llength $pk] != "{}" } {
|
||||
lappend filelist [OCCDoc_GetHeadersList "p" "$pk" "$productsPath"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Filter out files Handle_*.hxx and *.lxx
|
||||
set hdrlist {}
|
||||
foreach fileset $filelist {
|
||||
set hdrset {}
|
||||
foreach hdr $fileset {
|
||||
if { ! [regexp {Handle_.*[.]hxx} $hdr] && ! [regexp {.*[.]lxx} $hdr] } {
|
||||
lappend hdrset $hdr
|
||||
}
|
||||
}
|
||||
lappend hdrlist $hdrset
|
||||
}
|
||||
set filelist $hdrlist
|
||||
|
||||
set doxyFile [open $doxyFileName "a"]
|
||||
|
||||
puts $doxyFile "PROJECT_NAME = \"$title\""
|
||||
puts $doxyFile "PROJECT_NUMBER = $occt_version"
|
||||
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
|
||||
puts $doxyFile "GENERATE_TAGFILE = $outDir/${name}.tag"
|
||||
|
||||
if { [string tolower $searchMode] == "none" } {
|
||||
puts $doxyFile "SEARCHENGINE = NO"
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = NO"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} else {
|
||||
puts $doxyFile "SEARCHENGINE = YES"
|
||||
if { [string tolower $searchMode] == "local" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = NO"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} elseif { [string tolower $searchMode] == "server" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = YES"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} elseif { [string tolower $searchMode] == "external" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = YES"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = YES"
|
||||
} else {
|
||||
puts "Error: Wrong search engine type: $searchMode."
|
||||
close $doxyFile
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
|
||||
puts $doxyFile "DOT_PATH = $graphvizPath"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
|
||||
|
||||
# list of files to generate
|
||||
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
|
||||
puts $doxyFile ""
|
||||
puts $doxyFile "INPUT = $mainpage \\"
|
||||
foreach header $filelist {
|
||||
puts $doxyFile " $header \\"
|
||||
}
|
||||
|
||||
puts $doxyFile "MATHJAX_FORMAT = HTML-CSS"
|
||||
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
|
||||
|
||||
puts $doxyFile ""
|
||||
|
||||
} 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 = $inputDir/resources/occ_logo.png"
|
||||
|
||||
set PARAM_INPUT "INPUT ="
|
||||
set PARAM_IMAGEPATH "IMAGE_PATH = $inputDir/resources/ "
|
||||
foreach docFile $DocFilesList {
|
||||
set NEW_IMG_PATH "$inputDir/$docFile"
|
||||
if { [string compare $NEW_IMG_PATH [OCCDoc_GetRootDir $productsPath]] != 0 } {
|
||||
set img_string [file dirname $NEW_IMG_PATH]/images
|
||||
if { [file exists $img_string] } {
|
||||
append PARAM_IMAGEPATH " $img_string"
|
||||
}
|
||||
}
|
||||
append PARAM_INPUT " " $inputDir/$docFile
|
||||
}
|
||||
puts $doxyFile $PARAM_INPUT
|
||||
puts $doxyFile $PARAM_IMAGEPATH
|
||||
|
||||
# Add document type-specific options
|
||||
if { $generatorMode == "HTML_ONLY"} {
|
||||
# generate tree view
|
||||
puts $doxyFile "GENERATE_TREEVIEW = YES"
|
||||
|
||||
# Set a reference to a TAGFILE
|
||||
if { $tagFileDir != "" } {
|
||||
if {[file exists $tagFileDir/OCCT.tag] == 1} {
|
||||
#set tagPath [OCCDoc_GetRelPath $tagFileDir $outDir/html]
|
||||
set tagPath $tagFileDir
|
||||
puts $doxyFile "TAGFILES = $tagFileDir/OCCT.tag=../../refman/html"
|
||||
}
|
||||
}
|
||||
# HTML Search engine options
|
||||
if { [string tolower $searchMode] == "none" } {
|
||||
puts $doxyFile "SEARCHENGINE = NO"
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = NO"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} else {
|
||||
puts $doxyFile "SEARCHENGINE = YES"
|
||||
if { [string tolower $searchMode] == "local" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = NO"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} elseif { [string tolower $searchMode] == "server" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = YES"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = NO"
|
||||
} elseif { [string tolower $searchMode] == "external" } {
|
||||
puts $doxyFile "SERVER_BASED_SEARCH = YES"
|
||||
puts $doxyFile "EXTERNAL_SEARCH = YES"
|
||||
} else {
|
||||
puts "Error: Wrong search engine type: $searchMode."
|
||||
close $doxyFile
|
||||
return -1
|
||||
}
|
||||
}
|
||||
} elseif { $generatorMode == "CHM_ONLY"} {
|
||||
# specific options for CHM file generation
|
||||
puts $doxyFile "GENERATE_TREEVIEW = NO"
|
||||
puts $doxyFile "SEARCHENGINE = NO"
|
||||
puts $doxyFile "GENERATE_HTMLHELP = YES"
|
||||
puts $doxyFile "CHM_FILE = ../../overview.chm"
|
||||
puts $doxyFile "HHC_LOCATION = \"$hhcPath\""
|
||||
puts $doxyFile "DISABLE_INDEX = YES"
|
||||
}
|
||||
|
||||
# Formula options
|
||||
puts $doxyFile "MATHJAX_RELPATH = ${mathjaxLocation}"
|
||||
}
|
||||
|
||||
close $doxyFile
|
||||
return 0
|
||||
}
|
886
adm/occaux.tcl
Normal file
@@ -0,0 +1,886 @@
|
||||
# =======================================================================
|
||||
# Created on: 2014-03-21
|
||||
# Created by: OMY
|
||||
# Copyright (c) 1996-1999 Matra Datavision
|
||||
# Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
#
|
||||
# This file is part of Open CASCADE Technology software library.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
# by the Free Software Foundation, with special exception defined in the file
|
||||
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
# distribution for complete text of the license and disclaimer of any warranty.
|
||||
#
|
||||
# Alternatively, this file may be used under the terms of Open CASCADE
|
||||
# commercial license or contractual agreement.
|
||||
#
|
||||
# Brief: This script contains auxilary functions which can be used
|
||||
# in documentation generation process
|
||||
# =======================================================================
|
||||
|
||||
# ==============================================
|
||||
# Commonly used functions
|
||||
# ==============================================
|
||||
|
||||
# Parses arguments line like "-arg1=val1 -arg2=val2 ..." to array args_names and map args_values
|
||||
proc OCCDoc_ParseArguments {arguments} {
|
||||
global args_names
|
||||
global args_values
|
||||
set args_names {}
|
||||
array set args_values {}
|
||||
|
||||
foreach arg $arguments {
|
||||
if {[regexp {^(-)[a-z]+$} $arg] == 1} {
|
||||
set name [string range $arg 1 [string length $arg]-1]
|
||||
lappend args_names $name
|
||||
set args_values($name) "NULL"
|
||||
continue
|
||||
} elseif {[regexp {^(-)[a-z]+=.+$} $arg] == 1} {
|
||||
set equal_symbol_position [string first "=" $arg]
|
||||
set name [string range $arg 1 $equal_symbol_position-1]
|
||||
lappend args_names $name
|
||||
set value [string range $arg $equal_symbol_position+1 [string length $arguments]-1]
|
||||
|
||||
# To parse a list of values for -m parameter
|
||||
if { [string first "," $value] != -1 } {
|
||||
set value [split $value ","];
|
||||
}
|
||||
|
||||
set args_values($name) $value
|
||||
|
||||
} else {
|
||||
puts "Error in argument $arg."
|
||||
return 1
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
# Returns script parent folder
|
||||
proc OCCDoc_GetDoxDir {} {
|
||||
return [file normalize [file dirname [info script]]/../dox]
|
||||
}
|
||||
|
||||
# Returns OCCT root dir
|
||||
proc OCCDoc_GetOCCTRootDir {} {
|
||||
set path [OCCDoc_GetDoxDir]
|
||||
return [file normalize $path/..]
|
||||
}
|
||||
|
||||
# Returns root dir
|
||||
proc OCCDoc_GetRootDir { {theProductsPath ""} } {
|
||||
|
||||
if { $theProductsPath == "" } {
|
||||
return [OCCDoc_GetOCCTRootDir]
|
||||
} else {
|
||||
return [file normalize $theProductsPath]
|
||||
}
|
||||
}
|
||||
|
||||
# Returns OCCT include dir
|
||||
proc OCCDoc_GetIncDir { {theProductsPath ""} } {
|
||||
set path [OCCDoc_GetRootDir $theProductsPath]
|
||||
return "$path/inc"
|
||||
}
|
||||
|
||||
# Returns OCCT source dir
|
||||
proc OCCDoc_GetSourceDir { {theProductsPath ""} } {
|
||||
set path [OCCDoc_GetRootDir $theProductsPath]
|
||||
return "$path/src"
|
||||
}
|
||||
|
||||
# Returns name of the package from the current toolkit
|
||||
proc OCCDoc_GetNameFromPath { thePath } {
|
||||
|
||||
set splitted_path [split $thePath "/" ]
|
||||
set package_name [lindex $splitted_path end]
|
||||
|
||||
return $package_name
|
||||
}
|
||||
|
||||
# Returns the relative path between two folders
|
||||
proc OCCDoc_GetRelPath {thePathFrom thePathTo} {
|
||||
if { [file isdirectory "$thePathFrom"] == 0 } {
|
||||
return ""
|
||||
}
|
||||
|
||||
set aPathFrom [file normalize "$thePathFrom"]
|
||||
set aPathTo [file normalize "$thePathTo"]
|
||||
|
||||
set aCutedPathFrom "${aPathFrom}/dummy"
|
||||
set aRelatedDeepPath ""
|
||||
|
||||
while { "$aCutedPathFrom" != [file normalize "$aCutedPathFrom/.."] } {
|
||||
set aCutedPathFrom [file normalize "$aCutedPathFrom/.."]
|
||||
# does aPathTo contain aCutedPathFrom?
|
||||
regsub -all $aCutedPathFrom $aPathTo "" aPathFromAfterCut
|
||||
if { "$aPathFromAfterCut" != "$aPathTo" } { # if so
|
||||
if { "$aCutedPathFrom" == "$aPathFrom" } { # just go higher, for example, ./somefolder/someotherfolder
|
||||
set aPathTo ".${aPathTo}"
|
||||
} elseif { "$aCutedPathFrom" == "$aPathTo" } { # remove the last "/"
|
||||
set aRelatedDeepPath [string replace $aRelatedDeepPath end end ""]
|
||||
}
|
||||
regsub -all $aCutedPathFrom $aPathTo $aRelatedDeepPath aPathToAfterCut
|
||||
regsub -all "//" $aPathToAfterCut "/" aPathToAfterCut
|
||||
return $aPathToAfterCut
|
||||
}
|
||||
set aRelatedDeepPath "$aRelatedDeepPath../"
|
||||
}
|
||||
|
||||
return $thePathTo
|
||||
}
|
||||
|
||||
# Returns OCCT version string from file Standard_Version.hxx (if available)
|
||||
proc OCCDoc_DetectCasVersion {} {
|
||||
set occt_ver 6.7.0
|
||||
set occt_ver_add ""
|
||||
set filename "[OCCDoc_GetSourceDir]/Standard/Standard_Version.hxx"
|
||||
if { [file exists $filename] } {
|
||||
set fh [open $filename "r"]
|
||||
set fh_loaded [read $fh]
|
||||
close $fh
|
||||
regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver
|
||||
regexp {[^/]\s*#\s*define\s+OCC_VERSION_DEVELOPMENT\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver_add
|
||||
if { "$occt_ver_add" != "" } { set occt_ver ${occt_ver}.$occt_ver_add }
|
||||
}
|
||||
return $occt_ver
|
||||
}
|
||||
|
||||
# Checks if the necessary tools exist
|
||||
proc OCCDoc_DetectNecessarySoftware { DOXYGEN_PATH GRAPHVIZ_PATH INKSCAPE_PATH HHC_PATH PDFLATEX_PATH } {
|
||||
|
||||
upvar 1 DOXYGEN_PATH doxy_path
|
||||
upvar 1 GRAPHVIZ_PATH graph_path
|
||||
upvar 1 INKSCAPE_PATH inkscape_path
|
||||
upvar 1 HHC_PATH hhc_path
|
||||
upvar 1 PDFLATEX_PATH latex_path
|
||||
|
||||
set doxy_path ""
|
||||
set graph_path ""
|
||||
set inkscape_path ""
|
||||
set latex_path ""
|
||||
set hhc_path ""
|
||||
|
||||
set is_win "no"
|
||||
if { "$::tcl_platform(platform)" == "windows" } {
|
||||
set is_win "yes"
|
||||
}
|
||||
if {"$is_win" == "yes"} {
|
||||
set exe ".exe"
|
||||
} else {
|
||||
set exe ""
|
||||
}
|
||||
|
||||
set g_flag "no"
|
||||
set d_flag "no"
|
||||
set i_flag "no"
|
||||
set h_flag "no"
|
||||
set l_flag "no"
|
||||
|
||||
puts ""
|
||||
set envPath $::env(PATH)
|
||||
if { $is_win == "yes" } {
|
||||
set searchPathsList [split $envPath ";"]
|
||||
} else {
|
||||
set searchPathsList [split $envPath ":"]
|
||||
}
|
||||
|
||||
foreach path $searchPathsList {
|
||||
if { ($is_win == "no") &&
|
||||
(($path == "/usr/bin") || ($path == "/usr/local/bin")) } {
|
||||
# Avoid searching in default bin location
|
||||
continue
|
||||
}
|
||||
if {$d_flag == "no"} {
|
||||
if { [file exists $path/doxygen$exe] } {
|
||||
catch { exec $path/doxygen -V } version_string
|
||||
set version [lindex [split $version_string "\n"] 0]
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set doxy_path "$path/doxygen$exe"
|
||||
set d_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$g_flag == "no"} {
|
||||
if { [file exists $path/dot$exe] } {
|
||||
catch { exec $path/dot -V } version
|
||||
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set graph_path "$path/dot$exe"
|
||||
set g_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$i_flag == "no"} {
|
||||
if { [file exists $path/inkscape$exe] } {
|
||||
catch { exec $path/inkscape -V } version
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set inkscape_path "$path/inkscape$exe"
|
||||
set i_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$l_flag == "no"} {
|
||||
if { [file exists $path/pdflatex$exe] } {
|
||||
catch { exec $path/pdflatex -version } version
|
||||
set version [lindex [split $version "\n"] 0]
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set latex_path "$path/pdflatex$exe"
|
||||
set l_flag "yes"
|
||||
}
|
||||
}
|
||||
if { ("$is_win" == "yes") && ($h_flag == "no") } {
|
||||
if { [file exists $path/hhc.exe] } {
|
||||
puts "Info: hhc "
|
||||
puts " found in $path."
|
||||
set hhc_path "hhc$exe"
|
||||
set h_flag "yes"
|
||||
}
|
||||
}
|
||||
if { ($d_flag == "yes") &&
|
||||
($i_flag == "yes") &&
|
||||
($g_flag == "yes") &&
|
||||
($l_flag == "yes") &&
|
||||
(($is_win == "yes") &&
|
||||
($h_flag == "yes")) } {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# On Windows search for hhc.exe in the default location
|
||||
# if it has not been found yet
|
||||
if { ("$is_win" == "yes") && ($h_flag == "no") } {
|
||||
if { [info exists ::env(ProgramFiles\(x86\))] } {
|
||||
set h_flag "yes"
|
||||
set path "$::env(ProgramFiles\(x86\))\\HTML Help Workshop"
|
||||
set hhc_path "$path\\hhc.exe"
|
||||
puts "Info: hhc "
|
||||
puts " found in $path."
|
||||
} else {
|
||||
if { [info exists ::env(ProgramFiles)] } {
|
||||
set h_flag "yes"
|
||||
set path "$::env(ProgramFiles)\\HTML Help Workshop"
|
||||
set hhc_path "$path\\hhc.exe"
|
||||
puts "Info: hhc"
|
||||
puts " found in $path."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# On *nix-like platforms,
|
||||
# check the default binary locations if the tools had not been found yet
|
||||
if { $is_win == "no" &&
|
||||
(($d_flag == "no") ||
|
||||
($i_flag == "no") ||
|
||||
($g_flag == "no") ||
|
||||
($l_flag == "no")) } {
|
||||
|
||||
set default_path { "/usr/bin" "/usr/local/bin" }
|
||||
foreach path $default_path {
|
||||
if {$d_flag == "no"} {
|
||||
if { [file exists $path/doxygen$exe] } {
|
||||
catch { exec $path/doxygen -V } version_string
|
||||
set version [lindex [split $version_string "\n"] 0]
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set doxy_path "$path/doxygen$exe"
|
||||
set d_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$g_flag == "no"} {
|
||||
if { [file exists $path/dot$exe] } {
|
||||
catch { exec $path/dot -V } version
|
||||
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set graph_path "$path/dot$exe"
|
||||
set g_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$i_flag == "no"} {
|
||||
if { [file exists $path/inkscape$exe] } {
|
||||
catch { exec $path/inkscape -V } version
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set inkscape_path "$path/inkscape$exe"
|
||||
set i_flag "yes"
|
||||
}
|
||||
}
|
||||
if {$l_flag == "no"} {
|
||||
if { [file exists $path/pdflatex$exe] } {
|
||||
catch { exec $path/pdflatex -version } version
|
||||
set version [lindex [split $version "\n"] 0]
|
||||
puts "Info: $version "
|
||||
puts " found in $path."
|
||||
set latex_path "$path/pdflatex$exe"
|
||||
set l_flag "yes"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Check if tools have been found
|
||||
if { $d_flag == "no" } {
|
||||
puts "Warning: Could not find doxygen installed."
|
||||
return -1
|
||||
}
|
||||
if { $g_flag == "no" } {
|
||||
puts "Warning: Could not find graphviz installed."
|
||||
}
|
||||
if { $i_flag == "no" } {
|
||||
puts "Warning: Could not find inkscape installed."
|
||||
}
|
||||
if { $l_flag == "no" } {
|
||||
puts "Warning: Could not find pdflatex installed."
|
||||
}
|
||||
if { ("$::tcl_platform(platform)" == "windows") && ($h_flag == "no") } {
|
||||
puts "Warning: Could not find hhc installed."
|
||||
}
|
||||
|
||||
puts ""
|
||||
}
|
||||
|
||||
# Convert SVG files to PDF format to allow including them to PDF
|
||||
# (requires InkScape to be in PATH)
|
||||
proc OCCDoc_ProcessSvg {latexDir verboseMode} {
|
||||
|
||||
foreach file [glob -nocomplain $latexDir/*.svg] {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ==============================================
|
||||
# Reference Manual-specific functions
|
||||
# ==============================================
|
||||
|
||||
# Finds dependencies between all modules
|
||||
proc OCCDoc_CreateModulesDependencyGraph {dir filename modules mpageprefix} {
|
||||
global module_dependency
|
||||
|
||||
if {![catch {open $dir/$filename.dot "w"} file]} {
|
||||
puts $file "digraph $filename"
|
||||
puts $file "\{"
|
||||
|
||||
foreach mod $modules {
|
||||
if { $mod == "" } {
|
||||
continue
|
||||
}
|
||||
puts $file "\t$mod \[ URL = \"[string tolower $mpageprefix$mod.html]\" \]"
|
||||
foreach mod_depend $module_dependency($mod) {
|
||||
puts $file "\t$mod_depend -> $mod \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
|
||||
}
|
||||
}
|
||||
|
||||
puts $file "\}"
|
||||
close $file
|
||||
|
||||
return $filename
|
||||
}
|
||||
}
|
||||
|
||||
# Finds dependencies between all toolkits in module
|
||||
proc OCCDoc_CreateModuleToolkitsDependencyGraph {dir filename modulename tpageprefix} {
|
||||
global toolkits_in_module
|
||||
global toolkit_dependency
|
||||
global toolkit_parent_module
|
||||
|
||||
if {![catch {open $dir/$filename.dot "w"} file]} {
|
||||
puts $file "digraph $filename"
|
||||
puts $file "\{"
|
||||
|
||||
foreach tk $toolkits_in_module($modulename) {
|
||||
puts $file "\t$tk \[ URL = \"[string tolower $tpageprefix$tk.html]\"\ ]"
|
||||
foreach tkd $toolkit_dependency($tk) {
|
||||
if { [info exists toolkit_parent_module($tkd)] } {
|
||||
if {$toolkit_parent_module($tkd) == $modulename} {
|
||||
puts $file "\t$tkd -> $tk \[ dir = \"back\", color = \"midnightblue\", style = \"solid\" \]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
puts $file "\}"
|
||||
close $file
|
||||
|
||||
return $filename
|
||||
}
|
||||
}
|
||||
|
||||
# Finds dependencies between the current toolkit and other toolkits
|
||||
proc OCCDoc_CreateToolkitDependencyGraph {dir filename toolkitname tpageprefix} {
|
||||
global toolkit_dependency
|
||||
|
||||
if {![catch {open $dir/$filename.dot "w"} file]} {
|
||||
puts $file "digraph $filename"
|
||||
puts $file "\{"
|
||||
|
||||
puts $file "\t$toolkitname \[ URL = \"[string tolower $tpageprefix$toolkitname.html]\"\, shape = box ]"
|
||||
foreach tkd $toolkit_dependency($toolkitname) {
|
||||
puts $file "\t$tkd \[ URL = \"[string tolower $tpageprefix$tkd.html]\"\ , shape = box ]"
|
||||
puts $file "\t$toolkitname -> $tkd \[ color = \"midnightblue\", style = \"solid\" \]"
|
||||
}
|
||||
|
||||
if {[llength $toolkit_dependency($toolkitname)] > 1} {
|
||||
puts $file "\taspect = 1"
|
||||
}
|
||||
|
||||
puts $file "\}"
|
||||
close $file
|
||||
|
||||
return $filename
|
||||
}
|
||||
}
|
||||
|
||||
# Fills arrays of modules, toolkits, dependency of modules/toolkits etc
|
||||
proc OCCDoc_LoadData { {theProductsDir ""} } {
|
||||
global toolkits_in_module
|
||||
global toolkit_dependency
|
||||
global toolkit_parent_module
|
||||
global module_dependency
|
||||
|
||||
if { $theProductsDir == ""} {
|
||||
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/OS/" *.tcl]
|
||||
} else {
|
||||
set modules_files [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/VAS/" *.tcl]
|
||||
}
|
||||
|
||||
foreach module_file $modules_files {
|
||||
source $module_file
|
||||
}
|
||||
|
||||
set modules [OCCDoc_GetModulesList $theProductsDir]
|
||||
foreach mod $modules {
|
||||
|
||||
if { $mod == "" } {
|
||||
continue
|
||||
}
|
||||
# Get toolkits of current module
|
||||
set toolkits_in_module($mod) [$mod:toolkits]
|
||||
# Get all dependence of current toolkit
|
||||
foreach tk $toolkits_in_module($mod) {
|
||||
# set parent module of current toolkit
|
||||
set toolkit_parent_module($tk) $mod
|
||||
set exlibfile [open "[OCCDoc_GetSourceDir $theProductsDir]/$tk/EXTERNLIB" r]
|
||||
set exlibfile_data [read $exlibfile]
|
||||
set exlibfile_data [split $exlibfile_data "\n"]
|
||||
|
||||
set toolkit_dependency($tk) {}
|
||||
foreach dtk $exlibfile_data {
|
||||
if { ([string first "TK" $dtk 0] == 0) ||
|
||||
([string first "P" $dtk 0] == 0) } {
|
||||
lappend toolkit_dependency($tk) $dtk
|
||||
}
|
||||
}
|
||||
close $exlibfile
|
||||
}
|
||||
}
|
||||
|
||||
# Get modules dependency
|
||||
foreach mod $modules {
|
||||
set module_dependency($mod) {}
|
||||
foreach tk $toolkits_in_module($mod) {
|
||||
foreach tkd $toolkit_dependency($tk) {
|
||||
if { [info exists toolkit_parent_module($tkd)] } {
|
||||
if { $toolkit_parent_module($tkd) != $mod &&
|
||||
[lsearch $module_dependency($mod) $toolkit_parent_module($tkd)] == -1} {
|
||||
lappend module_dependency($mod) $toolkit_parent_module($tkd)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Returns list of packages of the given toolkit
|
||||
proc OCCDoc_GetPackagesList { theToolKitPath } {
|
||||
|
||||
set packages_list {}
|
||||
|
||||
# Open file with list of packages of the given toolkit
|
||||
set fileid [open "$theToolKitPath/PACKAGES" "r"]
|
||||
|
||||
while { [eof $fileid] == 0 } {
|
||||
set str [gets $fileid]
|
||||
if { $str != "" } {
|
||||
lappend packages_list $str
|
||||
}
|
||||
}
|
||||
|
||||
close $fileid
|
||||
|
||||
return $packages_list
|
||||
}
|
||||
|
||||
# Returns list of modules from UDLIST
|
||||
proc OCCDoc_GetModulesList { {theProductsDir ""} } {
|
||||
|
||||
if { $theProductsDir == "" } {
|
||||
source "[OCCDoc_GetSourceDir $theProductsDir]/OS/Modules.tcl"
|
||||
# load a command from this file
|
||||
set modules [OS:Modules]
|
||||
} else {
|
||||
source "[OCCDoc_GetSourceDir $theProductsDir]/VAS/Products.tcl"
|
||||
# load a command from this file
|
||||
set modules [VAS:Products]
|
||||
}
|
||||
|
||||
return $modules
|
||||
}
|
||||
|
||||
# Returns list of desired files in the specified location
|
||||
proc OCCDoc_GetHeadersList { theDesiredContent thePackageName {theProductsDir ""} } {
|
||||
|
||||
# Get list of header files with path
|
||||
set files_list [split [glob -nocomplain -type f -directory "[OCCDoc_GetIncDir $theProductsDir]" "${thePackageName}.hxx" "${thePackageName}_*.hxx"]]
|
||||
|
||||
# Get content according to desired type ('p' for path and 'f' for filenames only)
|
||||
if { $theDesiredContent == "p" } {
|
||||
return $files_list
|
||||
} elseif { $theDesiredContent == "f" } {
|
||||
|
||||
# Cut paths from filenames
|
||||
foreach file $files_list {
|
||||
set elem_index [lsearch $files_list $file]
|
||||
lset files_list $elem_index [OCCDoc_GetNameFromPath [lindex $files_list $elem_index]]
|
||||
}
|
||||
return $files_list
|
||||
}
|
||||
}
|
||||
|
||||
# Returns location of the toolkit
|
||||
proc OCCDoc_Locate { theToolKitName {theProductsDir ""} } {
|
||||
set tk_dir "[OCCDoc_GetSourceDir $theProductsDir]/[OCCDoc_GetNameFromPath $theToolKitName]"
|
||||
return $tk_dir
|
||||
}
|
||||
|
||||
# Gets contents of the given html node (for Post-processing)
|
||||
proc OCCDoc_GetNodeContents {node props html} {
|
||||
set openTag "<$node$props>"
|
||||
set closingTag "</$node>"
|
||||
set start [string first $openTag $html]
|
||||
if {$start == -1} {
|
||||
return ""
|
||||
}
|
||||
set start [expr $start + [string length $openTag]]
|
||||
set end [string length $html]
|
||||
set html [string range $html $start $end]
|
||||
set start [string first $closingTag $html]
|
||||
set end [string length $html]
|
||||
if {$start == -1} {
|
||||
return ""
|
||||
}
|
||||
set start [expr $start - 1]
|
||||
return [string range $html 0 $start]
|
||||
}
|
||||
|
||||
# Generates main page file describing module structure
|
||||
proc OCCDoc_MakeMainPage {outDir outFile modules {theProductsDir ""} } {
|
||||
global env
|
||||
|
||||
set one_module [expr [llength $modules] == 1]
|
||||
set fd [open $outFile "w"]
|
||||
|
||||
set module_prefix "module_"
|
||||
set toolkit_prefix "toolkit_"
|
||||
set package_prefix "package_"
|
||||
|
||||
if { ! [file exists "$outDir/html"] } {
|
||||
file mkdir "$outDir/html"
|
||||
}
|
||||
|
||||
OCCDoc_LoadData $theProductsDir
|
||||
|
||||
# Main page: list of modules
|
||||
if { ! $one_module } {
|
||||
puts $fd "/**"
|
||||
puts $fd "\\mainpage Open CASCADE Technology"
|
||||
|
||||
foreach mod $modules {
|
||||
puts $fd "\\li \\subpage [string tolower $module_prefix$mod]"
|
||||
}
|
||||
# insert modules relationship diagramm
|
||||
puts $fd "\\dotfile [OCCDoc_CreateModulesDependencyGraph $outDir/html schema_all_modules $modules $module_prefix]"
|
||||
puts $fd "**/\n"
|
||||
}
|
||||
|
||||
# One page per module: list of toolkits
|
||||
set toolkits {}
|
||||
foreach mod $modules {
|
||||
if { $mod == "" } {
|
||||
continue
|
||||
}
|
||||
puts $fd "/**"
|
||||
if { $one_module } {
|
||||
puts $fd "\\mainpage OCCT Module [$mod:name]"
|
||||
} else {
|
||||
puts $fd "\\page [string tolower module_$mod] Module [$mod:name]"
|
||||
}
|
||||
foreach tk [lsort [$mod:toolkits]] {
|
||||
lappend toolkits $tk
|
||||
puts $fd "\\li \\subpage [string tolower $toolkit_prefix$tk]"
|
||||
}
|
||||
puts $fd "\\dotfile [OCCDoc_CreateModuleToolkitsDependencyGraph $outDir/html schema_$mod $mod $toolkit_prefix]"
|
||||
puts $fd "**/\n"
|
||||
}
|
||||
|
||||
# One page per toolkit: list of packages
|
||||
set packages {}
|
||||
foreach tk $toolkits {
|
||||
puts $fd "/**"
|
||||
puts $fd "\\page [string tolower toolkit_$tk] Toolkit $tk"
|
||||
foreach pk [lsort [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $theProductsDir]]] {
|
||||
lappend packages $pk
|
||||
set u [OCCDoc_GetNameFromPath $pk]
|
||||
puts $fd "\\li \\subpage [string tolower $package_prefix$u]"
|
||||
}
|
||||
puts $fd "\\dotfile [OCCDoc_CreateToolkitDependencyGraph $outDir/html schema_$tk $tk $toolkit_prefix]"
|
||||
puts $fd "**/\n"
|
||||
}
|
||||
|
||||
# One page per package: list of classes
|
||||
foreach pk $packages {
|
||||
set u [OCCDoc_GetNameFromPath $pk]
|
||||
puts $fd "/**"
|
||||
puts $fd "\\page [string tolower $package_prefix$u] Package $u"
|
||||
foreach hdr [lsort [OCCDoc_GetHeadersList "f" "$pk" "$theProductsDir"]] {
|
||||
if { ! [regexp {^Handle_} $hdr] && [regexp {(.*)[.]hxx} $hdr str obj] } {
|
||||
puts $fd "\\li \\subpage $obj"
|
||||
}
|
||||
}
|
||||
puts $fd "**/\n"
|
||||
}
|
||||
|
||||
close $fd
|
||||
|
||||
return $outFile
|
||||
}
|
||||
|
||||
# Parses generated files to add a navigation path
|
||||
proc OCCDoc_PostProcessor {outDir} {
|
||||
puts "[clock format [clock seconds] -format {%Y.%m.%d %H:%M}] Post-process is started ..."
|
||||
append outDir "/html"
|
||||
set files [glob -nocomplain -type f $outDir/package_*]
|
||||
if { $files != {} } {
|
||||
foreach f [lsort $files] {
|
||||
set packageFilePnt [open $f r]
|
||||
set packageFile [read $packageFilePnt]
|
||||
set navPath [OCCDoc_GetNodeContents "div" " id=\"nav-path\" class=\"navpath\"" $packageFile]
|
||||
set packageName [OCCDoc_GetNodeContents "div" " class=\"title\"" $packageFile]
|
||||
regsub -all {<[^<>]*>} $packageName "" packageName
|
||||
|
||||
# add package link to nav path
|
||||
set first [expr 1 + [string last "/" $f]]
|
||||
set last [expr [string length $f] - 1]
|
||||
set packageFileName [string range $f $first $last]
|
||||
set end [string first "</ul>" $navPath]
|
||||
set end [expr $end - 1]
|
||||
set navPath [string range $navPath 0 $end]
|
||||
append navPath " <li class=\"navelem\"><a class=\"el\" href=\"$packageFileName\">$packageName</a> </li>\n </ul>"
|
||||
|
||||
# get list of files to update
|
||||
set listContents [OCCDoc_GetNodeContents "div" " class=\"textblock\"" $packageFile]
|
||||
set listContents [OCCDoc_GetNodeContents "ul" "" $listContents]
|
||||
set lines [split $listContents "\n"]
|
||||
foreach line $lines {
|
||||
if {[regexp {href=\"([^\"]*)\"} $line tmpLine classFileName]} {
|
||||
# check if anchor is there
|
||||
set anchorPos [string first "#" $classFileName]
|
||||
if {$anchorPos != -1} {
|
||||
set classFileName [string range $classFileName 0 [expr $anchorPos - 1]]
|
||||
}
|
||||
|
||||
# read class file
|
||||
set classFilePnt [open $outDir/$classFileName r+]
|
||||
set classFile [read $classFilePnt]
|
||||
|
||||
# find position of content block
|
||||
set contentPos [string first "<div class=\"header\">" $classFile]
|
||||
set navPart [string range $classFile 0 [expr $contentPos - 1]]
|
||||
|
||||
# position where to insert nav path
|
||||
set posToInsert [string last "</div>" $navPart]
|
||||
set prePart [string range $classFile 0 [expr $posToInsert - 1]]
|
||||
set postPart [string range $classFile $posToInsert [string length $classFile]]
|
||||
set newClassFile ""
|
||||
append newClassFile $prePart " <div id=\"nav-path\" class=\"navpath\">" $navPath \n " </div>" \n $postPart
|
||||
|
||||
# write updated content
|
||||
seek $classFilePnt 0
|
||||
puts $classFilePnt $newClassFile
|
||||
close $classFilePnt
|
||||
}
|
||||
}
|
||||
close $packageFilePnt
|
||||
}
|
||||
return 0
|
||||
} else {
|
||||
puts "no files found"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
# ======================================
|
||||
# User Guides-specific functions
|
||||
# ======================================
|
||||
|
||||
# Loads a list of docfiles from file FILES.txt
|
||||
proc OCCDoc_LoadFilesList {} {
|
||||
|
||||
set INPUTDIR [OCCDoc_GetDoxDir]
|
||||
|
||||
global available_docfiles
|
||||
set available_docfiles {}
|
||||
|
||||
# Read data from file
|
||||
if { [file exists "$INPUTDIR/FILES_HTML.txt"] == 1 } {
|
||||
set FILE [open "$INPUTDIR/FILES_HTML.txt" r]
|
||||
while {1} {
|
||||
set line [string trim [gets $FILE]]
|
||||
|
||||
# trim possible comments starting with '#'
|
||||
set line [regsub {\#.*} $line {}]
|
||||
if {$line != ""} {
|
||||
lappend available_docfiles $line
|
||||
}
|
||||
if {[eof $FILE]} {
|
||||
close $FILE
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
|
||||
global available_pdf
|
||||
set available_pdf {}
|
||||
|
||||
# Read data from file
|
||||
if { [file exists "$INPUTDIR/FILES_PDF.txt"] } {
|
||||
set FILE [open "$INPUTDIR/FILES_PDF.txt" r]
|
||||
while {1} {
|
||||
set line [string trim [gets $FILE]]
|
||||
|
||||
# Trim possible comments starting with '#'
|
||||
set line [regsub {\#.*} $line {}]
|
||||
if {$line != ""} {
|
||||
lappend available_pdf $line
|
||||
}
|
||||
if {[eof $FILE]} {
|
||||
close $FILE
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
# Writes new TeX file for conversion from tex to pdf for a specific doc
|
||||
proc OCCDoc_MakeRefmanTex {fileName latexDir verboseMode latexFilesList} {
|
||||
|
||||
if { $verboseMode == "YES" } {
|
||||
puts "Info: Making refman.tex file for $fileName..."
|
||||
}
|
||||
set DOCNAME "$latexDir/refman.tex"
|
||||
if {[file exists $DOCNAME] == 1} {
|
||||
file delete -force $DOCNAME
|
||||
}
|
||||
|
||||
# Copy template file to latex folder
|
||||
file copy "[OCCDoc_GetDoxDir]/resources/occt_pdf_template.tex" $DOCNAME
|
||||
|
||||
# Get templatized data
|
||||
set texfile [open $DOCNAME "r"]
|
||||
set texfile_loaded [read $texfile]
|
||||
close $texfile
|
||||
|
||||
# Replace dummy values
|
||||
set year [clock format [clock seconds] -format {%Y}]
|
||||
set texfile [open $DOCNAME "w"]
|
||||
set casVersion [OCCDoc_DetectCasVersion]
|
||||
|
||||
# Get name of the document
|
||||
set docLabel ""
|
||||
foreach aFileName $latexFilesList {
|
||||
# Find the file in FILES_PDF.txt
|
||||
set parsedFileName [split $aFileName "/" ]
|
||||
set newfileName [string range $fileName [expr [string first "__" $fileName] + 2] end]
|
||||
|
||||
if { [lsearch -nocase $parsedFileName "$newfileName.md" ] != -1 } {
|
||||
set filepath "[OCCDoc_GetDoxDir]/$aFileName"
|
||||
if { [file exists $filepath] } {
|
||||
set MDFile [open $filepath "r"]
|
||||
set label [split [gets $MDFile] "\{"]
|
||||
set docLabel [lindex $label 0]
|
||||
close $MDFile
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set texfile_loaded [string map [list DEFDOCLABEL "$docLabel" DEFCASVERSION "$casVersion" DEFFILENAME "$fileName" DEFYEAR "$year"] $texfile_loaded]
|
||||
|
||||
# Get data
|
||||
puts $texfile $texfile_loaded
|
||||
|
||||
close $texfile
|
||||
}
|
||||
|
||||
# Postprocesses generated TeX files
|
||||
proc OCCDoc_ProcessTex {{texFiles {}} {latexDir} verboseMode} {
|
||||
|
||||
foreach TEX $texFiles {
|
||||
if {$verboseMode == "YES"} {
|
||||
puts "Info: Preprocessing file $TEX..."
|
||||
}
|
||||
|
||||
if {![file exists $TEX]} {
|
||||
puts "Error: file $TEX does not exist."
|
||||
return -1
|
||||
}
|
||||
|
||||
set IN_F [open "$TEX" "r"]
|
||||
set TMPFILENAME "$latexDir/temp.tex"
|
||||
set OUT_F [open $TMPFILENAME w]
|
||||
|
||||
while {1} {
|
||||
set line [gets $IN_F]
|
||||
if { [string first "\\includegraphics" $line] != -1 } {
|
||||
# replace svg extension by pdf
|
||||
set line [regsub {[.]svg} $line ".pdf"]
|
||||
# Center images in TeX files
|
||||
set line "\\begin{center}\n $line\n\\end{center}"
|
||||
} elseif { [string first "\\subsection" $line] != -1 } {
|
||||
# Replace \subsection with \section tag
|
||||
regsub -all "\\\\subsection" $line "\\\\section" line
|
||||
} elseif { [string first "\\subsubsection" $line] != -1 } {
|
||||
# Replace \subsubsection with \subsection tag
|
||||
regsub -all "\\\\subsubsection" $line "\\\\subsection" line
|
||||
} elseif { [string first "\\paragraph" $line] != -1 } {
|
||||
# Replace \paragraph with \subsubsection tag
|
||||
regsub -all "\\\\paragraph" $line "\\\\subsubsection" line
|
||||
}
|
||||
puts $OUT_F $line
|
||||
|
||||
if {[eof $IN_F]} {
|
||||
close $IN_F
|
||||
close $OUT_F
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
file delete -force $TEX
|
||||
file rename $TMPFILENAME $TEX
|
||||
}
|
||||
}
|
8
adm/start.tcl
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/tclsh
|
||||
|
||||
# Command-line starter for occdoc command, use it as follows:
|
||||
# tclsh> source dox/start.tcl [arguments]
|
||||
|
||||
source [file join [file dirname [info script]] occaux.tcl]
|
||||
source [file join [file dirname [info script]] gendoc.tcl]
|
||||
gendoc {*}$::argv
|
185
adm/templates/3rdparty_macro.cmake
Normal file
@@ -0,0 +1,185 @@
|
||||
#
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
|
||||
|
||||
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# define 3RDPARTY_${PRODUCT_NAME}_DIR variable is it isn't defined
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
|
||||
endif()
|
||||
|
||||
# search for product directory inside 3RDPARTY_DIR directory
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "${PRODUCT_NAME}" ${PRODUCT_NAME}_DIR_NAME)
|
||||
if (${PRODUCT_NAME}_DIR_NAME)
|
||||
message (STATUS "Info: ${PRODUCT_NAME}: ${${PRODUCT_NAME}_DIR_NAME} folder is used")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "The directory containing ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED INSTALL_${PRODUCT_NAME})
|
||||
set (INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} required to be copied into install directory")
|
||||
endif()
|
||||
|
||||
# search for include directory
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/include"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER}
|
||||
NO_DEFAULT_PATH)
|
||||
find_path (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of the ${PRODUCT_NAME}" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
elseif (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# search for library
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
# first of all, search for debug version of a library if build type is debug
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME_DEBUG}
|
||||
PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/libd"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME_DEBUG})
|
||||
endif()
|
||||
|
||||
# if build type is release or debug version of library isn't found - search for release version of one
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${PRODUCT_NAME} library isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/lib(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# library path
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# search for shared library (just for win case)
|
||||
if (WIN32)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
elseif (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component(3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}"
|
||||
PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bind"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${PRODUCT_NAME} dll isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/bin(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
|
||||
# shared library path
|
||||
if (3RDPARTY_${PRODUCT_NAME}_DLL AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
get_filename_component (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${PRODUCT_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${PRODUCT_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
|
||||
endmacro()
|
15
adm/templates/custom.bat.in
Normal file
@@ -0,0 +1,15 @@
|
||||
echo off
|
||||
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
if "%CASDEB%" == "@BUILD_POSTFIX@" (
|
||||
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
|
||||
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
|
||||
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
||||
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
12
adm/templates/custom.bat.main
Normal file
@@ -0,0 +1,12 @@
|
||||
echo off
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
|
||||
if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
|
||||
if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
|
||||
rem include other custom.bat files with specific 3rdparty paths
|
||||
@ADDITIONAL_CUSTOM_CONTENT@
|
||||
|
15
adm/templates/custom.sh.in
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
||||
if [ "$CASDEB" == "@BUILD_POSTFIX@" ]; then
|
||||
export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
|
||||
export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
|
||||
export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@"
|
||||
export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@"
|
||||
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
|
||||
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
4
adm/templates/custom.sh.main
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
@ADDITIONAL_CUSTOM_CONTENT@
|
||||
|
10
adm/templates/draw.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
|
||||
rem Setup environment and launch DRAWEXE
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
echo Hint: use "pload ALL" command to load standard commands
|
||||
"%CASROOT%/%BIN_TAIL%/DRAWEXE.exe"
|
||||
|
||||
set "PATH=%ORIGIN_PATH%"
|
||||
|
8
adm/templates/draw.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh" "$1"
|
||||
|
||||
echo 'Hint: use "pload ALL" command to load standard commands'
|
||||
DRAWEXE
|
70
adm/templates/env.bat.in
Normal file
@@ -0,0 +1,70 @@
|
||||
echo off
|
||||
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@BUILD_POSTFIX@"
|
||||
|
||||
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 exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3
|
||||
)
|
||||
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
set "ORIGIN_PATH=%PATH%"
|
||||
|
||||
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
|
||||
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
|
||||
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
|
||||
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
|
||||
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
|
||||
set "PATH=%CASROOT%/%BIN_TAIL%;%PATH%"
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
set MMGT_CLEAR=1
|
||||
set CSF_EXCEPTION_PROMPT=1
|
||||
set "CSF_SHMessage=%CASROOT%\src\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
|
||||
set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
|
||||
set "CSF_XSMessage=%CASROOT%\src\XSMessage"
|
||||
set "CSF_TObjMessage=%CASROOT%\src\TObj"
|
||||
set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
|
||||
|
||||
if exist "%CASROOT%\src\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%CASROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
|
117
adm/templates/env.sh.in
Normal file
@@ -0,0 +1,117 @@
|
||||
#!/bin/bash
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="@BUILD_POSTFIX@";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
shopt -u nocasematch
|
||||
|
||||
export COMPILER="@COMPILER@"
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
fi
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${aScriptPath}/custom.sh" ]; then
|
||||
source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
if [ "$TCL_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$FREETYPE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$FREEIMAGE_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$GL2PS_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$VTK_DIR" != "" ]; then
|
||||
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
|
||||
LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
|
||||
|
||||
export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
|
||||
|
||||
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
||||
else
|
||||
export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
|
||||
fi
|
||||
|
||||
if [ "$WOKSTATION" == "mac" ]; then
|
||||
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
||||
else
|
||||
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----- Set envoronment variables used by OCCT -----
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
||||
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
||||
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
||||
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
||||
|
||||
# Draw Harness special stuff
|
||||
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
fi
|
||||
|
3
adm/templates/freeimage.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
#freeimage
|
||||
|
||||
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage" "freeimaged")
|
9
adm/templates/freeimageplus.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
#freeimageplus
|
||||
|
||||
if (WIN32)
|
||||
if (3RDPARTY_FREEIMAGE_DIR AND NOT 3RDPARTY_FREEIMAGEPLUS_DIR)
|
||||
set (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}" CACHE PATH "The directory containing freeimageplus" FORCE)
|
||||
endif()
|
||||
|
||||
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus" "freeimageplusd")
|
||||
endif()
|
233
adm/templates/freetype.cmake
Normal file
@@ -0,0 +1,233 @@
|
||||
# freetype
|
||||
|
||||
if (NOT DEFINED INSTALL_FREETYPE)
|
||||
set (INSTALL_FREETYPE OFF CACHE BOOL "Is freetype required to be copied into install directory")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DIR)
|
||||
set (3RDPARTY_FREETYPE_DIR "" CACHE PATH "The directory containing freetype")
|
||||
endif()
|
||||
|
||||
# store ENV{FREETYPE_DIR}
|
||||
SET (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (NOT ENV{FREETYPE_DIR})
|
||||
# search for freetype in user defined directory
|
||||
if (NOT 3RDPARTY_FREETYPE_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" FREETYPE FREETYPE_DIR_NAME)
|
||||
if (FREETYPE_DIR_NAME)
|
||||
set (3RDPARTY_FREETYPE_DIR "${3RDPARTY_DIR}/${FREETYPE_DIR_NAME}" CACHE PATH "The directory containing freetype" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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 (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY OR NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL OR NOT 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing freetype shared library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message (STATUS "Info: CMake default freetype search start...")
|
||||
find_package(Freetype)
|
||||
message (STATUS "Info: CMake default freetype search end")
|
||||
|
||||
# ft2build header
|
||||
if (FREETYPE_INCLUDE_DIR_ft2build AND EXISTS "${FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build "${FREETYPE_INCLUDE_DIR_ft2build}" CACHE FILEPATH "the path of ft2build.h" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
# cmake (version is < 3.0) doesn't find ftheader.h of freetype (version is >= 2.5.1)
|
||||
# do search taking into account freetype structure of 2.5.1 version
|
||||
message (STATUS "Info: CMake default search doesn't found FREETYPE_INCLUDE_DIR_freetype2")
|
||||
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES
|
||||
freetype/config/ftheader.h
|
||||
config/ftheader.h
|
||||
HINTS
|
||||
ENV FREETYPE_DIR
|
||||
PATHS
|
||||
/usr/X11R6
|
||||
/usr/local/X11R6
|
||||
/usr/local/X11
|
||||
/usr/freeware
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
NO_DEFAULT_PATH)
|
||||
find_path (FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h)
|
||||
|
||||
if (NOT FREETYPE_INCLUDE_DIR_freetype2 OR NOT EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
message (STATUS "Info: FREETYPE_INCLUDE_DIR_freetype2 is NOT found by additional search")
|
||||
else()
|
||||
message (STATUS "Info: FREETYPE_INCLUDE_DIR_freetype2 is found by additional search")
|
||||
endif()
|
||||
elseif (FREETYPE_INCLUDE_DIR_freetype2 OR EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_DIR_ABS "${3RDPARTY_FREETYPE_DIR}" ABSOLUTE)
|
||||
get_filename_component (FREETYPE_INCLUDE_DIR_freetype2_ABS "${FREETYPE_INCLUDE_DIR_freetype2}" ABSOLUTE)
|
||||
|
||||
string (REGEX MATCH "${3RDPARTY_FREETYPE_DIR_ABS}" DOES_PATH_CONTAIN "${FREETYPE_INCLUDE_DIR_freetype2_ABS}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN) # if cmake found freetype2 at different place from 3RDPARTY_FREETYPE_DIR
|
||||
# search for freetype2 in 3RDPARTY_FREETYPE_DIR and if it will be found - replace freetyp2 path by new one
|
||||
set (TMP_FREETYPE2 "TMP_FREETYPE2-NOTFOUND" CACHE FILEPATH "" FORCE)
|
||||
find_path (TMP_FREETYPE2 NAMES freetype/config/ftheader.h config/ftheader.h
|
||||
PATHS "${3RDPARTY_FREETYPE_DIR}"
|
||||
PATH_SUFFIXES include/freetype2 include freetype2
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (TMP_FREETYPE2 OR NOT EXISTS "${TMP_FREETYPE2}")
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${TMP_FREETYPE2}" CACHE FILEPATH "the path of freetype2" FORCE)
|
||||
|
||||
# hide and remove TMP_FREETYPE2
|
||||
mark_as_advanced (TMP_FREETYPE2)
|
||||
unset (TMP_FREETYPE2)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# return ENV{FREETYPE_DIR}
|
||||
SET (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR})
|
||||
|
||||
# freetype2 header
|
||||
if (FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
if (NOT 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
set (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2 "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE FILEPATH "the path of freetype2" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
|
||||
elseif (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_FREETYPE_LIBRARY_DIR_TMP "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_FREETYPE_LIBRARY_DIR}" STREQUAL "${3RDPARTY_FREETYPE_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "" CACHE FILEPATH "freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
elseif (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component(3RDPARTY_FREETYPE_DLL_DIR_TMP "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_FREETYPE_DLL_DIR}" STREQUAL "${3RDPARTY_FREETYPE_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_FREETYPE_DLL "" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# freetype library
|
||||
if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}")
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH)
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE FILEPATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (FREETYPE_LIBRARY_PARENT_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" PATH) # parent of the library directory
|
||||
|
||||
set (3RDPARTY_FREETYPE_DLL "3RDPARTY_FREETYPE_DLL-NOTFOUND" CACHE FILEPATH "freetype shared library" FORCE)
|
||||
find_library (3RDPARTY_FREETYPE_DLL freetype PATHS "${FREETYPE_LIBRARY_PARENT_DIR}/bin" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_DLL AND EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
get_filename_component (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL}" PATH)
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "${3RDPARTY_FREETYPE_DLL_DIR}" CACHE FILEPATH "The directory containing freetype shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_FREETYPE_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
set (3RDPARTY_FREETYPE_LIBRARY_DIR "" CACHE FILEPATH "The directory containing freetype library" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL_DIR OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL_DIR}")
|
||||
set (3RDPARTY_FREETYPE_DLL_DIR "" CACHE FILEPATH "The directory containing shared freetype library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_FREETYPE_LIBRARY)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_FREETYPE_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_FREETYPE_DLL OR NOT EXISTS "${3RDPARTY_FREETYPE_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_FREETYPE_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (INSTALL_FREETYPE)
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
else()
|
||||
install (FILES "${3RDPARTY_FREETYPE_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
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)
|
||||
|
||||
mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL)
|
3
adm/templates/gl2ps.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
#GL2PS
|
||||
|
||||
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps" "gl2psd")
|
3
adm/templates/glx.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
# glx
|
||||
|
||||
THIRDPARTY_PRODUCT("GLX" "GL/glx.h" "GL" "GLd")
|
68
adm/templates/occt_defs_flags.cmake
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(/fp:precise)
|
||||
endif()
|
||||
|
||||
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
|
||||
# ONLY for 32-bit
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if (MSVC80 OR MSVC90 OR MSVC10)
|
||||
add_definitions(/arch:SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions (-DCSFDB)
|
||||
if (WIN32)
|
||||
add_definitions (/DWNT -wd4996)
|
||||
elseif (APPLE)
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
|
||||
else()
|
||||
add_definitions (-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
|
||||
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 (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
|
||||
endif()
|
||||
|
||||
# remove DEBUG flag if it exists
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_CXX "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_CXX)
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_CXX_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif()
|
||||
|
||||
string (REGEX MATCH "-DDEBUG" IS_DEBUG_C "${CMAKE_C_FLAGS_DEBUG}")
|
||||
if (IS_DEBUG_C)
|
||||
message (STATUS "-DDEBUG has been removed from CMAKE_C_FLAGS_DEBUG")
|
||||
string (REGEX REPLACE "-DDEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif()
|
||||
|
||||
# enable parallel compilation on MSVC 9 and above
|
||||
if (MSVC AND NOT MSVC70 AND NOT MSVC80)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
|
||||
endif()
|
||||
|
||||
# generate a single response file which enlist all of the object files
|
||||
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
|
||||
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
|
||||
if (MSVC)
|
||||
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif()
|
||||
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
|
||||
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")
|
201
adm/templates/occt_macros.cmake
Normal file
@@ -0,0 +1,201 @@
|
||||
#
|
||||
|
||||
macro (OCCT_CHECK_AND_UNSET VARNAME)
|
||||
if (DEFINED ${VARNAME})
|
||||
unset (${VARNAME} CACHE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_DIR")
|
||||
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_INCLUDE_DIR")
|
||||
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY")
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY_DIR")
|
||||
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL")
|
||||
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL_DIR")
|
||||
endmacro()
|
||||
|
||||
# BUILD_POSTFIX, IS_BUILD_DEBUG variables
|
||||
macro (OCCT_MAKE_BUILD_POSTFIX)
|
||||
if ("${BUILD_CONFIGURATION}" STREQUAL "Debug")
|
||||
set (BUILD_POSTFIX "d")
|
||||
set (IS_BUILD_DEBUG "")
|
||||
else()
|
||||
set (BUILD_POSTFIX "")
|
||||
OCCT_CHECK_AND_UNSET (IS_BUILD_DEBUG)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# COMPILER_BITNESS variable
|
||||
macro (OCCT_MAKE_COMPILER_BITNESS)
|
||||
math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
|
||||
endmacro()
|
||||
|
||||
# OS_WITH_BIT
|
||||
macro (OCCT_MAKE_OS_WITH_BITNESS)
|
||||
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (WIN32)
|
||||
set (OS_WITH_BIT "win${COMPILER_BITNESS}")
|
||||
elseif(APPLE)
|
||||
set (OS_WITH_BIT "mac${COMPILER_BITNESS}")
|
||||
else()
|
||||
set (OS_WITH_BIT "lin${COMPILER_BITNESS}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# COMPILER variable
|
||||
macro (OCCT_MAKE_COMPILER_SHORT_NAME)
|
||||
if (MSVC)
|
||||
if (MSVC70)
|
||||
set (COMPILER vc7)
|
||||
elseif (MSVC80)
|
||||
set (COMPILER vc8)
|
||||
elseif (MSVC90)
|
||||
set (COMPILER vc9)
|
||||
elseif (MSVC10)
|
||||
set (COMPILER vc10)
|
||||
elseif (MSVC11)
|
||||
set (COMPILER vc11)
|
||||
elseif (MSVC12)
|
||||
set (COMPILER vc12)
|
||||
endif()
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCC)
|
||||
set (COMPILER gcc)
|
||||
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
|
||||
set (COMPILER gxx)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set (COMPILER clang)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
set (COMPILER icc)
|
||||
else()
|
||||
set (COMPILER ${CMAKE_GENERATOR})
|
||||
string (REGEX REPLACE " " "" COMPILER ${COMPILER})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function (SUBDIRECTORY_NAMES MAIN_DIRECTORY RESULT)
|
||||
file (GLOB SUB_ITEMS "${MAIN_DIRECTORY}/*")
|
||||
|
||||
foreach (ITEM ${SUB_ITEMS})
|
||||
if (IS_DIRECTORY "${ITEM}")
|
||||
get_filename_component (ITEM_NAME "${ITEM}" NAME)
|
||||
list (APPEND LOCAL_RESULT "${ITEM_NAME}")
|
||||
endif()
|
||||
endforeach()
|
||||
set (${RESULT} ${LOCAL_RESULT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
string (TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME)
|
||||
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+")
|
||||
list (APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}")
|
||||
|
||||
SUBDIRECTORY_NAMES ("${ROOT_DIR}" SUBDIR_NAME_LIST)
|
||||
|
||||
foreach (SEARCH_TEMPLATE ${SEARCH_TEMPLATES})
|
||||
if (LOCAL_RESULT)
|
||||
BREAK()
|
||||
endif()
|
||||
|
||||
foreach (SUBDIR_NAME ${SUBDIR_NAME_LIST})
|
||||
string (TOLOWER "${SUBDIR_NAME}" lower_SUBDIR_NAME)
|
||||
|
||||
string (REGEX MATCH "${SEARCH_TEMPLATE}" DUMMY_VAR "${lower_SUBDIR_NAME}")
|
||||
if (DUMMY_VAR)
|
||||
list (APPEND LOCAL_RESULT ${SUBDIR_NAME})
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (LOCAL_RESULT)
|
||||
list (LENGTH "${LOCAL_RESULT}" LOC_LEN)
|
||||
math (EXPR LAST_ELEMENT_INDEX "${LOC_LEN}-1")
|
||||
list (GET LOCAL_RESULT ${LAST_ELEMENT_INDEX} DUMMY)
|
||||
set (${RESULT} ${DUMMY} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
if (IS_DIRECTORY "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
# first of all, install original files
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
|
||||
# secondly, rewrite original files with patched ones
|
||||
install (DIRECTORY "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${BUILD_PATCH_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
else()
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE FINAL_NAME DESTINATION_PATH)
|
||||
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/${BEING_CONGIRUGED_FILE}")
|
||||
configure_file("${BUILD_PATCH_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
else()
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
endif()
|
||||
|
||||
install(FILES "${OCCT_BINARY_DIR}/${FINAL_NAME}" DESTINATION "${DESTINATION_PATH}")
|
||||
endmacro()
|
||||
|
||||
function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT)
|
||||
set (${USE_PRODUCT} OFF PARENT_SCOPE)
|
||||
|
||||
if (NOT USED_TOOLKITS)
|
||||
message(STATUS "Warning: the list of being used toolkits is empty")
|
||||
else()
|
||||
foreach (USED_TOOLKIT ${USED_TOOLKITS})
|
||||
if (BUILD_PATCH_DIR AND EXISTS "${BUILD_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${BUILD_PATCH_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB")
|
||||
file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT)
|
||||
endif()
|
||||
|
||||
string (REGEX MATCH "${CSF_VAR_NAME}" DOES_FILE_CONTAIN "${FILE_CONTENT}")
|
||||
|
||||
if (DOES_FILE_CONTAIN)
|
||||
set (${USE_PRODUCT} ON PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
27
adm/templates/opencl.cmake
Normal file
@@ -0,0 +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")
|
||||
ENDIF()
|
31
adm/templates/sample.bat
Normal file
@@ -0,0 +1,31 @@
|
||||
@echo off
|
||||
|
||||
if ["%1"] == [""] (
|
||||
echo Launch selected sample as follows:
|
||||
echo sample.bat SampleName vc10 win32 d
|
||||
echo or to use last sample build configuration:
|
||||
echo sample.bat SampleName
|
||||
echo available samples:
|
||||
echo Geometry
|
||||
echo Modeling
|
||||
echo Viewer2d
|
||||
echo Viewer3d
|
||||
echo ImportExport
|
||||
echo Ocaf
|
||||
echo Triangulation
|
||||
echo HLR
|
||||
echo Animation
|
||||
echo Convert
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0env.bat" %2 %3 %4
|
||||
|
||||
if not exist "%~dp0/%BIN_TAIL%/%1.exe" (
|
||||
echo Executable %~dp0/%BIN_TAIL%/%1.exe not found.
|
||||
echo Probably you didn't compile the application.
|
||||
exit /B
|
||||
)
|
||||
|
||||
"%~dp0/%BIN_TAIL%/%1.exe"
|
||||
|
241
adm/templates/tbb.cmake
Normal file
@@ -0,0 +1,241 @@
|
||||
# tbb
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (NOT DEFINED INSTALL_TBB)
|
||||
set (INSTALL_TBB OFF CACHE BOOL "Is tbb required to be copied into install directory")
|
||||
endif()
|
||||
|
||||
# tbb directory
|
||||
if (NOT DEFINED 3RDPARTY_TBB_DIR)
|
||||
set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb")
|
||||
endif()
|
||||
|
||||
# tbb include directory
|
||||
if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of the tbb")
|
||||
endif()
|
||||
|
||||
# tbb library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY OR NOT 3RDPARTY_TBB_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBB_LIBRARY "" CACHE FILEPATH "tbb library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb library directory
|
||||
if (NOT DEFINED 3RDPARTY_TBB_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBB_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb library")
|
||||
endif()
|
||||
|
||||
# tbb malloc library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY OR NOT 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_LIBRARY "" CACHE FILEPATH "tbb malloc library" FORCE)
|
||||
endif()
|
||||
|
||||
# tbb malloc library directory
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_LIBRARY_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tbb malloc library")
|
||||
endif()
|
||||
|
||||
# tbb shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TBB_DLL OR NOT 3RDPARTY_TBB_DLL_DIR)
|
||||
set (3RDPARTY_TBB_DLL "" CACHE FILEPATH "tbb shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tbb shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TBB_DLL_DIR)
|
||||
set (3RDPARTY_TBB_DLL_DIR "" CACHE FILEPATH "The directory containing tbb shared library")
|
||||
endif()
|
||||
|
||||
# tbb malloc shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL OR NOT 3RDPARTY_TBBMALLOC_DLL_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_DLL "" CACHE FILEPATH "tbb malloc shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tbb malloc shared library directory
|
||||
if (NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
|
||||
endif()
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
|
||||
|
||||
# search for product directory inside 3RDPARTY_DIR directory
|
||||
if (NOT 3RDPARTY_TBB_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" "TBB" TBB_DIR_NAME)
|
||||
if (TBB_DIR_NAME)
|
||||
message (STATUS "Info: TBB: ${TBB_DIR_NAME} folder is used")
|
||||
set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
|
||||
if (${COMPILER_BITNESS} STREQUAL 32)
|
||||
set (TBB_ARCH_NAME ia32)
|
||||
else()
|
||||
set (TBB_ARCH_NAME intel64)
|
||||
endif()
|
||||
|
||||
# search for include directory in defined 3rdparty directory
|
||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
|
||||
find_path (3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE FILEPATH "The directory containing the headers of tbb" FORCE)
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# TBB_COMPILER_FOLER
|
||||
#if (WIN32)
|
||||
set (TBB_COMPILER_FOLER ${COMPILER})
|
||||
#else()
|
||||
# set (TBB_COMPILER_FOLER ${COMPILER})
|
||||
#endif()
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# search for tbb and tbb malloc library in defined 3rdparty directory
|
||||
foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
|
||||
elseif (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
if (NOT "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR_TMP}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${LIBRARY_NAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
# first of all, search for debug version of a library if build type is debug
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}_debug
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/libd/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}_debug)
|
||||
endif()
|
||||
|
||||
# if build type is release or debug version of library isn't found - search for release version of one
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${LIBRARY_NAME} library isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/lib(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# search for dll in defined 3rdparty directory (just for win case)
|
||||
if (WIN32)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
|
||||
elseif (3RDPARTY_${LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
|
||||
if (NOT "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" STREQUAL "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR_TMP}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "" CACHE FILEPATH "${LIBRARY_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}_debug
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bind/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}_debug)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${LIBRARY_NAME} dll isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/bin(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
|
||||
get_filename_component(3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBRARY_NAME} shared library" FORCE)
|
||||
endif()
|
||||
endif() # end dll search
|
||||
endforeach() # end tbb / tbbmalloc
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (3RDPARTY_${LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBRARY_NAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# install tbb
|
||||
if (INSTALL_TBB)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY} ${3RDPARTY_TBBMALLOC_LIBRARY} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)
|
333
adm/templates/tcl.cmake
Normal file
@@ -0,0 +1,333 @@
|
||||
# tcl
|
||||
|
||||
if (NOT DEFINED INSTALL_TCL)
|
||||
set (INSTALL_TCL OFF CACHE BOOL "Is tcl lib required to be copied into install directory")
|
||||
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()
|
||||
|
||||
# tk include directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_INCLUDE_DIR)
|
||||
set (3RDPARTY_TK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of tk")
|
||||
endif()
|
||||
|
||||
# tcl library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY OR NOT 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY "" CACHE FILEPATH "tcl library" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl library directory
|
||||
if (NOT DEFINED 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tcl library")
|
||||
endif()
|
||||
|
||||
# tk library file (with absolute path)
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY OR NOT 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY "" CACHE FILEPATH "tk library" FORCE)
|
||||
endif()
|
||||
|
||||
# tk library directory
|
||||
if (NOT DEFINED 3RDPARTY_TK_LIBRARY_DIR)
|
||||
set (3RDPARTY_TK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing tk library")
|
||||
endif()
|
||||
|
||||
# tcl shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TCL_DLL OR NOT 3RDPARTY_TCL_DLL_DIR)
|
||||
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()
|
||||
|
||||
# tk shared library (with absolute path)
|
||||
if (WIN32)
|
||||
if (NOT DEFINED 3RDPARTY_TK_DLL OR NOT 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL "" CACHE FILEPATH "tk shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tk shared library directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_TK_DLL_DIR)
|
||||
set (3RDPARTY_TK_DLL_DIR "" CACHE FILEPATH "The directory containing tk shared library")
|
||||
endif()
|
||||
|
||||
# search for tcl in user defined directory
|
||||
if (NOT 3RDPARTY_TCL_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
|
||||
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/tk include dir, library dir and shared library dir
|
||||
macro (DIR_SUBDIR_FILE_FIT LIBNAME)
|
||||
if (3RDPARTY_TCL_DIR AND EXISTS "${3RDPARTY_TCL_DIR}")
|
||||
# tcl/tk include dir
|
||||
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl/tk library dir
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl/tk shared library dir
|
||||
if (WIN32)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
string (REGEX MATCH "${3RDPARTY_TCL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check tcl/tk library
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
# check tcl/tk shared library
|
||||
if (WIN32)
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
if (3RDPARTY_${LIBNAME}_DLL AND EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
string (REGEX MATCH "${3RDPARTY_${LIBNAME}_DLL_DIR}" DOES_PATH_CONTAIN "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
|
||||
if (NOT DOES_PATH_CONTAIN)
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
DIR_SUBDIR_FILE_FIT(TCL)
|
||||
DIR_SUBDIR_FILE_FIT(TK)
|
||||
|
||||
|
||||
# use default (CMake) TCL search
|
||||
find_package(TCL)
|
||||
|
||||
foreach (LIBNAME TCL TK)
|
||||
string (TOLOWER "${LIBNAME}" LIBNAME_L)
|
||||
|
||||
# tcl/tk include dir
|
||||
if (NOT 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
|
||||
if (${LIBNAME}_INCLUDE_PATH AND EXISTS "${${LIBNAME}_INCLUDE_PATH}")
|
||||
set (3RDPARTY_${LIBNAME}_INCLUDE_DIR "${${LIBNAME}_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of ${LIBNAME}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tcl/tk dir and library
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
if (${LIBNAME}_LIBRARY AND EXISTS "${${LIBNAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "${${LIBNAME}_LIBRARY}" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
elseif (3RDPARTY_${LIBNAME}_LIBRARY_DIR)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}86 ${LIBNAME_L}85
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
DIR_SUBDIR_FILE_FIT(${LIBNAME})
|
||||
|
||||
|
||||
# tcl/tk dir and library
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "3RDPARTY_${LIBNAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
|
||||
PATHS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# search in another place if previous search doesn't find anything
|
||||
find_library (3RDPARTY_${LIBNAME}_LIBRARY NAMES ${LIBNAME_L}8.6 ${LIBNAME_L}86 ${LIBNAME_L}8.5 ${LIBNAME_L}85
|
||||
PATHS "${3RDPARTY_TCL_DIR}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY "" CACHE FILEPATH "${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_LIBRARY_DIR AND 3RDPARTY_${LIBNAME}_LIBRARY)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_DIR "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
get_filename_component (${LIBNAME}_LIBRARY_NAME "${3RDPARTY_${LIBNAME}_LIBRARY}" NAME)
|
||||
string(REGEX REPLACE "^.*${LIBNAME_L}([0-9]\\.*[0-9]).*$" "\\1" ${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_NAME}")
|
||||
|
||||
if (NOT "${${LIBNAME}_LIBRARY_VERSION}" STREQUAL "${${LIBNAME}_LIBRARY_NAME}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION "${${LIBNAME}_LIBRARY_VERSION}")
|
||||
else() # if the version isn't found - seek other library with 8.6 or 8.5 version in the same dir
|
||||
message (STATUS "Info: ${LIBNAME} version isn't found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "")
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY_VERSION)
|
||||
string (REGEX REPLACE "^.*([0-9])[^0-9]*[0-9].*$" "\\1" 3RDPARTY_${LIBNAME}_MAJOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
|
||||
string (REGEX REPLACE "^.*[0-9][^0-9]*([0-9]).*$" "\\1" 3RDPARTY_${LIBNAME}_MINOR_VERSION "${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}")
|
||||
set (3RDPARTY_${LIBNAME}_LIBRARY_VERSION_WITH_DOT "${3RDPARTY_${LIBNAME}_MAJOR_VERSION}.${3RDPARTY_${LIBNAME}_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL)
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
set (DLL_FOLDER_FOR_SEARCH "")
|
||||
if (3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_DLL_DIR}")
|
||||
elseif (3RDPARTY_TCL_DIR)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_TCL_DIR}/bin")
|
||||
else()
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}" PATH)
|
||||
set (DLL_FOLDER_FOR_SEARCH "${3RDPARTY_${LIBNAME}_LIBRARY_DIR_PARENT}/bin")
|
||||
endif()
|
||||
|
||||
set (3RDPARTY_${LIBNAME}_DLL "3RDPARTY_${LIBNAME}_DLL-NOTFOUND" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
find_library (3RDPARTY_${LIBNAME}_DLL NAMES ${LIBNAME_L}${3RDPARTY_${LIBNAME}_LIBRARY_VERSION}
|
||||
PATHS "${DLL_FOLDER_FOR_SEARCH}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
set (3RDPARTY_${LIBNAME}_DLL "" CACHE FILEPATH "${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL_DIR AND 3RDPARTY_${LIBNAME}_DLL)
|
||||
get_filename_component (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL}" PATH)
|
||||
set (3RDPARTY_${LIBNAME}_DLL_DIR "${3RDPARTY_${LIBNAME}_DLL_DIR}" CACHE FILEPATH "The directory containing ${LIBNAME} shared library" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include found paths to common variables
|
||||
if (3RDPARTY_${LIBNAME}_INCLUDE_DIR AND EXISTS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_${LIBNAME}_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (3RDPARTY_${LIBNAME}_LIBRARY AND EXISTS "${3RDPARTY_${LIBNAME}_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIBNAME}_LIBRARY_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_${LIBNAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBNAME}_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${LIBNAME}_DLL_DIR)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# install tcltk
|
||||
if (INSTALL_TCL)
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/templates/occt_macros")
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES ${3RDPARTY_TCL_DLL} ${3RDPARTY_TK_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY} ${3RDPARTY_TK_LIBRARY} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without ${BUILD_POSTFIX})
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
else()
|
||||
message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
|
||||
message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
|
||||
|
||||
# unset all redundant variables
|
||||
#TCL
|
||||
OCCT_CHECK_AND_UNSET (TCL_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TCL_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TCL_TCLSH)
|
||||
#TK
|
||||
OCCT_CHECK_AND_UNSET (TK_LIBRARY)
|
||||
OCCT_CHECK_AND_UNSET (TK_INCLUDE_PATH)
|
||||
OCCT_CHECK_AND_UNSET (TK_WISH)
|
156
adm/templates/vtk.cmake
Normal file
@@ -0,0 +1,156 @@
|
||||
# vtk
|
||||
|
||||
if (NOT DEFINED INSTALL_VTK)
|
||||
set (INSTALL_VTK OFF CACHE BOOL "Is vtk required to be copied into install directory")
|
||||
endif()
|
||||
|
||||
# vtk directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_DIR)
|
||||
set (3RDPARTY_VTK_DIR "" CACHE PATH "The directory containing vtk")
|
||||
endif()
|
||||
|
||||
# vtk include directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "" CACHE FILEPATH "The directory containing headers of vtk")
|
||||
endif()
|
||||
|
||||
# vtk library directory
|
||||
if (NOT DEFINED 3RDPARTY_VTK_LIBRARY_DIR)
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "" CACHE FILEPATH "The directory containing vtk library")
|
||||
endif()
|
||||
|
||||
# vtk dll directory
|
||||
if (WIN32 AND NOT DEFINED 3RDPARTY_VTK_DLL_DIR)
|
||||
set (3RDPARTY_VTK_DLL_DIR "" CACHE FILEPATH "The directory containing VTK dll")
|
||||
endif()
|
||||
|
||||
# search for vtk in user defined directory
|
||||
if (NOT 3RDPARTY_VTK_DIR AND 3RDPARTY_DIR)
|
||||
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" vtk VTK_DIR_NAME)
|
||||
if (VTK_DIR_NAME)
|
||||
set (3RDPARTY_VTK_DIR "${3RDPARTY_DIR}/${VTK_DIR_NAME}" CACHE PATH "The directory containing vtk product" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# find installed vtk
|
||||
find_package(VTK QUIET)
|
||||
|
||||
# find native vtk
|
||||
if (NOT VTK_FOUND)
|
||||
find_package(VTK QUIET PATHS "${3RDPARTY_VTK_DIR}")
|
||||
endif()
|
||||
|
||||
if (NOT VTK_FOUND AND NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
message(SEND_ERROR "VTK not found. Set the 3RDPARTY_VTK_DIR cmake cache entry to the directory containing VTK.")
|
||||
set (3RDPARTY_VTK_DIR "3RDPARTY_VTK_DIR-NOTFOUND" CACHE PATH "The directory containing vtk product" FORCE)
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
set(VTK_VERSION "")
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
get_filename_component(3RDPARTY_VTK_DIR_NAME "${3RDPARTY_VTK_DIR}" NAME)
|
||||
string(REGEX MATCH "^VTK-([0-9].[0-9])" VTK_VERSION "${3RDPARTY_VTK_DIR_NAME}")
|
||||
set(VTK_VERSION "${CMAKE_MATCH_1}")
|
||||
if (NOT 3RDPARTY_VTK_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_DIR}/include/vtk-${VTK_VERSION}" CACHE FILEPATH "The directory containing includes of VTK" FORCE)
|
||||
endif()
|
||||
if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
else()
|
||||
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/lib")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(3RDPARTY_VTK_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# vtk libraries
|
||||
# lib
|
||||
set (VTK_LIBRARY_NAMES vtkCommonCore-${VTK_VERSION}.lib vtkCommonDataModel-${VTK_VERSION}.lib vtkCommonExecutionModel-${VTK_VERSION}.lib
|
||||
vtkCommonMath-${VTK_VERSION}.lib vtkCommonTransforms-${VTK_VERSION}.lib vtkRenderingCore-${VTK_VERSION}.lib
|
||||
vtkRenderingOpenGL-${VTK_VERSION}.lib vtkFiltersGeneral-${VTK_VERSION}.lib vtkIOCore-${VTK_VERSION}.lib
|
||||
vtkIOImage-${VTK_VERSION}.lib vtkImagingCore-${VTK_VERSION}.lib vtkInteractionStyle-${VTK_VERSION}.lib )
|
||||
|
||||
#dll
|
||||
set (VTK_DLL_NAMES vtkCommonComputationalGeometry-${VTK_VERSION}.dll
|
||||
vtkCommonCore-${VTK_VERSION}.dll
|
||||
vtkCommonDataModel-${VTK_VERSION}.dll
|
||||
vtkCommonExecutionModel-${VTK_VERSION}.dll
|
||||
vtkCommonMath-${VTK_VERSION}.dll
|
||||
vtkCommonMisc-${VTK_VERSION}.dll
|
||||
vtkCommonSystem-${VTK_VERSION}.dll
|
||||
vtkCommonTransforms-${VTK_VERSION}.dll
|
||||
vtkDICOMParser-${VTK_VERSION}.dll
|
||||
vtkFiltersCore-${VTK_VERSION}.dll
|
||||
vtkFiltersExtraction-${VTK_VERSION}.dll
|
||||
vtkFiltersGeneral-${VTK_VERSION}.dll
|
||||
vtkFiltersGeometry-${VTK_VERSION}.dll
|
||||
vtkFiltersSources-${VTK_VERSION}.dll
|
||||
vtkFiltersStatistics-${VTK_VERSION}.dll
|
||||
vtkIOCore-${VTK_VERSION}.dll
|
||||
vtkIOImage-${VTK_VERSION}.dll
|
||||
vtkImagingCore-${VTK_VERSION}.dll
|
||||
vtkImagingFourier-${VTK_VERSION}.dll
|
||||
vtkImagingHybrid-${VTK_VERSION}.dll
|
||||
vtkInteractionStyle-${VTK_VERSION}.dll
|
||||
vtkRenderingCore-${VTK_VERSION}.dll
|
||||
vtkRenderingOpenGL-${VTK_VERSION}.dll
|
||||
vtkalglib-${VTK_VERSION}.dll
|
||||
vtkjpeg-${VTK_VERSION}.dll
|
||||
vtkmetaio-${VTK_VERSION}.dll
|
||||
vtkpng-${VTK_VERSION}.dll
|
||||
vtksys-${VTK_VERSION}.dll
|
||||
vtktiff-${VTK_VERSION}.dll
|
||||
vtkzlib-${VTK_VERSION}.dll )
|
||||
|
||||
# search for dll directory
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
else()
|
||||
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/bin")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
OCCT_CHECK_AND_UNSET(VTK_DIR)
|
||||
|
||||
if (3RDPARTY_VTK_INCLUDE_DIR AND EXISTS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_VTK_INCLUDE_DIR}")
|
||||
else()
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_VTK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if (INSTALL_VTK)
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
if (WIN32)
|
||||
if(3RDPARTY_VTK_DLL_DIR AND EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
|
||||
set (3RDPARTY_VTK_DLL "3RDPARTY_VTK_DLL-NOTFOUND" CACHE FILEPATH "VTK shared library" FORCE)
|
||||
find_library(3RDPARTY_VTK_DLL "${VTK_DLL_NAME}" PATHS "${3RDPARTY_VTK_DLL_DIR}" NO_DEFAULT_PATH)
|
||||
if (NOT 3RDPARTY_VTK_DLL OR NOT EXISTS "${3RDPARTY_VTK_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED "${3RDPARTY_VTK_DLL}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_VTK_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
endif()
|
||||
endforeach()
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL)
|
||||
endif()
|
||||
else ()
|
||||
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
|
||||
string(REPLACE ".dll" ".so.1" VTK_DLL_NAME "${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME "lib${VTK_DLL_NAME}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)
|
BIN
data/images/hatch_1.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
data/images/marker_box1.png
Normal file
After Width: | Height: | Size: 298 B |
BIN
data/images/marker_box2.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
data/images/marker_dot.png
Normal file
After Width: | Height: | Size: 356 B |
188
dox/DoxygenLayout.xml
Normal file
@@ -0,0 +1,188 @@
|
||||
<doxygenlayout version="1.0">
|
||||
<!-- Generated by doxygen 1.8.3.1 -->
|
||||
<!-- Navigation index tabs for HTML output -->
|
||||
<navindex>
|
||||
<tab type="mainpage" visible="yes" title="Introduction"/>
|
||||
<tab type="pages" visible="yes" title="Documents" intro="This section contains links to all OCCT documents that are available at the moment"/>
|
||||
<tab type="modules" visible="yes" title="" intro=""/>
|
||||
<tab type="namespaces" visible="yes" title="">
|
||||
<tab type="namespacelist" visible="no" title="" intro=""/>
|
||||
<tab type="namespacemembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="classes" visible="yes" title="Reference Manual">
|
||||
<tab type="classlist" visible="no" title="" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="no" title="" intro=""/>
|
||||
<tab type="classmembers" visible="no" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="files" visible="no" title="Files">
|
||||
<tab type="filelist" visible="yes" title="" intro=""/>
|
||||
<tab type="globals" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="examples" visible="no" title="" intro=""/>
|
||||
</navindex>
|
||||
|
||||
<!-- Layout definition for a class page -->
|
||||
<class>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<inheritancegraph visible="$CLASS_GRAPH"/>
|
||||
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
|
||||
<memberdecl>
|
||||
<nestedclasses visible="yes" title=""/>
|
||||
<publictypes title=""/>
|
||||
<publicslots title=""/>
|
||||
<signals title=""/>
|
||||
<publicmethods title=""/>
|
||||
<publicstaticmethods title=""/>
|
||||
<publicattributes title=""/>
|
||||
<publicstaticattributes title=""/>
|
||||
<protectedtypes title=""/>
|
||||
<protectedslots title=""/>
|
||||
<protectedmethods title=""/>
|
||||
<protectedstaticmethods title=""/>
|
||||
<protectedattributes title=""/>
|
||||
<protectedstaticattributes title=""/>
|
||||
<packagetypes title=""/>
|
||||
<packagemethods title=""/>
|
||||
<packagestaticmethods title=""/>
|
||||
<packageattributes title=""/>
|
||||
<packagestaticattributes title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
<privatetypes title=""/>
|
||||
<privateslots title=""/>
|
||||
<privatemethods title=""/>
|
||||
<privatestaticmethods title=""/>
|
||||
<privateattributes title=""/>
|
||||
<privatestaticattributes title=""/>
|
||||
<friends title=""/>
|
||||
<related title="" subtitle=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<constructors title=""/>
|
||||
<functions title=""/>
|
||||
<related title=""/>
|
||||
<variables title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
</memberdef>
|
||||
<allmemberslink visible="yes"/>
|
||||
<usedfiles visible="$SHOW_USED_FILES"/>
|
||||
<authorsection visible="yes"/>
|
||||
</class>
|
||||
|
||||
<!-- Layout definition for a namespace page -->
|
||||
<namespace>
|
||||
<briefdescription visible="yes"/>
|
||||
<memberdecl>
|
||||
<nestednamespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</namespace>
|
||||
|
||||
<!-- Layout definition for a file page -->
|
||||
<file>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<includegraph visible="$INCLUDE_GRAPH"/>
|
||||
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
|
||||
<sourcelink visible="yes"/>
|
||||
<memberdecl>
|
||||
<classes visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection/>
|
||||
</file>
|
||||
|
||||
<!-- Layout definition for a group page -->
|
||||
<group>
|
||||
<briefdescription visible="yes"/>
|
||||
<groupgraph visible="$GROUP_GRAPHS"/>
|
||||
<memberdecl>
|
||||
<nestedgroups visible="yes" title=""/>
|
||||
<dirs visible="yes" title=""/>
|
||||
<files visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<pagedocs/>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</group>
|
||||
|
||||
<!-- Layout definition for a directory page -->
|
||||
<directory>
|
||||
<briefdescription visible="yes"/>
|
||||
<directorygraph visible="yes"/>
|
||||
<memberdecl>
|
||||
<dirs visible="yes"/>
|
||||
<files visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
</directory>
|
||||
</doxygenlayout>
|
63
dox/FILES_HTML.txt
Normal file
@@ -0,0 +1,63 @@
|
||||
# This file contains list of documentation files of OCCT which are processed
|
||||
# by Doxygen to generate HTML documentation.
|
||||
# Files are listed one file per line, with paths relative to dox folder.
|
||||
# Empty spaces are allowed, part of string starting with # is ignored.
|
||||
# The order of files in this list determines order of top-level pages
|
||||
# in the generated documentation.
|
||||
|
||||
overview/overview.md
|
||||
|
||||
../samples/mfc/standard/ReadMe.md
|
||||
../samples/CSharp/ReadMe.md
|
||||
../samples/CSharp/ReadMe_D3D.md
|
||||
|
||||
../samples/qt/AndroidQt/ReadMe.md
|
||||
../samples/java/jniviewer/ReadMe.md
|
||||
|
||||
tutorial/tutorial.md
|
||||
|
||||
technical_overview/technical_overview.md
|
||||
|
||||
user_guides/user_guides.md
|
||||
user_guides/foundation_classes/foundation_classes.md
|
||||
user_guides/modeling_data/modeling_data.md
|
||||
user_guides/modeling_algos/modeling_algos.md
|
||||
user_guides/boolean_operations/boolean_operations.md
|
||||
user_guides/shape_healing/shape_healing.md
|
||||
user_guides/visualization/visualization.md
|
||||
user_guides/iges/iges.md
|
||||
user_guides/step/step.md
|
||||
user_guides/xde/xde.md
|
||||
user_guides/ocaf/ocaf.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/brep_wp/brep_wp.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/voxels_wp/voxels_wp.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
dev_guides/dev_guides.md
|
||||
dev_guides/documentation/documentation.md
|
||||
dev_guides/contribution/coding_rules.md
|
||||
dev_guides/contribution_workflow/contribution_workflow.md
|
||||
dev_guides/git_guide/git_guide.md
|
||||
dev_guides/tests/tests.md
|
||||
dev_guides/debug/debug.md
|
||||
dev_guides/cdl/cdl.md
|
||||
dev_guides/wok/wok.md
|
||||
|
||||
dev_guides/building/building.md
|
||||
dev_guides/building/3rdparty/3rdparty_windows.md
|
||||
dev_guides/building/3rdparty/3rdparty_linux.md
|
||||
dev_guides/building/3rdparty/3rdparty_osx.md
|
||||
dev_guides/building/wok/wok.md
|
||||
dev_guides/building/automake.md
|
||||
dev_guides/building/cmake/cmake.md
|
||||
dev_guides/building/android/android.md
|
||||
dev_guides/building/code_blocks.md
|
||||
dev_guides/building/msvc.md
|
||||
dev_guides/building/xcode.md
|
||||
|
||||
license.md
|
34
dox/FILES_PDF.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
# This file contains list of documentation files of OCCT which are processed
|
||||
# by Doxygen to generate PDF documentation.
|
||||
# Files are listed one file per line, with paths relative to dox folder.
|
||||
# Empty spaces are allowed.
|
||||
# Strings starting with '#' are treated as comments and ignored.
|
||||
|
||||
user_guides/brep_wp/brep_wp.md
|
||||
user_guides/foundation_classes/foundation_classes.md
|
||||
user_guides/iges/iges.md
|
||||
user_guides/modeling_data/modeling_data.md
|
||||
user_guides/modeling_algos/modeling_algos.md
|
||||
user_guides/boolean_operations/boolean_operations.md
|
||||
user_guides/shape_healing/shape_healing.md
|
||||
user_guides/ocaf/ocaf.md
|
||||
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
|
||||
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
|
||||
user_guides/ocaf_wp/ocaf_wp.md
|
||||
user_guides/step/step.md
|
||||
user_guides/draw_test_harness/draw_test_harness.md
|
||||
user_guides/tobj/tobj.md
|
||||
user_guides/visualization/visualization.md
|
||||
user_guides/voxels_wp/voxels_wp.md
|
||||
user_guides/xde/xde.md
|
||||
user_guides/vis/vis.md
|
||||
|
||||
dev_guides/contribution_workflow/contribution_workflow.md
|
||||
dev_guides/documentation/documentation.md
|
||||
dev_guides/contribution/coding_rules.md
|
||||
dev_guides/git_guide/git_guide.md
|
||||
dev_guides/tests/tests.md
|
||||
dev_guides/wok/wok.md
|
||||
dev_guides/cdl/cdl.md
|
||||
|
||||
tutorial/tutorial.md
|
521
dox/LICENSE.md
Executable file
@@ -0,0 +1,521 @@
|
||||
License {#occt_public_license}
|
||||
=======
|
||||
|
||||
Open CASCADE Technology is available under GNU Lesser General Public License
|
||||
(LGPL) version 2.1 with additional exception.
|
||||
|
||||
@section license_lgpl_21 GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
### Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
- 0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
1. The modified work must itself be a software library.
|
||||
|
||||
2. You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
3. You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
4. If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
1. Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
2. Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
3. Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
4. If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
5. Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
1. Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
2. Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
**NO** **WARRANTY**
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
### END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
@section occt_lgpl_exception OPEN CASCADE EXCEPTION
|
||||
|
||||
### Open CASCADE Exception (version 1.0) to GNU LGPL version 2.1.
|
||||
|
||||
The object code (i.e. not a source) form of a "work that uses the Library"
|
||||
can incorporate material from a header file that is part of the Library.
|
||||
As a special exception to the GNU Lesser General Public License version 2.1,
|
||||
you may distribute such object code incorporating material from header files
|
||||
provided with the Open CASCADE Technology libraries (including code of CDL
|
||||
generic classes) under terms of your choice, provided that you give
|
||||
prominent notice in supporting documentation to this code that it makes use
|
||||
of or is based on facilities provided by the Open CASCADE Technology software.
|
244
dox/dev_guides/building/3rdparty/3rdparty_linux.md
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
Building 3rd-party libraries on Linux {#occt_dev_guides__building_3rdparty_linux}
|
||||
=========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party
|
||||
products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 - 8.6;
|
||||
* FreeType 2.4.10 - 2.5.3;
|
||||
* Optional products:
|
||||
* TBB 3.x - 4.x;
|
||||
* gl2ps 1.3.5 - 1.3.8;
|
||||
* FreeImage 3.14.1 - 3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_2 Installation from sources: Tcl
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. Enter the unix sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
|
||||
|
||||
cd TCL_SRC_DIR/unix
|
||||
|
||||
2. Run the *configure* command:
|
||||
|
||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
||||
|
||||
3. If the configure command has finished successfully, start the building process:
|
||||
|
||||
make
|
||||
|
||||
4. If building is finished successfully, start the installation of Tcl.
|
||||
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*
|
||||
|
||||
make install
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_3 Installation from sources: Tk
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. Enter the unix sub-directory of the directory where the Tk source files are located <i>(TK_SRC_DIR)</i>
|
||||
|
||||
cd TK_SRC_DIR/unix
|
||||
|
||||
2. Run the configure command, where <i>TCL_LIB_DIR</i> is *TCL_INSTALL_DIR/lib*.
|
||||
|
||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
||||
|
||||
3. If the configure command has finished successfully, start the building process:
|
||||
|
||||
make
|
||||
|
||||
4. If the building has finished successfully, start the installation of Tk.
|
||||
All binary and service files of the product will be copied
|
||||
to the directory defined by *TK_INSTALL_DIR* (usually it is *TCL_INSTALL_DIR*)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
|
||||
|
||||
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
2. Run the *configure* command:
|
||||
|
||||
configure --prefix=FREETYPE_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
|
||||
|
||||
3. If the *configure* command has finished successfully, start the building process:
|
||||
|
||||
make
|
||||
|
||||
4. If the building has finished successfully, start the installation of FreeType.
|
||||
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
|
||||
|
||||
This third-party product is installed with binaries from the archive that can be downloaded from http://threadingbuildingblocks.org.
|
||||
Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
|
||||
To install, unpack the downloaded archive of TBB product.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_2 gl2ps
|
||||
|
||||
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
|
||||
|
||||
1. Install or build *cmake* product from the source file.
|
||||
2. Start *cmake* in GUI mode with the directory where the source files of gl2ps are located:
|
||||
|
||||
ccmake GL2PS_SRC_DIR
|
||||
|
||||
* Press <i>[c]</i> to make the initial configuration;
|
||||
* Define the necessary options in *CMAKE_INSTALL_PREFIX*
|
||||
* Press <i>[c]</i> to make the final configuration
|
||||
* Press <i>[g]</i> to generate Makefile and exit
|
||||
|
||||
or just run the following command:
|
||||
|
||||
cmake –DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR –DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
3. Start the building of gl2ps:
|
||||
|
||||
make
|
||||
|
||||
4. Start the installation of gl2ps. Binaries will be installed according to the *CMAKE_INSTALL_PREFIX* option.
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
|
||||
|
||||
Download the necessary archive from http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
|
||||
|
||||
1. Modify *FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h*:
|
||||
In line 60 insert the following:
|
||||
|
||||
#include string.h
|
||||
|
||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
4. Run the installation process
|
||||
|
||||
a. If you have the permission to write into directories <i>/usr/include</i> and <i>/usr/lib</i>, run the following command:
|
||||
|
||||
make install
|
||||
b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*:
|
||||
|
||||
Change lines 7-9 from:
|
||||
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
|
||||
to:
|
||||
|
||||
DESTDIR ?= $(DESTDIR)
|
||||
INCDIR ?= $(DESTDIR)/include
|
||||
INSTALLDIR ?= $(DESTDIR)/lib
|
||||
|
||||
Change lines 65-67 from:
|
||||
|
||||
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
to:
|
||||
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
|
||||
Change line 70 from:
|
||||
|
||||
ldconfig
|
||||
|
||||
to:
|
||||
|
||||
\#ldconfig
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_4 VTK
|
||||
|
||||
You can download VTK sources from http://www.vtk.org/VTK/resources/software.html
|
||||
|
||||
### The building procedure:
|
||||
|
||||
Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it.
|
||||
|
||||
1. Install or build *cmake* product from the source file.
|
||||
2. Start *cmake* in GUI mode with the directory where the source files of *VTK* are located:
|
||||
|
||||
ccmake VTK_SRC_DIR
|
||||
|
||||
* Press <i>[c]</i> to make the initial configuration
|
||||
* Define the necessary options in *VTK_INSTALL_PREFIX*
|
||||
* Press <i>[c]</i> to make the final configuration
|
||||
* Press <i>[g]</i> to generate Makefile and exit
|
||||
|
||||
3. Start the building of VTK:
|
||||
|
||||
make
|
||||
|
||||
4. Start the installation of gl2ps. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
|
||||
|
||||
All 3rd-party products required for building of OCCT could be installed
|
||||
from official repositories. You may install them from console using apt-get utility:
|
||||
|
||||
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev libgl2ps-dev
|
||||
|
||||
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
|
||||
|
||||
# you may need to add i386 if not done already by command "dpkg --add-architecture i386"
|
||||
sudo apt-get install csh libstdc++6:i386 libxt6:i386 libxext6:i386 libxmu6:i386
|
||||
|
||||
Building is possible with C++ compliant compiler:
|
||||
|
||||
sudo apt-get install g++
|
211
dox/dev_guides/building/3rdparty/3rdparty_osx.md
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
Building 3rd-party libraries on MacOS X {#occt_dev_guides__building_3rdparty_osx}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available
|
||||
on the web site of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/</a>.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 - 8.6;
|
||||
* FreeType 2.4.10 - 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x - 4.x;
|
||||
* gl2ps 1.3.5 - 1.3.8;
|
||||
* FreeImage 3.14.1 - 3.16.0
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
|
||||
|
||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_2 Installation from sources: Tcl 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. Enter the *macosx* sub-directory of the directory where the Tcl source files are located <i>(TCL_SRC_DIR)</i>.
|
||||
|
||||
cd TCL_SRC_DIR/macosx
|
||||
|
||||
2. Run the *configure* command
|
||||
|
||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
||||
|
||||
3. If the *configure* command has finished successfully, start the building process
|
||||
|
||||
make
|
||||
|
||||
4. If building is finished successfully, start the installation of Tcl.
|
||||
All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*.
|
||||
|
||||
make install
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_3 Installation from sources: Tk 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. Enter the *macosx* sub-directory of the directory where the source files of Tk are located <i>(TK_SRC_DIR)</i>.
|
||||
|
||||
cd TK_SRC_DIR/macosx
|
||||
|
||||
2. Run the *configure* command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
|
||||
|
||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>--enable-64bit</i> option to the command line.
|
||||
|
||||
3. If the *configure* command has finished successfully, start the building process:
|
||||
|
||||
make
|
||||
|
||||
4. If the building has finished successfully, start the installation of Tk. All binary and service files of the product will be copied to the directory defined by *TK_INSTALL_DIR* (usually it is TCL_INSTALL_DIR)
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for text display in the 3D viewer.
|
||||
|
||||
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
|
||||
|
||||
1. Enter the directory where the source files of FreeType are located <i>(FREETYPE_SRC_DIR)</i>.
|
||||
|
||||
cd FREETYPE_SRC_DIR
|
||||
|
||||
2. Run the *configure* command
|
||||
|
||||
configure --prefix=FREETYPE_INSTALL_DIR
|
||||
|
||||
For a 64 bit platform also add <i>CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'</i> option to the command line.
|
||||
|
||||
3. If the *configure* command has finished successfully, start the building process
|
||||
|
||||
make
|
||||
|
||||
4. If building has finished successfully, start the installation of FreeType.
|
||||
All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*.
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries from the archive
|
||||
that can be downloaded from http://threadingbuildingblocks.org/.
|
||||
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*)
|
||||
and pick the archive for Mac OS X platform.
|
||||
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_2 gl2ps 1.3.5
|
||||
|
||||
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
|
||||
|
||||
1. Install or build cmake product from the source file.
|
||||
|
||||
2. Start cmake in GUI mode with the directory, where the source files of *fl2ps* are located:
|
||||
|
||||
ccmake GL2PS_SRC_DIR
|
||||
|
||||
* Press <i>[c]</i> to make the initial configuration;
|
||||
* Define the necessary options in *CMAKE_INSTALL_PREFIX*;
|
||||
* Press <i>[c]</i> to make the final configuration;
|
||||
* Press <i>[g]</i> to generate Makefile and exit.
|
||||
|
||||
or just run the following command:
|
||||
|
||||
cmake –DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR –DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
3. Start the building of gl2ps
|
||||
|
||||
make
|
||||
|
||||
4. Start the installation of gl2ps. Binaries will be installed according to the *CMAKE_INSTALL_PREFIX* option
|
||||
|
||||
make install
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
|
||||
|
||||
Download the necessary archive from
|
||||
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*.
|
||||
|
||||
Note that for building FreeImage on Mac OS X 10.7 you should replace *Makefile.osx*
|
||||
in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
|
||||
(http://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug).
|
||||
|
||||
1. If you build FreeImage 3.15.x you can skip this step.
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:</i>
|
||||
|
||||
In line 60 insert the following:
|
||||
|
||||
#include string.h
|
||||
|
||||
Modify <i>FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:</i>
|
||||
|
||||
In line 320 replace:
|
||||
|
||||
SwapShort(value);
|
||||
|
||||
with:
|
||||
|
||||
SwapShort(&value);
|
||||
|
||||
2. Enter the directory where the source files of FreeImage are located <i>(FREEIMAGE_SRC_DIR)</i>.
|
||||
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
|
||||
3. Run the building process
|
||||
|
||||
make
|
||||
|
||||
4. Run the installation process
|
||||
|
||||
1. If you have the permission to write into <i>/usr/local/include</i> and <i>/usr/local/lib</i> directories, run the following command:
|
||||
|
||||
make install
|
||||
|
||||
2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*:
|
||||
|
||||
Change line 49 from:
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
to:
|
||||
|
||||
PREFIX ?= $(PREFIX)
|
||||
|
||||
Change lines 65-69 from:
|
||||
|
||||
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
||||
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
||||
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
to:
|
||||
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
||||
|
||||
5. Clean temporary files
|
||||
|
||||
make clean
|
321
dox/dev_guides/building/3rdparty/3rdparty_windows.md
vendored
Normal file
@@ -0,0 +1,321 @@
|
||||
Building 3rd-party libraries on Windows {#occt_dev_guides__building_3rdparty_windows}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_win_1 Introduction
|
||||
|
||||
This document presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform. It is assumed that you are already familiar with MS Visual Studio / Visual C++.
|
||||
|
||||
You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available on the web site of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/. There are two types of third-party products used by OCCT:
|
||||
|
||||
* Mandatory products:
|
||||
* Tcl/Tk 8.5 - 8.6;
|
||||
* FreeType 2.4.10 - 2.5.3.
|
||||
* Optional products:
|
||||
* TBB 3.x - 4.x;
|
||||
* gl2ps 1.3.5 - 1.3.8;
|
||||
* FreeImage 3.14.1 -3.16.0;
|
||||
* VTK 6.1.0.
|
||||
|
||||
It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
|
||||
Further in this document, this folder is referred to as *3rdparty*.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2_1 Tcl/Tk
|
||||
|
||||
Tcl/Tk is required for DRAW test harness.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_win_2_1_1 Installation from sources: Tcl
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
1. In the *win* sub-directory, edit file *buildall.vc.bat*:
|
||||
|
||||
* Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance:
|
||||
|
||||
call "%VS80COMNTOOLS%\vsvars32.bat"
|
||||
|
||||
If you are building 64-bit version, set environment accordingly, e.g.:
|
||||
|
||||
call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
|
||||
|
||||
* Define variable *INSTALLDIR* pointing to directory where Tcl/Tk will be installed, e.g.:
|
||||
|
||||
set INSTALLDIR=D:\OCCT\3rdparty\tcltk-86-32
|
||||
|
||||
* Add option *install* to the first command line calling *nmake*:
|
||||
|
||||
nmake -nologo -f makefile.vc release htmlhelp install %1
|
||||
|
||||
* Remove second call to *nmake* (building statically linked executable)
|
||||
|
||||
2. Edit file *rules.vc* replacing line
|
||||
|
||||
SUFX = tsgx
|
||||
|
||||
by
|
||||
|
||||
SUFX = sgx
|
||||
|
||||
This is to avoid extra prefix 't' in the library name, which is not recognized by default by OCCT build tools.
|
||||
|
||||
3. In the command prompt, run *buildall.vc.bat*
|
||||
|
||||
You might need to run this script twice to have *tclsh* executable installed; check subfolder *bin* of specified installation path to verify this.
|
||||
|
||||
4. For convenience of use, we recommend making a copy of *tclsh* executable created in subfolder *bin* of *INSTALLDIR* and named with Tcl version number suffix, as *tclsh.exe* (with no suffix)
|
||||
|
||||
> cd D:\OCCT\3rdparty\tcltk-86-32\bin
|
||||
> cp tclsh86.exe tclsh.exe
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_win_2_1_2 Installation from sources: Tk
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
Apply the same steps as described for building Tcl above, with the same INSTALLDIR.
|
||||
Note that Tk produces its own executable, called *wish*.
|
||||
|
||||
You might need to edit default value of *TCLDIR* variable defined in *buildall.vc.bat* (should be not necessary if you unpack both Tcl and Tk sources in the same folder).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2_2 FreeType
|
||||
|
||||
FreeType is required for text display in a 3D viewer. You can download its sources from http://sourceforge.net/projects/freetype/files/
|
||||
|
||||
### The building procedure
|
||||
|
||||
1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder. As a result, you will get a folder named, for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
|
||||
|
||||
2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio. Here *vc20xx* stands for your version of Visual Studio.
|
||||
|
||||
3. Select the configuration to build: either Debug or Release.
|
||||
|
||||
4. Build the *freetype* project.
|
||||
|
||||
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
|
||||
|
||||
|
||||
5. If you build FreeType for a 64 bit platform, select in the main menu **Build - Configuration Manager** and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
|
||||
Update the value of the Output File for x64 configuration:
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
|
||||
Build the *freetype* project.
|
||||
|
||||
As a result, you will obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
|
||||
|
||||
To build FreeType as a dynamic library (.dll) follow steps 6, 7 and 8 of this procedure.
|
||||
|
||||
6. Open menu Project-> Properties-> Configuration Properties-> General and change option **Configuration Type** to *Dynamic Library (.dll)*.
|
||||
7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*:
|
||||
|
||||
in line 255, uncomment the definition of macro *FT_EXPORT* and change it as follows:
|
||||
|
||||
#define FT_EXPORT(x) __declspec(dllexport) x
|
||||
|
||||
8. Build the *freetype* project.
|
||||
|
||||
As a result, you will obtain the files of the import library (.lib) and the dynamic library (.dll) in folders <i>freetype \\objs\\release</i> or <i>\\objs\\debug </i>.
|
||||
|
||||
If you build for a 64 bit platform, follow step 5 of the procedure.
|
||||
|
||||
To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures, it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern: *freetype-compiler-bitness-building mode*, where:
|
||||
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
|
||||
* **bitness** is *32* or *64*;
|
||||
* **building mode** is *opt* (for Release) or *deb* (for Debug).
|
||||
|
||||
The *include* subfolder should be copied as is, while libraries should be renamed to *freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories *lib *and *bin*, respectively. If the Debug configuration is built, the Debug libraries should be put into subdirectories *libd* and *bind*.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_1 TBB
|
||||
|
||||
This third-party product is installed with binaries
|
||||
from the archive that can be downloaded from http://threadingbuildingblocks.org/.
|
||||
Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*) and pick the archive for Windows platform.
|
||||
|
||||
Unpack the downloaded archive of TBB product into the *3rdparty* folder.
|
||||
|
||||
Further in this document, this folder is referred to as *tbb*.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_2 gl2ps
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (dll file).
|
||||
You can download its sources from http://geuz.org/gl2ps/src/.
|
||||
|
||||
### The building procedure
|
||||
|
||||
1. Unpack the downloaded archive of gl2ps product (e.g. *gl2ps-1.3.5.tgz*) into the *3rdparty* folder.
|
||||
|
||||
As a result, you will get a folder named, for example, *3rdparty\\gl2ps-1.3.5-source*.
|
||||
|
||||
Rename it into <i>gl2ps-platform-compiler-building mode</i>, where
|
||||
* **platform** is *win32* or *win64*;
|
||||
* **compiler** is *vc8*, *vc9* or *vc10*;
|
||||
* **building mode** - *opt* (for release) or *deb* (for debug).
|
||||
|
||||
For example, <i>gl2ps-win64-vc10-deb</i>
|
||||
|
||||
Further in this document, this folder is referred to as *gl2ps*.
|
||||
|
||||
2. Download (from http://www.cmake.org/cmake/resources/software.html)
|
||||
and install the *CMake* build system.
|
||||
|
||||
3. Edit the file *gl2ps\\CMakeLists.txt*.
|
||||
|
||||
After line 113 in *CMakeLists.txt*:
|
||||
|
||||
set_target_properties(shared PROPERTIES COMPILE_FLAGS \"-DGL2PSDLL -DGL2PSDLL_EXPORTS\")
|
||||
|
||||
add the following line:
|
||||
|
||||
add_definitions(-D_USE_MATH_DEFINES)
|
||||
|
||||
Attention: If Cygwin was installed on your computer, make sure that there is no path to it in the *PATH* variable to avoid possible conflicts during the configuration.
|
||||
|
||||
4. Launch CMake <i>(cmake-gui.exe)</i> using the Program menu.
|
||||
|
||||
In CMake:
|
||||
|
||||
* Define where the source code is.
|
||||
This path must point to *gl2ps* folder.
|
||||
|
||||
* Define where to build the binaries.
|
||||
This path must point to the folder where generated gl2ps project binaries will be placed
|
||||
(for example, *gl2ps\\bin*).
|
||||
Further in this document, this folder is referred to as *gl2ps_bin*.
|
||||
|
||||
* Press **Configure** button.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
|
||||
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
|
||||
* Press **Finish** button to return to the main CMake window.
|
||||
Expand the ENABLE group and uncheck ENABLE_PNG and ENABLE_ZLIB check boxes.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
|
||||
* Expand the CMAKE group and define *CMAKE_INSTALL_PREFIX* which is the path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps-1.3.5*.
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
|
||||
* Press **Configure** button again, then press **Generate** button to generate Visual Studio projects. After completion, close CMake application.
|
||||
|
||||
5. Open the solution file *gl2ps_bin\\gl2ps.sln* in Visual Studio.
|
||||
|
||||
* Select a configuration to build
|
||||
* Choose **Release** to build Release binaries.
|
||||
* Choose **Debug** to build Debug binaries.
|
||||
* Select a platform to build.
|
||||
* Choose **Win32** to build for a 32 bit platform.
|
||||
* Choose **x64** to build for a 64 bit platform.
|
||||
* Build the solution.
|
||||
* Build the *INSTALL* project.
|
||||
|
||||
As a result, you should have the installed gl2ps product in the *CMAKE_INSTALL_PREFIX* path.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (.dll file).
|
||||
You can download its sources from
|
||||
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
|
||||
|
||||
As a result, you should have a folder named *3rdparty\\FreeImage*.
|
||||
|
||||
Rename it according to the rule: *freeimage-platform-compiler-building mode*, where
|
||||
|
||||
* **platform** is *win32* or *win64*;
|
||||
* **compiler** is *vc8* or *vc9* or *vc10* or *vc11*;
|
||||
* **building mode** is *opt* (for release) or *deb* (for debug)
|
||||
|
||||
Further in this document, this folder is referred to as *freeimage*.
|
||||
|
||||
2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio.
|
||||
|
||||
If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace.
|
||||
Such conversion should be suggested automatically by Visual Studio.
|
||||
|
||||
3. Select a configuration to build.
|
||||
|
||||
- Choose **Release** if you are building Release binaries.
|
||||
- Choose **Debug** if you are building Debug binaries.
|
||||
|
||||
*Note:*
|
||||
|
||||
If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage and FreeimagePlus projects:
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> General -> Output File
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File
|
||||
|
||||
FreeImage*d*.pdb to FreeImage.pdb
|
||||
FreeImagePlus*d*.pdb to FreeImagePlus.pdb
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library
|
||||
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line
|
||||
|
||||
FreeImage*d*.dll to FreeImage.dll
|
||||
FreeImage*d*.lib to FreeImage.lib
|
||||
FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
|
||||
Additionally, rename in project FreeImagePlus
|
||||
|
||||
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
|
||||
|
||||
from FreeImage*d*.lib to FreeImage.lib
|
||||
|
||||
4. Select a platform to build.
|
||||
|
||||
- Choose *Win32* if you are building for a 32 bit platform.
|
||||
- Choose *x64* if you are building for a 64 bit platform.
|
||||
|
||||
5. Start the building process.
|
||||
|
||||
As a result, you should have the library files of FreeImage product in *freeimage\\Dist* folder (*FreeImage.dll* and *FreeImage.lib*) and in *freeimage\\Wrapper\\FreeImagePlus\\dist* folder (*FreeImagePlus.dll* and *FreeImagePlus.lib*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_4 VTK
|
||||
|
||||
VTK is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library.
|
||||
|
||||
### The building procedure:
|
||||
|
||||
1. Download the necessary archive from http://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder.
|
||||
|
||||
As a result, you will get a folder named, for example, <i>3rdparty\VTK-6.1.0.</i>
|
||||
|
||||
Further in this document, this folder is referred to as *VTK*.
|
||||
|
||||
2. Use CMake to generate VS projects for building the library:
|
||||
- Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data.
|
||||
- Click **Configure**.
|
||||
- Select the VS version to be used from the ones you have installed (we recommend using VS 2010) and the architecture (32 or 64-bit).
|
||||
- Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder.
|
||||
|
||||
3. Build project VTK in Release mode.
|
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image001.png
vendored
Normal file
After Width: | Height: | Size: 123 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image003.png
vendored
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image004.png
vendored
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image005.png
vendored
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image006.png
vendored
Normal file
After Width: | Height: | Size: 206 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image007.png
vendored
Normal file
After Width: | Height: | Size: 236 KiB |
71
dox/dev_guides/building/android/android.md
Normal file
@@ -0,0 +1,71 @@
|
||||
Building with CMake and ADT for Android {#occt_dev_guides__building_android}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This file describes the steps to build OCCT libraries from a complete source package
|
||||
with following tools:
|
||||
- Generation of eclipse project files
|
||||
- CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
|
||||
- Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
|
||||
- Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
|
||||
- Make: MinGW v4.82+ for Windows, GNU Make vXX for Linux. http://sourceforge.net/projects/mingw/files/
|
||||
- Building eclipse project files of OCCT
|
||||
- Android Developer Tools (ADT) v22+ https://developer.android.com/sdk/index.html
|
||||
|
||||
## Generation of eclipse project files
|
||||
Run GUI tool provided by CMake: cmake-gui
|
||||
|
||||
### Tools configuration
|
||||
- Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
|
||||
- Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image001.png}
|
||||
|
||||
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. -
|
||||
|
||||
Select "Eclipse CDT4 - MinGW MakeFiles" item from the list
|
||||
- Choose "Specify toolchain file for cross-compiling"
|
||||
- Click "Next"
|
||||
@figure{/dev_guides/building/android/images/android_image002.png}
|
||||
- Specify the Toolchain file at next dialog by android.toolchain.cmake is contained by cross-compilation toolchain for CMake
|
||||
- Click "Finish"
|
||||
@figure{/dev_guides/building/android/images/android_image003.png}
|
||||
|
||||
Add cache entry ANDROID_NDK - path (entry type is PATH) to the NDK folder ("Add Entry" button)
|
||||
@figure{/dev_guides/building/android/images/android_image004.png}
|
||||
|
||||
if there is message "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."
|
||||
Define CMAKE_MAKE_PROGRAM variable with the file path to mingw32-make executable.
|
||||
@figure{/dev_guides/building/android/images/android_image005.png}
|
||||
|
||||
### OCCT Configuration
|
||||
|
||||
How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake"
|
||||
taking into account the specific configuration variables for android:
|
||||
- ANDROID_ABI = armeabi-v7a
|
||||
- ANDROID_NATIVE_API_LEVEL = 15
|
||||
- ANDROID_NDK_LAYOUT is equal to BUILD_CONFIGURATION variable
|
||||
- CMAKE_ECLIPSE_VERSION is equal to installed eclipse version (e.g., 4.2)
|
||||
|
||||
Configure parallel building:
|
||||
- CMAKE_ECLIPSE_MAKE_ARGUMENTS = -jN where N = your numbers of CPU cores (threads)
|
||||
|
||||
@figure{/dev_guides/building/android/images/android_image006.png}
|
||||
|
||||
### Generation of eclipse projects files
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then the eclipse project files will appear in the build folder (e.g. <i> D:/android-build-eclipse-api-15 </i>).
|
||||
|
||||
## Building eclipse project files of OCCT
|
||||
|
||||
- Open eclipse (downloaded ADT bundle contains it)
|
||||
@figure{/dev_guides/building/android/images/android_image007.png}
|
||||
- Import "Existing project into Workspace"
|
||||
@figure{/dev_guides/building/android/images/android_image008.png}
|
||||
@figure{/dev_guides/building/android/images/android_image009.png}
|
||||
- Build ALL
|
||||
@figure{/dev_guides/building/android/images/android_image010.png}
|
||||
|
||||
When the building process has finished, libraries are located in \<build folder\>/out (e.g. <i> D:/android-build-eclipse-api-15/out </i>).
|
BIN
dox/dev_guides/building/android/images/android_image001.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
dox/dev_guides/building/android/images/android_image002.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
dox/dev_guides/building/android/images/android_image003.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
dox/dev_guides/building/android/images/android_image004.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
dox/dev_guides/building/android/images/android_image005.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
dox/dev_guides/building/android/images/android_image006.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
dox/dev_guides/building/android/images/android_image007.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
dox/dev_guides/building/android/images/android_image008.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
dox/dev_guides/building/android/images/android_image009.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
dox/dev_guides/building/android/images/android_image010.png
Normal file
After Width: | Height: | Size: 46 KiB |
72
dox/dev_guides/building/automake.md
Normal file
@@ -0,0 +1,72 @@
|
||||
Building with Automake {#occt_dev_guides__building_automake}
|
||||
======================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Linux with **Autotools** GNU build system.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See paragraph 1 \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of
|
||||
\ref occt_dev_guides__building for instructions.
|
||||
|
||||
Note that during compilation by makefiles on Linux station with
|
||||
NVIDIA video card you may experience problems because the installation
|
||||
procedure of NVIDIA video driver removes library *libGL.so* included in package
|
||||
*libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in
|
||||
directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory
|
||||
<i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>).
|
||||
|
||||
To prevent this, it is suggested to make links:
|
||||
|
||||
|
||||
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
|
||||
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
|
||||
|
||||
|
||||
1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system.
|
||||
|
||||
2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles.
|
||||
|
||||
|
||||
$CASROOT/configure \<FLAGS\>
|
||||
|
||||
Where <i> \<FLAGS\> </i> is a set of options.
|
||||
The following flags are mandatory:
|
||||
|
||||
* <i> --with-tcl= </i> defines the location of *tclConfig.sh*;
|
||||
* <i> --with-tk= </i> defines location of *tkConfig.sh*;
|
||||
* <i> --with-freetype= </i> defines location of installed **FreeType** product
|
||||
* <i> --prefix= </i> defines the location for installation of OCCT binaries
|
||||
|
||||
Additional flags:
|
||||
|
||||
* <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product;
|
||||
* <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
|
||||
* <i> --with-tbb-include= </i> defines the location of *tbb.h*;
|
||||
* <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
|
||||
* <i> --with-vtk-include= </i> defines the location of VTK includes;
|
||||
* <i> --with-vtk-library= </i> defines the location of VTK libraries;
|
||||
* <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information;
|
||||
* <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization;
|
||||
* <i> --disable-draw </i> allows OCCT building without Draw.
|
||||
|
||||
If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
|
||||
|
||||
|
||||
Attention: 64-bit platforms are detected automatically.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
\> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 -–with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 –with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
|
||||
|
||||
|
||||
3.If configure exits successfully, you can build OCCT with *make* command.
|
||||
|
||||
\> make -j8 install
|
||||
|
||||
4.To start *DRAW*, launch
|
||||
|
||||
\> draw.sh
|
32
dox/dev_guides/building/building.md
Normal file
@@ -0,0 +1,32 @@
|
||||
Building OCCT from sources {#occt_dev_guides__building}
|
||||
=========
|
||||
|
||||
In order to build OCCT libraries from these sources for use in your program,
|
||||
you need to:
|
||||
|
||||
1. Make sure you have all required third-party libraries installed (check
|
||||
software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
|
||||
|
||||
See the following documents for short guide to installation of
|
||||
third-party libraries on different platforms:
|
||||
- \subpage occt_dev_guides__building_3rdparty_windows
|
||||
- \subpage occt_dev_guides__building_3rdparty_linux
|
||||
- \subpage occt_dev_guides__building_3rdparty_osx
|
||||
|
||||
2. If you use bare OCCT sources from Git repository or made some changes affecting
|
||||
CDL files or dependencies of OCCT toolkits, you need to update header files generated
|
||||
from \ref occt_dev_guides__cdl "CDL", and regenerate build scripts for your environment using WOK.
|
||||
See \subpage occt_dev_guides__building_wok for details.
|
||||
|
||||
Skip to step 3 if you use complete source package (e.g. official OCCT
|
||||
release) without changes in CDL.
|
||||
|
||||
3. Build using your preferred build tool.
|
||||
- \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
|
||||
- \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_android "Building with CMake and ADT for Android (cross-platform)"
|
||||
- \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
|
||||
- \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
|
||||
- \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"
|
||||
|
||||
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
|
231
dox/dev_guides/building/cmake/cmake.md
Normal file
@@ -0,0 +1,231 @@
|
||||
Building with CMake {#occt_dev_guides__building_cmake}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This file describes the steps to build OCCT libraries from a complete source package
|
||||
with **CMake**. CMake is free software that can create GNU Makefiles, KDevelop,
|
||||
XCode, Eclipse and Visual Studio project files. **CMake** version 3.0 or above is
|
||||
required.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository) or make some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see the
|
||||
instructions for your platform in @ref occt_dev_guides__building.
|
||||
|
||||
## Define the location of build and install directories.
|
||||
|
||||
The build directory is where intermediate files (projects / makefiles, objects, binaries) will be created. Each built configuration should have its own build directory.
|
||||
|
||||
The install directory is where binaries will be installed after build, along with header files and resources required for OCCT use in applications.
|
||||
It is possible to install several configurations of OCCT (differentiated by platform, bitness, compiler, and build type) into the same directory.
|
||||
|
||||
It is recommended to separate build and install directories from OCCT source directory, for example:
|
||||
|
||||
/user/home/occt/ - sources
|
||||
/user/home/tmp/occt-build-vc10-x64-release - intermediate files
|
||||
/user/home/occt-install - installed binaries
|
||||
|
||||
## CMake usage
|
||||
|
||||
Run CMake indicating the path to OCCT sources <i>($CASROOT)</i> and selected build directory.
|
||||
|
||||
It is recommended to use GUI tools provided by CMake: *cmake-gui* on Windows, Mac and Linux (*ccmake* also can be used on Linux).
|
||||
|
||||
### Windows:
|
||||
|
||||
Specify the root folder of OCCT (<i>$CASROOT</i>, which contains *CMakelists.txt* file) by clicking **Browse Source**.
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image001.png}
|
||||
|
||||
Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**.
|
||||
|
||||
Each configuration of the project should be built in its own directory. When building multiple configurations it is recommended to indicate in the name of build directories the system, bitness, compiler, and build type (e.g., <i>d:/occt/build/win32-vc9-debug</i> ).
|
||||
|
||||
**Configure** opens the window with a drop-down list of generators supported by CMake project. Select the required generator (e.g., Visual Studio 2008) and click **Finish**.
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image002.png}
|
||||
|
||||
### Linux (ccmake variant):
|
||||
|
||||
In the console, change to the build directory and call *ccmake* with the path to the source directory of the project:
|
||||
|
||||
> cd ~/occt/build/debug
|
||||
> ccmake ~/occt
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image003.png}
|
||||
|
||||
Press *c* to configure.
|
||||
|
||||
*cmake-gui* is used in the same way as described above for Windows.
|
||||
|
||||
### Mac OS:
|
||||
|
||||
Use *cmake-gui* **Applications -> CMake 2.8-10.app** to generate project files for the chosen build environment (e.g., XCode).
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image004.png}
|
||||
|
||||
## OCCT Configuration
|
||||
|
||||
The error message, which appears at the end of configuration process, informs you about the required variables,
|
||||
which need to be defined. This error will appear until all required variables are defined correctly.
|
||||
|
||||
Note: In *cmake-gui* there is "grouped" option, which groups variables with a common prefix.
|
||||
|
||||
### Selection of the components to be built
|
||||
|
||||
The variables with <i>BUILD_</i> prefix allow specifying OCCT components and
|
||||
configuration to be built:
|
||||
|
||||
* *BUILD_CONFIGURATION* - defines configuration to be built (Release by default).
|
||||
* <i>BUILD_<MODULE></i> - specifies whether the corresponding OCCT module should be
|
||||
built (all toolkits). Note that even if the whole module is not
|
||||
selected for build, its toolkits used by other toolkits
|
||||
selected for build will be included automatically.
|
||||
* *BUILD_TOOLKITS* - allows including additional toolkits from non-selected
|
||||
modules (should be list of toolkit names separated by a
|
||||
space or a semicolon).
|
||||
* *BUILD_SAMPLES* - specifies whether OCCT MFC samples should be built.
|
||||
* *BUILD_PATCH_DIR* - optionally specifies additional folder containing patched OCCT source files.
|
||||
The patch may contain arbitrary subset of OCCT source files (including CMake scripts, templates, etc.), organized in the same structure of folders as OCCT.
|
||||
The projects generated by CMake will use files found in the patch folder instead of the corresponding files of OCCT.
|
||||
|
||||
Check variables with <i>USE_</i> prefix (<i>USE_FREEIMAGE, USE_GL2PS, USE_TBB,</i> and
|
||||
<i>USE_OPENCL</i>) if you want to enable use of the corresponding optional 3rd-party
|
||||
library.
|
||||
|
||||
### 3rd-party configuration (The variables with <i>3RDPARTY_</i> prefix)
|
||||
|
||||
If you have 3rd-party libraries in a non-default location
|
||||
(e.g., on Windows, binaries downloaded from http://www.opencascade.org/getocc/download/3rdparty/")
|
||||
*3RDPARTY_DIR* variable should be specified with the path to the folders where required 3rd-party libraries will be sought
|
||||
|
||||
The results of search for 3rd-party directories will be stored in *3RDPARTY_\<LIBRARY\>_DIR* variables. If *3RDPARTY_DIR* directory is defined, required libraries are sought in *3RDPARTY_DIR* location.
|
||||
|
||||
The procedure expects to find binary and header files of each 3rd-party library in its own sub-directory: *bin*, *lib* and *include*.
|
||||
|
||||
Press **Configure** (**c** key for ccmake).
|
||||
|
||||
The result of the search are recorded in the corresponding variables:
|
||||
|
||||
* *3RDPARTY_\<PRODUCT\>_DIR* - path to the 3rdparty directory (with directory name) (e.g. <i>D:/3rdparty/tcltk-86-32</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR* - path to directory containing a library (e.g. <i>D:/3rdparty/tcltk-86-32/lib</i>).
|
||||
* *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* - path to the directory containing a header file (e.g., <i>D:/3rdparty/tcltk-86-32/include</i>)
|
||||
* *3RDPARTY_\<PRODUCT\>_DLL_DIR* - path to the directory containing a shared library (e.g., <i>D:/3rdparty/tcltk-86-32/bin</i>) This variable is able just in windows case
|
||||
|
||||
|
||||
Note: a libraries and include directories should be the children of product directory if the last one is defined.
|
||||
|
||||
The search process is as follows:
|
||||
|
||||
1. Common path: *3RDPARTY_DIR*
|
||||
2. Path to a particular 3rd-party library: *3RDPARTY_\<PRODUCT\>_DIR*
|
||||
3. Paths to headers and binaries:
|
||||
1. *3RDPARTY_\<PRODUCT\>_INCLUDE_DIR*
|
||||
2. *3RDPARTY_\<PRODUCT\>_LIBRARY_DIR*
|
||||
3. *3RDPARTY_\<PRODUCT\>_DLL_DIR*
|
||||
|
||||
If a variable of any level is not defined (empty or <i> \<variable name\>-NOTFOUND </i>)
|
||||
and the upper level variable is defined, the content of the non-defined variable
|
||||
will be sought at the next configuration step. If search process at level 3 does not find the required files, it seeks in default places.
|
||||
|
||||
Important: If *BUILD_CONFIGURATION* variable is changed, at the next configuration
|
||||
*3RDPARTY_ variables* will be replaced by the search process result, except for the *3RDPARTY_DIR* variable.
|
||||
|
||||
**Note** : CMake will produce an error after the configuration step until all required variables are defined correctly.
|
||||
If the search result (include path, or library path, or dll path) does not meet your expectations,
|
||||
you can change *3RDPARTY_\<PRODUCT\>_*_DIR variable*, clear (if they are not empty)
|
||||
*3RDPARTY_\<PRODUCT\>_DLL_DIR, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR* and 3RDPARTY_\<PRODUCT\>_LIBRARY_DIR variables
|
||||
(or clear one of them) and run the configuration process again.
|
||||
|
||||
At this time the search will be performed in the newly identified directory
|
||||
and the result will be recorded to corresponding variables (replace old value if it is necessary).
|
||||
|
||||
For example, (Linux case) *3RDPARTY_FREETYPE_DIR* variable
|
||||
|
||||
/PRODUCTS/maintenance/Mandriva2010/freetype-2.4.10
|
||||
|
||||
can be changed to
|
||||
|
||||
/PRODUCTS/maintenance/Mandriva2010/freetype-2.5.3
|
||||
|
||||
During the configuration process and the related variables (*3RDPARTY_FREETYPE_DLL_DIR*, *3RDPARTY_FREETYPE_INCLUDE_DIR* and *3RDPARTY_FREETYPE_LIBRARY_DIR*) will be filled with new found values
|
||||
|
||||
**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names,
|
||||
change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
|
||||
|
||||
###The variables with INSTALL_ prefix:
|
||||
|
||||
Define *INSTALL_DIR* variable as the path will be contain the built OCCT files (libraries, executables and headers)
|
||||
If <i>INSTALL_\<PRODUCT\></i> variable is checked, 3rd-party products will be copied to the install directory.
|
||||
|
||||
At the end of the configuration process "configuring done" message will be shown and the generation process can be started.
|
||||
|
||||
## OCCT Generation
|
||||
|
||||
This procedure will create makefiles or project files for your build system.
|
||||
|
||||
### Windows
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then the project files will appear in the build folder (e.g. <i> d:/occt/build/win32-vc9-release </i>).
|
||||
|
||||
### Linux
|
||||
|
||||
Click **Generate** button (if you use cmake-gui) or press **g** (for ccmake) to start the generation process.
|
||||
|
||||
### Mac OS X
|
||||
|
||||
Click **Generate** button and wait until the generation process is finished.
|
||||
Then the project files will appear in the build folder (e.g. <i> /Developer/occt/build/XCode </i>).
|
||||
|
||||
## OCCT Building
|
||||
|
||||
The install folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*) and samples (if its were built; (see below **MFC samples**)); the directory structure is follow:
|
||||
* **data** - data files for OCCT (brep, iges, stp)
|
||||
* **inc** - header files
|
||||
* **samples** - tcl sample files
|
||||
* **src** - all required source files for OCCT
|
||||
* **tests** - OCCT test suite
|
||||
* **win32/vc10/bind**> - example relative directory tree of binary files (3rdparty and occt)
|
||||
* **win32/vc9/lib**> - example relative directory tree of libraries (3rdparty and occt)
|
||||
|
||||
### Windows (Visual studio)
|
||||
|
||||
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
|
||||
|
||||
When the building process is finished, build the *INSTALL* project (by default the build solution process skips the building of the INSTALL project) to move the above files to *INSTALL_DIR*.
|
||||
|
||||
For this, right-click on the *INSTALL* project and select **Project Only -> Build Only** -> *INSTALL* in the solution explorer.
|
||||
|
||||
### Linux (make)
|
||||
|
||||
Change directory to the directory with binaries and run *make* command
|
||||
|
||||
> make
|
||||
|
||||
To copy all libraries, executables and chosen 3rd-party libraries run *make* command with *install* argument
|
||||
|
||||
> make install
|
||||
|
||||
This command will move the above files to *INSTALL_DIR*.
|
||||
|
||||
### Mac OS X (XCode)
|
||||
|
||||
Go to the build folder, start XCode solution *OCCT.xcodeproj* and build it by clicking **Build -> Build**.
|
||||
Please notice that XCode may lag because it processes sources at the first start.
|
||||
|
||||
When the building process has finished, build the *INSTALL* project (by default the build solution process skips the building of *INSTALL* project) to move the above files to *INSTALL_DIR*.
|
||||
Notice that *env.sh* (which configures *PATH* and *DYLD_LIBRARY_PATH* environment variables
|
||||
as well as Draw Harness extra variables) and *draw.sh* (to launch *DRAWEXE* ) will be created in the target directory.
|
||||
|
||||
### MFC samples
|
||||
|
||||
On Windows you can also build binaries of MFC samples together with OCCT. For this, activate **BUILD_Samples** check-box in CMake configuration dialog.
|
||||
|
||||
@figure{/dev_guides/building/cmake/images/cmake_image007.png}
|
||||
|
||||
Please take into account that MFC sample binaries will be installed in the same folder as OCCT binaries during building of *INSTALL* project.
|
||||
To run an MFC sample use *sample.bat* launcher. The command format is: <i>sample.bat *SampleName*</i> (e.g. <i>sample.bat ImportExport</i>).
|
BIN
dox/dev_guides/building/cmake/images/cmake_image001.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image002.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image003.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image004.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image005.png
Normal file
After Width: | Height: | Size: 230 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image007.png
Normal file
After Width: | Height: | Size: 22 KiB |
70
dox/dev_guides/building/code_blocks.md
Normal file
@@ -0,0 +1,70 @@
|
||||
Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
|
||||
======================================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source package
|
||||
on Mac OS X with **Code::Blocks**.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for details.
|
||||
|
||||
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file
|
||||
*custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
|
||||
|
||||
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
|
||||
|
||||
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
|
||||
|
||||
All paths should be separated by ":" symbol.
|
||||
|
||||
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
|
||||
in the aforementioned environment variables *CSF_OPT_INC* and
|
||||
*CSF_OPT_LIB64* from file *custom.sh*.
|
||||
|
||||
If you want to build OCCT without the optional libraries perform the
|
||||
following steps:
|
||||
|
||||
2.1 Disable unnecessary library in custom.sh by setting the corresponding
|
||||
variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*.
|
||||
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
|
||||
2.2 Remove this library from Linker settings in **Code::Blocks** for each project
|
||||
that uses it: right click on the required project, choose **Build options**,
|
||||
go to **Linker settings** tab in the opened window , select unnecessary
|
||||
libraries and click **Delete** button.
|
||||
|
||||
3. Open Terminal application
|
||||
|
||||
4. Enter <i> \<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
5. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
|
||||
|
||||
6. To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
|
||||
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform
|
||||
the following steps:
|
||||
|
||||
1.Open Terminal application
|
||||
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
35
dox/dev_guides/building/msvc.md
Normal file
@@ -0,0 +1,35 @@
|
||||
Building with MS Visual C++ {#occt_dev_guides__building_msvc}
|
||||
===========================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source
|
||||
archive on Windows with <b>MS Visual C++</b>.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for instructions.
|
||||
|
||||
1. Edit file *custom.bat* to define the environment:
|
||||
|
||||
- *VCVER* - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
|
||||
and relevant *VCVARS* path
|
||||
- *ARCH* - architecture (32 or 64), affects only *PATH* variable for execution
|
||||
- <i>HAVE_*</i> - flags to enable or disable use of optional third-party products
|
||||
- CSF_OPT_* - paths to search for includes and binaries of all used
|
||||
third-party products
|
||||
|
||||
2. Launch *msvc.bat* to start Visual Studio with all necessary environment
|
||||
variables defined.
|
||||
|
||||
Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
|
||||
Binaries are produced in *win32* or *win64* folders.
|
||||
|
||||
3. Build with Visual Studio
|
||||
|
||||
Note: If VTK was not installed on you computer and you are not interested in usage of
|
||||
OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw
|
||||
projects from process of compilation in the main menu <b>Build / Configuration Manager</b>.
|
||||
|
||||
To start DRAW, launch *draw.bat*.
|
BIN
dox/dev_guides/building/wok/images/wok_image001.png
Normal file
After Width: | Height: | Size: 168 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image002.png
Normal file
After Width: | Height: | Size: 270 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image003.png
Normal file
After Width: | Height: | Size: 157 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image004.png
Normal file
After Width: | Height: | Size: 194 KiB |
162
dox/dev_guides/building/wok/wok.md
Normal file
@@ -0,0 +1,162 @@
|
||||
Using WOK {#occt_dev_guides__building_wok}
|
||||
=========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
\ref occt_dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
|
||||
It is required for generation of header files for classes defined with
|
||||
@ref occt_dev_guides__cdl "CDL" ("Cascade Definition Language").
|
||||
Also tools for generation of project files for other build systems, and OCCT
|
||||
documentation, are integrated to WOK.
|
||||
|
||||
WOK thus is needed in the following situations:
|
||||
- Building from OCCT sources from Git repository (do not contain generated files)
|
||||
- Building after some changes made in CDL files
|
||||
|
||||
Before installing and using WOK, make sure that you have installed a compiler
|
||||
(it is assumed that it is Visual Studio on Windows or gcc on Linux and MacOS)
|
||||
and third-party components required for building OCCT.
|
||||
|
||||
@section wok1 Installing WOK
|
||||
|
||||
Download the latest version of binary distribution WOK from http://dev.opencascade.org/index.php?q=home/resources
|
||||
|
||||
@subsection wok11 Windows
|
||||
|
||||
Run the installer. You will be prompted to read and accept the OCCT Public License to proceed:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image001.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image001.png
|
||||
|
||||
Click **Next** and proceed with the installation.
|
||||
At the end of the installation you will be prompted to specify the version and the location of Visual Studio to be used, and the location of third-party libraries:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image002.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image002.png
|
||||
|
||||
You can change these settings at any time later. For this click on the item **Customize environment (GUI tool)** in the WOK group in the Windows Start menu.
|
||||
|
||||
The shortcuts from this group provide two ways to run WOK:
|
||||
* In command prompt window using option *WOK TCL shell*.
|
||||
* In Emacs editor using option *WOK Emacs*. Using Emacs is convenient if you need to work within WOK environment.
|
||||
|
||||
By default WOK installer creates a WOK factory with name *LOC* within workshop *dev*. I.e. the WOK path is <i>:LOC:dev</i>.
|
||||
|
||||
@subsection wok12 Linux
|
||||
|
||||
* Unpack the .tgz archive containing WOK distributive into the installation directory <i>\<WOK_INSTALL_DIR\></i>.
|
||||
|
||||
* Perform the following commands assuming that you have unpacked WOK distributive archive into <i>\<WOK_INSTALL_DIR\></i>:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_confgui.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image003.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image003.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK use one the following commands:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_emacs.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
or
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_tclsh.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection wok13 Mac OS X
|
||||
|
||||
* Double click on file *wokSetup.dmg* in the Finder. This opens a new window. Drag and drop *wokSetup* folder from this window at the location in the Finder where you want to install WOK, i.e. <i>\<WOK_INSTALL_DIR\></i>.
|
||||
|
||||
* Browse to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokConfig*. This opens a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image004.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image004.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokEmacs*.
|
||||
|
||||
|
||||
@section wok2 Initialization of Workbench
|
||||
|
||||
To start working with OCCT, clone the OCCT Git repository from the server (see http://dev.opencascade.org/index.php?q=home/resources for details) or unpack the source archive.
|
||||
|
||||
Then create a WOK workbench (command *wcreate*) setting its Home to the directory, where the repository is created (<i>$CASROOT</i> variable). The workbench should have the same name as that directory.
|
||||
|
||||
For example, assuming that OCCT repository has been cloned into *D:/occt* folder:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wcreate occt -DHome=D:/occt
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note that <i>$CASROOT</i> is equal to *D:/occt* now.
|
||||
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.; see @ref occt_dev_guides__wok "WOK User's Guide" for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
|
||||
@section wok3 Generation of building projects
|
||||
|
||||
Use command *wgenproj* in WOK to generate derived headers, source and building projects files:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wokcd occt
|
||||
LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
TARGET:
|
||||
* *vc8* - Visual Studio 2005;
|
||||
* *vc9* - Visual Studio 2008;
|
||||
* *vc10* - Visual Studio 2010;
|
||||
* *vc11* - Visual Studio 2012;
|
||||
* *cbp* - CodeBlocks;
|
||||
* *cmake* - CMake;
|
||||
* *amk* - AutoMake;
|
||||
* *xcd* - Xcode;
|
||||
* <i>-no_wprocess</i> option skips generation of derived headers and source files.
|
||||
|
||||
Note that this command takes several minutes to complete at the first call.
|
||||
|
||||
Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories *drv* and <i>.adm</i> and repeat the command.
|
||||
|
||||
To regenerate derived headers and source files without regeneration of projects use command:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
LOC:dev> wokcd occt
|
||||
LOC:dev:occt> wprocess -DGroups=Src,Xcpp
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The generated building project has been placed into <i>$CASROOT/adm</i> folder:
|
||||
* for vc8 - <i>$CASROOT/adm/msvc/vc8</i>;
|
||||
* for vc9 - <i>$CASROOT/adm/msvc/vc9</i>;
|
||||
* for vc10 - <i>$CASROOT/adm/msvc/vc10</i>;
|
||||
* for vc11 - <i>$CASROOT/adm/msvc/vc11</i>;
|
||||
* for cbp - <i>$CASROOT/adm/\<OS\>/cbp</i>;
|
||||
* for cmake - <i>$CASROOT/adm/cmake</i>;
|
||||
* for amk - <i>$CASROOT/adm/lin/amk</i>;
|
||||
* xcd - <i>$CASROOT/adm/\<OS\>/xcd</i>
|
||||
|
||||
@section wok4 Generation of documentation
|
||||
|
||||
Use command *wgendoc* in WOK to generate reference documentation:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
:LOC:dev> wokcd occt
|
||||
:LOC:dev:occt> wgendoc
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The following options can be used:
|
||||
* <i>-wb=\<workbench name\></i> the name of OCCT workbench (the current one by default);
|
||||
* <i>-m=\<list of modules\></i> the list of modules that will be contained in the documentation;
|
||||
* <i>-outdir=\<path\></i> the output directory for the documentation;
|
||||
* <i>-chm</i> the option to generate CHM file;
|
||||
* <i>-hhc=\<path\></i> the path to HTML Help Compiler *hhc.exe* or equivalent;
|
||||
* <i>-qthelp=\<path\></i> the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
|
||||
* <i>-doxygen=\<path\></i> the path to Doxygen executable;
|
||||
* <i>-dot=\<path\></i> the path to GraphViz dot executable.
|
70
dox/dev_guides/building/xcode.md
Normal file
@@ -0,0 +1,70 @@
|
||||
Building with Xcode {#occt_dev_guides__building_xcode}
|
||||
===================
|
||||
|
||||
This file describes steps to build OCCT libraries from a complete source package
|
||||
on Mac OS X with **Xcode**.
|
||||
|
||||
If you build OCCT from bare sources (as in Git repository) or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install the required third-party libraries; see
|
||||
paragraph 1 of \ref occt_dev_guides__building for details.
|
||||
|
||||
1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**)
|
||||
in file *custom.sh* located in <i>\<OCCT_ROOT_DIR\> </i>. For this:
|
||||
|
||||
1.1. Add paths to the includes in variable *CSF_OPT_INC*;
|
||||
|
||||
1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
|
||||
|
||||
All paths should be separated by ":" symbol.
|
||||
|
||||
2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
|
||||
in the aforementioned environment variables *CSF_OPT_INC* and *CSF_OPT_LIB64* from file *custom.sh*.
|
||||
|
||||
If you want to build OCCT without the optional libraries perform the following steps:
|
||||
|
||||
2.1 Disable unnecessary library in *custom.sh* by setting the corresponding
|
||||
variable <i>HAVE_<LIBRARY_NAME></i> to *false*.
|
||||
~~~~~
|
||||
export HAVE_GL2PS=false
|
||||
~~~~~
|
||||
2.2 Remove this library from Project navigator in Xcode for each project that
|
||||
uses it: choose the required project, right click on the unnecessary
|
||||
library and select **Delete** button.
|
||||
|
||||
3. Open Terminal application.
|
||||
|
||||
4. Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
5. To start **Xcode**, run command <i>/xcode.sh</i>
|
||||
|
||||
6. To build a certain toolkit, select it in **Scheme** drop-down list in Xcode
|
||||
toolbar, press **Product** in the menu and click **Build** button.
|
||||
|
||||
To build the entire OCCT, create a new empty project (select **File ->
|
||||
New -> Project -> "Empty project** in the menu. Input the project name,
|
||||
e.g. *OCCT*, click **Next** and **Create** buttons). Drag and drop the *OCCT*
|
||||
folder in the created *OCCT* project in the Project navigator. Select
|
||||
**File -> New -> Target -> Aggregate** in the menu. Enter the project name
|
||||
(e.g. <i>OCCT</i>) and click **Finish**. The **Build Phases** tab will open.
|
||||
Click "+" button to add the necessary toolkits to the target project.
|
||||
It is possible to select all toolkits by pressing **Command+A** combination.
|
||||
|
||||
To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
|
||||
|
||||
1.Open Terminal application
|
||||
|
||||
2.Enter <i>\<OCCT_ROOT_DIR\></i>:
|
||||
~~~~~
|
||||
cd \<OCCT_ROOT_DIR\>
|
||||
~~~~~
|
||||
|
||||
3.Run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh xcd [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
1846
dox/dev_guides/cdl/cdl.md
Normal file
BIN
dox/dev_guides/cdl/images/cdl_image003.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image004.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image005.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image006.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image007.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image008.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image009.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image010.png
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image011.png
Normal file
After Width: | Height: | Size: 138 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image012.png
Normal file
After Width: | Height: | Size: 77 KiB |
1127
dox/dev_guides/contribution/coding_rules.md
Normal file
283
dox/dev_guides/contribution_workflow/contribution_workflow.md
Normal file
@@ -0,0 +1,283 @@
|
||||
Contribution Workflow {#occt_dev_guides__contribution_workflow}
|
||||
====================================
|
||||
@tableofcontents
|
||||
|
||||
@section occt_contribution_workflow_1 Introduction
|
||||
|
||||
The purpose of this document is to describe standard workflow for processing contributions to certified version of OCCT.
|
||||
|
||||
@subsection occt_contribution_workflow_1_1 Use of issue tracker system
|
||||
|
||||
Each contribution should have corresponding issue (bug, or feature, or integration request)
|
||||
registered in the MantisBT issue tracker system accessible by URL
|
||||
http://tracker.dev.opencascade.org.
|
||||
The issue is processed further according to the described workflow.
|
||||
|
||||
@subsection occt_contribution_workflow_1_2 Access Levels
|
||||
|
||||
Access level defines the permissions of the user to view,
|
||||
register and modify issues in a Mantis bugtracker.
|
||||
The correspondence of access level and user permissions
|
||||
is defined in accordance with the table below.
|
||||
|
||||
| Access level | Granted to | Permissions | Can set statuses |
|
||||
|:------------- | :--------- | :-------------- | :----------------------- |
|
||||
| Viewer | Everyone (anonymous access) | View public issues only | No |
|
||||
| Reporter | Users registered on dev.opencascade.com | View, report, and comment issues | New, Resolved |
|
||||
| Updater | Users of dev.opencascade.com in publicly visible projects | View and comment issues | New, Resolved |
|
||||
| Developer | OCC developers and external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed |
|
||||
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested |
|
||||
| Manager | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed |
|
||||
|
||||
According to his access level, the user can participate in the issue handling process under different roles, as described below.
|
||||
|
||||
@section occt_contribution_workflow_2 Typical workflow for an issue
|
||||
|
||||
@subsection occt_contribution_workflow_2_1 General scheme
|
||||
|
||||
@image html OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
|
||||
|
||||
@subsection occt_contribution_workflow_2_2 Issue registration
|
||||
|
||||
An issue is registered in Mantis bugtracker by the Reporter with definition of the necessary attributes.
|
||||
The definition of the following attributes is obligatory:
|
||||
|
||||
* **Category** - indicates component of OCCT to which the issue relates. If in doubt, assign OCCT:Foundation Classes.
|
||||
* **Reproducibility**
|
||||
* **Severity**
|
||||
* **Priority**
|
||||
* **Profile** - allows defining the platform on which the problem was detected from the list of predefined platforms. If a platform is absent in the list of predefined platforms it is possible to use Or Fill In option to define the platform manually.
|
||||
* **Platform**
|
||||
* **OS**
|
||||
* **OS Version**
|
||||
* **Products Version** - defines the version of Open CASCADE on which the problem has been detected.
|
||||
* **Summary** - a short, one sentence description of the issue. It has a limit of 128 characters. It should be informative and useful for the developers. It is advisable to avoid vague or misleading phrases, such as "it doesn't work" or "it crashed". It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
|
||||
* **Description** - should contain a detailed definition of the nature of the registered issue depending on its type. For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if possible at this stage) or any inputs from the originator. For a feature or integration request it is recommended to describe the proposed feature in details (as possible at that stage), including the changes required for its implementation and the main features of the new functionality. Filling the bug description is obligatory.
|
||||
* **Steps To Reproduce** - in this field it is possible to describe in detail how to reproduce the issue. This field considerably helps to find the cause of the problem, to eliminate it and to create the test case.
|
||||
* *Upload File* field allows attaching the shapes, scripts or modified source files of OCCT. It is recommended to attach a prototype test case in form of a Tcl script for DRAW, using either existing DRAW commands, or a C++ code which can be organized in DRAW commands, as well as sample shapes or other input data (if applicable), immediately after the issue registration.
|
||||
|
||||
The newly registered issue gets status **NEW** and is assigned to the developer responsible for the OCCT component indicated in the Category field (Maintainer).
|
||||
|
||||
@subsection occt_contribution_workflow_2_3 Assigning the issue
|
||||
|
||||
The description of the new issue is checked by the **Maintainer** and if it is feasible,
|
||||
he may assign the issue to a **Developer**. Alternatively, any user with **Developer** access level
|
||||
or higher can assign the issue to himself if he wants to provide a solution.
|
||||
|
||||
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
|
||||
|
||||
The **Maintainer, Technical Project Manager,** or **Bugmaster** can close or reassign the issue
|
||||
(in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the purpose of the new feature.
|
||||
That decision shall be documented in the comments to the issue in the Bugtracker.
|
||||
|
||||
The assigned issue should have state **ASSIGNED**.
|
||||
|
||||
@subsection occt_contribution_workflow_2_4 Resolving the issue
|
||||
|
||||
The **Developer** responsible for the issue assigned to him provides a solution
|
||||
as a change on the version of OCCT indicated in the issue attributes, or the last development version.
|
||||
|
||||
The modified sources should be submitted for review and testing to the dedicated branch of the official OCCT Git repository:
|
||||
|
||||
* Branch should be created for the issue with name composed of letters ‘CR’ followed by issue ID number (without leading zeroes).
|
||||
Optional suffix can be added to the branch name after issue ID,
|
||||
e.g. to distinguish between several version of the fix.
|
||||
* The branch should be based on recent version of the master branch
|
||||
(not later than commit tagged as last OCCT release).
|
||||
* The first line of the first commit message should contain
|
||||
the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug TDataXtd_PatternStd").
|
||||
The consequent lines should contain a description of the changes made.
|
||||
If more than one commit has been made, the commit messages should contain description of the changes made.
|
||||
* The amount of the code affected by the change should be limited
|
||||
to only the changes required for the bug fix or improvement.
|
||||
Change of layout or re-formatting of the existing code is allowed
|
||||
only in the parts where meaningful changes related to the issue have been made.
|
||||
* The name of the branch where the fix is submitted should be given
|
||||
in the note to the Mantis issue
|
||||
(providing the direct link to relevant branch view in GitWeb is encouraged).
|
||||
* The description of the changes made should be put to the field
|
||||
"Additional information and documentation updates" of the Mantis issue.
|
||||
|
||||
In some cases (if Git is not accessible for the contributor),
|
||||
external contributions can be submitted as patch (diff) files or sources
|
||||
attached to the Mantis issue, with indication of OCCT version on which the fix is made.
|
||||
Such contributions should be put to Git for processing by someone else,
|
||||
and hence they have less priority in processing than the ones submitted directly through Git.
|
||||
|
||||
The issue for which solution is provided should be switched to **RESOLVED** state
|
||||
and assigned to the developer who is expected to make a code review
|
||||
(the **Reviewer**; by default, can be set to the **Maintainer** of the component).
|
||||
|
||||
@subsection occt_contribution_workflow_2_5 Code review
|
||||
|
||||
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT Code reviewing rules and examines all changes in the sources to detect obvious and possible errors, misprints, conformity to coding style.
|
||||
|
||||
* If Reviewer detects some problems, he can either:
|
||||
* Fix these issues and provide new solution, reassigning the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
|
||||
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developer’s forum if necessary).
|
||||
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
|
||||
* If Reviewer does not detect any problems, he changes status to **REVIEWED**.
|
||||
|
||||
@subsection occt_contribution_workflow_2_6 Testing
|
||||
|
||||
The issues that are in **REVIEWED** state are subject of certification (non-regression) testing.
|
||||
The issue is assigned to OCC **Tester** when he starts processing it.
|
||||
The results of tests are checked by the **Tester**:
|
||||
* If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problem. The **Developer** should produce a new solution.
|
||||
* If the **Tester** does not detect build problems or regressions, he changes the status to **TESTED** for further integration.
|
||||
|
||||
@subsection occt_contribution_workflow_2_7 Integration of a solution
|
||||
|
||||
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
|
||||
* the change has been reviewed;
|
||||
* the change has been tested without regressions (or with regressions treated properly);
|
||||
* the test case has been created for this issue (when applicable), and the change has been rechecked on this test case;
|
||||
* "Additional information and documentation updates" field is filled by the developer;
|
||||
* the change does not conflict with other changes integrated previously.
|
||||
|
||||
If the result of check is successful the Integrator integrates solution
|
||||
into the master branch of the repository. Each change is integrated into the master branch
|
||||
as a single commit without preserving the history of changes made in the branch
|
||||
(by rebase, squashing all intermediate commits), however, preserving the author when possible.
|
||||
This is done to have the master branch history plain and clean.
|
||||
The following picture illustrates the process:
|
||||
|
||||
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
|
||||
|
||||
The new master branch is tested against possible regressions that might appear due to interference between separate changes. When the tests are Ok, the new master is pushed to the official repository
|
||||
and the original branches are removed from it.
|
||||
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as-integrated.
|
||||
|
||||
@subsection occt_contribution_workflow_2_8 Closing a bug
|
||||
|
||||
The **Bugmaster** closes the issue after regular OCCT Release provided that the issue status is **VERIFIED** and that issue was really solved in that release, by rechecking the corresponding test case. The final issue state is **CLOSED**.
|
||||
|
||||
@subsection occt_contribution_workflow_2_9 Reopening a bug
|
||||
|
||||
If a regression is detected, the **Bugmaster** may reopen and reassign the **CLOSED** issue to the appropriate developer with comprehensive comments about the reason of reopening. The issue then becomes **ASSIGNED** again.
|
||||
|
||||
@section occt_contribution_workflow_3 Appendix
|
||||
|
||||
@subsection occt_contribution_workflow_3_1 Issue attributes
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_1_1 Severity
|
||||
|
||||
Severity shows at which extent the issue affects the product.
|
||||
The list of used severities is given in the table below in the descending order.
|
||||
|
||||
| Severity | Description | Weight for Bug Score |
|
||||
| :---------- | :------------------------------------------------ | :------------------: |
|
||||
| crash | Crash of the application or OS, loss of data | 5 |
|
||||
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. | 4 |
|
||||
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. | 3 |
|
||||
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. | 2 |
|
||||
| tweak | Ergonomic inconvenience, need of light updates. | 1 |
|
||||
| text | Inconsistence of program code to the Coding Standard. Errors in source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). | 1 |
|
||||
| trivial | Cosmetic bugs. | 1 |
|
||||
| feature | Bug fix, new feature, improvement that requires workload estimation and validation. | 1 |
|
||||
| integration request | Requested integration of an existing feature into the product. | 0 |
|
||||
| Just a question | A question to be processed, without need of any changes in the product. | 0 |
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_1_2 Statuses of issues
|
||||
|
||||
The bug statuses that can be applied to the issues are listed in the table below.
|
||||
|
||||
| Status | Description |
|
||||
| :------------------- | :----------------------------------------- |
|
||||
| New | New just registered issue. Testing case should be created by Reporter. |
|
||||
| Feedback | The issue requires more information; the original posters should pay attention. |
|
||||
| Assigned | Assigned to a developer. |
|
||||
| Resolved + a resolution | The issue has been fixed, and now is waiting for revision. |
|
||||
|Revised + a resolution | The issue has been revised, and now is waiting for testing. |
|
||||
| Tested | The fix has been internally tested by the tester with success on the full non-regression database or its part and a test case has been created for this issue. |
|
||||
| Verified | The fix has been integrated into the master of the corresponding repository |
|
||||
| Closed | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_1_3 Resolutions
|
||||
|
||||
**Resolution** is set when the bug is resolved. "Reopen" resolution is added automatically when the bug is reopened.
|
||||
|
||||
| Resolution | Description |
|
||||
|:--------------------- | :--------------------------------------------------------------------------- |
|
||||
| Open | The issue is being processed. |
|
||||
| Fixed | The issue has been successfully fixed. |
|
||||
| Reopened | The bug has been reopened because of insufficient fix or regression. |
|
||||
| | Unable to reproduceThe bug is not reproduced. |
|
||||
| Not fixable | The bug cannot be fixed because it is a bug of third party software, or because it requires more workload than it can be allowed. |
|
||||
| Duplicate | The bug for the same issue already exists in the tracker. |
|
||||
| Not a bug | It is a normal behavior in accordance with the specification of the product |
|
||||
| No change required | The issue didn’t require any change of the product, such as a question issue |
|
||||
| Suspended | This resolution is set for Acknowledged status only. It means that the issue is waiting for fix until a special administrative decision is taken (e.g. a budget is not yet set in accordance with the contract) |
|
||||
| Documentation updated | The issue was a normal behavior of the product, but the actions of the user were wrong. The specification and the user manual have been updated to reflect this issue. |
|
||||
| Won’t fix | An administrative/contractual decision has been taken to not fix the bug |
|
||||
|
||||
@subsection occt_contribution_workflow_3_2 Update and evolution of documentation
|
||||
|
||||
The documentation on Open CASCADE Technology currently exists in three forms:
|
||||
|
||||
* OCCT Technical Documentation generated automatically with Doxygen tool on the basis of comments in CDL or HXX files.
|
||||
* User’s Reference Documentation on OCCT packages and Products supplied in the form of PDF User’s guides
|
||||
* OCCT Release Documentation supplied in the form of Release Notes with each release.
|
||||
|
||||
It is strictly required to properly report the improvements and changes introduced in OCCT in all three forms of Documentation.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_1 Maintenance of CDL files
|
||||
|
||||
Every developer providing a contribution to the source code of OCC
|
||||
should make a relevant change in the corresponding header file, including CDL.
|
||||
|
||||
Making the appropriate comments is mandatory in the following cases:
|
||||
|
||||
* Development of a new package / class / method / enumeration;
|
||||
* Modification of an existing package / class / method / enumeration that changes its behavior;
|
||||
* Modification / new development impacts at other packages / classes / methods / enumerations, the documentation which of should be modified correspondingly.
|
||||
|
||||
The only case when the comments may be not required is introducing
|
||||
a modification that does not change the existing behavior in any noticeable way
|
||||
or brings the behavior in accordance with the existing description.
|
||||
|
||||
CDL description must be in good English, containing as much relevant
|
||||
information and as clear as possible. If the developer is unable to properly formulate
|
||||
his ideas in English or suspects that his description can be misunderstood,
|
||||
he should address to the Documentation Engineer for language assistance.
|
||||
Such action is completely subject to the discretion of the developer; however,
|
||||
the Documentation Engineer can require that the developer should provide a relevant
|
||||
technical documentation and reopen a bug until all documentation satisfies the requirements above.
|
||||
|
||||
@subsubsection occt_contribution_workflow_3_2_2 Maintenance of the User’s Reference Documentation
|
||||
|
||||
The User’s Reference Documentation is distributed among a number of User’s Guides,
|
||||
each describing a certain module of OCCT.
|
||||
The User's Guides do not cover the entire functionality of OCCT;
|
||||
however, they describe most widely used and important packages.
|
||||
|
||||
In most aspects the User's Guides present the information that is contained in CDL descriptions for methods, classes, etc., only from a different point of view. Thus, it is required that any developer who implements a new or modifies an existing package / class / method / enumeration and adds a description of new development or changes in the corresponding CDL file should also check if this class package / class / method / enumeration or the package / class, to which the added class / method belongs is already described in the documentation and update the User’s Reference Documentation correspondingly.
|
||||
|
||||
3.2.3. Preparation of the Release Documentation
|
||||
|
||||
Before changing the bug Status to RESOLVED, the developer should provide a description of the implemented work using the "Additional information and documentation updates" field of Mantis bugtracker.
|
||||
|
||||
This description is used for the Release Documentation and has the following purposes:
|
||||
|
||||
* to inform the OCCT users about the main features and improvements implemented in the platform in the release;
|
||||
* to give a complete and useable list of changes introduced into the OCCT since the latest version.
|
||||
|
||||
The changes should be described from the user’s viewpoint so that the text
|
||||
could be comprehensible even for beginners having a very vague idea about OCCT.
|
||||
If the developer is unable to properly formulate his ideas in English or suspects
|
||||
that his description can be misunderstood, he should address to the Documentation Engineer
|
||||
for language assistance. Such action is completely subject to the discretion of the developer;
|
||||
however, the Documentation Engineer can require that the developer
|
||||
should provide a relevant technical documentation and reopen a bug
|
||||
until all documentation satisfies the requirements.
|
||||
|
||||
**Note**, that it is required to single out the changes in the OCCT behavior as compared to the previous versions and especially the changes to be considered when porting from the previous version of OCCT.
|
||||
|
||||
For example:
|
||||
* If global macros XXX() was used in the code of your application, revise it for direct use of the argument stream object.
|
||||
* You might need to revise the code related to text display in 3d viewer to take into account new approach of using system fonts via XXX library.
|
||||
|
||||
The **Documentation Engineer** is responsible for preparation of the version Release Notes
|
||||
and update of the User’s Guides. If the **Documentation Engineer** considers that the description currently provided by the **Developer** is somehow inadequate or unsatisfactory he can demand the **Developer** to rewrite the documentation with the **Documentation Engineer’s** assistance.
|
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 89 KiB |
272
dox/dev_guides/debug/debug.md
Normal file
@@ -0,0 +1,272 @@
|
||||
Debugging tools and hints {#occt_dev_guides__debug}
|
||||
=========================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section occt_debug_macro Compiler macro to enable extended debug messages
|
||||
|
||||
Many OCCT algorithms can produce extended debug messages, usually printed to cout.
|
||||
These include messages on internal errors and special cases encountered, timing etc.
|
||||
In OCCT versions prior to 6.8.0 most of these messages were activated by compiler macro *DEB*, enabled by default in debug builds.
|
||||
Since version 6.8.0 this is disabled by default but can be enabled by defining compiler macro *OCCT_DEBUG*.
|
||||
|
||||
To enable this macro on Windows when building with Visual Studio projects, edit file custom.bat and add the line:
|
||||
|
||||
set CSF_DEFINES=OCCT_DEBUG
|
||||
|
||||
Some algorithms use specific macros for yet more verbose messages, usually started with OCCT_DEBUG_.
|
||||
These messages can be enabled in the same way, by defining corresponding macro.
|
||||
|
||||
Note that some header files are modified when *OCCT_DEBUG* is enabled, hence binaries built with it enabled are not compatible with client code built without this option; this is not intended for production use.
|
||||
|
||||
@section occt_debug_exceptions Calling JIT debugger on exception
|
||||
|
||||
On Windows platform when using Visual Studio compiler there is a possibility to start the debugger automatically if an exception is caught in a program running OCCT. For this, set environment variable *CSF_DEBUG* to any value. Note that this feature works only if you enable OCCT exception handler in your application by calling *OSD::SetSignal()*.
|
||||
|
||||
@section occt_debug_intro Introduction
|
||||
|
||||
This manual describes facilities included in OCCT to support debugging, and provides some hints for more efficient debug.
|
||||
|
||||
@section occt_debug_bop Self-diagnostics in Boolean operations algorithm
|
||||
|
||||
In real-world applications modeling operations are often performed in a long sequence, while the user sees only the final result of the whole sequence. If the final result is wrong, the first debug step is to identify the offending operation to be debugged further. Boolean operation algorithm in OCCT provides a self-diagnostic feature which can help to do that step.
|
||||
|
||||
This feature can be activated by defining environment variable *CSF_DEBUG_BOP*, which should specify an existing writeable directory.
|
||||
|
||||
The diagnostic code checks validity of the input arguments and the result of each Boolean operation. When an invalid situation is detected, the report consisting of argument shapes and a DRAW script to reproduce the problematic operation is saved to the directory pointed by *CSF_DEBUG_BOP*.
|
||||
|
||||
@section occt_debug_call Functions for calling from debugger
|
||||
|
||||
Modern interactive debuggers provide the possibility to execute application code at a program break point. This feature can be used to analyse the temporary objects available only in the context of the debugged code. OCCT provides several global functions that can be used in this way.
|
||||
|
||||
Note that all these functions accept pointer to variable as <i>void*</i> to allow calling the function even when debugger does not recognize type equivalence or can not perform necessary type cast automatically. It is responsibility of the developer to provide the correct pointer. In general these functions are not guaranteed to work, thus use them with caution and at your own risk.
|
||||
|
||||
@subsection occt_debug_call_draw Interacting with DRAW
|
||||
|
||||
Open CASCADE Test Harness or @ref occt_user_guides__test_harness "DRAW" provides an extensive set of tools for inspection and analysis of OCCT shapes and geometric objects and is mostly used as environment for prototyping and debugging OCCT-based algorithms.
|
||||
|
||||
In some cases the objects to be inspected are available in DRAW as results of DRAW commands. In other cases, however, it is necessary to inspect intermediate objects created by the debugged algorithm. To support this, DRAW provides a set of commands allowing the developer to store intermediate objects directly from the debugger stopped at some point during the program execution (usually at a breakpoint).
|
||||
|
||||
~~~~~
|
||||
const char* Draw_Eval (const char *theCommandStr)
|
||||
~~~~~
|
||||
|
||||
Evaluates a DRAW command or script.
|
||||
A command is passed as a string parameter.
|
||||
|
||||
~~~~~
|
||||
const char* DBRep_Set (const char* theNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified shape as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr)
|
||||
const char* DrawTrSurf_SetPnt (const char* theNameStr, void* thePntPtr)
|
||||
const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr)
|
||||
~~~~~
|
||||
|
||||
Sets the specified geometric object as a value of DRAW interpreter variable with the given name.
|
||||
- *theNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
- *thePntPtr* - a pointer to the variable of type *gp_Pnt* to be set.
|
||||
- *thePnt2dPtr* - a pointer to the variable of type *gp_Pnt2d* to be set.
|
||||
|
||||
All these functions are defined in *TKDraw* toolkit and return a string indicating the result of execution.
|
||||
|
||||
@subsection occt_debug_call_brep Saving and dumping shapes and geometric objects
|
||||
|
||||
The following functions are provided by *TKBRep* toolkit and can be used from debugger prompt:
|
||||
|
||||
~~~~~
|
||||
const char* BRepTools_Write (const char* theFileNameStr, void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Saves the specified shape to a file with the given name.
|
||||
- *theFileNameStr* - the DRAW interpreter variable name to set.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
~~~~~
|
||||
const char* BRepTools_Dump (void* theShapePtr)
|
||||
const char* BRepTools_DumpLoc (void* theShapePtr)
|
||||
~~~~~
|
||||
|
||||
Dumps shape or its location to cout.
|
||||
- *theShapePtr* - a pointer to *TopoDS_Shape* variable.
|
||||
|
||||
The following function is provided by *TKMesh* toolkit:
|
||||
|
||||
~~~~~
|
||||
const char* BRepMesh_Dump (void* theMeshHandlePtr, const char* theFileNameStr)
|
||||
~~~~~
|
||||
|
||||
Stores mesh produced in parametric space to BREP file.
|
||||
- *theMeshHandlePtr* - a pointer to *Handle(BRepMesh_DataStructureOfDelaun)* variable.
|
||||
- *theFileNameStr* - name of file the mesh sould be stored to.
|
||||
|
||||
The following additional function is provided by *TKGeomBase* toolkit:
|
||||
|
||||
~~~~~
|
||||
const char* GeomTools_Dump (void* theHandlePtr)
|
||||
~~~~~
|
||||
|
||||
Dump geometric object to cout.
|
||||
- *theHandlePtr* - a pointer to the geometric variable (<i>Handle</i> to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
|
||||
|
||||
@section occt_debug_vstudio Using Visual Studio debugger
|
||||
|
||||
@subsection occt_debug_vstudio_command Command window
|
||||
|
||||
Visual Studio debugger provides the Command Window (can be activated from menu <b>View / Other Windows / Command Window</b>), which can be used to evaluate variables and expressions interactively in a debug session (see http://msdn.microsoft.com/en-us/library/c785s0kz.aspx). Note that the Immediate Window can also be used but it has some limitations, e.g. does not support aliases.
|
||||
|
||||
When the execution is interrupted by a breakpoint, you can use this window to call the above described functions in context of the currently debugged function. Note that in most cases you will need to specify explicitly context of the function by indicating the name of the DLL where it is defined.
|
||||
|
||||
For example, assume that you are debugging a function, where local variable *TopoDS_Edge* *anEdge1* is of interest.
|
||||
The following set of commands in the Command window will save this edge to file *edge1.brep*, then put it to DRAW variable *e1* and show it maximized in the axonometric DRAW view:
|
||||
|
||||
~~~~~
|
||||
>? ({,,TKBRep.dll}BRepTools_Write)("d:/edge1.brep",(void*)&anEdge1)
|
||||
0x04a2f234 "d:/edge1.brep"
|
||||
>? ({,,TKDraw.dll}DBRep_Set)("e1",(void*)&anEdge1)
|
||||
0x0369eba8 "e1"
|
||||
>? ({,,TKDraw.dll}Draw_Eval)("donly e1; axo; fit")
|
||||
0x029a48f0 ""
|
||||
~~~~~
|
||||
|
||||
For convenience it is possible to define aliases to commands in this window, for instance (here ">" is prompt provided by the command window; in the Immediate window this symbol should be entered manually):
|
||||
|
||||
~~~~~
|
||||
>alias deval ? ({,,TKDraw}Draw_Eval)
|
||||
>alias dsetshape ? ({,,TKDraw}DBRep_Set)
|
||||
>alias dsetgeom ? ({,,TKDraw}DrawTrSurf_Set)
|
||||
>alias dsetpnt ? ({,,TKDraw}DrawTrSurf_SetPnt)
|
||||
>alias dsetpnt2d ? ({,,TKDraw}DrawTrSurf_SetPnt2d)
|
||||
>alias saveshape ? ({,,TKBRep}BRepTools_Write)
|
||||
>alias dumpshape ? ({,,TKBRep}BRepTools_Dump)
|
||||
>alias dumploc ? ({,,TKBRep}BRepTools_DumpLoc)
|
||||
>alias dumpmesh ? ({,,TKMesh}BRepMesh_Dump)
|
||||
>alias dumpgeom ? ({,,TKGeomBase}GeomTools_Dump)
|
||||
~~~~~
|
||||
|
||||
Note that aliases are stored in the Visual Studio user's preferences and it is sufficient to define them once on a workstation. With these aliases, the above example can be reproduced easier (note the space symbol after alias name!):
|
||||
|
||||
~~~~~
|
||||
>saveshape ("d:/edge1.brep",(void*)&anEdge1)
|
||||
0x04a2f234 "d:/edge1.brep"
|
||||
>dsetshape ("e1",(void*)&anEdge1)
|
||||
0x0369eba8 "e1"
|
||||
>deval ("donly e1; axo; fit")
|
||||
0x029a48f0 ""
|
||||
~~~~~
|
||||
|
||||
Note that there is no guarantee that the call will succeed and will not affect the program execution, thus use this feature at your own risk. In particular, the commands interacting with window system (such as *axo*, *vinit*, etc.) are known to cause application crash when the program is built in 64-bit mode. To avoid this, it is recommended to prepare all necessary view windows in advance, and arrange these windows to avoid overlapping with the Visual Studio window, to ensure that they are visible during debug.
|
||||
|
||||
@subsection occt_debug_vstudio_watch Customized display of variables content
|
||||
|
||||
Visual Studio provides a way to customize display of variables of different types in debugger windows (Watch, Autos, Locals, etc.).
|
||||
|
||||
In Visual Studio 2005-2010 the rules for this display are defined in file *autoexp.dat* located in subfolder *Common7\\Packages\\Debugger* of the Visual Studio installation folder (hint: the path to that folder is given in the corresponding environment variable, e.g. *VS100COMNTOOLS* for vc10). This file contains two sections: *AutoExpand* and *Visualizer*. The following rules can be added to these sections to provide more convenient display of some OCCT data types.
|
||||
|
||||
### \[AutoExpand\] section
|
||||
|
||||
~~~~~
|
||||
; Open CASCADE classes
|
||||
Standard_Transient=<,t> count=<count,d>
|
||||
Handle_Standard_Transient=<entity,x> count=<entity->count,d> <,t>
|
||||
TCollection_AsciiString=<mylength,d> <mystring,s>
|
||||
TCollection_HAsciiString=<myString.mylength,d> <myString.mystring,s>
|
||||
TCollection_ExtendedString=<mylength,d> <mystring,su>
|
||||
TCollection_HExtendedString=<myString.mylength,d> <myString.mystring,su>
|
||||
TCollection_BaseSequence=size=<Size,d> curr=<CurrentIndex,d>
|
||||
TCollection_BasicMap=size=<mySize,d>
|
||||
NCollection_BaseSequence=size=<mySize,d> curr=<myCurrentIndex,d>
|
||||
NCollection_BaseList=length=<myLength,d>
|
||||
NCollection_BaseMap=size=<mySize,d> buckets=<myNbBuckets>
|
||||
NCollection_BaseVector=length=<myLength,d>
|
||||
TDF_Label=<myLabelNode,x> tag=<myLabelNode->myTag>
|
||||
TDF_LabelNode=tag=<myTag,d>
|
||||
TDocStd_Document=format=<myStorageFormat.mystring,su> count=<count,d> <,t>
|
||||
TopoDS_Shape=<myTShape.entity,x> <myOrient>
|
||||
gp_XYZ=<x,g>, <y,g>, <z,g>
|
||||
gp_Pnt=<coord.x,g>, <coord.y,g>, <coord.z,g>
|
||||
gp_Vec=<coord.x,g>, <coord.y,g>, <coord.z,g>
|
||||
gp_Dir=<coord.x,g>, <coord.y,g>, <coord.z,g>
|
||||
gp_XY=<x,g>, <y,g>
|
||||
gp_Pnt2d=<coord.x,g>, <coord.y,g>
|
||||
gp_Dir2d=<coord.x,g>, <coord.y,g>
|
||||
gp_Vec2d=<coord.x,g>, <coord.y,g>
|
||||
gp_Mat2d={<matrix[0][0],g>,<matrix[0][1],g>}, {<matrix[1][0],g>,<matrix[1][1],g>}
|
||||
gp_Ax1=loc={<loc.coord.x,g>, <loc.coord.y,g>, <loc.coord.z,g>} vdir={<vdir.coord.x,g>, <vdir.coord.y,g>, <vdir.coord.z,g>}
|
||||
~~~~~
|
||||
|
||||
### \[Visualizer\] section
|
||||
|
||||
~~~~~
|
||||
; Open CASCADE classes
|
||||
|
||||
NCollection_Handle<*> {
|
||||
preview ( *((($T0::Ptr*)$e.entity)->myPtr) )
|
||||
children ( (($T0::Ptr*)$e.entity)->myPtr )
|
||||
}
|
||||
|
||||
NCollection_List<*> {
|
||||
preview ( #( "NCollection_List [", $e.myLength, "]" ) )
|
||||
children ( #list( head: $c.myFirst, next: myNext ) : #(*($T1*)(&$e+1)) )
|
||||
}
|
||||
|
||||
NCollection_Array1<*> {
|
||||
preview ( #( "NCollection_Array1 [", $e.myLowerBound, "..", $e.myUpperBound, "]" ) )
|
||||
children ( #array( expr: $c.myData[$i], size: 1+$c.myUpperBound ) )
|
||||
}
|
||||
|
||||
math_Vector {
|
||||
preview ( #( "math_Vector [", $e.LowerIndex, "..", $e.UpperIndex, "]" ) )
|
||||
children ( #array ( expr: ((double*)($c.Array.Addr))[$i], size: 1+$c.UpperIndex ) )
|
||||
}
|
||||
|
||||
TColStd_Array1OfReal {
|
||||
preview ( #( "Array1OfReal [", $e.myLowerBound, "..", $e.myUpperBound, "]" ) )
|
||||
children ( #array ( expr: ((double*)($c.myStart))[$i], size: 1+$c.myUpperBound ) )
|
||||
}
|
||||
|
||||
Handle_TColStd_HArray1OfReal {
|
||||
preview ( #( "HArray1OfReal [",
|
||||
((TColStd_HArray1OfReal*)$e.entity)->myArray.myLowerBound, "..",
|
||||
((TColStd_HArray1OfReal*)$e.entity)->myArray.myUpperBound, "] ",
|
||||
[$e.entity,x], " count=", $e.entity->count ) )
|
||||
children ( #array ( expr: ((double*)(((TColStd_HArray1OfReal*)$e.entity)->myArray.myStart))[$i],
|
||||
size: 1+((TColStd_HArray1OfReal*)$e.entity)->myArray.myUpperBound ) )
|
||||
}
|
||||
|
||||
TColStd_Array1OfInteger {
|
||||
preview ( #( "Array1OfInteger [", $e.myLowerBound, "..", $e.myUpperBound, "]" ) )
|
||||
children ( #array ( expr: ((int*)($c.myStart))[$i], size: 1+$c.myUpperBound ) )
|
||||
}
|
||||
|
||||
Handle_TColStd_HArray1OfInteger {
|
||||
preview ( #( "HArray1OfInteger [",
|
||||
((TColStd_HArray1OfInteger*)$e.entity)->myArray.myLowerBound, "..",
|
||||
((TColStd_HArray1OfInteger*)$e.entity)->myArray.myUpperBound, "] ",
|
||||
[$e.entity,x], " count=", $e.entity->count ) )
|
||||
children ( #array ( expr: ((int*)(((TColStd_HArray1OfInteger*)$e.entity)->myArray.myStart))[$i],
|
||||
size: 1+((TColStd_HArray1OfInteger*)$e.entity)->myArray.myUpperBound ) )
|
||||
}
|
||||
|
||||
Handle_TCollection_HExtendedString {
|
||||
preview ( #( "HExtendedString ", [$e.entity,x], " count=", $e.entity->count,
|
||||
" ", ((TCollection_HExtendedString*)$e.entity)->myString ) )
|
||||
children ( #([actual members]: [$e,!] ) )
|
||||
}
|
||||
|
||||
Handle_TCollection_HAsciiString {
|
||||
preview ( #( "HAsciiString ", [$e.entity,x], " count=", $e.entity->count,
|
||||
" ", ((TCollection_HAsciiString*)$e.entity)->myString ) )
|
||||
children ( #([actual members]: [$e,!],
|
||||
#array( expr: ((TCollection_HAsciiString*)$e.entity)->myString.mystring[$i],
|
||||
size: ((TCollection_HAsciiString*)$e.entity)->myString.mylength) ) )
|
||||
}
|
||||
~~~~~
|
||||
|
||||
In Visual Studio 2012 and later, visualizers can be put in a separate file in subdirectory *Visualizers*. See file *occt.natvis* for example.
|
146
dox/dev_guides/debug/occt.natvis
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="gp_XY">
|
||||
<DisplayString>[{(float)x} {(float)y}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Pnt2d">
|
||||
<AlternativeType Name="gp_Vec2d"></AlternativeType>
|
||||
<AlternativeType Name="gp_Dir2d"></AlternativeType>
|
||||
<DisplayString>[{(float)cood.x} {(float)cood.y}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_XYZ">
|
||||
<DisplayString>[{(float)x} {(float)y} {(float)z}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Pnt">
|
||||
<AlternativeType Name="gp_Vec"></AlternativeType>
|
||||
<AlternativeType Name="gp_Dir"></AlternativeType>
|
||||
<DisplayString>[{(float)coord.x} {(float)coord.y} {(float)coord.z}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_Vec2<*>">
|
||||
<DisplayString>[{v[0]} {v[1]}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_Vec3<*>">
|
||||
<DisplayString>[{v[0]} {v[1]} {v[2]}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_Vec4<*>">
|
||||
<DisplayString>[{v[0]} {v[1]} {v[2]} {v[3]}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Mat2d">
|
||||
<DisplayString>
|
||||
[{(float)matrix[0][0]} {(float)matrix[0][1]}], [{(float)matrix[1][0]} {(float)matrix[1][1]}]
|
||||
</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_Mat4<*>">
|
||||
<Expand>
|
||||
<Item Name="row0">((NCollection_Vec4<$T1>*)myMat)[0]</Item>
|
||||
<Item Name="row1">((NCollection_Vec4<$T1>*)myMat)[1]</Item>
|
||||
<Item Name="row2">((NCollection_Vec4<$T1>*)myMat)[2]</Item>
|
||||
<Item Name="row3">((NCollection_Vec4<$T1>*)myMat)[3]</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Handle_Standard_Transient">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*((NCollection_Handle<$T1>::Ptr*)entity)->myPtr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TCollection_AsciiString">
|
||||
<DisplayString>{mylength}: {mystring,s}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TCollection_HAsciiString">
|
||||
<DisplayString>{myString.mylength}: {myString.mystring,s}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_UtfString<*>">
|
||||
<DisplayString>{myLength}: {myString,s}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TCollection_ExtendedString">
|
||||
<DisplayString>{mylength}: {(wchar_t *)mystring,su}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TCollection_HExtendedString">
|
||||
<DisplayString>{myString.mylength}: {(wchar_t *)myString.mystring,su}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TCollection_BaseSequence">
|
||||
<DisplayString>TCollection_Sequence [{Size}], curr={CurrentIndex}</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TCollection_BasicMap">
|
||||
<AlternativeType Name="NCollection_BaseMap"/>
|
||||
<DisplayString>TCollection_Map [{mySize}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TColStd_PackedMapOfInteger">
|
||||
<DisplayString>TColStd_PackedMapOfInteger [{myExtent}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="NCollection_Vector<*>">
|
||||
<DisplayString>NCollection_Vector [{myLength}]</DisplayString>
|
||||
<Expand>
|
||||
<IndexListItems Condition="myData->Length<myLength">
|
||||
<Size>myData->Length</Size>
|
||||
<ValueNode>*($T1*)((char*)myData->DataPtr + $i * myItemSize)</ValueNode>
|
||||
</IndexListItems>
|
||||
<IndexListItems Condition="myData->Length>=myLength">
|
||||
<Size>myLength</Size>
|
||||
<ValueNode>*($T1*)((char*)myData->DataPtr + $i * myItemSize)</ValueNode>
|
||||
</IndexListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_List<*>">
|
||||
<DisplayString>NCollection_List [{myLength}]</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<Size>myLength</Size>
|
||||
<HeadPointer>myFirst</HeadPointer>
|
||||
<NextPointer>myNext</NextPointer>
|
||||
<ValueNode>*($T1*)(sizeof(NCollection_ListNode) + ((char *)this))</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Bnd_B2f">
|
||||
<AlternativeType Name="Bnd_B2d"></AlternativeType>
|
||||
<DisplayString Condition="myCenter[0] > 1000000000000000000.">VOID</DisplayString>
|
||||
<DisplayString Condition="myCenter[0] < 1000000000000000000.">
|
||||
Center: [{(float)myCenter[0]} {(float)myCenter[1]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]}]
|
||||
</DisplayString>
|
||||
</Type>
|
||||
<Type Name="Bnd_B3f">
|
||||
<AlternativeType Name="Bnd_B3d"></AlternativeType>
|
||||
<DisplayString Condition="myCenter[0] > 1000000000000000000.">VOID</DisplayString>
|
||||
<DisplayString Condition="myCenter[0] < 1000000000000000000.">
|
||||
Center: [{(float)myCenter[0]} {(float)myCenter[1]} {(float)myCenter[2]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]} {(float)myHSize[2]}]
|
||||
</DisplayString>
|
||||
</Type>
|
||||
<Type Name="TDF_Label">
|
||||
<DisplayString Condition="myLabelNode==0">NULL</DisplayString>
|
||||
<DisplayString Condition="myLabelNode!=0">[:{myLabelNode->myTag}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*myLabelNode</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TDF_LabelNode">
|
||||
<DisplayString>[:{myTag}]</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="brother" Condition="myBrother!=0">* myBrother</Item>
|
||||
<Item Name="child" Condition="myFirstChild!=0">* myFirstChild</Item>
|
||||
<ExpandedItem>myFirstAttribute</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Handle_TDF_Attribute">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">
|
||||
[transaction={((TDF_Attribute*)entity)->myTransaction}]
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<!--Item Name="next" Condition="myNext.entity!=0x00000000">myNext</Item-->
|
||||
<ExpandedItem>(TDF_Attribute*)entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="OpenGl_Context">
|
||||
<DisplayString>[{myGlVerMajor}.{myGlVerMinor}]</DisplayString>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
18
dox/dev_guides/dev_guides.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Developer Guides {#dev_guides}
|
||||
================
|
||||
|
||||
The following documents provide information on OCCT building, development and testing:
|
||||
|
||||
* @subpage occt_dev_guides__building "Building OCCT from sources"
|
||||
* @subpage occt_dev_guides__documentation "Documentation system"
|
||||
* @subpage occt_dev_guides__coding_rules "Coding Rules"
|
||||
* @subpage occt_dev_guides__contribution_workflow "Contribution Workflow"
|
||||
* @subpage occt_dev_guides__git_guide "Guide to installing and using Git for OCCT development"
|
||||
* @subpage occt_dev_guides__tests "Automatic Testing system"
|
||||
* @subpage occt_dev_guides__debug "Debugging tools and hints"
|
||||
|
||||
Two other documents provide details on obsolete technologies used by OCCT,
|
||||
to be removed in future releases:
|
||||
|
||||
* @subpage occt_dev_guides__wok "Workshop Organization Kit (WOK)"
|
||||
* @subpage occt_dev_guides__cdl "Component Definition Language (CDL)"
|
486
dox/dev_guides/documentation/documentation.md
Normal file
@@ -0,0 +1,486 @@
|
||||
Documentation System {#occt_dev_guides__documentation}
|
||||
======================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section OCCT_DM_SECTION_1 Introduction
|
||||
|
||||
This document provides practical guidelines for generation and editing of OCCT user documentation.
|
||||
|
||||
@section OCCT_DM_SECTION_2 Prerequisites
|
||||
|
||||
You need to have the following software installed to generate the documentation.
|
||||
|
||||
**Tcl/Tk**
|
||||
Version 8.5 or 8.6: http://www.tcl.tk/software/tcltk/download.html
|
||||
|
||||
**Doxygen**
|
||||
Version 1.8.4 or above: http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
**Dot**
|
||||
Part of Graphviz software, used by Doxygen for generation of class diagrams in Reference Manual: http://www.graphviz.org/Download..php
|
||||
|
||||
**MiKTeX** or other package providing **pdflatex** command (only needed for generation of PDF documents): http://miktex.org/download
|
||||
|
||||
**Inkscape** (only needed for generation of PDF documents containing SVG images): http://www.inkscape.org/download
|
||||
|
||||
When generating PDF documentation, **pdflatex** and **inkscape** executables should be accessible by PATH variable.
|
||||
You can use *custom.bat* file to add necessary paths to the *PATH* variable.
|
||||
|
||||
Note that in the process of PDF generation MiKTeX may need some packages not installed by default.
|
||||
We recommend setting option "Install missing packages on-the-fly" to "Ask me first" (default) during MiKTeX installation:
|
||||
|
||||
@figure{/dev_guides/documentation/images/documentation_miktex.png}
|
||||
|
||||
On the first run of **pdflatex** it will open a dialog window prompting for installation of missing packages.
|
||||
Follow the instructions to proceed (define proxy settings if needed, select a mirror site to download from, etc.).
|
||||
|
||||
**MathJax** is used for rendering math formulas in browser (HTML and CHM outputs): http://www.mathjax.org.
|
||||
|
||||
By default MathJAX scripts and fonts are taken from http://cdn.mathjax.org/mathjax/latest and no installation of MathJAX is necessary if Internet is accessible.
|
||||
If you need to use OCCT documentation while off-line, you can install a local copy of MatJAX, see http://www.mathjax.org/download/.
|
||||
See \ref OCCT_DM_SECTION_A_9 for more details on inserting mathematical expressions.
|
||||
|
||||
@section OCCT_DM_SECTION_2_1 Documentation Generation
|
||||
|
||||
Run command *gendoc* from command prompt (with OCCT directory as current one) to generate OCCT documentation.
|
||||
The synopsis is:
|
||||
|
||||
gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=<list of modules>|-ug=<list of docs>\] \[-v\] \[-s=<search_mode>\] \[-mathjax=<path>\]
|
||||
|
||||
Here the options are:
|
||||
|
||||
* Choice of documentation to be generated:
|
||||
* <i>-overview</i>: To generate Overview and User Guides (cannot be used with -refman)
|
||||
* <i>-refman</i>: To generate class Reference Manual (cannot be used with -overview)
|
||||
|
||||
* Choice of output format:
|
||||
* <i>-html</i>: To generate HTML files (default, cannot be used with -pdf or -chm)
|
||||
* <i>-pdf</i>: To generate PDF files (cannot be used with -refman, -html, or -chm)
|
||||
* <i>-chm</i>: To generate CHM files (cannot be used with -html or -pdf)
|
||||
|
||||
* Additional options:
|
||||
* <i>-m=\<modules_list\></i>: List of OCCT modules (separated with comma), for generation of Reference Manual
|
||||
* <i>-ug=\<docs_list\></i>: List of MarkDown documents (separated with comma), to use for generation of Overview / User Guides
|
||||
* <i>-mathjax=\<path\></i>: To use local or alternative copy of MathJax
|
||||
* <i>-s=\<search_mode\></i>: Specifies the Search mode of HTML documents; can be: none | local | server | external
|
||||
* <i>-h</i>: Prints this help message
|
||||
* <i>-v</i>: Enables more verbose output
|
||||
|
||||
**Note**
|
||||
|
||||
* In case of PDF output the utility generates a separate PDF file for each document;
|
||||
* In case of HTML output the utility generates a common Table of contents containing references to all documents.
|
||||
* In case of CHM output single CHM file is generated
|
||||
|
||||
**Examples**
|
||||
|
||||
To generate the output for a specific document specify the path to the corresponding MarkDown file (paths relative to *dox* sub-folder can be given), for instance:
|
||||
|
||||
~~~~
|
||||
> gendoc -overview -ug=dev_guides/documentation/documentation.md
|
||||
~~~~
|
||||
|
||||
To generate Reference Manual for the whole Open CASCADE Technology library, run:
|
||||
~~~~
|
||||
> gendoc -refman
|
||||
~~~~
|
||||
|
||||
To generate Reference Manual for Foundation Classes and Modeling Data modules only, with search option, run:
|
||||
~~~~
|
||||
> gendoc -refman -m=FoundationClasses,ModelingData,ModelingAlgorithms -s=local
|
||||
~~~~
|
||||
|
||||
@section OCCT_DM_SECTION_3 Documentation Conventions
|
||||
|
||||
This section contains information about file format conventions, directories structure, etc.
|
||||
|
||||
@subsection OCCT_DM_SECTION_3_1 File Format
|
||||
|
||||
The format used for documentation is MarkDown with Doxygen extensions.
|
||||
The MarkDown files have a <i>*.md</i> extension and are based on rules described in \ref OCCT_DM_SECTION_A section.
|
||||
|
||||
@subsection OCCT_DM_SECTION_3_2 Directory Structure
|
||||
|
||||
@figure{/dev_guides/documentation/images/documentation_folders.png}
|
||||
|
||||
Each document has its own folder if there are any images used in it. These images are stored in *images* subfolder.
|
||||
|
||||
If you want to use the same image for several documents, you can place it in *dox/resources* folder.
|
||||
|
||||
**Note**: To avoid incorrect image display, use a relative path to the image (starting from *dox* folder). For instance:
|
||||
|
||||
|
||||
@verbatim
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg}
|
||||
@endverbatim
|
||||
|
||||
|
||||
The documentation is generated in subfolder *doc* :
|
||||
* *html* - a directory for generated HTML pages;
|
||||
* *pdf* - a directory for generated PDF files.
|
||||
|
||||
@section OCCT_DM_SECTION_4 Adding a New Document
|
||||
|
||||
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into <i>/dox/dev_guides/</i>.
|
||||
|
||||
If there are images in the document, it should be placed in its own folder containing a subfolder for images. For instance:
|
||||
* <i> /dox/dev_guides/svn/ </i> - for *svn.md* file;
|
||||
* <i> /dox/dev_guides/svn/images/ </i> - for images.
|
||||
|
||||
Add a relative path to *svn.md* in file <i>dox/FILES.txt</i>. For instance
|
||||
|
||||
@verbatim
|
||||
dev_guides/svn/svn.md
|
||||
@endverbatim
|
||||
|
||||
**Note** that the order of paths to documents in *FILES.txt* is reproduced in the Table of Contents in the HTML output. Please, place them logically.
|
||||
|
||||
**Note** that you should specify a file tag, not the document name. See <a href="#OCCT_DM_SECTION_A_1">Header section</a> for details.
|
||||
|
||||
@section OCCT_DOC_SECTION_5 Additional Resources
|
||||
|
||||
More information about OCCT can be found at http://www.opencascade.org
|
||||
|
||||
The information on formula syntax can be found at:
|
||||
http://en.wikipedia.org/wiki/Help:Displaying_a_formula
|
||||
|
||||
More information on MarkDown and Doxygen syntax can be found at:
|
||||
http://www.stack.nl/~dimitri/doxygen/manual
|
||||
|
||||
@section OCCT_DM_SECTION_A Appendix 1: Document Syntax
|
||||
|
||||
A document file in *.md format must start with a proper header defining a caption and a unique tag.
|
||||
|
||||
@verbatim
|
||||
Documentation System {#dev_guides__documentation}
|
||||
=====================
|
||||
@endverbatim
|
||||
|
||||
The document structure is formed by sections that must be defined consistently.
|
||||
|
||||
The document can contain plain text, lists, tables, code snippets, images, math, etc.
|
||||
Any specific text elements can be introduced by Markdown language tags or by usual HTML tags.
|
||||
|
||||
The table of contents, page numbers (in PDF), and figure numbers (in PDF) are generated automatically.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_1 Headers and hierarchic document structure
|
||||
|
||||
Headers of different levels can be specified with the following tags:
|
||||
* <i>\@section</i> - for the first-level headers;
|
||||
* <i>\@subsection</i> - for the second level headers;
|
||||
* <i>\@subsubsection</i> - for the third level headers.
|
||||
|
||||
For example:
|
||||
|
||||
@verbatim
|
||||
@section occt_ocaf_1 Basic Concepts
|
||||
@subsection occt_ocaf_1_1 Applications and Documents
|
||||
@subsubsection occt_ocaf_1_1_1 The document and the data framework
|
||||
@endverbatim
|
||||
|
||||
Please, note that section names can be used for references within the document and in other documents, so it is necessary to use the common prefix indicative of the document name for all section names in the given document.
|
||||
For example, *occt_ocaf* for sections in Open CASCADE Application Framework manual.
|
||||
|
||||
The remaining part of section names in most documents consists only of numbers, for example *1_1*. Actually, the hierarchical structure of the output table of contents is not based on these numbers and is generated automatically.
|
||||
|
||||
The numbers are only indicative of a section location in the body of the document. However, duplicate section names in a document inevitably cause errors during generation.
|
||||
|
||||
If you insert a section in the middle of a big document, do not renumber the document to the end (which is inefficient and error prone), but choose an arbitrary number or letter, not yet used in the document section naming, and base the naming in this section on it.
|
||||
|
||||
The section hierarchy is limited to three levels and further levels cannot be presented in the Table of Contents.
|
||||
|
||||
However, the fourth and fifth level headers can be tagged with <i>####</i> and <i>#####</i> correspondingly.
|
||||
|
||||
It is also possible to use tags <i>##</i> and <i>###</i> for second and third level headers if you do not wish to show them in the table of contents or make references to them.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_2 Plain Text
|
||||
|
||||
A plain text is organized in paragraphs, separated by empty lines in MarkDown source.
|
||||
The length of lines is not restricted; it is recommended to put each sentence on a separate line -- this is optimal for easier comparison of different versions of the same document.
|
||||
|
||||
To insert special symbols, like \< , \> or \\, prepend them with \\ character: \\\<, \\\>, \\\\, etc.
|
||||
To emphasize a word or a group of words, wrap the text with one pair of asterisks (*) or underscores (_) to make it *italic* and two pairs of these symbols to make it **Bold**.
|
||||
|
||||
**Note** that if your emphasized text starts or ends with a special symbol, the asterisks may not work. Use explicit HTML tags \<i\>\</i\> and \<b\>\</b\> instead.
|
||||
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_3 Lists
|
||||
|
||||
To create a bulleted list, start each line with a hyphen or an asterisk,
|
||||
followed by a space. List items can be nested. This code:
|
||||
|
||||
@verbatim
|
||||
* Bullet 1
|
||||
* Bullet 2
|
||||
- Bullet 2a
|
||||
- Bullet 2b
|
||||
* Bullet 3
|
||||
@endverbatim
|
||||
|
||||
produces this list:
|
||||
|
||||
* Bullet 1
|
||||
* Bullet 2
|
||||
* Bullet 2a
|
||||
* Bullet 2b
|
||||
* Bullet 3
|
||||
|
||||
To create a numbered list, start each line with number and a period,
|
||||
then a space. Numbered lists can also be nested. Thus this code
|
||||
|
||||
@verbatim
|
||||
1. List item 1
|
||||
1. Sub-item 1
|
||||
2. Sub-item 2
|
||||
2. List item 2
|
||||
4. List item 3
|
||||
@endverbatim
|
||||
|
||||
produces this list:
|
||||
|
||||
1. List item 1
|
||||
1. Sub-item 1
|
||||
2. Sub-item 2
|
||||
2. List item 2
|
||||
3. List item 3
|
||||
|
||||
**Note** that numbers of list items in the output are generated so they do not necessarily follow the numbering of source items.
|
||||
|
||||
In some cases automatic generation adversely restarts the numbering, i.e. you get list items 1. 1. 1. instead of 1. 2. 3. in the output.
|
||||
The use of explicit HTML tags \<ol\>\</ol\> and \<li\>\</li\> can help in this case.
|
||||
|
||||
Each list item can contain several paragraphs of text; these paragraphs must
|
||||
have the same indentation as text after bullet or number in the numbered list
|
||||
item (otherwise numbering will be broken).
|
||||
|
||||
Code blocks can be inserted as paragraphs with additional indentation
|
||||
(4 spaces more). Note that fenced code blocks do not work within numbered lists
|
||||
and their use may cause numeration to be reset.
|
||||
|
||||
|
||||
Example of a complex nested list:
|
||||
|
||||
1. List item 1
|
||||
|
||||
Additional paragraph
|
||||
|
||||
code fragment
|
||||
|
||||
One more paragraph
|
||||
|
||||
1. Sub-item 1
|
||||
|
||||
code fragment for sub-item 1
|
||||
|
||||
2. Sub-item 2
|
||||
|
||||
Paragraph for sub-item 2
|
||||
|
||||
Yet one more paragraph for list item 1
|
||||
|
||||
2. List item 2
|
||||
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_4 Tables
|
||||
|
||||
A table consists of a header line, a separator line, and at least one row line.
|
||||
Table columns are separated by the pipe (|) character. The following example:
|
||||
|
||||
@verbatim
|
||||
First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
@endverbatim
|
||||
|
||||
will produce the following table:
|
||||
|
||||
First Header | Second Header
|
||||
------------ | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
|
||||
Column alignment can be controlled via one or two colons at the header separator line:
|
||||
|
||||
@verbatim
|
||||
| Right | Center | Left |
|
||||
| ----: | :----: | :---- |
|
||||
| 10 | 10 | 10 |
|
||||
| 1000 | 1000 | 1000 |
|
||||
@endverbatim
|
||||
|
||||
which will looks as follows:
|
||||
|
||||
| Right | Center | Left |
|
||||
| ----: | :----: | :---- |
|
||||
| 10 | 10 | 10 |
|
||||
| 1000 | 1000 | 1000 |
|
||||
|
||||
Note that each table row should be contained in one line of text; complex tables can be created using HTML tags.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_5 Code Blocks
|
||||
|
||||
Paragraphs indented with 4 or more spaces are considered as code fragments and rendered using Courier font.
|
||||
Example:
|
||||
|
||||
This line is indented by 4 spaces and rendered as a code block.
|
||||
|
||||
A fenced code block does not require indentation, and is defined by a pair of "fence lines".
|
||||
Such line consists of 3 or more tilde (~) characters on a line.
|
||||
The end of the block should have the same number of tildes.
|
||||
Thus it is strongly advised to use only three or four tildes.
|
||||
|
||||
By default the output is the same as for a normal code block.
|
||||
To highlight the code, the developer has to indicate the typical file extension,
|
||||
which corresponds to the programming language, after the opening fence.
|
||||
For highlighting according to the C++ language, for instance, write the following code (the curly braces and dot are optional):
|
||||
|
||||
@verbatim
|
||||
~~~{.cpp}
|
||||
int func(int a,int b) { return a*b; }
|
||||
~~~
|
||||
@endverbatim
|
||||
|
||||
which will produce:
|
||||
~~~{.cpp}
|
||||
int func(int a,int b) { return a*b; }
|
||||
~~~
|
||||
|
||||
Smaller code blocks can be inserted by wrapping with tags <i>\@code</i> and <i>\@endcode</i>.
|
||||
|
||||
Verbatim content (same as code but without syntax highlighting) can be inserted by wrapping with tags <i>\@verbatim</i> and <i>\@endverbatim</i>.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_6 References
|
||||
|
||||
To insert a reference to a website, it is sufficient to write an URL.
|
||||
For example: http://en.wikipedia.org
|
||||
|
||||
To insert a reference to a document or its subsection, use command <i>\@ref</i> followed by the document or section tag name.
|
||||
For instance, @code @ref OCCT_DM_SECTION_A @endcode will be rendered as @ref OCCT_DM_SECTION_A.
|
||||
|
||||
Note that links between documents will not work in PDF output if each document is generated independently.
|
||||
Hence it is recommended to add a name of the referenced section after the tag name in the <i>\@ref</i> command (in quotes): this will guarantee that the reference is recognizable for the reader even if the cross-link is not instantiated.
|
||||
For instance: @code @ref occt_modat_1 "Geometry Utilities" @endcode will be rendered as @ref occt_modat_1 "Geometry Utilities".
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_7 Images
|
||||
|
||||
For inserting images into the document use the command <i>\@figure</i>, as follows:
|
||||
|
||||
@verbatim
|
||||
@figure{/relative/path/to/image/image_file_name.png,"Image caption"}
|
||||
@endverbatim
|
||||
|
||||
The first argument is a path to the image file, relative to the *dox* folder.
|
||||
The supported formats for images are PNG, JPG, and SVG.
|
||||
The file extension must be lowercase and correspond to the file format.
|
||||
The image file name should have no dots except for the one before extension (names with more than one dot confuse **pdflatex**).
|
||||
|
||||
The second argument is optional, it defines the caption for the image to be inserted.
|
||||
The caption argument, if given, should be quoted, even if it is a single word.
|
||||
Captions are included below the image; in PDF output the images with caption are numbered automatically.
|
||||
|
||||
Example:
|
||||
|
||||
@verbatim
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg,"Test SVG image"}
|
||||
@endverbatim
|
||||
|
||||
is rendered as:
|
||||
|
||||
@figure{/dev_guides/documentation/images/documentation_test_image.svg,"Test SVG image"}
|
||||
|
||||
We recommend using **Inkscape** for creation and edition of vector graphics.
|
||||
The graphics created in MS Word Draw and some other vector editors can be copy-pasted to Inkscape and saved as SVG images.
|
||||
|
||||
Note that the image that will be included in documentation is the whole page of the Inkscape document; use option "Resize page to content" in menu **File -> Document properties** of Inkscape to fit page dimensions to the picture (adding margins as necessary).
|
||||
|
||||
Note that the *figure* command is an alias to the standard Doxygen command *image* repeated twice: once for HTML and then for Latex output (used for PDF generation). Thus if HTML and PDF outputs should include different images or captions, command "image" can be used:
|
||||
|
||||
@verbatim
|
||||
@image html /relative/path/to/image/occ_logo.png
|
||||
@image latex /relative/path/to/image/occ_logo.png "OCC logo"
|
||||
@endverbatim
|
||||
|
||||
@image html /resources/occ_logo.png
|
||||
@image latex /resources/occ_logo.png "OCC logo"
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_8 Table Of Contents
|
||||
|
||||
Use \@tableofcontents tag to get the table of contents at the beginning of the document.
|
||||
|
||||
Actually, it is not strictly necessary now because TreeView option for HTML is used.
|
||||
The TOC in the PDF document will be generated automatically.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_9 Formulas
|
||||
|
||||
Formulas within MarkDown documents can be defined using LaTeX syntax.
|
||||
|
||||
Equations can be written by several ways:
|
||||
|
||||
1.Unnumbered displayed formulas that are centered on a separate line.
|
||||
These formulas should be put between \@f\[ and \@f\] tags. An example:
|
||||
|
||||
@verbatim
|
||||
@f[
|
||||
|I_2|=\left| \int_{0}^T \psi(t)
|
||||
\left\{
|
||||
u(a,t)-
|
||||
\int_{\gamma(t)}^a
|
||||
\frac{d\theta}{k(\theta,t)}
|
||||
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
|
||||
\right\} dt
|
||||
\right|
|
||||
@f]
|
||||
@endverbatim
|
||||
|
||||
gives the following result:
|
||||
|
||||
@f$
|
||||
|I_2|=\left| \int_{0}^T \psi(t)
|
||||
\left\{
|
||||
u(a,t)-
|
||||
\int_{\gamma(t)}^a
|
||||
\frac{d\theta}{k(\theta,t)}
|
||||
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
|
||||
\right\} dt
|
||||
\right|
|
||||
@f$
|
||||
|
||||
2.Formulas can also be put between @verbatim \begin{align} @endverbatim and @verbatim \end{align} @endverbatim tags.
|
||||
|
||||
For example:
|
||||
|
||||
@verbatim
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endverbatim
|
||||
|
||||
gives the following result:
|
||||
@latexonly
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endlatexonly
|
||||
|
||||
@htmlonly
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endhtmlonly
|
||||
|
||||
3.Inline formulas can be specified using this syntax:
|
||||
|
||||
@verbatim
|
||||
@f$ \sqrt{3x-1}+(1+x)^2 @f$
|
||||
@endverbatim
|
||||
|
||||
that leads to the following result: @f$ \sqrt{3x-1}+(1+x)^2 @f$
|
||||
|
BIN
dox/dev_guides/documentation/images/documentation_folders.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
dox/dev_guides/documentation/images/documentation_miktex.png
Normal file
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="443.5307"
|
||||
height="187.48862"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="test_image.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="295.90235"
|
||||
inkscape:cy="-323.77532"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="716"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-page="false"
|
||||
borderlayer="false"
|
||||
fit-margin-top="5"
|
||||
fit-margin-left="5"
|
||||
fit-margin-right="5"
|
||||
fit-margin-bottom="5" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-79.097656,-21.098232)">
|
||||
<path
|
||||
sodipodi:type="spiral"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path2985"
|
||||
sodipodi:cx="142.85715"
|
||||
sodipodi:cy="126.6479"
|
||||
sodipodi:expansion="1"
|
||||
sodipodi:revolution="3"
|
||||
sodipodi:radius="73.178566"
|
||||
sodipodi:argument="-18.174814"
|
||||
sodipodi:t0="0"
|
||||
d="m 142.85715,126.6479 c 2.86505,2.29205 -1.67612,4.99285 -3.80953,4.76191 -5.78142,-0.62584 -7.49143,-7.75205 -5.71428,-12.38096 3.17892,-8.28004 13.59119,-10.36558 20.95239,-6.66665 10.80286,5.42832 13.31404,19.50561 7.61903,29.52381 -7.59056,13.35269 -25.44626,16.29352 -38.09525,8.5714 -15.91746,-9.71749 -19.28891,-31.39926 -9.52378,-46.66667 11.82689,-18.490884 37.35922,-22.29349 55.23811,-10.476151 21.06966,13.926321 25.30383,43.323481 11.42852,63.809531 -16.01959,23.65196 -49.29063,28.31803 -72.38096,12.3809 C 82.334702,151.39625 77.236493,114.2452 95.238126,88.552628 115.43324,59.729444 156.46861,54.198885 184.76195,74.26698 c 31.41097,22.27939 37.37404,67.20227 15.23802,98.09525" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
x="225.71429"
|
||||
y="55.219326"
|
||||
id="text2987"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2989"
|
||||
x="225.71429"
|
||||
y="55.219326">Test SVG image</tspan></text>
|
||||
<path
|
||||
style="fill:#d40000"
|
||||
id="path2996"
|
||||
d="m 225.93253,80.077991 c 3.24312,6.556366 8.29882,11.800272 13.5792,16.763957 4.5107,4.980932 7.56994,10.929012 10.6621,16.828992 2.61039,5.79272 3.86714,11.94331 7.08009,17.44901 3.75425,6.35398 6.70021,13.19689 8.79217,20.27197 4.84784,15.88966 11.74851,2.45314 -37.25143,18.61001 -0.78487,0.2588 0.15562,-1.64589 0.20424,-2.47091 0.0536,-0.90872 0.0682,-1.81932 0.10224,-2.72899 0.17911,-6.50471 -0.15488,-13.01656 0.28271,-19.50992 0.46019,-6.30504 2.24023,-12.34988 4.0286,-18.37582 2.36519,-5.44796 6.30711,-10.00347 9.73908,-14.79837 3.98599,-5.97976 8.02146,-11.96839 13.10341,-17.072556 4.37574,-4.432922 8.35123,-9.243914 12.37764,-13.99199 4.43478,-4.829914 10.15101,-8.139537 15.06208,-12.425011 14.95925,-12.429871 35.2123,-18.385688 51.95332,-26.62658 11.5059,-5.663868 -23.27039,10.786567 -34.90558,16.179851 17.6228,-9.547136 35.52389,-19.290175 55.17352,-23.555822 4.29932,-0.713125 2.15416,-0.406331 6.43505,-0.923403 0,0 -35.68459,22.595324 -35.68459,22.595324 l 0,0 c -4.12774,0.727408 -2.06126,0.312559 -6.19873,1.248113 -3.11612,0.864072 -6.22731,1.766121 -9.25625,2.908329 -0.8427,0.317783 -3.30812,1.424428 -2.49421,1.03881 40.69568,-19.281166 46.47137,-22.237336 32.54467,-15.189227 -79.1837,37.555094 -31.13152,14.703661 -6.06008,3.03043 4.62777,-2.154687 -15.27783,7.276298 -11.28272,6.532336 -1.75524,1.522667 -3.27126,3.31763 -5.09432,4.758404 -3.18452,2.516733 -7.13492,4.190007 -9.93487,7.239896 -4.62518,4.303389 -8.28044,9.606276 -12.50569,14.296007 -0.80437,0.69437 -4.493,3.820284 -5.21444,4.670532 -2.98505,3.518007 -5.33483,7.691189 -8.08882,11.393589 -2.92337,4.905278 -6.62131,9.277358 -10.15131,13.755678 -2.01215,5.68475 -3.56944,11.57461 -4.40544,17.54154 -0.83081,6.35553 -0.13439,12.77693 -0.29528,19.17264 -0.0102,1.50844 -0.0276,5.46288 -0.0732,5.48876 -34.08891,19.36365 -36.17581,33.13461 -40.63381,14.4297 -1.84609,-6.79718 -4.68694,-13.28977 -8.31428,-19.32972 -3.24304,-5.58446 -4.82126,-11.64528 -7.31615,-17.57296 -2.8174,-5.54315 -5.55105,-11.15816 -9.9264,-15.68612 -5.41001,-5.49645 -10.6705,-11.1173 -14.41843,-17.919019 0,0 38.38591,-18.02746 38.38591,-18.02746 z"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(84.097656,26.098232)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.5 KiB |