Compare commits
713 commits
main
...
26-linux-p
Author | SHA1 | Date | |
---|---|---|---|
|
cd001100ce | ||
|
31171d8cff | ||
|
e88b96339a | ||
|
1590df0b1d | ||
|
145651ed54 | ||
2a394c4cd5 | |||
7b5ccf70e6 | |||
42576e9099 | |||
642c47c180 | |||
1906de7b89 | |||
a6339b7fd9 | |||
9bd0bf131c | |||
f46cad2e63 | |||
1fdbb7e688 | |||
4f784dc460 | |||
7369ce6f78 | |||
eba869c7f0 | |||
2e8bfb3f0b | |||
9242213489 | |||
5cedb47135 | |||
2a21b4b517 | |||
f229de6ba5 | |||
3c25a4eb8c | |||
15db81852c | |||
a549e75526 | |||
e7a8320e98 | |||
0e55d39f53 | |||
d5b6609538 | |||
5d93d12272 | |||
ce305c7512 | |||
56df66454a | |||
99543f52f3 | |||
|
9a7d51bda2 | ||
|
2aa121968d | ||
|
92a53aa4f5 | ||
|
61b607aebd | ||
|
52ee255d7e | ||
|
ccb943b852 | ||
|
7d909da444 | ||
|
33580166f4 | ||
|
59527ecc49 | ||
|
e50b590ad0 | ||
|
6eb66730a5 | ||
|
e1315c28a7 | ||
|
01736696a8 | ||
|
4ad536b4fb | ||
|
db95157bdb | ||
|
2da57a4d24 | ||
|
8b40f509a0 | ||
|
6372a8f5fb | ||
|
cd9a3c35c4 | ||
|
2625225120 | ||
|
d90983bee3 | ||
|
7e03f9964f | ||
003480c4e9 | |||
|
510b5672d3 | ||
|
f75a3cdd2d | ||
|
5231e8de28 | ||
|
8d16f2bc49 | ||
|
ca9baf5e4c | ||
|
9ce9d9c388 | ||
|
9d85a406d4 | ||
|
647136acc8 | ||
|
a92608edc4 | ||
|
dc2fff60b8 | ||
|
ff11c8b8fb | ||
|
b785a5114b | ||
|
b07db1a990 | ||
|
574405e5b5 | ||
|
cc0ff91df5 | ||
|
7023fc88ac | ||
|
0fa7db915e | ||
|
7c4eb1b66b | ||
|
70141044c7 | ||
|
9883d542ba | ||
|
afddb37b73 | ||
|
4e68b3c40a | ||
|
8a6a8765ac | ||
|
da10334807 | ||
|
a53ec84c73 | ||
|
d7782f758f | ||
|
72ac7d0439 | ||
|
485c220d9a | ||
|
25502f0cca | ||
|
ad0ba5c6b1 | ||
|
56b8a61b16 | ||
|
f11527442c | ||
|
ee624ccc70 | ||
|
3c52626be2 | ||
|
bfccba236f | ||
|
070966fca1 | ||
|
306ee45cc5 | ||
|
73b691df36 | ||
|
eb941d396b | ||
|
1e5a40a0a2 | ||
|
b22528aac9 | ||
|
fec3a81af4 | ||
|
d30dc60e7b | ||
|
536437f618 | ||
|
25834f81d8 | ||
|
2e93b84f2c | ||
|
2f602f508a | ||
|
d66e9867c0 | ||
|
b9ce644e15 | ||
|
143127d249 | ||
|
d31bfa9606 | ||
|
3b00a6a2e0 | ||
|
162e4c6912 | ||
|
3a0d88c07d | ||
|
9a29dbced9 | ||
|
e6cf799eb4 | ||
|
c6b62b8787 | ||
|
3c3869fef5 | ||
|
1615c21909 | ||
|
60e927a3a0 | ||
|
aa42c17fed | ||
|
a45d723334 | ||
|
d1073593b0 | ||
|
2583d447f3 | ||
|
88a87a07a0 | ||
|
1b37624679 | ||
|
f079236f7f | ||
|
6c077b671d | ||
|
9dc33effe6 | ||
|
f2a3a4e99f | ||
|
59b4206afb | ||
|
7940b17ba7 | ||
|
6f1bb45f47 | ||
|
68d9be0bd9 | ||
|
3f25776129 | ||
|
a46bb29254 | ||
|
02d8b7d400 | ||
|
9b8272b2bd | ||
|
f53ecd3687 | ||
|
fd61399877 | ||
|
9ab62c5606 | ||
|
4c6e5ad4fa | ||
|
a99cb3c992 | ||
|
7dcfbe78f1 | ||
|
e3291f999c | ||
|
af1efdcfb9 | ||
|
3534ca411b | ||
|
752f5e3cdb | ||
|
2a407b8c00 | ||
|
9666ed648b | ||
|
4cd0390d7e | ||
|
cd2a7f0efc | ||
|
8837ac7831 | ||
|
34a3f05b98 | ||
|
98cd2c5e02 | ||
|
44c61c03e5 | ||
|
535f5b8bde | ||
|
2f98e52dbf | ||
|
ae71ce0f89 | ||
|
c7a5ee9e24 | ||
|
9388eae03e | ||
|
3b7f35efcc | ||
|
f225b26b76 | ||
|
f413f6e488 | ||
|
746336f249 | ||
|
9ed1ce8f7c | ||
|
bedc55578d | ||
|
30160d3f15 | ||
|
9807be9534 | ||
|
caafb52698 | ||
|
1c941a69f2 | ||
|
4780450e41 | ||
|
c0678ac664 | ||
|
887eee427d | ||
|
84934d3bee | ||
|
a87c252e3a | ||
|
51aeaf44fa | ||
|
31efed9b17 | ||
|
b860ae4428 | ||
|
377b122772 | ||
|
a307601382 | ||
|
681d3b5c73 | ||
|
ae56643f3a | ||
|
18b7697a23 | ||
|
23b9105803 | ||
|
f0c464f4d3 | ||
|
77af1636aa | ||
|
997b4b9e00 | ||
|
9ab3b7f253 | ||
|
fe890b3728 | ||
|
a2f67bf469 | ||
|
7a61907a41 | ||
|
be26e83637 | ||
|
bff7557fb9 | ||
|
dd0f1ab72b | ||
|
f11cc79b02 | ||
|
23ba7e265b | ||
|
fd5c22af05 | ||
|
286ea1144f | ||
|
0c2ff9d8ee | ||
|
927d66ed5d | ||
|
dfba29c457 | ||
|
d3e43081f3 | ||
|
a3ebdb8594 | ||
|
e7acc8f8ef | ||
|
aab52e2d72 | ||
|
bb8acc7134 | ||
|
c9a1346d76 | ||
|
3d965a2071 | ||
|
db6fcdf39d | ||
|
3d3c1d50c3 | ||
|
04c4a675af | ||
|
47bc75eb42 | ||
|
2b19bbe241 | ||
|
f77f8249f1 | ||
|
06f08b1128 | ||
|
3f2b4f3a22 | ||
|
32e71c4b97 | ||
853a0aca10 | |||
|
1d70d9c21a | ||
|
1598a7a30f | ||
|
09d682a7a3 | ||
|
353458b28a | ||
|
aaf1b2baf3 | ||
|
1a9cd3bdd3 | ||
|
12ae0ca308 | ||
|
2cb2a92e7a | ||
|
e85b805ccd | ||
|
c2d74a55e0 | ||
|
8ab5d4884b | ||
|
bd8968ec5f | ||
|
d3e0708447 | ||
|
9721582940 | ||
|
d3a72f1506 | ||
|
962c6f0798 | ||
|
c747e3621a | ||
|
10e5fb77ed | ||
|
76759098f2 | ||
|
a2dced68c5 | ||
|
7bbeae5dca | ||
|
5cd464003a | ||
|
fc920e0a39 | ||
|
bd8e3d3b0a | ||
|
1b8e007ce3 | ||
|
102982b3d1 | ||
|
8312add6d3 | ||
|
315f663861 | ||
|
342c4fb1d1 | ||
|
d936b42889 | ||
|
0aa8fc673f | ||
|
44f5615a6d | ||
|
463532c55d | ||
|
7b5b6c7841 | ||
|
da57e300d7 | ||
|
4f79153468 | ||
|
f6de1efb49 | ||
|
109ac760c1 | ||
|
f59390baab | ||
|
562dd7f3f4 | ||
|
c324daeda5 | ||
|
aacdfbb9b4 | ||
|
53f6021738 | ||
|
d3f07c825c | ||
|
c2992abb27 | ||
|
04e3a7255b | ||
|
296f4cdbd5 | ||
|
fc6e939cd2 | ||
|
5d1c5b7e0a | ||
|
25ec3e3a8f | ||
|
8f5dbd9157 | ||
|
fde0edc21a | ||
|
6abf3cbdaa | ||
|
c72d7294bd | ||
|
a62a5e9957 | ||
|
4a7b86721a | ||
|
9638c01274 | ||
|
d436cc8144 | ||
|
9766c1e734 | ||
|
414571d8f7 | ||
|
1e73d9a97c | ||
|
3ec4fbbef8 | ||
|
4b784e9bcd | ||
|
da97034f04 | ||
|
5ac8b6207e | ||
|
6fbe0b7c82 | ||
|
c3d77b630c | ||
|
e1bb4da09c | ||
|
73ddf45565 | ||
|
f3e265c701 | ||
|
031da2f78a | ||
|
e7c19bb2fd | ||
|
a1ac8dfe97 | ||
|
04dbab90e4 | ||
|
344b52fbee | ||
|
1cad7c694a | ||
|
0baef7f715 | ||
|
b35b7325c9 | ||
|
af5bf969ff | ||
|
23012f6520 | ||
|
87304cbad5 | ||
|
f881cfe327 | ||
|
55a9aa7f7d | ||
|
ebfbcba197 | ||
|
c171c3d9b3 | ||
|
4dc25df5a4 | ||
|
6afc2adfc6 | ||
|
4f09b85b76 | ||
|
2d295b71ed | ||
|
8e86401f04 | ||
|
5b5c82823b | ||
|
7eaed43bf3 | ||
|
6defb32387 | ||
|
35f8ba80b3 | ||
|
f919445249 | ||
|
10557b5512 | ||
|
c302c78907 | ||
|
084ee56928 | ||
|
9201d1d677 | ||
|
ac9c0ee700 | ||
|
20ac49a193 | ||
|
413ae7af5a | ||
|
682a74618b | ||
|
6f1c516faa | ||
|
d65dcc27ad | ||
|
644a1860e0 | ||
|
9b3df1892b | ||
|
1afed943d1 | ||
|
cacc313034 | ||
|
93434d6aea | ||
|
51aac8b5e9 | ||
|
766def2c9b | ||
|
2c6719b8c8 | ||
|
3ef66c79d9 | ||
|
ba8357bb61 | ||
|
c98bf6f44f | ||
|
1b4997ccd7 | ||
|
a8b28aa24c | ||
0ff7b7f01e | |||
|
3ae90854ea | ||
|
1a902a502a | ||
|
46f448ee9c | ||
|
4928c10656 | ||
|
97634f2157 | ||
|
cfaceffe9e | ||
|
faa77e6e9b | ||
|
c59afc9ec8 | ||
|
0583e1e879 | ||
|
6c2c932024 | ||
|
cae95ca01d | ||
|
c6e045ee44 | ||
|
dae4a3b93e | ||
|
90b9372fe3 | ||
|
b636a7376e | ||
|
86546c56dc | ||
|
a5c209f83b | ||
2dfcf5f7b6 | |||
|
081a34ffce | ||
|
62979a8a4f | ||
|
26985f0fea | ||
|
833ba9baf8 | ||
|
b78d33d1e2 | ||
|
5c4f5bcb50 | ||
9a3aa0f468 | |||
67529e6147 | |||
10c24349c8 | |||
|
0d0bf4c7d0 | ||
261a1fc57d | |||
e2e79f722e | |||
|
3b7c82c473 | ||
|
8e05b80b18 | ||
|
34df094f24 | ||
|
99cfd4d693 | ||
|
88cb2e4791 | ||
|
dd88ab208c | ||
|
fa2bd028a3 | ||
|
598eadfa62 | ||
|
2c38ac8e2e | ||
|
f3ea058c80 | ||
|
6487bc4dd9 | ||
|
d71751293b | ||
|
77c9be8d5b | ||
|
136d07bf4f | ||
|
cc1a749f90 | ||
|
66c3562750 | ||
7e1800a9fe | |||
|
306061a1c0 | ||
786df4ff8e | |||
|
97b82ac58f | ||
|
6ad79f707e | ||
|
372d06c342 | ||
|
43e8593735 | ||
|
0fc7d54c8c | ||
|
52eeb2a0b2 | ||
|
1c75bcde46 | ||
|
0cb718f37b | ||
|
51cff76ce2 | ||
|
c34414b71e | ||
|
2c8409506f | ||
|
a5a400bd3f | ||
|
a281290174 | ||
|
7cf8de2922 | ||
|
11ca113401 | ||
|
edf0b19c75 | ||
|
7f8163e747 | ||
|
ca1549b5ad | ||
|
16d6357cb6 | ||
|
c74c8984b9 | ||
|
a12b47c446 | ||
|
8260641eae | ||
|
3781f38994 | ||
966badbd20 | |||
d44dc182eb | |||
|
24026cae8f | ||
|
945b9e8847 | ||
|
0ffd7bda5c | ||
|
03107010d5 | ||
|
a115f89ed2 | ||
|
041070f479 | ||
|
b308063431 | ||
|
1b3c882d3a | ||
|
969f54a35e | ||
|
d4ac247790 | ||
|
d2f9358fb7 | ||
|
20bd5dbea1 | ||
|
68a7fe8c8b | ||
|
444bdeceb6 | ||
|
190f72d95f | ||
|
9eb6c89733 | ||
|
b6d9b74caf | ||
|
7b01cafbb3 | ||
|
a4fdeac558 | ||
|
3f398463c7 | ||
|
04f59795e7 | ||
|
bdd66f019d | ||
|
99aa166911 | ||
|
db6a314479 | ||
|
9e17c46d19 | ||
|
74a4e107b6 | ||
|
976b5d5689 | ||
|
9f104a27ba | ||
|
eb877f41ad | ||
|
5d3b99efc8 | ||
|
6a6aa0eec3 | ||
|
d2dece0aaa | ||
|
69e68f8d3c | ||
|
5290549a48 | ||
|
fc0ec87fc9 | ||
|
d0e2b9441e | ||
|
0d4bbaf373 | ||
|
16c0314701 | ||
|
7332a26dc6 | ||
|
b3c12786b8 | ||
|
13ec474eff | ||
|
480b126c7f | ||
|
3dc3df8943 | ||
|
d5e71d73b6 | ||
|
49ffc68b2d | ||
|
61c5cf3126 | ||
|
6eacd63fd1 | ||
|
60cf3bfeb2 | ||
|
2530930a16 | ||
|
0df947d7f9 | ||
|
99f5dd2443 | ||
|
8a09f68b7b | ||
|
e86c68cc35 | ||
|
7741a13e19 | ||
|
092fb96736 | ||
|
18eced08f6 | ||
|
cea54fe7aa | ||
|
c7fe2891fa | ||
|
5db13e35d4 | ||
|
63c963d465 | ||
|
19aeadc732 | ||
|
b7c634fd72 | ||
|
a69ad6c5e1 | ||
|
930d7fe433 | ||
|
b7e65be64f | ||
|
c8e66a5427 | ||
|
28e790481c | ||
|
40073b4e57 | ||
|
de2dc037fd | ||
|
ababfe0553 | ||
|
24e8b7c393 | ||
|
230fb82bc7 | ||
|
2a6989c9b5 | ||
|
e20aa73c3b | ||
|
7311bfaec3 | ||
|
a11940e5b5 | ||
|
60ccf2c744 | ||
|
5a37077a96 | ||
|
ddcbd3ff21 | ||
|
e5ba01fd41 | ||
|
01c0f01df8 | ||
|
583c540995 | ||
|
25b5953c9f | ||
|
2e81af43a5 | ||
|
678d0c123b | ||
|
e665b46d43 | ||
|
e634df16fd | ||
|
99a9211b91 | ||
|
0d52b6cb26 | ||
|
623fdd7bde | ||
|
03499a1c74 | ||
|
2955d01eb0 | ||
|
6032a0785c | ||
|
18baf226c1 | ||
|
191edf39b2 | ||
|
446a342d83 | ||
|
d95b4650eb | ||
|
913914f0cb | ||
|
eb4a46798d | ||
|
94bf161016 | ||
|
388b7239bf | ||
|
319029b66c | ||
|
a368410768 | ||
|
02a4f33d98 | ||
|
2a9c5213c0 | ||
|
31008adfaf | ||
|
47e31b913e | ||
|
59d128b5df | ||
|
bf5d21f64f | ||
|
00713e84b2 | ||
|
02012a8601 | ||
|
deea49bf25 | ||
|
105fc03cc1 | ||
|
cd4881f61e | ||
|
ee1c27ebd4 | ||
|
b4696caf98 | ||
|
eccbb211e4 | ||
|
9e18fa8a43 | ||
|
fa6f292065 | ||
|
37587ca8a3 | ||
|
a5b252e900 | ||
|
09654475b0 | ||
|
55e7ba97a1 | ||
|
22773a6dd6 | ||
|
3c538a551c | ||
|
31938b3ce1 | ||
|
76c8a8a055 | ||
|
0e3a6b8a3e | ||
|
f5f7a853b9 | ||
|
9960aab6a1 | ||
|
8c2dade6c4 | ||
|
de4ded9f18 | ||
|
dfb0d70ccf | ||
|
ba121d3bdd | ||
|
53837c0938 | ||
|
2080c59915 | ||
|
ae361f28f7 | ||
|
ed75b1c70a | ||
|
ac77d98aff | ||
|
3966c93a61 | ||
|
615e7c80b9 | ||
|
fd540dcafa | ||
|
e307920121 | ||
|
852a5ee1a9 | ||
|
56697a355b | ||
|
06981b5483 | ||
|
abdffe85bc | ||
|
cd31a742d7 | ||
|
fffb496213 | ||
|
bd4fcfd996 | ||
|
7c89930d46 | ||
|
0e748551e1 | ||
|
60e40efe9d | ||
|
ac68c846cf | ||
|
dca0bac052 | ||
|
ca585f73c0 | ||
|
4db953aa8a | ||
|
15f946083a | ||
|
1f50b40314 | ||
|
f3debe6377 | ||
|
fa5799447b | ||
|
04eac7050c | ||
|
58172f33f4 | ||
|
2595f0187a | ||
|
daf19fe497 | ||
|
05e5a7ea33 | ||
|
c83d7dd33e | ||
|
4b1f0731a5 | ||
|
bd0678bd84 | ||
|
8d7cf7eb7c | ||
|
7bf7b27b57 | ||
|
f1715d76cb | ||
|
f0928a2387 | ||
|
a14005fca4 | ||
|
227aaaae92 | ||
|
0da225bc83 | ||
|
1d64e5970f | ||
|
d468ad26f5 | ||
|
fbfc8606eb | ||
|
7ce0f45add | ||
|
8aa2e15936 | ||
|
2c49555595 | ||
|
59889aae88 | ||
|
ffc3171ccd | ||
|
7d06137e22 | ||
|
7b8ae7d530 | ||
|
a4881c2af5 | ||
|
8a720cd86c | ||
|
7b901a8888 | ||
|
d94941a20b | ||
|
5a699abe0a | ||
|
ac66527715 | ||
|
c58e1a3506 | ||
|
17f094c671 | ||
|
7e3b9d56bb | ||
|
4db7f2c959 | ||
|
635d62ac4c | ||
|
ee8a70287a | ||
|
750200b703 | ||
|
54d69aef76 | ||
|
0a88f8c546 | ||
|
f26f3d9024 | ||
|
a9bafa02bd | ||
|
44c6dab045 | ||
|
ce5fc881f7 | ||
|
a482c7db0b | ||
|
f55c927e7d | ||
|
f4a25a0f21 | ||
|
cda2b33cc6 | ||
|
049e35d930 | ||
|
90bdb65511 | ||
|
31a31a85b3 | ||
|
42260ea0fe | ||
|
e93335ee5e | ||
|
31210fac85 | ||
|
afb3daca3e | ||
|
8e862a24d9 | ||
|
3a327b4290 | ||
|
7371134470 | ||
|
8a493fc2a0 | ||
|
e79aa31372 | ||
|
f8d2c30957 | ||
|
787c138d87 | ||
|
84dea26126 | ||
|
888ed49ca2 | ||
|
ff6bb332eb | ||
|
a75d70b8bc | ||
|
40cb337c68 | ||
|
0b3c441079 | ||
|
badb4ed031 | ||
|
8741cfebe9 | ||
|
811aa1967d | ||
|
577680c85c | ||
|
4a26780709 | ||
|
2f46d107f4 | ||
|
debf070ec1 | ||
|
c57c1526a4 | ||
|
68c0db7e36 | ||
|
b310661545 | ||
|
0fac8984c2 | ||
|
994e90e58f | ||
|
a63cea2a59 | ||
|
e94374db7d | ||
|
a85c1b0b15 | ||
|
c5a35e0828 | ||
|
cee43e05df | ||
|
4b6a17bcb2 | ||
|
f73fa8ee24 | ||
|
66c8269aad | ||
|
17bec77777 | ||
|
8a726b62da | ||
|
b2e7b71b1f | ||
|
b619ef1865 | ||
|
16b08bd66e | ||
|
ec64ba53a7 | ||
|
d888e502b5 | ||
|
f68c84e361 | ||
|
248c7e14a7 | ||
|
2523706447 | ||
|
9e1b9d8050 | ||
|
04407be1cc | ||
|
008f67fcbc | ||
|
e4a1e9df63 | ||
|
2faf5b5010 | ||
|
32d5f7c497 | ||
|
e22fa8b951 | ||
|
9571f5f235 | ||
|
435ddae54f | ||
|
27fcfd823a | ||
|
3e658f1a1f | ||
|
ea12dd7969 | ||
|
fbd9800085 | ||
|
84585af4c3 | ||
|
f3b13af5e8 | ||
|
35bb966603 | ||
|
e1f8ac7d1b | ||
|
c3cd4d9d0d | ||
|
c9e5cd2e82 | ||
|
e5905be835 | ||
|
97b85a790d | ||
|
1623961c20 | ||
|
a72e76be2f | ||
|
63dddb4df8 | ||
|
1f999fc420 | ||
|
b4c0c8f921 | ||
|
ebe627cce6 | ||
|
c559bf1288 | ||
|
4c8d7884ea | ||
|
245b32782f | ||
|
a4e564bae5 | ||
|
b4487dddec | ||
|
711962de71 | ||
|
02ab16f83f | ||
|
008794031a | ||
|
960b3bc5e3 | ||
|
78587d3d47 | ||
|
a88878a079 | ||
|
6af7a93174 | ||
|
64841ed85a | ||
|
3c08d152ce | ||
|
7e6fee83a1 | ||
|
022ca9622d | ||
|
d819704717 | ||
|
d874429b7c | ||
|
d4f357850e | ||
|
306d4a1e56 |
3960 changed files with 133231 additions and 14364 deletions
.gitignore.gitlab-ci.yml
code
CMakeLists.txt
CMakeModules
AndroidToolChain.cmakeCheckDepends.cmakeConfigureChecks.cmakeFind3dsMaxSDK.cmakeFindCEGUI.cmakeFindCppTest.cmakeFindCustomMFC.cmakeFindDSound.cmakeFindDirectXSDK.cmakeFindEFXUtil.cmakeFindExternal.cmakeFindFMOD.cmakeFindFreeType.cmakeFindIconv.cmakeFindJpeg.cmakeFindLibOVR.cmakeFindLibVR.cmakeFindLuabind.cmakeFindOgg.cmakeFindOpenGLES.cmakeFindSTLport.cmakeFindSquish.cmakeFindVorbis.cmakeFindWindowsSDK.cmakeFindXF86VidMode.cmakePCHSupport.cmakeiOSToolChain.cmakenel.cmake
nel
CMakeLists.txt
include/nel
samples
src
3d
CMakeLists.txtdriver.cpp
CMakeLists.txtdriver
dru.cppfont_generator.cpplandscape.cpplandscape_user.cpplandscapeig_manager.cpplandscapevb_allocator.cppmesh.cppmesh_morpher.cppmesh_mrm.cppmesh_mrm_skin.cppmesh_mrm_skin_template.cppmesh_mrm_skinned.cppmrm_builder.cpppatch.cpppatch_render.cpppatchdlm_context.cppps_face.cppps_mesh.cppquad_effect.cppscene_group.cppshadow_map_manager.cpptexture_dlm.cpptile_bank.cppvegetable_blend_layer_model.cppvegetable_manager.cppvegetablevb_allocator.cppwater_model.cppzone.cppzone_lighter.cppcegui
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -162,6 +162,9 @@ build/*
|
||||||
install/*
|
install/*
|
||||||
build_vc*
|
build_vc*
|
||||||
code/nel/tools/build_gamedata/configuration/buildsite.py
|
code/nel/tools/build_gamedata/configuration/buildsite.py
|
||||||
|
code/nel/tools/build_gamedata_linux/configuration/buildsite.py
|
||||||
|
code/build*
|
||||||
|
|
||||||
|
|
||||||
# Linux nel compile
|
# Linux nel compile
|
||||||
code/nel/build/nel-config
|
code/nel/build/nel-config
|
||||||
|
@ -238,6 +241,7 @@ code/ryzom/tools/server/ryzom_ams/old
|
||||||
|
|
||||||
#tools and external dir's
|
#tools and external dir's
|
||||||
external
|
external
|
||||||
|
external_vc14
|
||||||
external_stlport
|
external_stlport
|
||||||
nel_tools*
|
nel_tools*
|
||||||
ryzom_tools*
|
ryzom_tools*
|
||||||
|
|
133
.gitlab-ci.yml
133
.gitlab-ci.yml
|
@ -1,17 +1,25 @@
|
||||||
Linux:
|
stages:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- staging
|
||||||
|
- production
|
||||||
|
|
||||||
|
## BUILDS
|
||||||
|
|
||||||
|
# Job de compilation pour Linux
|
||||||
|
Linux client build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
except:
|
||||||
- develop
|
- ryzomcore
|
||||||
- /^feature\/.*(\+CI$|\+CI-LIN64.*)/
|
|
||||||
- tags
|
|
||||||
tags:
|
tags:
|
||||||
- Docker
|
- Docker
|
||||||
- Linux
|
image: debian:jessie
|
||||||
image: ubuntu:14.04
|
|
||||||
script:
|
script:
|
||||||
# Installation des dépendances
|
# Installation des dépendances
|
||||||
|
- echo "deb http://ftp.debian.org/debian/ jessie-backports non-free contrib main" >> /etc/apt/sources.list
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y g++ gcc cmake libgl1-mesa-dev libjpeg-dev libpng12-dev libopenal-dev libfreetype6-dev libxxf86vm-dev libxrandr-dev libxrender-dev libvorbis-dev libluabind-dev libboost-dev libmysqlclient-dev libssl-dev liblzma-dev libxml2-dev
|
- apt-get -y upgrade
|
||||||
|
- apt-get -t jessie-backports install libxml2 -y g++ gcc cmake libcurl4-openssl-dev libgl1-mesa-dev libjpeg-dev libpng-dev libopenal-dev libfreetype6-dev libxxf86vm-dev libxrandr-dev libxrender-dev libvorbis-dev libluabind-dev libboost-dev libmysqlclient-dev libssl-dev liblzma-dev libxml2-dev makeself
|
||||||
# Installation des dépendances des dépendances statiques (à commenter si construction de Khanat en mode dynamique)
|
# Installation des dépendances des dépendances statiques (à commenter si construction de Khanat en mode dynamique)
|
||||||
# libxml2 : python-pyicu (support d'unicode), python-dev (support de... python)
|
# libxml2 : python-pyicu (support d'unicode), python-dev (support de... python)
|
||||||
- apt-get install -y wget python-pyicu python-dev
|
- apt-get install -y wget python-pyicu python-dev
|
||||||
|
@ -20,31 +28,32 @@ Linux:
|
||||||
- cd BUILD/x86_64
|
- cd BUILD/x86_64
|
||||||
## Le curl des dépots a trop de dépendances en statique. On le recompile donc, afin d'aléger l'executable
|
## Le curl des dépots a trop de dépendances en statique. On le recompile donc, afin d'aléger l'executable
|
||||||
# Téléchargement et décompression des dépendances à recompiller
|
# Téléchargement et décompression des dépendances à recompiller
|
||||||
- wget -c http://curl.haxx.se/download/curl-7.21.0.tar.gz
|
- wget -c http://curl.haxx.se/download/curl-7.50.0.tar.gz
|
||||||
- tar xzf curl-7.21.0.tar.gz
|
- tar xzf curl-7.50.0.tar.gz
|
||||||
# Compilation de curl
|
# Compilation de curl
|
||||||
- cd curl-7.21.0
|
- cd curl-7.50.0
|
||||||
- ./configure --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 --without-libssh2 --with-ssl=/usr/lib/x86_64-linux-gnu/libssl.so
|
- ./configure --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 --without-libssh2 --with-ssl
|
||||||
- make install -j$(($(nproc)-1))
|
- make install -j$(nproc)
|
||||||
- cd ..
|
- cd ..
|
||||||
## Compilation de Khanat
|
## Compilation de Khanat
|
||||||
# Configuration
|
# Configuration
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_LUA52=ON -DCURL_LIBRARY=/usr/local/lib/libcurl.a ../../code
|
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_LUA52=ON ../../code
|
||||||
# Compilation et installation
|
# Compilation et installation
|
||||||
- make -j$(($(nproc)-1)) install DESTDIR=../../Linux/x86_64
|
- make -j$(nproc) install DESTDIR=../../Linux/x86_64
|
||||||
|
# Packaging
|
||||||
|
- cd ../../
|
||||||
|
- cp ./dist/khanat/autoextract_script.sh ./Linux/x86_64/
|
||||||
|
- chmod +x ./Linux/x86_64/autoextract_script.sh
|
||||||
|
- makeself --nox11 --target /tmp/khanat_installer ./Linux/x86_64/ khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run "Khanat installer" ./autoextract_script.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7)-$CI_PIPELINE_ID-Linux-x86_64"
|
||||||
paths:
|
paths:
|
||||||
- Linux
|
- khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
||||||
cache:
|
|
||||||
key: "$CI_BUILD_NAME"
|
|
||||||
paths:
|
|
||||||
- BUILD
|
|
||||||
|
|
||||||
OSX:
|
# Job de compilation pour OSX
|
||||||
|
OSX client build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- develop
|
|
||||||
- /^feature\/.*(\+CI$|\+CI-OSX.*)/
|
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- OSX
|
- OSX
|
||||||
|
@ -55,11 +64,77 @@ OSX:
|
||||||
# Configuration
|
# Configuration
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFINAL_VERSION=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON -DWITH_LUA52=ON ../../code
|
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFINAL_VERSION=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON -DWITH_LUA52=ON ../../code
|
||||||
# Compilation et installation
|
# Compilation et installation
|
||||||
- make -j$(($(sysctl -n hw.ncpu)-1)) install DESTDIR=../../OSX/x86_64
|
- make -j$(($(sysctl -n hw.ncpu)/2)) install DESTDIR=../../OSX/x86_64
|
||||||
artifacts:
|
artifacts:
|
||||||
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-OSX-x86_64"
|
||||||
paths:
|
paths:
|
||||||
- OSX
|
- OSX/x86_64/*
|
||||||
cache:
|
when: manual
|
||||||
key: "$CI_BUILD_NAME"
|
|
||||||
paths:
|
## TESTS
|
||||||
- BUILD
|
|
||||||
|
Linux client test:
|
||||||
|
stage: test
|
||||||
|
except:
|
||||||
|
- ryzomcore
|
||||||
|
tags:
|
||||||
|
- Docker
|
||||||
|
image: ubuntu:14.04
|
||||||
|
script:
|
||||||
|
# Test de l'installation initiale
|
||||||
|
- ./khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
||||||
|
dependencies:
|
||||||
|
- Linux client build
|
||||||
|
|
||||||
|
.OSX client test:
|
||||||
|
stage: test
|
||||||
|
except:
|
||||||
|
- ryzomcore
|
||||||
|
tags:
|
||||||
|
- OSX
|
||||||
|
script:
|
||||||
|
- echo "pas encore de test pour le client OSX"
|
||||||
|
dependencies:
|
||||||
|
- OSX client build
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
##DEPLOYEMENT TO STAGING (TEST SERVER)
|
||||||
|
|
||||||
|
# Job de déploiment vers le staging. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de staging (zone de test)
|
||||||
|
.Deploy to Staging:
|
||||||
|
stage: staging
|
||||||
|
environment: Staging
|
||||||
|
except:
|
||||||
|
- ryzomcore
|
||||||
|
tags:
|
||||||
|
- Docker
|
||||||
|
image: ubuntu:14.04
|
||||||
|
script:
|
||||||
|
- echo "pas encore de deployment"
|
||||||
|
dependencies:
|
||||||
|
- Linux client build
|
||||||
|
- Linux client test
|
||||||
|
- OSX client build
|
||||||
|
- OSX client test
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
##DEPLOYEMENT TO PRODUCTION
|
||||||
|
|
||||||
|
# Job de déploiment vers la production. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de production
|
||||||
|
.Release to Production:
|
||||||
|
stage: production
|
||||||
|
environment: Production
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- Docker
|
||||||
|
image: ubuntu:14.04
|
||||||
|
script:
|
||||||
|
- echo "pas encore de tag"
|
||||||
|
dependencies:
|
||||||
|
- Linux client build
|
||||||
|
- Linux client test
|
||||||
|
- OSX client build
|
||||||
|
- OSX client test
|
||||||
|
- Deploy to Staging
|
||||||
|
when: manual
|
||||||
|
|
|
@ -36,7 +36,7 @@ IF(COMMAND cmake_policy)
|
||||||
IF(POLICY CMP0020)
|
IF(POLICY CMP0020)
|
||||||
CMAKE_POLICY(SET CMP0020 NEW)
|
CMAKE_POLICY(SET CMP0020 NEW)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(COMMAND cmake_policy)
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(nel)
|
INCLUDE(nel)
|
||||||
INCLUDE(ConfigureChecks)
|
INCLUDE(ConfigureChecks)
|
||||||
|
@ -61,11 +61,12 @@ SET(NL_VERSION_MAJOR 0)
|
||||||
SET(NL_VERSION_MINOR 12)
|
SET(NL_VERSION_MINOR 12)
|
||||||
SET(NL_VERSION_PATCH 0)
|
SET(NL_VERSION_PATCH 0)
|
||||||
SET(YEAR "2004-${CURRENT_YEAR}")
|
SET(YEAR "2004-${CURRENT_YEAR}")
|
||||||
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
SET(AUTHOR "Winch Gate and The Ryzom Core Community")
|
||||||
|
|
||||||
SET(RYZOM_VERSION_MAJOR 2)
|
SET(RYZOM_VERSION_MAJOR 2)
|
||||||
SET(RYZOM_VERSION_MINOR 9)
|
SET(RYZOM_VERSION_MINOR 9)
|
||||||
SET(RYZOM_VERSION_PATCH 0)
|
SET(RYZOM_VERSION_PATCH 0)
|
||||||
|
SET(REVISION 0)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Redirect output files
|
# Redirect output files
|
||||||
|
@ -75,15 +76,15 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
# DLL should be in the same directory as EXE under Windows
|
# DLL should be in the same directory as EXE under Windows
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_MFC)
|
IF(WITH_MFC)
|
||||||
FIND_PACKAGE(MFC QUIET)
|
FIND_PACKAGE(MFC QUIET)
|
||||||
ENDIF(WITH_MFC)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Set default config options
|
# Set default config options
|
||||||
|
@ -97,8 +98,6 @@ NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
|
||||||
NL_SETUP_PREFIX_PATHS()
|
NL_SETUP_PREFIX_PATHS()
|
||||||
RYZOM_SETUP_PREFIX_PATHS()
|
RYZOM_SETUP_PREFIX_PATHS()
|
||||||
|
|
||||||
NL_CONFIGURE_CHECKS()
|
|
||||||
|
|
||||||
NL_SETUP_BUILD()
|
NL_SETUP_BUILD()
|
||||||
NL_SETUP_BUILD_FLAGS()
|
NL_SETUP_BUILD_FLAGS()
|
||||||
|
|
||||||
|
@ -112,8 +111,8 @@ IF(WIN32)
|
||||||
|
|
||||||
IF(WITH_MFC)
|
IF(WITH_MFC)
|
||||||
FIND_PACKAGE(CustomMFC REQUIRED)
|
FIND_PACKAGE(CustomMFC REQUIRED)
|
||||||
ENDIF(WITH_MFC)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PACKAGE(ZLIB REQUIRED)
|
FIND_PACKAGE(ZLIB REQUIRED)
|
||||||
FIND_PACKAGE(LibXml2 REQUIRED)
|
FIND_PACKAGE(LibXml2 REQUIRED)
|
||||||
|
@ -122,15 +121,25 @@ FIND_PACKAGE(OpenSSL REQUIRED)
|
||||||
FIND_PACKAGE(GIF)
|
FIND_PACKAGE(GIF)
|
||||||
FIND_PACKAGE(Jpeg)
|
FIND_PACKAGE(Jpeg)
|
||||||
|
|
||||||
|
IF(WITH_LIBOVR)
|
||||||
|
FIND_PACKAGE(LibOVR)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(WITH_LIBVR)
|
||||||
|
FIND_PACKAGE(LibVR)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
NL_CONFIGURE_CHECKS()
|
||||||
|
|
||||||
IF(WITH_STATIC_LIBXML2)
|
IF(WITH_STATIC_LIBXML2)
|
||||||
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
||||||
ENDIF(WITH_STATIC_LIBXML2)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LIBXML2_ICONV)
|
IF(WITH_LIBXML2_ICONV)
|
||||||
FIND_PACKAGE(Iconv REQUIRED)
|
FIND_PACKAGE(Iconv REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
||||||
ENDIF(WITH_LIBXML2_ICONV)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_STATIC)
|
IF(WITH_STATIC)
|
||||||
# libxml2 could need winsock2 library
|
# libxml2 could need winsock2 library
|
||||||
|
@ -145,20 +154,20 @@ IF(WITH_STATIC)
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
||||||
|
|
||||||
IF(FINAL_VERSION)
|
IF(FINAL_VERSION)
|
||||||
ADD_DEFINITIONS(-DFINAL_VERSION=1)
|
ADD_DEFINITIONS(-DFINAL_VERSION=1)
|
||||||
ENDIF(FINAL_VERSION)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SSE2)
|
IF(WITH_SSE2)
|
||||||
ADD_DEFINITIONS(-DNL_HAS_SSE2)
|
ADD_DEFINITIONS(-DNL_HAS_SSE2)
|
||||||
IF(WITH_SSE3)
|
IF(WITH_SSE3)
|
||||||
ADD_DEFINITIONS(-DNL_HAS_SSE3)
|
ADD_DEFINITIONS(-DNL_HAS_SSE3)
|
||||||
ENDIF(WITH_SSE3)
|
ENDIF()
|
||||||
ENDIF(WITH_SSE2)
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE_CERTIFICATE)
|
IF(APPLE_CERTIFICATE)
|
||||||
# Find codesign_allocate
|
# Find codesign_allocate
|
||||||
|
@ -304,7 +313,7 @@ IF(WITH_QT5)
|
||||||
|
|
||||||
ADD_QT_LIBRARY(XcbQpa)
|
ADD_QT_LIBRARY(XcbQpa)
|
||||||
ADD_QT_LIBRARY(PlatformSupport)
|
ADD_QT_LIBRARY(PlatformSupport)
|
||||||
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL)
|
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL -lxcb-glx)
|
||||||
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
||||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
|
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -399,16 +408,16 @@ IF(WITH_QT)
|
||||||
|
|
||||||
# Use Qt 4
|
# Use Qt 4
|
||||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
|
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
|
||||||
ENDIF(WITH_QT)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_ASSIMP)
|
IF(WITH_ASSIMP)
|
||||||
FIND_PACKAGE(assimp REQUIRED)
|
FIND_PACKAGE(assimp REQUIRED)
|
||||||
ENDIF(WITH_ASSIMP)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NEL)
|
IF(WITH_NEL)
|
||||||
IF(WITH_NEL_TESTS)
|
IF(WITH_NEL_TESTS)
|
||||||
FIND_PACKAGE(CppTest)
|
FIND_PACKAGE(CppTest)
|
||||||
ENDIF(WITH_NEL_TESTS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GUI)
|
IF(WITH_GUI)
|
||||||
FIND_PACKAGE(Luabind REQUIRED)
|
FIND_PACKAGE(Luabind REQUIRED)
|
||||||
|
@ -446,19 +455,19 @@ IF(WITH_NEL)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
|
||||||
ADD_SUBDIRECTORY(nel)
|
ADD_SUBDIRECTORY(nel)
|
||||||
ENDIF(WITH_NEL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_RYZOM)
|
IF(WITH_RYZOM)
|
||||||
ADD_SUBDIRECTORY(ryzom)
|
ADD_SUBDIRECTORY(ryzom)
|
||||||
ENDIF(WITH_RYZOM)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NELNS)
|
IF(WITH_NELNS)
|
||||||
ADD_SUBDIRECTORY(nelns)
|
ADD_SUBDIRECTORY(nelns)
|
||||||
ENDIF(WITH_NELNS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SNOWBALLS)
|
IF(WITH_SNOWBALLS)
|
||||||
ADD_SUBDIRECTORY(snowballs2)
|
ADD_SUBDIRECTORY(snowballs2)
|
||||||
ENDIF(WITH_SNOWBALLS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_TOOLS)
|
IF(WITH_TOOLS)
|
||||||
ADD_SUBDIRECTORY(tool)
|
ADD_SUBDIRECTORY(tool)
|
||||||
|
@ -466,22 +475,22 @@ ENDIF()
|
||||||
|
|
||||||
IF(WITH_STUDIO)
|
IF(WITH_STUDIO)
|
||||||
ADD_SUBDIRECTORY(studio)
|
ADD_SUBDIRECTORY(studio)
|
||||||
ENDIF(WITH_STUDIO)
|
ENDIF()
|
||||||
|
|
||||||
# To build the documention, you will have to enable it
|
# To build the documention, you will have to enable it
|
||||||
# and then do the equivalent of "make DoxygenDoc".
|
# and then do the equivalent of "make DoxygenDoc".
|
||||||
IF(BUILD_DOCUMENTATION)
|
IF(BUILD_DOCUMENTATION)
|
||||||
IF(DOT)
|
IF(DOT)
|
||||||
SET(HAVE_DOT YES)
|
SET(HAVE_DOT YES)
|
||||||
ELSE(DOT)
|
ELSE()
|
||||||
SET(HAVE_DOT NO)
|
SET(HAVE_DOT NO)
|
||||||
ENDIF(DOT)
|
ENDIF()
|
||||||
# This processes our Doxyfile.in and substitutes paths to generate
|
# This processes our Doxyfile.in and substitutes paths to generate
|
||||||
# a final Doxyfile
|
# a final Doxyfile
|
||||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
||||||
ENDIF(BUILD_DOCUMENTATION)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NEL_TESTS)
|
IF(WITH_NEL_TESTS)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
|
@ -491,8 +500,8 @@ IF(WITH_NEL_TESTS)
|
||||||
SET(SVNCOMMAND svn)
|
SET(SVNCOMMAND svn)
|
||||||
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
|
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
|
||||||
SET(GENERATELOGS svn2cl)
|
SET(GENERATELOGS svn2cl)
|
||||||
ENDIF(BUILD_DASHBOARD)
|
ENDIF()
|
||||||
ENDIF(WITH_NEL_TESTS)
|
ENDIF()
|
||||||
|
|
||||||
# packaging information
|
# packaging information
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
|
||||||
|
@ -524,10 +533,10 @@ IF(WIN32)
|
||||||
#SET(CPACK_GENERATOR "NSIS")
|
#SET(CPACK_GENERATOR "NSIS")
|
||||||
SET(CPACK_GENERATOR "NSIS;ZIP")
|
SET(CPACK_GENERATOR "NSIS;ZIP")
|
||||||
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
SET(CPACK_GENERATOR "TGZ")
|
SET(CPACK_GENERATOR "TGZ")
|
||||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
set(CPACK_SOURCE_IGNORE_FILES
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
"~$"
|
"~$"
|
||||||
"\\\\.cvsignore$"
|
"\\\\.cvsignore$"
|
||||||
|
@ -545,8 +554,8 @@ IF(WIN32)
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
|
||||||
DESTINATION ${NL_BIN_PREFIX})
|
DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF(WITH_QT)
|
ENDIF()
|
||||||
ELSE(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
ELSE()
|
||||||
IF(WITH_QT)
|
IF(WITH_QT)
|
||||||
INCLUDE(${QT_USE_FILE})
|
INCLUDE(${QT_USE_FILE})
|
||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
|
@ -554,8 +563,8 @@ IF(WIN32)
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
|
||||||
DESTINATION ${NL_BIN_PREFIX})
|
DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF(WITH_QT)
|
ENDIF()
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
ENDIF()
|
||||||
|
|
||||||
# Install CEGUI and its dependencies.
|
# Install CEGUI and its dependencies.
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
|
@ -565,14 +574,14 @@ IF(WIN32)
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF()
|
||||||
|
|
||||||
# Only the tools require MFC.
|
# Only the tools require MFC.
|
||||||
IF(WITH_TOOLS)
|
IF(WITH_TOOLS)
|
||||||
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
|
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
|
||||||
ENDIF(WITH_TOOLS)
|
ENDIF()
|
||||||
#INCLUDE(InstallRequiredSystemLibraries)
|
#INCLUDE(InstallRequiredSystemLibraries)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
|
@ -582,4 +591,4 @@ INCLUDE(CMakePackaging.txt)
|
||||||
#INCLUDE(UseDebian)
|
#INCLUDE(UseDebian)
|
||||||
#IF(DEBIAN_FOUND)
|
#IF(DEBIAN_FOUND)
|
||||||
# ADD_DEBIAN_TARGETS(nel)
|
# ADD_DEBIAN_TARGETS(nel)
|
||||||
#ENDIF(DEBIAN_FOUND)
|
#ENDIF()
|
||||||
|
|
|
@ -22,13 +22,8 @@ IF(NOT TARGET_CPU)
|
||||||
SET(TARGET_CPU "armv7")
|
SET(TARGET_CPU "armv7")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(ARMV7_HARD_FLOAT OFF)
|
|
||||||
|
|
||||||
IF(TARGET_CPU STREQUAL "armv7")
|
IF(TARGET_CPU STREQUAL "armv7")
|
||||||
SET(LIBRARY_ARCHITECTURE "armeabi-v7a")
|
SET(LIBRARY_ARCHITECTURE "armeabi-v7a")
|
||||||
IF(ARMV7_HARD_FLOAT)
|
|
||||||
SET(LIBRARY_ARCHITECTURE "${LIBRARY_ARCHITECTURE}-hard")
|
|
||||||
ENDIF()
|
|
||||||
SET(CMAKE_SYSTEM_PROCESSOR "armv7")
|
SET(CMAKE_SYSTEM_PROCESSOR "armv7")
|
||||||
SET(TOOLCHAIN_ARCH "arm")
|
SET(TOOLCHAIN_ARCH "arm")
|
||||||
SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi")
|
SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi")
|
||||||
|
@ -123,6 +118,12 @@ MACRO(SEARCH_TOOLCHAIN _COMPILER)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# try prefixes without version
|
||||||
|
SET(_TOOLCHAIN_WITHOUT_VERSION "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}")
|
||||||
|
IF(EXISTS ${_TOOLCHAIN_WITHOUT_VERSION})
|
||||||
|
LIST(APPEND ${_COMPILER}_TOOLCHAIN_VERSIONS "default")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT ${_COMPILER}_TOOLCHAIN_VERSIONS)
|
IF(NOT ${_COMPILER}_TOOLCHAIN_VERSIONS)
|
||||||
MESSAGE(FATAL_ERROR "No Android ${_COMPILER} toolchain found in default search path ${NDK_ROOT}/toolchains")
|
MESSAGE(FATAL_ERROR "No Android ${_COMPILER} toolchain found in default search path ${NDK_ROOT}/toolchains")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -136,7 +137,15 @@ MACRO(SEARCH_TOOLCHAIN _COMPILER)
|
||||||
LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION)
|
LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-${${_COMPILER}_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}")
|
MESSAGE(STATUS "TOOLCHAIN_PREFIX = ${${_COMPILER}_TOOLCHAIN_VERSION}")
|
||||||
|
|
||||||
|
IF("${${_COMPILER}_TOOLCHAIN_VERSION}" STREQUAL "default")
|
||||||
|
MESSAGE(STATUS "default")
|
||||||
|
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}/prebuilt/${TOOLCHAIN_HOST}")
|
||||||
|
ELSE()
|
||||||
|
MESSAGE(STATUS "not default")
|
||||||
|
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-${${_COMPILER}_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT EXISTS "${${_COMPILER}_TOOLCHAIN_ROOT}")
|
IF(NOT EXISTS "${${_COMPILER}_TOOLCHAIN_ROOT}")
|
||||||
FILE(GLOB _TOOLCHAIN_PREFIXES "${${_COMPILER}_TOOLCHAIN_ROOT}*")
|
FILE(GLOB _TOOLCHAIN_PREFIXES "${${_COMPILER}_TOOLCHAIN_ROOT}*")
|
||||||
|
@ -192,7 +201,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
MACRO(SET_TOOLCHAIN_BINARY_LLVM _NAME _BINARY)
|
MACRO(SET_TOOLCHAIN_BINARY_LLVM _NAME _BINARY)
|
||||||
SET(${_NAME} ${CLANG_TOOLCHAIN_ROOT}/bin/${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE )
|
SET(${_NAME} ${CLANG_TOOLCHAIN_ROOT}/bin/${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE)
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
MACRO(SET_TOOLCHAIN_BINARY_GCC _NAME _BINARY)
|
MACRO(SET_TOOLCHAIN_BINARY_GCC _NAME _BINARY)
|
||||||
|
@ -214,6 +223,14 @@ IF(CLANG)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_ASM_COMPILER llvm-as)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_ASM_COMPILER llvm-as)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_AR llvm-ar)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_AR llvm-ar)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_LINKER clang++)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_LINKER clang++)
|
||||||
|
|
||||||
|
IF(NOT EXISTS "${CMAKE_ASM_COMPILER}")
|
||||||
|
SET_TOOLCHAIN_BINARY_GCC(CMAKE_ASM_COMPILER as)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT EXISTS "${CMAKE_AR}")
|
||||||
|
SET_TOOLCHAIN_BINARY_GCC(CMAKE_AR ar)
|
||||||
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(STATUS "Using GCC compiler")
|
MESSAGE(STATUS "Using GCC compiler")
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
SET(${SYMBOL_FOUND} FALSE)
|
||||||
# MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
# MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
||||||
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
ENDIF()
|
||||||
ENDIF(CMAKE_NM)
|
ENDIF()
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
SET(CMAKE_OBJDUMP objdump)
|
SET(CMAKE_OBJDUMP objdump)
|
||||||
IF(CMAKE_OBJDUMP)
|
IF(CMAKE_OBJDUMP)
|
||||||
|
@ -35,11 +35,11 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
|
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
SET(${SYMBOL_FOUND} FALSE)
|
||||||
ELSE(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
ELSE()
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
|
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
|
||||||
ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
ENDIF()
|
||||||
ENDIF(CMAKE_OBJDUMP)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
||||||
|
|
||||||
# CHECK_LINKED_LIBRARY
|
# CHECK_LINKED_LIBRARY
|
||||||
|
@ -66,8 +66,8 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
||||||
SET(${LIBRARY_FOUND} TRUE)
|
SET(${LIBRARY_FOUND} TRUE)
|
||||||
# MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
# MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
||||||
ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
ENDIF()
|
||||||
ENDIF(CMAKE_OTOOL)
|
ENDIF()
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
SET(CMAKE_OBJDUMP objdump)
|
SET(CMAKE_OBJDUMP objdump)
|
||||||
IF(CMAKE_OBJDUMP)
|
IF(CMAKE_OBJDUMP)
|
||||||
|
@ -79,11 +79,11 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
|
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
|
||||||
SET(${LIBRARY_FOUND} TRUE)
|
SET(${LIBRARY_FOUND} TRUE)
|
||||||
ELSE(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
ELSE()
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
|
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
|
||||||
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
ENDIF()
|
||||||
ENDIF(CMAKE_OBJDUMP)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
ENDMACRO(CHECK_LINKED_LIBRARY)
|
ENDMACRO(CHECK_LINKED_LIBRARY)
|
||||||
|
|
||||||
MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
||||||
|
@ -91,13 +91,13 @@ MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND)
|
IF(SYMBOL_FOUND)
|
||||||
CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
ENDIF(SYMBOL_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
SET(${MUSTLINK} YES)
|
SET(${MUSTLINK} YES)
|
||||||
ELSE(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
ELSE()
|
||||||
SET(${MUSTLINK} NO)
|
SET(${MUSTLINK} NO)
|
||||||
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
ENDIF()
|
||||||
ENDMACRO(CHECK_DEPENDS)
|
ENDMACRO(CHECK_DEPENDS)
|
||||||
|
|
||||||
# LINK_DEPENDS
|
# LINK_DEPENDS
|
||||||
|
@ -116,23 +116,23 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL)
|
||||||
IF(WIN32 OR WITH_STATIC)
|
IF(WIN32 OR WITH_STATIC)
|
||||||
# In static, we link all libraries because it will keep only used symbols
|
# In static, we link all libraries because it will keep only used symbols
|
||||||
SET(MUST_LINK TRUE)
|
SET(MUST_LINK TRUE)
|
||||||
ELSE(WIN32 OR WITH_STATIC)
|
ELSE()
|
||||||
CHECK_UNDEFINED_SYMBOL(${MYLIBRARY} ${SYMBOL} SYMBOL_FOUND)
|
CHECK_UNDEFINED_SYMBOL(${MYLIBRARY} ${SYMBOL} SYMBOL_FOUND)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND)
|
IF(SYMBOL_FOUND)
|
||||||
CHECK_LINKED_LIBRARY(${MYLIBRARY} ${OTHERLIBRARY} LIBRARY_FOUND)
|
CHECK_LINKED_LIBRARY(${MYLIBRARY} ${OTHERLIBRARY} LIBRARY_FOUND)
|
||||||
ENDIF(SYMBOL_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
MESSAGE(STATUS "Underlinking found: ${${MYLIBRARY}} needs ${${OTHERLIBRARY}} but is not linked to, manually linking...")
|
MESSAGE(STATUS "Underlinking found: ${${MYLIBRARY}} needs ${${OTHERLIBRARY}} but is not linked to, manually linking...")
|
||||||
SET(MUST_LINK TRUE)
|
SET(MUST_LINK TRUE)
|
||||||
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
ENDIF()
|
||||||
ENDIF(WIN32 OR WITH_STATIC)
|
ENDIF()
|
||||||
ENDIF(${MYLIBRARY} AND ${OTHERLIBRARY} AND NOT ${OTHERLIBRARY}_LINKED)
|
ENDIF()
|
||||||
IF(MUST_LINK)
|
IF(MUST_LINK)
|
||||||
MESSAGE(STATUS "Linking with ${${OTHERLIBRARY}}")
|
MESSAGE(STATUS "Linking with ${${OTHERLIBRARY}}")
|
||||||
SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}})
|
SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}})
|
||||||
SET(${OTHERLIBRARY}_LINKED TRUE)
|
SET(${OTHERLIBRARY}_LINKED TRUE)
|
||||||
ENDIF(MUST_LINK)
|
ENDIF()
|
||||||
ENDMACRO(LINK_DEPENDS)
|
ENDMACRO(LINK_DEPENDS)
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@ MACRO(NL_CONFIGURE_CHECKS)
|
||||||
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
|
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
|
||||||
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
|
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
|
||||||
|
|
||||||
SET(RYZOM_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}.${REVISION}")
|
SET(RYZOM_VERSION_SHORT "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}")
|
||||||
|
SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}")
|
||||||
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
|
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
|
||||||
NOW(BUILD_DATE)
|
NOW(BUILD_DATE)
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ if(MAXSDK_FOUND)
|
||||||
${MAXSDK_PARAMBLK2_LIBRARY}
|
${MAXSDK_PARAMBLK2_LIBRARY}
|
||||||
${MAXSDK_BMM_LIBRARY} )
|
${MAXSDK_BMM_LIBRARY} )
|
||||||
|
|
||||||
else(MAXSDK_FOUND)
|
ELSE()
|
||||||
set(MAXSDK_LIBRARIES)
|
set(MAXSDK_LIBRARIES)
|
||||||
endif(MAXSDK_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
mark_as_advanced(MAXSDK_INCLUDE_DIR MAXSDK_LIBRARY)
|
mark_as_advanced(MAXSDK_INCLUDE_DIR MAXSDK_LIBRARY)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(CEGUI_FIND_QUIETLY TRUE)
|
SET(CEGUI_FIND_QUIETLY TRUE)
|
||||||
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(CEGUI_INCLUDE_DIRS
|
FIND_PATH(CEGUI_INCLUDE_DIRS
|
||||||
|
@ -45,9 +45,9 @@ IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
|
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
|
||||||
IF(NOT CEGUI_FIND_QUIETLY)
|
IF(NOT CEGUI_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
|
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
|
||||||
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
ELSE()
|
||||||
IF(NOT CEGUI_FIND_QUIETLY)
|
IF(NOT CEGUI_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
|
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
|
||||||
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
ENDIF()
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(CPPTEST_FIND_QUIETLY TRUE)
|
SET(CPPTEST_FIND_QUIETLY TRUE)
|
||||||
ENDIF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(CPPTEST_INCLUDE_DIR
|
FIND_PATH(CPPTEST_INCLUDE_DIR
|
||||||
cpptest.h
|
cpptest.h
|
||||||
|
@ -30,7 +30,7 @@ SET(LIBRARY_NAME_DEBUG cpptestd)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
|
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
|
||||||
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
|
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
||||||
${LIBRARY_NAME_RELEASE}
|
${LIBRARY_NAME_RELEASE}
|
||||||
|
@ -67,18 +67,18 @@ IF(CPPTEST_INCLUDE_DIR)
|
||||||
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
||||||
IF(CPPTEST_LIBRARY_DEBUG)
|
IF(CPPTEST_LIBRARY_DEBUG)
|
||||||
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
||||||
ENDIF(CPPTEST_LIBRARY_DEBUG)
|
ENDIF()
|
||||||
ENDIF(CPPTEST_LIBRARY_RELEASE)
|
ENDIF()
|
||||||
ENDIF(CPPTEST_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
IF(CPPTEST_FOUND)
|
IF(CPPTEST_FOUND)
|
||||||
IF(NOT CPPTEST_FIND_QUIETLY)
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
||||||
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(CPPTEST_FOUND)
|
ELSE()
|
||||||
IF(NOT CPPTEST_FIND_QUIETLY)
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
||||||
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(CPPTEST_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -6,20 +6,20 @@
|
||||||
|
|
||||||
IF(CustomMFC_FIND_REQUIRED)
|
IF(CustomMFC_FIND_REQUIRED)
|
||||||
SET(MFC_FIND_REQUIRED TRUE)
|
SET(MFC_FIND_REQUIRED TRUE)
|
||||||
ENDIF(CustomMFC_FIND_REQUIRED)
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT MFC_DIR)
|
IF(NOT MFC_DIR)
|
||||||
# If MFC have been found, remember their directory
|
# If MFC have been found, remember their directory
|
||||||
IF(VC_DIR)
|
IF(VC_DIR)
|
||||||
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
|
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
|
||||||
ENDIF(VC_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(MFC_DIR
|
FIND_PATH(MFC_DIR
|
||||||
include/afxwin.h
|
include/afxwin.h
|
||||||
HINTS
|
HINTS
|
||||||
${MFC_STANDARD_DIR}
|
${MFC_STANDARD_DIR}
|
||||||
)
|
)
|
||||||
ENDIF(NOT MFC_DIR)
|
ENDIF()
|
||||||
|
|
||||||
# Display an error message if MFC are not found, MFC_FOUND is updated
|
# Display an error message if MFC are not found, MFC_FOUND is updated
|
||||||
# User will be able to update MFC_DIR to the correct directory
|
# User will be able to update MFC_DIR to the correct directory
|
||||||
|
@ -33,9 +33,9 @@ IF(MFC_FOUND)
|
||||||
# Using 32 or 64 bits libraries
|
# Using 32 or 64 bits libraries
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib/amd64")
|
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib/amd64")
|
||||||
ELSE(TARGET_X64)
|
ELSE()
|
||||||
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib")
|
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
# Add MFC libraries directory to default library path
|
# Add MFC libraries directory to default library path
|
||||||
LINK_DIRECTORIES(${MFC_LIBRARY_DIR})
|
LINK_DIRECTORIES(${MFC_LIBRARY_DIR})
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
if(DSOUND_INCLUDE_DIR)
|
if(DSOUND_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(DSOUND_FIND_QUIETLY TRUE)
|
set(DSOUND_FIND_QUIETLY TRUE)
|
||||||
endif(DSOUND_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
find_path(DSOUND_INCLUDE_DIR dsound.h
|
find_path(DSOUND_INCLUDE_DIR dsound.h
|
||||||
"$ENV{DXSDK_DIR}"
|
"$ENV{DXSDK_DIR}"
|
||||||
|
@ -29,8 +29,8 @@ find_package_handle_standard_args(DSOUND DEFAULT_MSG
|
||||||
|
|
||||||
if(DSOUND_FOUND)
|
if(DSOUND_FOUND)
|
||||||
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
|
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
|
||||||
else(DSOUND_FOUND)
|
ELSE()
|
||||||
set(DSOUND_LIBRARIES)
|
set(DSOUND_LIBRARIES)
|
||||||
endif(DSOUND_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
IF(DXSDK_DIR)
|
IF(DXSDK_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
SET(DXSDK_FIND_QUIETLY TRUE)
|
SET(DXSDK_FIND_QUIETLY TRUE)
|
||||||
ENDIF(DXSDK_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(DXSDK_DIR
|
FIND_PATH(DXSDK_DIR
|
||||||
"Include/dxsdkver.h"
|
"Include/dxsdkver.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
||||||
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
||||||
|
@ -42,9 +42,9 @@ IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
SET(EFXUTIL_FOUND "YES")
|
SET(EFXUTIL_FOUND "YES")
|
||||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
||||||
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
||||||
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -16,7 +16,7 @@ IF(WITH_STLPORT)
|
||||||
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
|
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
|
||||||
SET(EXTERNAL_TEMP_FILE "include/stlport/string")
|
SET(EXTERNAL_TEMP_FILE "include/stlport/string")
|
||||||
SET(EXTERNAL_NAME "external with STLport")
|
SET(EXTERNAL_NAME "external with STLport")
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(EXTERNAL_PATH
|
FIND_PATH(EXTERNAL_PATH
|
||||||
${EXTERNAL_TEMP_FILE}
|
${EXTERNAL_TEMP_FILE}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(FMOD_FIND_QUIETLY TRUE)
|
SET(FMOD_FIND_QUIETLY TRUE)
|
||||||
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(FMOD_INCLUDE_DIR
|
FIND_PATH(FMOD_INCLUDE_DIR
|
||||||
|
@ -25,9 +25,9 @@ FIND_PATH(FMOD_INCLUDE_DIR
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
|
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
|
||||||
ELSE(TARGET_X64)
|
ELSE()
|
||||||
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
|
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
FIND_LIBRARY(FMOD_LIBRARY
|
FIND_LIBRARY(FMOD_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
|
@ -49,9 +49,9 @@ IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
SET(FMOD_FOUND "YES")
|
SET(FMOD_FOUND "YES")
|
||||||
IF(NOT FMOD_FIND_QUIETLY)
|
IF(NOT FMOD_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARY}")
|
MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARY}")
|
||||||
ENDIF(NOT FMOD_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT FMOD_FIND_QUIETLY)
|
IF(NOT FMOD_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find FMOD!")
|
MESSAGE(STATUS "Warning: Unable to find FMOD!")
|
||||||
ENDIF(NOT FMOD_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(Freetype_FIND_QUIETLY TRUE)
|
SET(Freetype_FIND_QUIETLY TRUE)
|
||||||
ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
||||||
freetype
|
freetype
|
||||||
|
@ -24,7 +24,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIRS
|
||||||
|
|
||||||
IF(NOT FREETYPE_INCLUDE_DIRS)
|
IF(NOT FREETYPE_INCLUDE_DIRS)
|
||||||
SET(FREETYPE_INCLUDE_DIRS "")
|
SET(FREETYPE_INCLUDE_DIRS "")
|
||||||
ENDIF(NOT FREETYPE_INCLUDE_DIRS)
|
ENDIF()
|
||||||
|
|
||||||
# ft2build.h does not reside in the freetype include dir
|
# ft2build.h does not reside in the freetype include dir
|
||||||
FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
||||||
|
@ -42,7 +42,7 @@ FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
||||||
# combine both include directories into one variable
|
# combine both include directories into one variable
|
||||||
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
||||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
|
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
|
||||||
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
||||||
NAMES freetype libfreetype freetype219 freetype246
|
NAMES freetype libfreetype freetype219 freetype246
|
||||||
|
@ -89,8 +89,8 @@ IF(FREETYPE_INCLUDE_DIRS)
|
||||||
# Case where Freetype is compiled from sources (debug version is compiled by default)
|
# Case where Freetype is compiled from sources (debug version is compiled by default)
|
||||||
SET(FREETYPE_FOUND ON)
|
SET(FREETYPE_FOUND ON)
|
||||||
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_DEBUG})
|
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_DEBUG})
|
||||||
ENDIF(FREETYPE_LIBRARY_RELEASE AND FREETYPE_LIBRARY_DEBUG)
|
ENDIF()
|
||||||
ENDIF(FREETYPE_INCLUDE_DIRS)
|
ENDIF()
|
||||||
|
|
||||||
IF(FREETYPE_FOUND)
|
IF(FREETYPE_FOUND)
|
||||||
IF(WITH_STATIC_EXTERNAL AND APPLE)
|
IF(WITH_STATIC_EXTERNAL AND APPLE)
|
||||||
|
@ -98,13 +98,13 @@ IF(FREETYPE_FOUND)
|
||||||
IF(BZIP2_FOUND)
|
IF(BZIP2_FOUND)
|
||||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
|
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
|
||||||
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} ${BZIP2_LIBRARIES})
|
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} ${BZIP2_LIBRARIES})
|
||||||
ENDIF(BZIP2_FOUND)
|
ENDIF()
|
||||||
ENDIF(WITH_STATIC_EXTERNAL AND APPLE)
|
ENDIF()
|
||||||
IF(NOT Freetype_FIND_QUIETLY)
|
IF(NOT Freetype_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARIES}")
|
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARIES}")
|
||||||
ENDIF(NOT Freetype_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
ELSE()
|
||||||
IF(NOT Freetype_FIND_QUIETLY)
|
IF(NOT Freetype_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find FreeType!")
|
MESSAGE(STATUS "Warning: Unable to find FreeType!")
|
||||||
ENDIF(NOT Freetype_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(FREETYPE_FOUND)
|
ENDIF()
|
||||||
|
|
|
@ -20,7 +20,7 @@ FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c PATHS /opt/local)
|
||||||
|
|
||||||
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
SET(ICONV_FOUND TRUE)
|
SET(ICONV_FOUND TRUE)
|
||||||
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
ENDIF()
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
@ -29,7 +29,7 @@ IF(ICONV_FOUND)
|
||||||
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
||||||
if(ICONV_HAVE_WERROR)
|
if(ICONV_HAVE_WERROR)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
endif(ICONV_HAVE_WERROR)
|
ENDIF()
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
int main(){
|
int main(){
|
||||||
|
@ -43,19 +43,19 @@ IF(ICONV_FOUND)
|
||||||
}
|
}
|
||||||
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
||||||
ENDIF(ICONV_FOUND)
|
ENDIF()
|
||||||
set(CMAKE_REQUIRED_INCLUDES)
|
set(CMAKE_REQUIRED_INCLUDES)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
IF(ICONV_FOUND)
|
IF(ICONV_FOUND)
|
||||||
IF(NOT ICONV_FIND_QUIETLY)
|
IF(NOT ICONV_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
||||||
ENDIF(NOT ICONV_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(ICONV_FOUND)
|
ELSE()
|
||||||
IF(Iconv_FIND_REQUIRED)
|
IF(Iconv_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
||||||
ENDIF(Iconv_FIND_REQUIRED)
|
ENDIF()
|
||||||
ENDIF(ICONV_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
ICONV_INCLUDE_DIR
|
ICONV_INCLUDE_DIR
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(JPEG_FIND_QUIETLY TRUE)
|
SET(JPEG_FIND_QUIETLY TRUE)
|
||||||
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(JPEG_INCLUDE_DIR
|
FIND_PATH(JPEG_INCLUDE_DIR
|
||||||
|
@ -42,9 +42,9 @@ IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
SET(JPEG_FOUND "YES")
|
SET(JPEG_FOUND "YES")
|
||||||
IF(NOT JPEG_FIND_QUIETLY)
|
IF(NOT JPEG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
|
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
|
||||||
ENDIF(NOT JPEG_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT JPEG_FIND_QUIETLY)
|
IF(NOT JPEG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
|
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
|
||||||
ENDIF(NOT JPEG_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
IF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
IF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LIBOVR_FIND_QUIETLY TRUE)
|
SET(LIBOVR_FIND_QUIETLY TRUE)
|
||||||
ENDIF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(LIBOVR_INCLUDE_DIR
|
FIND_PATH(LIBOVR_INCLUDE_DIR
|
||||||
OVR.h
|
NAMES
|
||||||
|
OVR.h OVR_CAPI.h
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{LIBOVR_DIR}/Include
|
$ENV{LIBOVR_DIR}/Include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
|
@ -24,18 +25,18 @@ FIND_PATH(LIBOVR_INCLUDE_DIR
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/x86_64")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/x86_64")
|
||||||
ELSE(TARGET_X64)
|
ELSE()
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/i386")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/i386")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
ELSEIF(APPLE)
|
ELSEIF(APPLE)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/MacOS/Release")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/MacOS/Release")
|
||||||
ELSEIF(WIN32)
|
ELSEIF(WIN32)
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/x64")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/x64")
|
||||||
ELSE(TARGET_X64)
|
ELSE()
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Win32")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Win32")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
ENDIF(UNIX)
|
ENDIF()
|
||||||
|
|
||||||
FIND_LIBRARY(LIBOVR_LIBRARY
|
FIND_LIBRARY(LIBOVR_LIBRARY
|
||||||
NAMES ovr libovr
|
NAMES ovr libovr
|
||||||
|
@ -55,17 +56,17 @@ FIND_LIBRARY(LIBOVR_LIBRARY
|
||||||
IF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
IF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBOVR_FIND_QUIETLY)
|
IF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found LibOVR: ${LIBOVR_LIBRARY}")
|
MESSAGE(STATUS "Found LibOVR: ${LIBOVR_LIBRARY}")
|
||||||
ENDIF(NOT LIBOVR_FIND_QUIETLY)
|
ENDIF()
|
||||||
SET(LIBOVR_FOUND "YES")
|
SET(LIBOVR_FOUND "YES")
|
||||||
SET(LIBOVR_DEFINITIONS "-DHAVE_LIBOVR")
|
SET(LIBOVR_DEFINITIONS "-DHAVE_LIBOVR")
|
||||||
SET(NL_STEREO_AVAILABLE ON)
|
SET(NL_STEREO_AVAILABLE ON)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY} X11 Xinerama udev pthread)
|
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY} X11 Xinerama udev pthread)
|
||||||
ELSE(UNIX)
|
ELSE()
|
||||||
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY})
|
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY})
|
||||||
ENDIF(UNIX)
|
ENDIF()
|
||||||
ELSE(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT LIBOVR_FIND_QUIETLY)
|
IF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find LibOVR!")
|
MESSAGE(STATUS "Warning: Unable to find LibOVR!")
|
||||||
ENDIF(NOT LIBOVR_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
IF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LIBVR_FIND_QUIETLY TRUE)
|
SET(LIBVR_FIND_QUIETLY TRUE)
|
||||||
ENDIF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(LIBVR_INCLUDE_DIR hmd.h
|
FIND_PATH(LIBVR_INCLUDE_DIR hmd.h
|
||||||
PATH_SUFFIXES include/LibVR
|
PATH_SUFFIXES include/LibVR
|
||||||
|
@ -22,12 +22,12 @@ FIND_LIBRARY(LIBVR_LIBRARY
|
||||||
IF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
IF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBVR_FIND_QUIETLY)
|
IF(NOT LIBVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found LibVR: ${LIBVR_LIBRARY}")
|
MESSAGE(STATUS "Found LibVR: ${LIBVR_LIBRARY}")
|
||||||
ENDIF(NOT LIBVR_FIND_QUIETLY)
|
ENDIF()
|
||||||
SET(LIBVR_FOUND "YES")
|
SET(LIBVR_FOUND "YES")
|
||||||
SET(LIBVR_DEFINITIONS "-DHAVE_LIBVR")
|
SET(LIBVR_DEFINITIONS "-DHAVE_LIBVR")
|
||||||
SET(NL_STEREO_AVAILABLE ON)
|
SET(NL_STEREO_AVAILABLE ON)
|
||||||
ELSE(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT LIBVR_FIND_QUIETLY)
|
IF(NOT LIBVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find LibVR!")
|
MESSAGE(STATUS "Warning: Unable to find LibVR!")
|
||||||
ENDIF(NOT LIBVR_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -124,7 +124,7 @@ IF(WITH_LUA51)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d)
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d)
|
||||||
|
@ -134,7 +134,7 @@ IF(WITH_LUA50)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d)
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d)
|
||||||
|
@ -143,7 +143,7 @@ ENDIF()
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd)
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
# generic libraries names
|
# generic libraries names
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind)
|
||||||
|
@ -194,8 +194,8 @@ IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||||
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
||||||
SET(LUABIND_FOUND TRUE)
|
SET(LUABIND_FOUND TRUE)
|
||||||
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
||||||
ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
ENDIF()
|
||||||
ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
IF(LUABIND_FOUND)
|
IF(LUABIND_FOUND)
|
||||||
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||||
|
@ -203,17 +203,17 @@ IF(LUABIND_FOUND)
|
||||||
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
||||||
IF(LUABIND_VERSION_FILE)
|
IF(LUABIND_VERSION_FILE)
|
||||||
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
||||||
ENDIF(LUABIND_VERSION_FILE)
|
ENDIF()
|
||||||
|
|
||||||
FIND_CORRECT_LUA_VERSION()
|
FIND_CORRECT_LUA_VERSION()
|
||||||
|
|
||||||
IF(NOT Luabind_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
||||||
ENDIF(NOT Luabind_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(LUABIND_FOUND)
|
ELSE()
|
||||||
IF(NOT Luabind_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||||
ENDIF(NOT Luabind_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(LUABIND_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(OGG_FIND_QUIETLY TRUE)
|
SET(OGG_FIND_QUIETLY TRUE)
|
||||||
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(OGG_INCLUDE_DIR
|
FIND_PATH(OGG_INCLUDE_DIR
|
||||||
|
@ -41,9 +41,9 @@ IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
SET(OGG_FOUND "YES")
|
SET(OGG_FOUND "YES")
|
||||||
IF(NOT OGG_FIND_QUIETLY)
|
IF(NOT OGG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
|
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
|
||||||
ENDIF(NOT OGG_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT OGG_FIND_QUIETLY)
|
IF(NOT OGG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Ogg!")
|
MESSAGE(STATUS "Warning: Unable to find Ogg!")
|
||||||
ENDIF(NOT OGG_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -43,7 +43,7 @@ IF(OPENGLES_GLES_LIBRARY)
|
||||||
IF(OPENGLES_EGL_LIBRARY)
|
IF(OPENGLES_EGL_LIBRARY)
|
||||||
SET(OPENGLES_EGL_FOUND "YES")
|
SET(OPENGLES_EGL_FOUND "YES")
|
||||||
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
|
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
|
||||||
ELSE(OPENGLES_EGL_LIBRARY)
|
ELSE()
|
||||||
SET(OPENGLES_EGL_FOUND "NO")
|
SET(OPENGLES_EGL_FOUND "NO")
|
||||||
ENDIF(OPENGLES_EGL_LIBRARY)
|
ENDIF()
|
||||||
ENDIF(OPENGLES_GLES_LIBRARY)
|
ENDIF()
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
IF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
IF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(STLPORT_FIND_QUIETLY TRUE)
|
SET(STLPORT_FIND_QUIETLY TRUE)
|
||||||
ENDIF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(STLPORT_INCLUDE_DIR
|
FIND_PATH(STLPORT_INCLUDE_DIR
|
||||||
iostream
|
iostream
|
||||||
|
@ -74,18 +74,18 @@ IF(STLPORT_INCLUDE_DIR)
|
||||||
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
||||||
IF(STLPORT_LIBRARY_DEBUG)
|
IF(STLPORT_LIBRARY_DEBUG)
|
||||||
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
||||||
ENDIF(STLPORT_LIBRARY_DEBUG)
|
ENDIF()
|
||||||
ENDIF(STLPORT_LIBRARY_RELEASE)
|
ENDIF()
|
||||||
ENDIF(STLPORT_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
IF(STLPORT_FOUND)
|
IF(STLPORT_FOUND)
|
||||||
IF(NOT STLPORT_FIND_QUIETLY)
|
IF(NOT STLPORT_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found STLport: ${STLPORT_LIBRARIES}")
|
MESSAGE(STATUS "Found STLport: ${STLPORT_LIBRARIES}")
|
||||||
ENDIF(NOT STLPORT_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(STLPORT_FOUND)
|
ELSE()
|
||||||
IF(NOT STLPORT_FIND_QUIETLY)
|
IF(NOT STLPORT_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find STLport!")
|
MESSAGE(STATUS "Warning: Unable to find STLport!")
|
||||||
ENDIF(NOT STLPORT_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(STLPORT_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
MARK_AS_ADVANCED(STLPORT_LIBRARY_RELEASE STLPORT_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(STLPORT_LIBRARY_RELEASE STLPORT_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(SQUISH_FIND_QUIETLY TRUE)
|
SET(SQUISH_FIND_QUIETLY TRUE)
|
||||||
ENDIF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
FIND_PATH(SQUISH_INCLUDE_DIR
|
FIND_PATH(SQUISH_INCLUDE_DIR
|
||||||
squish.h
|
squish.h
|
||||||
|
@ -58,26 +58,26 @@ IF(SQUISH_INCLUDE_DIR)
|
||||||
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
|
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
|
||||||
IF(SQUISH_LIBRARY_DEBUG)
|
IF(SQUISH_LIBRARY_DEBUG)
|
||||||
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
|
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
|
||||||
ELSE(SQUISH_LIBRARY_DEBUG)
|
ELSE()
|
||||||
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}")
|
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}")
|
||||||
MESSAGE("Debug Squish NOT found, using the release version!")
|
MESSAGE("Debug Squish NOT found, using the release version!")
|
||||||
ENDIF(SQUISH_LIBRARY_DEBUG)
|
ENDIF()
|
||||||
ENDIF(SQUISH_LIBRARY_RELEASE)
|
ENDIF()
|
||||||
ENDIF(SQUISH_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
IF(SQUISH_FOUND)
|
IF(SQUISH_FOUND)
|
||||||
IF(NOT SQUISH_FIND_QUIETLY)
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
|
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
|
||||||
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
ENDIF()
|
||||||
FILE(STRINGS ${SQUISH_INCLUDE_DIR}/squish.h METRIC REGEX "metric = 0")
|
FILE(STRINGS ${SQUISH_INCLUDE_DIR}/squish.h METRIC REGEX "metric = 0")
|
||||||
IF(METRIC)
|
IF(METRIC)
|
||||||
SET(SQUISH_COMPRESS_HAS_METRIC ON)
|
SET(SQUISH_COMPRESS_HAS_METRIC ON)
|
||||||
SET(SQUISH_DEFINITIONS -DSQUISH_COMPRESS_HAS_METRIC)
|
SET(SQUISH_DEFINITIONS -DSQUISH_COMPRESS_HAS_METRIC)
|
||||||
ENDIF(METRIC)
|
ENDIF()
|
||||||
ELSE(SQUISH_FOUND)
|
ELSE()
|
||||||
IF(NOT SQUISH_FIND_QUIETLY)
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
||||||
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(SQUISH_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(VORBIS_FIND_QUIETLY TRUE)
|
SET(VORBIS_FIND_QUIETLY TRUE)
|
||||||
ENDIF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(VORBIS_INCLUDE_DIR
|
FIND_PATH(VORBIS_INCLUDE_DIR
|
||||||
|
@ -57,9 +57,9 @@ IF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
|
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
|
||||||
IF(NOT VORBIS_FIND_QUIETLY)
|
IF(NOT VORBIS_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
|
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
|
||||||
ENDIF(NOT VORBIS_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT VORBIS_FIND_QUIETLY)
|
IF(NOT VORBIS_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
|
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
|
||||||
ENDIF(NOT VORBIS_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
|
@ -366,19 +366,34 @@ FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(WINSDK_UCRT_DIR)
|
IF(WINSDK_UCRT_DIR)
|
||||||
# directory where UCRT headers are found
|
# determine exact UCRT version
|
||||||
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
SET(WINSDK_UCRT_INCLUDE_ROOT_DIR ${WINSDK_UCRT_DIR}/Include)
|
||||||
HINTS
|
SET(WINSDK_UCRT_LIB_ROOT_DIR ${WINSDK_UCRT_DIR}/Lib)
|
||||||
${WINSDK_UCRT_DIR}/Include/10.0.10056.0/ucrt
|
|
||||||
${WINSDK_UCRT_DIR}/Include/10.0.10150.0/ucrt
|
|
||||||
)
|
|
||||||
|
|
||||||
# directory where UCRT libraries are found
|
FILE(GLOB UCRT_SUBDIRS RELATIVE ${WINSDK_UCRT_INCLUDE_ROOT_DIR} ${WINSDK_UCRT_INCLUDE_ROOT_DIR}/*)
|
||||||
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
SET(UCRT_VERSION)
|
||||||
HINTS
|
|
||||||
${WINSDK_UCRT_DIR}/Lib/10.0.10056.0/ucrt/${WINSDK8_SUFFIX}
|
FOREACH(UCRT_SUBDIR ${UCRT_SUBDIRS})
|
||||||
${WINSDK_UCRT_DIR}/Lib/10.0.10150.0/ucrt/${WINSDK8_SUFFIX}
|
IF(NOT UCRT_VERSION OR UCRT_SUBDIR VERSION_GREATER UCRT_VERSION)
|
||||||
)
|
SET(UCRT_VERSION ${UCRT_SUBDIR})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
IF(UCRT_VERSION)
|
||||||
|
MESSAGE(STATUS "Using Windows UCRT ${UCRT_VERSION}")
|
||||||
|
|
||||||
|
# directory where UCRT headers are found
|
||||||
|
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
||||||
|
HINTS
|
||||||
|
${WINSDK_UCRT_INCLUDE_ROOT_DIR}/${UCRT_VERSION}/ucrt
|
||||||
|
)
|
||||||
|
|
||||||
|
# directory where UCRT libraries are found
|
||||||
|
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
||||||
|
HINTS
|
||||||
|
${WINSDK_UCRT_LIB_ROOT_DIR}/${UCRT_VERSION}/ucrt/${WINSDK8_SUFFIX}
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# signtool is used to sign executables
|
# signtool is used to sign executables
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(XF86VidMode_FIND_QUIETLY TRUE)
|
SET(XF86VidMode_FIND_QUIETLY TRUE)
|
||||||
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(XF86VidMode_INCLUDE_DIR
|
FIND_PATH(XF86VidMode_INCLUDE_DIR
|
||||||
|
@ -37,10 +37,10 @@ IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
SET(XF86VidMode_DEFINITIONS -DXF86VIDMODE)
|
SET(XF86VidMode_DEFINITIONS -DXF86VIDMODE)
|
||||||
IF(NOT XF86VidMode_FIND_QUIETLY)
|
IF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
|
MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
|
||||||
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
|
ENDIF()
|
||||||
ELSE(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
ELSE()
|
||||||
IF(NOT XF86VidMode_FIND_QUIETLY)
|
IF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
|
MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
|
||||||
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
@ -33,17 +33,29 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
SET(PCH_ARCHS)
|
SET(PCH_ARCHS)
|
||||||
|
|
||||||
SET(_FLAGS)
|
SET(_FLAGS)
|
||||||
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
|
|
||||||
|
|
||||||
|
# C++ flags
|
||||||
|
SET(_FLAG ${CMAKE_CXX_FLAGS})
|
||||||
|
SEPARATE_ARGUMENTS(_FLAG)
|
||||||
|
|
||||||
|
LIST(APPEND _FLAGS ${_FLAG})
|
||||||
|
|
||||||
|
# C++ config flags
|
||||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
|
||||||
LIST(APPEND _FLAGS " ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}}")
|
|
||||||
|
SET(_FLAG ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}})
|
||||||
|
SEPARATE_ARGUMENTS(_FLAG)
|
||||||
|
|
||||||
|
LIST(APPEND _FLAGS ${_FLAG})
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
|
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
|
||||||
|
|
||||||
SET(_USE_PIC OFF)
|
SET(_USE_PIC OFF)
|
||||||
|
|
||||||
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
|
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
|
||||||
LIST(APPEND _FLAGS " ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
|
SET(_FLAG ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
|
||||||
|
SEPARATE_ARGUMENTS(_FLAG)
|
||||||
|
LIST(APPEND _FLAGS ${_FLAG})
|
||||||
ELSE()
|
ELSE()
|
||||||
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
|
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
|
||||||
IF(_pic)
|
IF(_pic)
|
||||||
|
@ -53,67 +65,71 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
|
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND _FLAGS " -I\"${item}\"")
|
LIST(APPEND _FLAGS -I"${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
|
# NOTE: As cmake files (eg FindQT4) may now use generator expressions around their defines that evaluate
|
||||||
|
# to an empty string, wrap all "items" in an expression that outputs a -D IFF the generated
|
||||||
|
# expression is not empty.
|
||||||
|
|
||||||
# Required for CMake 2.6
|
# Required for CMake 2.6
|
||||||
SET(GLOBAL_DEFINITIONS)
|
SET(GLOBAL_DEFINITIONS)
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
|
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
|
||||||
IF(oldProps)
|
IF(oldProps)
|
||||||
LIST(APPEND _FLAGS " ${oldProps}")
|
LIST(APPEND _FLAGS ${oldProps})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
|
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
|
||||||
IF(oldPropsBuild)
|
IF(oldPropsBuild)
|
||||||
LIST(APPEND _FLAGS " ${oldPropsBuild}")
|
LIST(APPEND _FLAGS ${oldPropsBuild})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
|
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
|
||||||
IF(DIRINC)
|
IF(DIRINC)
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND _FLAGS " -I\"${item}\"")
|
LIST(APPEND _FLAGS -I"${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
|
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -126,7 +142,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
IF(_DIRS)
|
IF(_DIRS)
|
||||||
FOREACH(item ${_DIRS})
|
FOREACH(item ${_DIRS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -I\"${item}\"")
|
LIST(APPEND GLOBAL_DEFINITIONS -I"${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -135,10 +151,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
IF(_DEFINITIONS)
|
IF(_DEFINITIONS)
|
||||||
FOREACH(item ${_DEFINITIONS})
|
FOREACH(item ${_DEFINITIONS})
|
||||||
# don't use dynamic expressions
|
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
IF(NOT item MATCHES "\\$<")
|
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
|
||||||
ENDIF()
|
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -149,7 +162,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
|
IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
|
||||||
# Hack to define missing QT_NO_DEBUG with Qt 5.2
|
# Hack to define missing QT_NO_DEBUG with Qt 5.2
|
||||||
IF(_UPPER_BUILD STREQUAL "RELEASE")
|
IF(_UPPER_BUILD STREQUAL "RELEASE")
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG")
|
LIST(APPEND GLOBAL_DEFINITIONS "-DQT_NO_DEBUG")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
|
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
|
||||||
|
@ -158,28 +171,26 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(_USE_PIC)
|
IF(_USE_PIC)
|
||||||
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
|
LIST(APPEND _FLAGS ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
LIST(APPEND _FLAGS " ${GLOBAL_DEFINITIONS}")
|
|
||||||
|
|
||||||
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
||||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
||||||
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
||||||
LIST(APPEND _FLAGS " ${_directory_flags}")
|
LIST(APPEND _FLAGS ${_directory_flags})
|
||||||
LIST(APPEND _FLAGS " ${_directory_definitions}")
|
LIST(APPEND _FLAGS ${_directory_definitions})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Format definitions
|
# Format definitions
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# Fix path with space
|
# Fix path with space
|
||||||
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
|
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
|
||||||
ELSE()
|
|
||||||
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
|
|
||||||
SEPARATE_ARGUMENTS(_FLAGS)
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# Already in list form and items may contain non-leading spaces that should not be split on
|
||||||
|
LIST(INSERT _FLAGS 0 "${GLOBAL_DEFINITIONS}")
|
||||||
|
|
||||||
IF(CLANG)
|
IF(CLANG)
|
||||||
# Determining all architectures and get common flags
|
# Determining all architectures and get common flags
|
||||||
SET(_ARCH_NEXT)
|
SET(_ARCH_NEXT)
|
||||||
|
@ -236,6 +247,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(PCH_FLAGS)
|
IF(PCH_FLAGS)
|
||||||
|
LIST(REMOVE_ITEM PCH_FLAGS "")
|
||||||
LIST(REMOVE_DUPLICATES PCH_FLAGS)
|
LIST(REMOVE_DUPLICATES PCH_FLAGS)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
@ -247,16 +259,16 @@ MACRO(GET_PDB_FILENAME _out_filename _target)
|
||||||
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
|
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
|
||||||
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
|
||||||
ELSE(${_targetType} STREQUAL EXECUTABLE)
|
ELSE()
|
||||||
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||||
ENDIF(${_targetType} STREQUAL EXECUTABLE)
|
ENDIF()
|
||||||
|
|
||||||
# determine target postfix
|
# determine target postfix
|
||||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}_POSTFIX" _postfix_var_name)
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}_POSTFIX" _postfix_var_name)
|
||||||
GET_TARGET_PROPERTY(_targetPostfix ${_target} ${_postfix_var_name})
|
GET_TARGET_PROPERTY(_targetPostfix ${_target} ${_postfix_var_name})
|
||||||
IF(${_targetPostfix} MATCHES NOTFOUND)
|
IF(${_targetPostfix} MATCHES NOTFOUND)
|
||||||
SET(_targetPostfix "")
|
SET(_targetPostfix "")
|
||||||
ENDIF(${_targetPostfix} MATCHES NOTFOUND)
|
ENDIF()
|
||||||
|
|
||||||
SET(${_out_filename} "${_targetOutput}/${_target}${_targetPostfix}.pdb")
|
SET(${_out_filename} "${_targetOutput}/${_target}${_targetPostfix}.pdb")
|
||||||
ENDMACRO(GET_PDB_FILENAME)
|
ENDMACRO(GET_PDB_FILENAME)
|
||||||
|
|
|
@ -177,26 +177,26 @@ ENDIF()
|
||||||
# set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv7,armv7s and appears to be XCode's standard.
|
# set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv7,armv7s and appears to be XCode's standard.
|
||||||
# The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only
|
# The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only
|
||||||
IF(ARCHS)
|
IF(ARCHS)
|
||||||
SET(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE string "Build architecture for iOS")
|
SET(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE STRING "Build architecture for iOS")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Set the find root to the iOS developer roots and to user defined paths
|
# Set the find root to the iOS developer roots and to user defined paths
|
||||||
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} $ENV{EXTERNAL_IOS_PATH} CACHE string "iOS find search path root")
|
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} ${CMAKE_SOURCE_DIR}/external $ENV{EXTERNAL_IOS_PATH} CACHE STRING "iOS find search path root")
|
||||||
|
|
||||||
# default to searching for frameworks first
|
# default to searching for frameworks first
|
||||||
set (CMAKE_FIND_FRAMEWORK FIRST)
|
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
|
|
||||||
# set up the default search directories for frameworks
|
# set up the default search directories for frameworks
|
||||||
set (CMAKE_SYSTEM_FRAMEWORK_PATH
|
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
||||||
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
||||||
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
||||||
)
|
)
|
||||||
|
|
||||||
# only search the iOS sdks, not the remainder of the host filesystem
|
# only search the iOS sdks, not the remainder of the host filesystem
|
||||||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
# determinate location for bin utils based on CMAKE_FIND_ROOT_PATH
|
# determinate location for bin utils based on CMAKE_FIND_ROOT_PATH
|
||||||
include(CMakeFindBinUtils)
|
include(CMakeFindBinUtils)
|
||||||
|
|
|
@ -4,7 +4,7 @@ SET(CMAKE_TRY_COMPILE_CONFIGURATION "Release")
|
||||||
# Force Release configuration by default
|
# Force Release configuration by default
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
ENDIF()
|
||||||
|
|
||||||
# Declare CMAKE_CONFIGURATION_TYPES before PROJECT
|
# Declare CMAKE_CONFIGURATION_TYPES before PROJECT
|
||||||
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||||
|
@ -17,7 +17,7 @@ MACRO(NL_GEN_PC name)
|
||||||
IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
||||||
CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}")
|
CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}")
|
||||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION ${NL_LIB_PREFIX}/pkgconfig)
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION ${NL_LIB_PREFIX}/pkgconfig)
|
||||||
ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
ENDIF()
|
||||||
ENDMACRO(NL_GEN_PC)
|
ENDMACRO(NL_GEN_PC)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -26,9 +26,9 @@ ENDMACRO(NL_GEN_PC)
|
||||||
MACRO(NL_TARGET_LIB name)
|
MACRO(NL_TARGET_LIB name)
|
||||||
IF(WITH_STATIC)
|
IF(WITH_STATIC)
|
||||||
ADD_LIBRARY(${name} STATIC ${ARGN})
|
ADD_LIBRARY(${name} STATIC ${ARGN})
|
||||||
ELSE(WITH_STATIC)
|
ELSE()
|
||||||
ADD_LIBRARY(${name} SHARED ${ARGN})
|
ADD_LIBRARY(${name} SHARED ${ARGN})
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF()
|
||||||
ENDMACRO(NL_TARGET_LIB)
|
ENDMACRO(NL_TARGET_LIB)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -37,9 +37,9 @@ ENDMACRO(NL_TARGET_LIB)
|
||||||
MACRO(NL_TARGET_DRIVER name)
|
MACRO(NL_TARGET_DRIVER name)
|
||||||
IF(WITH_STATIC_DRIVERS)
|
IF(WITH_STATIC_DRIVERS)
|
||||||
ADD_LIBRARY(${name} STATIC ${ARGN})
|
ADD_LIBRARY(${name} STATIC ${ARGN})
|
||||||
ELSE(WITH_STATIC_DRIVERS)
|
ELSE()
|
||||||
ADD_LIBRARY(${name} MODULE ${ARGN})
|
ADD_LIBRARY(${name} MODULE ${ARGN})
|
||||||
ENDIF(WITH_STATIC_DRIVERS)
|
ENDIF()
|
||||||
ENDMACRO(NL_TARGET_DRIVER)
|
ENDMACRO(NL_TARGET_DRIVER)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -64,16 +64,35 @@ MACRO(NL_DEFAULT_PROPS name label)
|
||||||
VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR})
|
VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR})
|
||||||
IF(NL_LIB_PREFIX)
|
IF(NL_LIB_PREFIX)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
||||||
ENDIF(NL_LIB_PREFIX)
|
ENDIF()
|
||||||
ENDIF(${type} STREQUAL SHARED_LIBRARY)
|
ENDIF()
|
||||||
|
|
||||||
IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
||||||
|
# check if using a GUI
|
||||||
|
GET_TARGET_PROPERTY(_VALUE ${name} WIN32_EXECUTABLE)
|
||||||
|
|
||||||
|
IF(TARGET_X64)
|
||||||
|
# Target Windows XP 64 bits
|
||||||
|
SET(_SUBSYSTEM_VERSION "5.02")
|
||||||
|
ELSE()
|
||||||
|
# Target Windows XP
|
||||||
|
SET(_SUBSYSTEM_VERSION "5.01")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(_VALUE)
|
||||||
|
# GUI
|
||||||
|
SET(_SUBSYSTEM "WINDOWS")
|
||||||
|
ELSE()
|
||||||
|
# Console
|
||||||
|
SET(_SUBSYSTEM "CONSOLE")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||||
VERSION ${NL_VERSION}
|
VERSION ${NL_VERSION}
|
||||||
SOVERSION ${NL_VERSION_MAJOR}
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
COMPILE_FLAGS "/GA"
|
COMPILE_FLAGS "/GA"
|
||||||
LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}")
|
LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR} /SUBSYSTEM:${_SUBSYSTEM},${_SUBSYSTEM_VERSION}")
|
||||||
ENDIF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
ENDIF()
|
||||||
ENDMACRO(NL_DEFAULT_PROPS)
|
ENDMACRO(NL_DEFAULT_PROPS)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -83,7 +102,7 @@ ENDMACRO(NL_DEFAULT_PROPS)
|
||||||
MACRO(NL_ADD_LIB_SUFFIX name)
|
MACRO(NL_ADD_LIB_SUFFIX name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
ENDMACRO(NL_ADD_LIB_SUFFIX)
|
ENDMACRO(NL_ADD_LIB_SUFFIX)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -95,10 +114,10 @@ MACRO(NL_ADD_RUNTIME_FLAGS name)
|
||||||
# SET_TARGET_PROPERTIES(${name} PROPERTIES
|
# SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||||
# LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
# LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
# LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
|
# LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
TARGET_LINK_LIBRARIES(${name} ${STLPORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
TARGET_LINK_LIBRARIES(${name} ${STLPORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
||||||
|
|
||||||
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||||
|
@ -106,25 +125,25 @@ MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DIRECT3D)
|
IF(WITH_DRIVER_DIRECT3D)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
||||||
ENDIF(WITH_DRIVER_DIRECT3D)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGL)
|
IF(WITH_DRIVER_OPENGL)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
ENDIF(WITH_DRIVER_OPENGL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGLES)
|
IF(WITH_DRIVER_OPENGLES)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles_win)
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
ENDIF(WITH_DRIVER_OPENGLES)
|
ENDIF()
|
||||||
ENDIF(WITH_STATIC_DRIVERS)
|
ENDIF()
|
||||||
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
||||||
|
|
||||||
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||||
|
@ -132,30 +151,30 @@ MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DSOUND)
|
IF(WITH_DRIVER_DSOUND)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound_win)
|
||||||
ENDIF(WITH_DRIVER_DSOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_XAUDIO2)
|
IF(WITH_DRIVER_XAUDIO2)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2_win)
|
||||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_openal_win)
|
||||||
ENDIF(WITH_DRIVER_OPENAL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod_win)
|
||||||
ENDIF(WITH_DRIVER_FMOD)
|
ENDIF()
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
||||||
ENDIF(WITH_DRIVER_OPENAL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
||||||
ENDIF(WITH_DRIVER_FMOD)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
ENDIF(WITH_STATIC_DRIVERS)
|
ENDIF()
|
||||||
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
|
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -173,14 +192,14 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.:
|
||||||
cd cmake
|
cd cmake
|
||||||
cmake ..
|
cmake ..
|
||||||
")
|
")
|
||||||
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
ENDIF()
|
||||||
|
|
||||||
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
||||||
|
|
||||||
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
IF(WITH_QT)
|
IF(WITH_QT)
|
||||||
OPTION(WITH_STUDIO "Build Core Studio" OFF )
|
OPTION(WITH_STUDIO "Build Core Studio" OFF )
|
||||||
ENDIF(WITH_QT)
|
ENDIF()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Features
|
# Features
|
||||||
|
@ -194,30 +213,30 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
# Default to static building on Windows.
|
# Default to static building on Windows.
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(WITH_STATIC "With static libraries." ON )
|
OPTION(WITH_STATIC "With static libraries." ON )
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
OPTION(WITH_STATIC "With static libraries." OFF)
|
OPTION(WITH_STATIC "With static libraries." OFF)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
IF (WITH_STATIC)
|
IF (WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" ON )
|
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" ON )
|
||||||
ELSE(WITH_STATIC)
|
ELSE()
|
||||||
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF)
|
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF)
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF()
|
||||||
IF (WITH_STATIC)
|
IF (WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_CURL "With static curl" ON )
|
OPTION(WITH_STATIC_CURL "With static curl" ON )
|
||||||
ELSE(WITH_STATIC)
|
ELSE()
|
||||||
OPTION(WITH_STATIC_CURL "With static curl" OFF)
|
OPTION(WITH_STATIC_CURL "With static curl" OFF)
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF()
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON )
|
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON )
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF)
|
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF)
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(WITH_EXTERNAL "With provided external." ON )
|
OPTION(WITH_EXTERNAL "With provided external." ON )
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
OPTION(WITH_EXTERNAL "With provided external." OFF)
|
OPTION(WITH_EXTERNAL "With provided external." OFF)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
||||||
IF(UNIX AND NOT APPLE)
|
IF(UNIX AND NOT APPLE)
|
||||||
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
|
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
|
||||||
|
@ -237,20 +256,21 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
IF(WIN32 AND MFC_FOUND)
|
IF(WIN32 AND MFC_FOUND)
|
||||||
OPTION(WITH_MFC "With MFC Support" ON )
|
OPTION(WITH_MFC "With MFC Support" ON )
|
||||||
ELSE(WIN32 AND MFC_FOUND)
|
ELSE()
|
||||||
OPTION(WITH_MFC "With MFC Support" OFF)
|
OPTION(WITH_MFC "With MFC Support" OFF)
|
||||||
ENDIF(WIN32 AND MFC_FOUND)
|
ENDIF()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Optional support
|
# Optional support
|
||||||
###
|
###
|
||||||
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
||||||
|
|
||||||
IF(WIN32)
|
# only enable STLport for VC++ 2010 and less
|
||||||
|
IF(WIN32 AND MSVC_VERSION LESS 1600)
|
||||||
OPTION(WITH_STLPORT "With STLport support." ON )
|
OPTION(WITH_STLPORT "With STLport support." ON )
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
OPTION(WITH_STLPORT "With STLport support." OFF)
|
OPTION(WITH_STLPORT "With STLport support." OFF)
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
|
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
|
||||||
|
|
||||||
|
@ -303,7 +323,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
IF(NOT MSVC)
|
IF(NOT MSVC)
|
||||||
OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF)
|
OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF)
|
||||||
ENDIF(NOT MSVC)
|
ENDIF()
|
||||||
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
||||||
|
@ -321,7 +341,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_RYZOM_CLIENT "Build Ryzom Core Client" ON )
|
OPTION(WITH_RYZOM_CLIENT "Build Ryzom Core Client" ON )
|
||||||
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
|
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
|
||||||
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
|
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
|
||||||
OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON )
|
OPTION(WITH_RYZOM_INSTALLER "Build Ryzom Installer" OFF)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Optional support
|
# Optional support
|
||||||
|
@ -333,6 +353,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
|
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
|
||||||
OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF)
|
OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF)
|
||||||
OPTION(WITH_RYZOM_STEAM "Enable Steam features" OFF)
|
OPTION(WITH_RYZOM_STEAM "Enable Steam features" OFF)
|
||||||
|
OPTION(WITH_RYZOM_SANDBOX "Enable Sandbox under OS X" OFF)
|
||||||
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
|
||||||
|
@ -359,15 +380,15 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
SET(NL_BUILD_MODE "NL_DEBUG")
|
SET(NL_BUILD_MODE "NL_DEBUG")
|
||||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
|
ELSE()
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Release")
|
ELSE()
|
||||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||||
# enforce release mode if it's neither Debug nor Release
|
# enforce release mode if it's neither Debug nor Release
|
||||||
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
||||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Release")
|
ENDIF()
|
||||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
ENDIF()
|
||||||
|
|
||||||
SET(HOST_CPU ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
SET(HOST_CPU ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
|
||||||
|
@ -375,35 +396,35 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(HOST_CPU "x86_64")
|
SET(HOST_CPU "x86_64")
|
||||||
ELSEIF(HOST_CPU MATCHES "i.86")
|
ELSEIF(HOST_CPU MATCHES "i.86")
|
||||||
SET(HOST_CPU "x86")
|
SET(HOST_CPU "x86")
|
||||||
ENDIF(HOST_CPU MATCHES "(amd|AMD)64")
|
ENDIF()
|
||||||
|
|
||||||
# Determine target CPU
|
# Determine target CPU
|
||||||
|
|
||||||
# If not specified, use the same CPU as host
|
# If not specified, use the same CPU as host
|
||||||
IF(NOT TARGET_CPU)
|
IF(NOT TARGET_CPU)
|
||||||
SET(TARGET_CPU ${CMAKE_SYSTEM_PROCESSOR})
|
SET(TARGET_CPU ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
ENDIF(NOT TARGET_CPU)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_CPU MATCHES "(amd|AMD)64")
|
IF(TARGET_CPU MATCHES "(amd|AMD)64")
|
||||||
SET(TARGET_CPU "x86_64")
|
SET(TARGET_CPU "x86_64")
|
||||||
ELSEIF(TARGET_CPU MATCHES "i.86")
|
ELSEIF(TARGET_CPU MATCHES "i.86")
|
||||||
SET(TARGET_CPU "x86")
|
SET(TARGET_CPU "x86")
|
||||||
ENDIF(TARGET_CPU MATCHES "(amd|AMD)64")
|
ENDIF()
|
||||||
|
|
||||||
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
SET(CLANG ON)
|
SET(CLANG ON)
|
||||||
MESSAGE(STATUS "Using Clang compiler")
|
MESSAGE(STATUS "Using Clang compiler")
|
||||||
ENDIF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Xcode")
|
IF(CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
SET(XCODE ON)
|
SET(XCODE ON)
|
||||||
MESSAGE(STATUS "Generating Xcode project")
|
MESSAGE(STATUS "Generating Xcode project")
|
||||||
ENDIF(CMAKE_GENERATOR MATCHES "Xcode")
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "NMake")
|
IF(CMAKE_GENERATOR MATCHES "NMake")
|
||||||
SET(NMAKE ON)
|
SET(NMAKE ON)
|
||||||
MESSAGE(STATUS "Generating NMake project")
|
MESSAGE(STATUS "Generating NMake project")
|
||||||
ENDIF(CMAKE_GENERATOR MATCHES "NMake")
|
ENDIF()
|
||||||
|
|
||||||
# If target and host CPU are the same
|
# If target and host CPU are the same
|
||||||
IF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
IF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
||||||
|
@ -412,24 +433,24 @@ MACRO(NL_SETUP_BUILD)
|
||||||
IF(NOT CMAKE_SIZEOF_VOID_P)
|
IF(NOT CMAKE_SIZEOF_VOID_P)
|
||||||
INCLUDE (CheckTypeSize)
|
INCLUDE (CheckTypeSize)
|
||||||
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
|
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
|
||||||
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
|
ENDIF()
|
||||||
|
|
||||||
# Using 32 or 64 bits libraries
|
# Using 32 or 64 bits libraries
|
||||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(TARGET_CPU "x86_64")
|
SET(TARGET_CPU "x86_64")
|
||||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
ELSE()
|
||||||
SET(TARGET_CPU "x86")
|
SET(TARGET_CPU "x86")
|
||||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
ENDIF()
|
||||||
ELSEIF(HOST_CPU MATCHES "arm")
|
ELSEIF(HOST_CPU MATCHES "arm")
|
||||||
SET(TARGET_CPU "arm")
|
SET(TARGET_CPU "arm")
|
||||||
ELSE(HOST_CPU MATCHES "x86")
|
ELSE()
|
||||||
SET(TARGET_CPU "unknown")
|
SET(TARGET_CPU "unknown")
|
||||||
MESSAGE(STATUS "Unknown architecture: ${HOST_CPU}")
|
MESSAGE(STATUS "Unknown architecture: ${HOST_CPU}")
|
||||||
ENDIF(HOST_CPU MATCHES "x86")
|
ENDIF()
|
||||||
# TODO: add checks for PPC
|
# TODO: add checks for PPC
|
||||||
ELSE("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
ELSE()
|
||||||
MESSAGE(STATUS "Compiling on ${HOST_CPU} for ${TARGET_CPU}")
|
MESSAGE(STATUS "Compiling on ${HOST_CPU} for ${TARGET_CPU}")
|
||||||
ENDIF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
ENDIF()
|
||||||
|
|
||||||
# Use values from environment variables
|
# Use values from environment variables
|
||||||
SET(PLATFORM_CFLAGS "$ENV{CFLAGS} $ENV{CPPFLAGS} ${PLATFORM_CFLAGS}")
|
SET(PLATFORM_CFLAGS "$ENV{CFLAGS} $ENV{CPPFLAGS} ${PLATFORM_CFLAGS}")
|
||||||
|
@ -469,36 +490,36 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(TARGET_ARM 1)
|
SET(TARGET_ARM 1)
|
||||||
ELSEIF(TARGET_CPU STREQUAL "mips")
|
ELSEIF(TARGET_CPU STREQUAL "mips")
|
||||||
SET(TARGET_MIPS 1)
|
SET(TARGET_MIPS 1)
|
||||||
ENDIF(TARGET_CPU STREQUAL "x86_64")
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7S")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7S")
|
||||||
ENDIF(TARGET_ARMV7S)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-HAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-HAVE_ARMV6")
|
||||||
ENDIF(TARGET_ARMV6)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARM")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARM")
|
||||||
ENDIF(TARGET_ARM)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X86)
|
IF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-DHAVE_X86")
|
||||||
ENDIF(TARGET_X86)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_X64 -DHAVE_X86_64")
|
ADD_PLATFORM_FLAGS("-DHAVE_X64 -DHAVE_X86_64")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-DHAVE_MIPS")
|
||||||
ENDIF(TARGET_MIPS)
|
ENDIF()
|
||||||
ENDIF(NOT CMAKE_OSX_ARCHITECTURES)
|
ENDIF()
|
||||||
|
|
||||||
# Fix library paths suffixes for Debian MultiArch
|
# Fix library paths suffixes for Debian MultiArch
|
||||||
IF(LIBRARY_ARCHITECTURE)
|
IF(LIBRARY_ARCHITECTURE)
|
||||||
|
@ -507,22 +528,22 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64)
|
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64)
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32)
|
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32)
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
ENDIF(LIBRARY_ARCHITECTURE)
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE AND NOT IOS)
|
IF(APPLE AND NOT IOS)
|
||||||
SET(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
SET(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
||||||
SET(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
SET(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
||||||
ENDIF(APPLE AND NOT IOS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LOGGING)
|
IF(WITH_LOGGING)
|
||||||
ADD_PLATFORM_FLAGS("-DENABLE_LOGS")
|
ADD_PLATFORM_FLAGS("-DENABLE_LOGS")
|
||||||
ENDIF(WITH_LOGGING)
|
ENDIF()
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
IF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
IF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
||||||
SET(MSVC11 ON)
|
SET(MSVC11 ON)
|
||||||
ENDIF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
ENDIF()
|
||||||
|
|
||||||
# Ignore default include paths
|
# Ignore default include paths
|
||||||
ADD_PLATFORM_FLAGS("/X")
|
ADD_PLATFORM_FLAGS("/X")
|
||||||
|
@ -534,50 +555,50 @@ MACRO(NL_SETUP_BUILD)
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC12)
|
ELSEIF(MSVC12)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
||||||
# /Ox is working with VC++ 2013, but custom optimizations don't exist
|
# /Ox is working with VC++ 2013, but custom optimizations don't exist
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC11)
|
ELSEIF(MSVC11)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
||||||
# /Ox is working with VC++ 2012, but custom optimizations don't exist
|
# /Ox is working with VC++ 2012, but custom optimizations don't exist
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC10)
|
ELSEIF(MSVC10)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
||||||
# /Ox is working with VC++ 2010, but custom optimizations don't exist
|
# /Ox is working with VC++ 2010, but custom optimizations don't exist
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC90)
|
ELSEIF(MSVC90)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
||||||
# don't use a /O[012x] flag if you want custom optimizations
|
# don't use a /O[012x] flag if you want custom optimizations
|
||||||
SET(RELEASE_CFLAGS "/Ob2 /Oi /Ot /Oy /GT /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ob2 /Oi /Ot /Oy /GT /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC80)
|
ELSEIF(MSVC80)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /Wp64")
|
ADD_PLATFORM_FLAGS("/Gy- /Wp64 /Zm1000")
|
||||||
# don't use a /O[012x] flag if you want custom optimizations
|
# don't use a /O[012x] flag if you want custom optimizations
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}")
|
||||||
ELSE(MSVC12)
|
ELSE()
|
||||||
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
|
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
|
||||||
ENDIF(MSVC14)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /Zm1000 /wd4250")
|
ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /wd4250")
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
# Fix a bug with Intellisense
|
# Fix a bug with Intellisense
|
||||||
ADD_PLATFORM_FLAGS("/D_WIN64")
|
ADD_PLATFORM_FLAGS("/D_WIN64")
|
||||||
# Fix a compilation error for some big C++ files
|
# Fix a compilation error for some big C++ files
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} /bigobj")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} /bigobj")
|
||||||
ELSE(TARGET_X64)
|
ELSE()
|
||||||
# Allows 32 bits applications to use 3 GB of RAM
|
# Allows 32 bits applications to use 3 GB of RAM
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /LARGEADDRESSAWARE")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /LARGEADDRESSAWARE")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
# Exceptions are only set for C++
|
# Exceptions are only set for C++
|
||||||
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} /EHa")
|
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} /EHa")
|
||||||
|
@ -585,9 +606,9 @@ MACRO(NL_SETUP_BUILD)
|
||||||
IF(WITH_SYMBOLS)
|
IF(WITH_SYMBOLS)
|
||||||
SET(NL_RELEASE_CFLAGS "/Zi ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "/Zi ${NL_RELEASE_CFLAGS}")
|
||||||
SET(NL_RELEASE_LINKFLAGS "/DEBUG ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "/DEBUG ${NL_RELEASE_LINKFLAGS}")
|
||||||
ELSE(WITH_SYMBOLS)
|
ELSE()
|
||||||
SET(NL_RELEASE_LINKFLAGS "/RELEASE ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "/RELEASE ${NL_RELEASE_LINKFLAGS}")
|
||||||
ENDIF(WITH_SYMBOLS)
|
ENDIF()
|
||||||
|
|
||||||
SET(NL_DEBUG_CFLAGS "/Zi /MDd /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
|
SET(NL_DEBUG_CFLAGS "/Zi /MDd /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
|
||||||
SET(NL_RELEASE_CFLAGS "/MD /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "/MD /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
|
||||||
|
@ -596,25 +617,25 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(WITH_WARNINGS)
|
IF(WITH_WARNINGS)
|
||||||
SET(DEBUG_CFLAGS "/W4 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/W4 ${DEBUG_CFLAGS}")
|
||||||
ELSE(WITH_WARNINGS)
|
ELSE()
|
||||||
SET(DEBUG_CFLAGS "/W3 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/W3 ${DEBUG_CFLAGS}")
|
||||||
ENDIF(WITH_WARNINGS)
|
ENDIF()
|
||||||
ELSE(MSVC)
|
ELSE()
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_PLATFORM_FLAGS("-DWIN32 -D_WIN32")
|
ADD_PLATFORM_FLAGS("-DWIN32 -D_WIN32")
|
||||||
|
|
||||||
IF(CLANG)
|
IF(CLANG)
|
||||||
ADD_PLATFORM_FLAGS("-nobuiltininc")
|
ADD_PLATFORM_FLAGS("-nobuiltininc")
|
||||||
ENDIF(CLANG)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SSE3)
|
IF(WITH_SSE3)
|
||||||
ADD_PLATFORM_FLAGS("-msse3")
|
ADD_PLATFORM_FLAGS("-msse3")
|
||||||
ENDIF(WITH_SSE3)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GCC_FPMATH_BOTH)
|
IF(WITH_GCC_FPMATH_BOTH)
|
||||||
ADD_PLATFORM_FLAGS("-mfpmath=both")
|
ADD_PLATFORM_FLAGS("-mfpmath=both")
|
||||||
ENDIF(WITH_GCC_FPMATH_BOTH)
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
IF(NOT XCODE)
|
IF(NOT XCODE)
|
||||||
|
@ -649,97 +670,97 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(_ARCHS "${_ARCHS} mips")
|
SET(_ARCHS "${_ARCHS} mips")
|
||||||
SET(TARGET_MIPS 1)
|
SET(TARGET_MIPS 1)
|
||||||
MATH(EXPR TARGETS_COUNT "${TARGETS_COUNT}+1")
|
MATH(EXPR TARGETS_COUNT "${TARGETS_COUNT}+1")
|
||||||
ELSE(_ARCH STREQUAL "i386")
|
ELSE()
|
||||||
SET(_ARCHS "${_ARCHS} unknwon(${_ARCH})")
|
SET(_ARCHS "${_ARCHS} unknwon(${_ARCH})")
|
||||||
ENDIF(_ARCH STREQUAL "i386")
|
ENDIF()
|
||||||
ENDFOREACH(_ARCH)
|
ENDFOREACH(_ARCH)
|
||||||
MESSAGE(STATUS "Compiling under Mac OS X for ${TARGETS_COUNT} architectures: ${_ARCHS}")
|
MESSAGE(STATUS "Compiling under Mac OS X for ${TARGETS_COUNT} architectures: ${_ARCHS}")
|
||||||
ELSE(CMAKE_OSX_ARCHITECTURES)
|
ELSE()
|
||||||
SET(TARGETS_COUNT 0)
|
SET(TARGETS_COUNT 0)
|
||||||
ENDIF(CMAKE_OSX_ARCHITECTURES)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGETS_COUNT EQUAL 1)
|
IF(TARGETS_COUNT EQUAL 1)
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7s -DHAVE_ARMV7S")
|
ADD_PLATFORM_FLAGS("-arch armv7s -DHAVE_ARMV7S")
|
||||||
ENDIF(TARGET_ARMV7S)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7 -DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-arch armv7 -DHAVE_ARMV7")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv6 -DHAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-arch armv6 -DHAVE_ARMV6")
|
||||||
ENDIF(TARGET_ARMV6)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV5)
|
IF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv5 -DHAVE_ARMV5")
|
ADD_PLATFORM_FLAGS("-arch armv5 -DHAVE_ARMV5")
|
||||||
ENDIF(TARGET_ARMV5)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-mthumb -DHAVE_ARM")
|
ADD_PLATFORM_FLAGS("-mthumb -DHAVE_ARM")
|
||||||
ENDIF(TARGET_ARM)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-arch x86_64 -DHAVE_X64 -DHAVE_X86_64 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-arch x86_64 -DHAVE_X64 -DHAVE_X86_64 -DHAVE_X86")
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-arch i386 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-arch i386 -DHAVE_X86")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-arch mips -DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-arch mips -DHAVE_MIPS")
|
||||||
ENDIF(TARGET_MIPS)
|
ENDIF()
|
||||||
ELSEIF(TARGETS_COUNT EQUAL 0)
|
ELSEIF(TARGETS_COUNT EQUAL 0)
|
||||||
# Not using CMAKE_OSX_ARCHITECTURES, HAVE_XXX already defined before
|
# Not using CMAKE_OSX_ARCHITECTURES, HAVE_XXX already defined before
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7s")
|
ADD_PLATFORM_FLAGS("-arch armv7s")
|
||||||
ENDIF(TARGET_ARMV7S)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7")
|
ADD_PLATFORM_FLAGS("-arch armv7")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv6")
|
ADD_PLATFORM_FLAGS("-arch armv6")
|
||||||
ENDIF(TARGET_ARMV6)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV5)
|
IF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv5")
|
ADD_PLATFORM_FLAGS("-arch armv5")
|
||||||
ENDIF(TARGET_ARMV5)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-mthumb")
|
ADD_PLATFORM_FLAGS("-mthumb")
|
||||||
ENDIF(TARGET_ARM)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-arch x86_64")
|
ADD_PLATFORM_FLAGS("-arch x86_64")
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-arch i386")
|
ADD_PLATFORM_FLAGS("-arch i386")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-arch mips")
|
ADD_PLATFORM_FLAGS("-arch mips")
|
||||||
ENDIF(TARGET_MIPS)
|
ENDIF()
|
||||||
ELSE(TARGETS_COUNT EQUAL 1)
|
ELSE()
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_armv6 -mthumb -Xarch_armv6 -DHAVE_ARM -Xarch_armv6 -DHAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-Xarch_armv6 -mthumb -Xarch_armv6 -DHAVE_ARM -Xarch_armv6 -DHAVE_ARMV6")
|
||||||
ENDIF(TARGET_ARMV6)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_armv7 -mthumb -Xarch_armv7 -DHAVE_ARM -Xarch_armv7 -DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-Xarch_armv7 -mthumb -Xarch_armv7 -DHAVE_ARM -Xarch_armv7 -DHAVE_ARMV7")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X86)
|
IF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_i386 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-Xarch_i386 -DHAVE_X86")
|
||||||
ENDIF(TARGET_X86)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_x86_64 -DHAVE_X64 -Xarch_x86_64 -DHAVE_X86_64")
|
ADD_PLATFORM_FLAGS("-Xarch_x86_64 -DHAVE_X64 -Xarch_x86_64 -DHAVE_X86_64")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_mips -DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-Xarch_mips -DHAVE_MIPS")
|
||||||
ENDIF(TARGET_MIPS)
|
ENDIF()
|
||||||
ENDIF(TARGETS_COUNT EQUAL 1)
|
ENDIF()
|
||||||
|
|
||||||
IF(IOS)
|
IF(IOS)
|
||||||
SET(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
|
SET(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
|
||||||
|
@ -749,73 +770,73 @@ MACRO(NL_SETUP_BUILD)
|
||||||
CONVERT_VERSION_NUMBER(${IOS_VERSION_MAJOR} ${IOS_VERSION_MINOR} ${IOS_VERSION_PATCH} IOS_VERSION_NUMBER)
|
CONVERT_VERSION_NUMBER(${IOS_VERSION_MAJOR} ${IOS_VERSION_MINOR} ${IOS_VERSION_PATCH} IOS_VERSION_NUMBER)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-D__IPHONE_OS_VERSION_MIN_REQUIRED=${IOS_VERSION_NUMBER}")
|
ADD_PLATFORM_FLAGS("-D__IPHONE_OS_VERSION_MIN_REQUIRED=${IOS_VERSION_NUMBER}")
|
||||||
ENDIF(IOS_VERSION)
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_IOS_SYSROOT)
|
IF(CMAKE_IOS_SYSROOT)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv7s ")
|
SET(XARCH "-Xarch_armv7s ")
|
||||||
ENDIF(TARGETS_COUNT GREATER 1)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF(TARGET_ARMV7S)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv7 ")
|
SET(XARCH "-Xarch_armv7 ")
|
||||||
ENDIF(TARGETS_COUNT GREATER 1)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv6 ")
|
SET(XARCH "-Xarch_armv6 ")
|
||||||
ENDIF(TARGETS_COUNT GREATER 1)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF(TARGET_ARMV6)
|
ENDIF()
|
||||||
ENDIF(CMAKE_IOS_SYSROOT)
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
IF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_i386 ")
|
SET(XARCH "-Xarch_i386 ")
|
||||||
ENDIF(TARGETS_COUNT GREATER 1)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SIMULATOR_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SIMULATOR_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-mios-simulator-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-mios-simulator-version-min=${IOS_VERSION}")
|
||||||
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
ENDIF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
ENDIF()
|
||||||
ENDIF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
ENDIF()
|
||||||
ELSE(IOS)
|
ELSE()
|
||||||
# Always force -mmacosx-version-min to override environement variable
|
# Always force -mmacosx-version-min to override environement variable
|
||||||
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
ENDIF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
ENDIF()
|
||||||
ENDIF(IOS)
|
ENDIF()
|
||||||
|
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-headerpad_max_install_names")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-headerpad_max_install_names")
|
||||||
|
|
||||||
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-search_paths_first")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-search_paths_first")
|
||||||
ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
ENDIF()
|
||||||
ENDIF(NOT XCODE)
|
ENDIF()
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
||||||
ADD_PLATFORM_FLAGS("-m32 -march=i686")
|
ADD_PLATFORM_FLAGS("-m32 -march=i686")
|
||||||
ENDIF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
ENDIF()
|
||||||
|
|
||||||
IF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
IF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
||||||
ADD_PLATFORM_FLAGS("-m64")
|
ADD_PLATFORM_FLAGS("-m64")
|
||||||
ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
ENDIF()
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-D_REENTRANT -fno-strict-aliasing")
|
ADD_PLATFORM_FLAGS("-D_REENTRANT -fno-strict-aliasing")
|
||||||
|
|
||||||
|
@ -825,11 +846,11 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(WITH_COVERAGE)
|
IF(WITH_COVERAGE)
|
||||||
ADD_PLATFORM_FLAGS("-fprofile-arcs -ftest-coverage")
|
ADD_PLATFORM_FLAGS("-fprofile-arcs -ftest-coverage")
|
||||||
ENDIF(WITH_COVERAGE)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_WARNINGS)
|
IF(WITH_WARNINGS)
|
||||||
ADD_PLATFORM_FLAGS("-Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused")
|
ADD_PLATFORM_FLAGS("-Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused")
|
||||||
ENDIF(WITH_WARNINGS)
|
ENDIF()
|
||||||
|
|
||||||
IF(ANDROID)
|
IF(ANDROID)
|
||||||
ADD_PLATFORM_FLAGS("--sysroot=${PLATFORM_ROOT}")
|
ADD_PLATFORM_FLAGS("--sysroot=${PLATFORM_ROOT}")
|
||||||
|
@ -846,17 +867,17 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -march=armv7-a -Wl,--fix-cortex-a8")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -march=armv7-a -Wl,--fix-cortex-a8")
|
||||||
ELSEIF(TARGET_ARMV5)
|
ELSEIF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-march=armv5te -mtune=xscale -msoft-float")
|
ADD_PLATFORM_FLAGS("-march=armv5te -mtune=xscale -msoft-float")
|
||||||
ENDIF(TARGET_ARMV7)
|
ENDIF()
|
||||||
|
|
||||||
SET(TARGET_THUMB ON)
|
SET(TARGET_THUMB ON)
|
||||||
IF(TARGET_THUMB)
|
IF(TARGET_THUMB)
|
||||||
ADD_PLATFORM_FLAGS("-mthumb -fno-strict-aliasing -finline-limit=64")
|
ADD_PLATFORM_FLAGS("-mthumb -fno-strict-aliasing -finline-limit=64")
|
||||||
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -marm")
|
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -marm")
|
||||||
ELSE(TARGET_THUMB)
|
ELSE()
|
||||||
ADD_PLATFORM_FLAGS("-funswitch-loops -finline-limit=300")
|
ADD_PLATFORM_FLAGS("-funswitch-loops -finline-limit=300")
|
||||||
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -fno-strict-aliasing")
|
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -fno-strict-aliasing")
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -fstrict-aliasing")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -fstrict-aliasing")
|
||||||
ENDIF(TARGET_THUMB)
|
ENDIF()
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
# Optimizations for Intel Atom
|
# Optimizations for Intel Atom
|
||||||
ADD_PLATFORM_FLAGS("-march=i686 -mtune=atom -mstackrealign -msse3 -mfpmath=sse -m32 -flto -ffast-math -funroll-loops")
|
ADD_PLATFORM_FLAGS("-march=i686 -mtune=atom -mstackrealign -msse3 -mfpmath=sse -m32 -flto -ffast-math -funroll-loops")
|
||||||
|
@ -866,39 +887,39 @@ MACRO(NL_SETUP_BUILD)
|
||||||
ELSEIF(TARGET_MIPS)
|
ELSEIF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-fpic -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fno-strict-aliasing")
|
ADD_PLATFORM_FLAGS("-fpic -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fno-strict-aliasing")
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -funswitch-loops -finline-limit=300")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -funswitch-loops -finline-limit=300")
|
||||||
ENDIF(TARGET_ARM)
|
ENDIF()
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -L${PLATFORM_ROOT}/usr/lib")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -L${PLATFORM_ROOT}/usr/lib")
|
||||||
ENDIF(ANDROID)
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
|
ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
|
|
||||||
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
|
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
|
||||||
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
||||||
ADD_PLATFORM_FLAGS("-fPIC")
|
ADD_PLATFORM_FLAGS("-fPIC")
|
||||||
ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
ENDIF()
|
||||||
|
|
||||||
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48")
|
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48")
|
||||||
|
|
||||||
IF(NOT APPLE)
|
IF(NOT APPLE)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed")
|
||||||
ENDIF(NOT APPLE)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SYMBOLS)
|
IF(WITH_SYMBOLS)
|
||||||
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
|
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
|
||||||
ELSE(WITH_SYMBOLS)
|
ELSE()
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}")
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
ENDIF(WITH_SYMBOLS)
|
ENDIF()
|
||||||
|
|
||||||
SET(NL_DEBUG_CFLAGS "-g -DNL_DEBUG -D_DEBUG ${NL_DEBUG_CFLAGS}")
|
SET(NL_DEBUG_CFLAGS "-g -DNL_DEBUG -D_DEBUG ${NL_DEBUG_CFLAGS}")
|
||||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O3 ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O3 ${NL_RELEASE_CFLAGS}")
|
||||||
ENDIF(MSVC)
|
ENDIF()
|
||||||
ENDMACRO(NL_SETUP_BUILD)
|
ENDMACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
MACRO(NL_SETUP_BUILD_FLAGS)
|
MACRO(NL_SETUP_BUILD_FLAGS)
|
||||||
|
@ -933,7 +954,7 @@ MACRO(NL_MAKE_ABSOLUTE_PREFIX NAME_RELATIVE NAME_ABSOLUTE)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
|
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(IS_ABSOLUTE "${${NAME_RELATIVE}}")
|
ENDIF()
|
||||||
ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX)
|
ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
MACRO(NL_SETUP_PREFIX_PATHS)
|
MACRO(NL_SETUP_PREFIX_PATHS)
|
||||||
|
@ -1010,7 +1031,7 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
|
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(NOT RYZOM_ETC_PREFIX)
|
ENDIF()
|
||||||
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX)
|
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
## Allow override of install_prefix/share path.
|
## Allow override of install_prefix/share path.
|
||||||
|
@ -1050,7 +1071,7 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
|
SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(NOT RYZOM_LIB_PREFIX)
|
ENDIF()
|
||||||
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)
|
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
## Allow override of install_prefix/games path.
|
## Allow override of install_prefix/games path.
|
||||||
|
@ -1068,7 +1089,7 @@ ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
MACRO(SETUP_EXTERNAL)
|
MACRO(SETUP_EXTERNAL)
|
||||||
IF(WITH_EXTERNAL)
|
IF(WITH_EXTERNAL)
|
||||||
FIND_PACKAGE(External REQUIRED)
|
FIND_PACKAGE(External REQUIRED)
|
||||||
ENDIF(WITH_EXTERNAL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FIND_PACKAGE(External REQUIRED)
|
FIND_PACKAGE(External REQUIRED)
|
||||||
|
@ -1077,8 +1098,8 @@ MACRO(SETUP_EXTERNAL)
|
||||||
IF(DEFINED BOOST_DIR)
|
IF(DEFINED BOOST_DIR)
|
||||||
SET(BOOST_INCLUDEDIR ${BOOST_DIR}/include)
|
SET(BOOST_INCLUDEDIR ${BOOST_DIR}/include)
|
||||||
SET(BOOST_LIBRARYDIR ${BOOST_DIR}/lib)
|
SET(BOOST_LIBRARYDIR ${BOOST_DIR}/lib)
|
||||||
ENDIF(DEFINED BOOST_DIR)
|
ENDIF()
|
||||||
ELSE(WIN32)
|
ELSE()
|
||||||
FIND_PACKAGE(External QUIET)
|
FIND_PACKAGE(External QUIET)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
@ -1087,28 +1108,28 @@ MACRO(SETUP_EXTERNAL)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
IF(WITH_STATIC_EXTERNAL)
|
IF(WITH_STATIC_EXTERNAL)
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
# Android and iOS have pthread
|
# Android and iOS have pthread
|
||||||
IF(ANDROID OR IOS)
|
IF(ANDROID OR IOS)
|
||||||
SET(CMAKE_USE_PTHREADS_INIT 1)
|
SET(CMAKE_USE_PTHREADS_INIT 1)
|
||||||
SET(Threads_FOUND TRUE)
|
SET(Threads_FOUND TRUE)
|
||||||
ELSE(ANDROID OR IOS)
|
ELSE()
|
||||||
FIND_PACKAGE(Threads REQUIRED)
|
FIND_PACKAGE(Threads REQUIRED)
|
||||||
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
||||||
ENDIF(ANDROID OR IOS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
FIND_PACKAGE(STLport REQUIRED)
|
FIND_PACKAGE(STLport REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# Must include DXSDK before WINSDK
|
# Must include DXSDK before WINSDK
|
||||||
|
@ -1116,10 +1137,10 @@ MACRO(SETUP_EXTERNAL)
|
||||||
# IF(DXSDK_INCLUDE_DIR)
|
# IF(DXSDK_INCLUDE_DIR)
|
||||||
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||||
# ENDIF()
|
# ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
FIND_PACKAGE(MSVC REQUIRED)
|
FIND_PACKAGE(MSVC REQUIRED)
|
||||||
FIND_PACKAGE(WindowsSDK REQUIRED)
|
FIND_PACKAGE(WindowsSDK REQUIRED)
|
||||||
ENDIF(MSVC)
|
ENDIF()
|
||||||
ENDMACRO(SETUP_EXTERNAL)
|
ENDMACRO(SETUP_EXTERNAL)
|
||||||
|
|
|
@ -2,23 +2,23 @@ PROJECT(NeL CXX C)
|
||||||
|
|
||||||
IF(WITH_STATIC_DRIVERS)
|
IF(WITH_STATIC_DRIVERS)
|
||||||
ADD_DEFINITIONS(-DNL_STATIC)
|
ADD_DEFINITIONS(-DNL_STATIC)
|
||||||
ENDIF(WITH_STATIC_DRIVERS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# On Win32 we can also build the MAX plugins.
|
# On Win32 we can also build the MAX plugins.
|
||||||
IF(WITH_NEL_MAXPLUGIN)
|
IF(WITH_NEL_MAXPLUGIN)
|
||||||
FIND_PACKAGE(3dsMaxSDK)
|
FIND_PACKAGE(3dsMaxSDK)
|
||||||
ENDIF(WITH_NEL_MAXPLUGIN)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
FIND_PACKAGE(FreeType)
|
FIND_PACKAGE(FreeType)
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
FIND_PACKAGE(CEGUI)
|
FIND_PACKAGE(CEGUI)
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF()
|
||||||
|
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
FIND_PACKAGE(Ogg)
|
FIND_PACKAGE(Ogg)
|
||||||
|
@ -26,24 +26,16 @@ IF(WITH_SOUND)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
FIND_PACKAGE(OpenAL)
|
FIND_PACKAGE(OpenAL)
|
||||||
ENDIF(WITH_DRIVER_OPENAL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
FIND_PACKAGE(FMOD)
|
FIND_PACKAGE(FMOD)
|
||||||
ENDIF(WITH_DRIVER_FMOD)
|
ENDIF()
|
||||||
ENDIF(WITH_SOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GTK)
|
IF(WITH_GTK)
|
||||||
FIND_PACKAGE(GTK2)
|
FIND_PACKAGE(GTK2)
|
||||||
ENDIF(WITH_GTK)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LIBOVR)
|
|
||||||
FIND_PACKAGE(LibOVR)
|
|
||||||
ENDIF(WITH_LIBOVR)
|
|
||||||
|
|
||||||
IF(WITH_LIBVR)
|
|
||||||
FIND_PACKAGE(LibVR)
|
|
||||||
ENDIF(WITH_LIBVR)
|
|
||||||
|
|
||||||
IF(WITH_INSTALL_LIBRARIES)
|
IF(WITH_INSTALL_LIBRARIES)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
@ -61,7 +53,7 @@ IF(WITH_INSTALL_LIBRARIES)
|
||||||
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
|
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
|
||||||
|
|
||||||
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF(UNIX)
|
ENDIF()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(include)
|
ADD_SUBDIRECTORY(include)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
CTrackDefaultFloat DefaultUTrans; // u translation
|
CTrackDefaultFloat DefaultUTrans; // u translation
|
||||||
CTrackDefaultFloat DefaultVTrans; // v translation
|
CTrackDefaultFloat DefaultVTrans; // v translation
|
||||||
CTrackDefaultFloat DefaultUScale; // u scale
|
CTrackDefaultFloat DefaultUScale; // u scale
|
||||||
CTrackDefaultFloat DefaultVScale; // u scale
|
CTrackDefaultFloat DefaultVScale; // v scale
|
||||||
CTrackDefaultFloat DefaultWRot; // v scale
|
CTrackDefaultFloat DefaultWRot; // v scale
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,10 @@ public:
|
||||||
sint32 Top; // Distance between origin and top of the texture
|
sint32 Top; // Distance between origin and top of the texture
|
||||||
sint32 Left; // Distance between origin and left of the texture
|
sint32 Left; // Distance between origin and left of the texture
|
||||||
sint32 AdvX; // Advance to the next caracter
|
sint32 AdvX; // Advance to the next caracter
|
||||||
|
|
||||||
|
SLetterInfo():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false), Next(NULL), Prev(NULL), Cat(0), CharWidth(0), CharHeight(0), GlyphIndex(0), Top(0), Left(0), AdvX(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SLetterKey
|
struct SLetterKey
|
||||||
|
@ -74,6 +78,10 @@ public:
|
||||||
uint32 getVal();
|
uint32 getVal();
|
||||||
//bool operator < (const SLetterKey&k) const;
|
//bool operator < (const SLetterKey&k) const;
|
||||||
//bool operator == (const SLetterKey&k) const;
|
//bool operator == (const SLetterKey&k) const;
|
||||||
|
|
||||||
|
SLetterKey():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -320,7 +320,7 @@ public:
|
||||||
// For edition: change the tileVegetableDesc. NB: only the TileVegetableDescFileName is serialised.
|
// For edition: change the tileVegetableDesc. NB: only the TileVegetableDescFileName is serialised.
|
||||||
void setTileVegetableDesc (const CTileVegetableDesc &tvd);
|
void setTileVegetableDesc (const CTileVegetableDesc &tvd);
|
||||||
/** try to load the vegetable tile desc associated with the fileName (nlinfo() if can't)
|
/** try to load the vegetable tile desc associated with the fileName (nlinfo() if can't)
|
||||||
* lookup into CPath. no-op if string=="".
|
* lookup into CPath. no-op if string empty
|
||||||
*/
|
*/
|
||||||
void loadTileVegetableDesc();
|
void loadTileVegetableDesc();
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ public:
|
||||||
/** There is (OrderS/2+1) * (OrderT/2+1) tiles light influence.
|
/** There is (OrderS/2+1) * (OrderT/2+1) tiles light influence.
|
||||||
* It indicates which static pointLight influence each corner of a TessBlock (block of 2*2 tiles).
|
* It indicates which static pointLight influence each corner of a TessBlock (block of 2*2 tiles).
|
||||||
*
|
*
|
||||||
* If size()==0, suppose no light influence. but CZone::retrieve() always return a
|
* If empty(), suppose no light influence. but CZone::retrieve() always return a
|
||||||
* size() == (OrderS/2+1) * (OrderT/2+1).
|
* size() == (OrderS/2+1) * (OrderT/2+1).
|
||||||
*
|
*
|
||||||
* They are stored in line first order, from S=0 to 1, and T=0 to 1.
|
* They are stored in line first order, from S=0 to 1, and T=0 to 1.
|
||||||
|
|
|
@ -2,36 +2,36 @@ SUBDIRS(misc)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
SUBDIRS(3d)
|
SUBDIRS(3d)
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GUI)
|
IF(WITH_GUI)
|
||||||
ADD_SUBDIRECTORY(gui)
|
ADD_SUBDIRECTORY(gui)
|
||||||
ENDIF(WITH_GUI)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GEORGES)
|
IF(WITH_GEORGES)
|
||||||
SUBDIRS(georges)
|
SUBDIRS(georges)
|
||||||
ENDIF(WITH_GEORGES)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LIGO)
|
IF(WITH_LIGO)
|
||||||
SUBDIRS(ligo)
|
SUBDIRS(ligo)
|
||||||
ENDIF(WITH_LIGO)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LOGIC)
|
IF(WITH_LOGIC)
|
||||||
SUBDIRS(logic)
|
SUBDIRS(logic)
|
||||||
ENDIF(WITH_LOGIC)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NET)
|
IF(WITH_NET)
|
||||||
SUBDIRS(net)
|
SUBDIRS(net)
|
||||||
ENDIF(WITH_NET)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
SUBDIRS(sound)
|
SUBDIRS(sound)
|
||||||
ENDIF(WITH_SOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_PACS)
|
IF(WITH_PACS)
|
||||||
SUBDIRS(pacs)
|
SUBDIRS(pacs)
|
||||||
ENDIF(WITH_PACS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
SUBDIRS(cegui)
|
SUBDIRS(cegui)
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF()
|
||||||
|
|
|
@ -865,7 +865,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure the CSheetId singleton has been properly initialised
|
// make sure the CSheetId singleton has been properly initialised
|
||||||
// NLMISC::CSheetId::init(updatePackedSheet);
|
NLMISC::CSheetId::init(updatePackedSheet);
|
||||||
|
|
||||||
// load the packed sheet if exists
|
// load the packed sheet if exists
|
||||||
try
|
try
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace NLGUI
|
||||||
class CGroupParagraph;
|
class CGroupParagraph;
|
||||||
|
|
||||||
extern std::string CurrentCookie;
|
extern std::string CurrentCookie;
|
||||||
extern std::string HTTPCurrentDomain;
|
|
||||||
|
|
||||||
// HTML group
|
// HTML group
|
||||||
/**
|
/**
|
||||||
|
@ -78,7 +77,7 @@ namespace NLGUI
|
||||||
class CStyleParams
|
class CStyleParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CStyleParams () : TextColor(255,255,255,255)
|
CStyleParams () : FontFamily(""), TextColor(255,255,255,255)
|
||||||
{
|
{
|
||||||
FontSize=10;
|
FontSize=10;
|
||||||
FontWeight=400;
|
FontWeight=400;
|
||||||
|
@ -93,6 +92,7 @@ namespace NLGUI
|
||||||
uint FontSize;
|
uint FontSize;
|
||||||
uint FontWeight;
|
uint FontWeight;
|
||||||
bool FontOblique;
|
bool FontOblique;
|
||||||
|
std::string FontFamily;
|
||||||
NLMISC::CRGBA TextColor;
|
NLMISC::CRGBA TextColor;
|
||||||
bool Underlined;
|
bool Underlined;
|
||||||
bool StrikeThrough;
|
bool StrikeThrough;
|
||||||
|
@ -253,6 +253,7 @@ namespace NLGUI
|
||||||
int luaEndElement(CLuaState &ls);
|
int luaEndElement(CLuaState &ls);
|
||||||
int luaShowDiv(CLuaState &ls);
|
int luaShowDiv(CLuaState &ls);
|
||||||
int luaParseHtml(CLuaState &ls);
|
int luaParseHtml(CLuaState &ls);
|
||||||
|
int luaRenderHtml(CLuaState &ls);
|
||||||
|
|
||||||
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
||||||
REFLECT_LUA_METHOD("browse", luaBrowse)
|
REFLECT_LUA_METHOD("browse", luaBrowse)
|
||||||
|
@ -265,6 +266,7 @@ namespace NLGUI
|
||||||
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
||||||
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
||||||
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
|
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
|
||||||
|
REFLECT_LUA_METHOD("renderHtml", luaRenderHtml)
|
||||||
REFLECT_STRING("url", getURL, setURL)
|
REFLECT_STRING("url", getURL, setURL)
|
||||||
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
||||||
REFLECT_EXPORT_END
|
REFLECT_EXPORT_END
|
||||||
|
@ -282,9 +284,6 @@ namespace NLGUI
|
||||||
// A new text block has been parsed
|
// A new text block has been parsed
|
||||||
virtual void addText (const char * buf, int len);
|
virtual void addText (const char * buf, int len);
|
||||||
|
|
||||||
// A link has been parsed
|
|
||||||
virtual void addLink (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
|
||||||
|
|
||||||
// A new begin HTML element has been parsed (<IMG> for exemple)
|
// A new begin HTML element has been parsed (<IMG> for exemple)
|
||||||
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
||||||
|
|
||||||
|
@ -376,6 +375,7 @@ namespace NLGUI
|
||||||
std::string _URL;
|
std::string _URL;
|
||||||
// Current URL
|
// Current URL
|
||||||
std::string _DocumentUrl;
|
std::string _DocumentUrl;
|
||||||
|
std::string _DocumentDomain;
|
||||||
// Valid base href was found
|
// Valid base href was found
|
||||||
bool _IgnoreBaseUrlTag;
|
bool _IgnoreBaseUrlTag;
|
||||||
// Fragment from loading url
|
// Fragment from loading url
|
||||||
|
@ -511,6 +511,15 @@ namespace NLGUI
|
||||||
return _GlobalColor.back();
|
return _GlobalColor.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Current font name
|
||||||
|
std::vector<std::string> _FontFamily;
|
||||||
|
inline const char* getFontFamily() const
|
||||||
|
{
|
||||||
|
if (_FontFamily.empty())
|
||||||
|
return "";
|
||||||
|
return _FontFamily.back().c_str();
|
||||||
|
}
|
||||||
|
|
||||||
// Current font size
|
// Current font size
|
||||||
std::vector<uint> _FontSize;
|
std::vector<uint> _FontSize;
|
||||||
inline uint getFontSize() const
|
inline uint getFontSize() const
|
||||||
|
|
|
@ -51,7 +51,8 @@ namespace NLGUI
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::string scheme;
|
std::string scheme;
|
||||||
std::string domain;
|
std::string authority;
|
||||||
|
std::string host;
|
||||||
std::string path;
|
std::string path;
|
||||||
std::string query;
|
std::string query;
|
||||||
std::string hash;
|
std::string hash;
|
||||||
|
|
|
@ -586,8 +586,12 @@ namespace NLGUI
|
||||||
static NL3D::UDriver *driver;
|
static NL3D::UDriver *driver;
|
||||||
static NL3D::UTextContext *textcontext;
|
static NL3D::UTextContext *textcontext;
|
||||||
|
|
||||||
|
typedef CHashMap< std::string, NL3D::UTextContext* > TFontsList;
|
||||||
|
static TFontsList fonts;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static NL3D::UTextContext* getTextContext(){ return textcontext; }
|
static NL3D::UTextContext* getTextContext(const std::string &name="");
|
||||||
|
static bool registerFont(const std::string &name, const std::string &font);
|
||||||
|
|
||||||
/// Set of hw cursor images
|
/// Set of hw cursor images
|
||||||
static std::set< std::string > *hwCursors;
|
static std::set< std::string > *hwCursors;
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace NLGUI
|
||||||
/// Set
|
/// Set
|
||||||
|
|
||||||
void setText (const ucstring &text);
|
void setText (const ucstring &text);
|
||||||
|
void setFontName (const std::string &name);
|
||||||
void setFontSize (sint nFontSize);
|
void setFontSize (sint nFontSize);
|
||||||
void setEmbolden (bool nEmbolden);
|
void setEmbolden (bool nEmbolden);
|
||||||
void setOblique (bool nOblique);
|
void setOblique (bool nOblique);
|
||||||
|
@ -94,6 +95,7 @@ namespace NLGUI
|
||||||
void setMultiLineClipEndSpace (bool state); // use it for multiline edit box for instance
|
void setMultiLineClipEndSpace (bool state); // use it for multiline edit box for instance
|
||||||
void setFirstLineX (uint firstLineX);
|
void setFirstLineX (uint firstLineX);
|
||||||
void setMultiMaxLine(uint l) { _MultiMaxLine = l; }
|
void setMultiMaxLine(uint l) { _MultiMaxLine = l; }
|
||||||
|
void setMultiMinLine(uint l) { _MultiMinLine = l; }
|
||||||
|
|
||||||
// Force only a subset of letter to be displayed. Default is 0/0xFFFFFFFF
|
// Force only a subset of letter to be displayed. Default is 0/0xFFFFFFFF
|
||||||
void enableStringSelection(uint start, uint end);
|
void enableStringSelection(uint start, uint end);
|
||||||
|
@ -103,6 +105,7 @@ namespace NLGUI
|
||||||
|
|
||||||
ucstring getText() const { return _Text; }
|
ucstring getText() const { return _Text; }
|
||||||
sint getFontSize() const;
|
sint getFontSize() const;
|
||||||
|
std::string getFontName() const { return _FontName; }
|
||||||
bool getEmbolden() { return _Embolden; }
|
bool getEmbolden() { return _Embolden; }
|
||||||
bool getOblique() { return _Oblique; }
|
bool getOblique() { return _Oblique; }
|
||||||
NLMISC::CRGBA getColor() { return _Color; }
|
NLMISC::CRGBA getColor() { return _Color; }
|
||||||
|
@ -114,6 +117,8 @@ namespace NLGUI
|
||||||
sint getMultiLineSpace() const { return _MultiLineSpace; }
|
sint getMultiLineSpace() const { return _MultiLineSpace; }
|
||||||
bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; }
|
bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; }
|
||||||
uint32 getMultiMaxLine() const { return _MultiMaxLine; }
|
uint32 getMultiMaxLine() const { return _MultiMaxLine; }
|
||||||
|
uint32 getMultiMinLine() const { return _MultiMinLine; }
|
||||||
|
uint32 getMultiMinOffsetY() const;
|
||||||
|
|
||||||
// get current Hint font width, in pixels
|
// get current Hint font width, in pixels
|
||||||
uint getFontWidth() const;
|
uint getFontWidth() const;
|
||||||
|
@ -224,6 +229,8 @@ namespace NLGUI
|
||||||
uint _Index;
|
uint _Index;
|
||||||
/// info on the computed String associated to this text control
|
/// info on the computed String associated to this text control
|
||||||
NL3D::UTextContext::CStringInfo _Info;
|
NL3D::UTextContext::CStringInfo _Info;
|
||||||
|
/// Font name to get TextContext
|
||||||
|
std::string _FontName;
|
||||||
/// the font size
|
/// the font size
|
||||||
sint _FontSize;
|
sint _FontSize;
|
||||||
bool _Embolden;
|
bool _Embolden;
|
||||||
|
@ -259,6 +266,7 @@ namespace NLGUI
|
||||||
sint _MultiLineSpace;
|
sint _MultiLineSpace;
|
||||||
sint _LastMultiLineMaxW;
|
sint _LastMultiLineMaxW;
|
||||||
uint32 _MultiMaxLine;
|
uint32 _MultiMaxLine;
|
||||||
|
uint32 _MultiMinLine;
|
||||||
|
|
||||||
|
|
||||||
/// FormatTag handling
|
/// FormatTag handling
|
||||||
|
@ -316,7 +324,7 @@ namespace NLGUI
|
||||||
CFormatInfo Format;
|
CFormatInfo Format;
|
||||||
public:
|
public:
|
||||||
// build from a string, using the current text context
|
// build from a string, using the current text context
|
||||||
void build(const ucstring &text, uint numSpaces= 0);
|
void build(const ucstring &text, NL3D::UTextContext &textContext, uint numSpaces= 0);
|
||||||
};
|
};
|
||||||
typedef std::vector<CWord> TWordVect;
|
typedef std::vector<CWord> TWordVect;
|
||||||
|
|
||||||
|
@ -327,9 +335,9 @@ namespace NLGUI
|
||||||
// ctor
|
// ctor
|
||||||
CLine();
|
CLine();
|
||||||
// Clear the line & remove text contexts
|
// Clear the line & remove text contexts
|
||||||
void clear();
|
void clear(NL3D::UTextContext &textContext);
|
||||||
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
||||||
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth);
|
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth, NL3D::UTextContext &textContext);
|
||||||
void addWord(const CWord &word, uint fontWidth);
|
void addWord(const CWord &word, uint fontWidth);
|
||||||
uint getNumWords() const { return (uint)_Words.size(); }
|
uint getNumWords() const { return (uint)_Words.size(); }
|
||||||
CWord &getWord(uint index) { return _Words[index]; }
|
CWord &getWord(uint index) { return _Words[index]; }
|
||||||
|
|
|
@ -442,6 +442,7 @@ namespace NLGUI
|
||||||
OptionTimeoutMessages,
|
OptionTimeoutMessages,
|
||||||
OptionTimeoutContext,
|
OptionTimeoutContext,
|
||||||
OptionTimeoutContextHtml,
|
OptionTimeoutContextHtml,
|
||||||
|
OptionMonospaceFont,
|
||||||
NumSystemOptions
|
NumSystemOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,12 @@ public:
|
||||||
void makeOpaque();
|
void makeOpaque();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make fully transparent pixels (alpha 0) black.
|
||||||
|
*/
|
||||||
|
void makeTransparentPixelsBlack();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if the bitmap has uniform alpha values for all pixels.
|
* Return if the bitmap has uniform alpha values for all pixels.
|
||||||
* \param alpha return the uniform value if return is true
|
* \param alpha return the uniform value if return is true
|
||||||
|
@ -609,7 +615,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Extended version of blit. The destinaion of the blit is 'this' bitmap
|
* Extended version of blit. The destinaion of the blit is 'this' bitmap
|
||||||
* Source and dest rect are clamped as necessary.
|
* Source and dest rect are clamped as necessary.
|
||||||
* For now, only RGBA is uspported (an asertion occurs otherwise)
|
* For now, only RGBA is supported (an asertion occurs otherwise)
|
||||||
* mipmap are not updated.
|
* mipmap are not updated.
|
||||||
* IMPORTANT : copy to self is not handled correctly
|
* IMPORTANT : copy to self is not handled correctly
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -120,9 +120,9 @@ public:
|
||||||
*/
|
*/
|
||||||
std::string toString() const
|
std::string toString() const
|
||||||
{
|
{
|
||||||
if (_Ids.size()==0) return std::string("");
|
if (_Ids.empty()) return std::string("");
|
||||||
std::string str=_Ids[0];
|
std::string str=_Ids[0];
|
||||||
for (unsigned i=1; i<_Ids.size(); i++)
|
for (uint i=1; i<_Ids.size(); i++)
|
||||||
str +=std::string(":")+ _Ids[i];
|
str +=std::string(":")+ _Ids[i];
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
namespace STRING_MANAGER
|
namespace STRING_MANAGER
|
||||||
{
|
{
|
||||||
const ucstring nl("\r\n");
|
const ucstring nl("\n");
|
||||||
|
|
||||||
|
|
||||||
struct TStringInfo
|
struct TStringInfo
|
||||||
|
|
|
@ -144,12 +144,10 @@ public:
|
||||||
* 16 bits encoding can be recognized by the official header :
|
* 16 bits encoding can be recognized by the official header :
|
||||||
* FF, FE, witch can be reversed if the data are MSB first.
|
* FF, FE, witch can be reversed if the data are MSB first.
|
||||||
*
|
*
|
||||||
* Optionally, you can force the reader to consider the file as
|
|
||||||
* UTF-8 encoded.
|
|
||||||
* Optionally, you can ask the reader to interpret #include commands.
|
* Optionally, you can ask the reader to interpret #include commands.
|
||||||
*/
|
*/
|
||||||
static void readTextFile(const std::string &filename,
|
static void readTextFile(const std::string &filename,
|
||||||
ucstring &result, bool forceUtf8 = false,
|
ucstring &result,
|
||||||
bool fileLookup = true,
|
bool fileLookup = true,
|
||||||
bool preprocess = false,
|
bool preprocess = false,
|
||||||
TLineFormat lineFmt = LINE_FMT_NO_CARE,
|
TLineFormat lineFmt = LINE_FMT_NO_CARE,
|
||||||
|
@ -162,11 +160,8 @@ public:
|
||||||
* EF,BB, BF.
|
* EF,BB, BF.
|
||||||
* 16 bits encoding can be recognized by the official header :
|
* 16 bits encoding can be recognized by the official header :
|
||||||
* FF, FE, witch can be reversed if the data are MSB first.
|
* FF, FE, witch can be reversed if the data are MSB first.
|
||||||
*
|
|
||||||
* Optionally, you can force the reader to consider the file as
|
|
||||||
* UTF-8 encoded.
|
|
||||||
*/
|
*/
|
||||||
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result, bool forceUtf8 = false);
|
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result);
|
||||||
|
|
||||||
/** Remove any C style comment from the passed string.
|
/** Remove any C style comment from the passed string.
|
||||||
*/
|
*/
|
||||||
|
@ -262,7 +257,7 @@ private:
|
||||||
|
|
||||||
/// The internal read function, it does the real job of readTextFile
|
/// The internal read function, it does the real job of readTextFile
|
||||||
static void _readTextFile(const std::string &filename,
|
static void _readTextFile(const std::string &filename,
|
||||||
ucstring &result, bool forceUtf8,
|
ucstring &result,
|
||||||
bool fileLookup,
|
bool fileLookup,
|
||||||
bool preprocess,
|
bool preprocess,
|
||||||
TLineFormat lineFmt,
|
TLineFormat lineFmt,
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CPacsClient()
|
CPacsClient()
|
||||||
{
|
{
|
||||||
// No connexion
|
// No connection
|
||||||
_Server=NULL;
|
_Server=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ static TCallbackItem PacsCallbackArray[] =
|
||||||
|
|
||||||
inline bool CPacsClient::connect ()
|
inline bool CPacsClient::connect ()
|
||||||
{
|
{
|
||||||
// Create a connexion
|
// Create a connection
|
||||||
_Server = new CCallbackClient;
|
_Server = new CCallbackClient;
|
||||||
|
|
||||||
// Look up for PACS service
|
// Look up for PACS service
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
static IAudioDecoder *createAudioDecoder(const std::string &type, NLMISC::IStream *stream, bool loop);
|
static IAudioDecoder *createAudioDecoder(const std::string &type, NLMISC::IStream *stream, bool loop);
|
||||||
|
|
||||||
/// Get information on a music file (only artist and title at the moment).
|
/// Get information on a music file (only artist and title at the moment).
|
||||||
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title);
|
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title, float &length);
|
||||||
|
|
||||||
/// Get audio/container extensions that are currently supported by the nel sound library.
|
/// Get audio/container extensions that are currently supported by the nel sound library.
|
||||||
static void getMusicExtensions(std::vector<std::string> &extensions);
|
static void getMusicExtensions(std::vector<std::string> &extensions);
|
||||||
|
|
|
@ -77,7 +77,7 @@ public:
|
||||||
inline sint32 getStreamOffset() { return _StreamOffset; }
|
inline sint32 getStreamOffset() { return _StreamOffset; }
|
||||||
|
|
||||||
/// Get information on a music file (only artist and title at the moment).
|
/// Get information on a music file (only artist and title at the moment).
|
||||||
static bool getInfo(NLMISC::IStream *stream, std::string &artist, std::string &title);
|
static bool getInfo(NLMISC::IStream *stream, std::string &artist, std::string &title, float &length);
|
||||||
|
|
||||||
/// Get how many bytes the music buffer requires for output minimum.
|
/// Get how many bytes the music buffer requires for output minimum.
|
||||||
virtual uint32 getRequiredBytes();
|
virtual uint32 getRequiredBytes();
|
||||||
|
|
|
@ -332,7 +332,7 @@ public:
|
||||||
virtual bool isMusicEnded();
|
virtual bool isMusicEnded();
|
||||||
virtual void setMusicVolume(float gain);
|
virtual void setMusicVolume(float gain);
|
||||||
virtual float getMusicLength();
|
virtual float getMusicLength();
|
||||||
virtual bool getSongTitle(const std::string &filename, std::string &result);
|
virtual bool getSongTitle(const std::string &filename, std::string &result, float &length);
|
||||||
virtual void enableBackgroundMusic(bool enable);
|
virtual void enableBackgroundMusic(bool enable);
|
||||||
virtual void enableBackgroundMusicTimeConstraint(bool enable);
|
virtual void enableBackgroundMusicTimeConstraint(bool enable);
|
||||||
CMusicSoundManager *getBackgroundMusicManager() const {return _BackgroundMusicManager;}
|
CMusicSoundManager *getBackgroundMusicManager() const {return _BackgroundMusicManager;}
|
||||||
|
|
|
@ -192,7 +192,7 @@ public:
|
||||||
* \param artist returns the song artist (empty if not available)
|
* \param artist returns the song artist (empty if not available)
|
||||||
* \param title returns the title (empty if not available)
|
* \param title returns the title (empty if not available)
|
||||||
*/
|
*/
|
||||||
virtual bool getMusicInfo(const std::string &/* filepath */, std::string &artist, std::string &title) { artist.clear(); title.clear(); return false; }
|
virtual bool getMusicInfo(const std::string &/* filepath */, std::string &artist, std::string &title, float &length) { artist.clear(); title.clear(); length = 0.f; return false; }
|
||||||
/// Get audio/container extensions that are supported natively by the driver implementation.
|
/// Get audio/container extensions that are supported natively by the driver implementation.
|
||||||
virtual void getMusicExtensions(std::vector<std::string> &extensions) const = 0;
|
virtual void getMusicExtensions(std::vector<std::string> &extensions) const = 0;
|
||||||
/// Return if a music extension is supported by the driver's music channel.
|
/// Return if a music extension is supported by the driver's music channel.
|
||||||
|
|
|
@ -432,7 +432,7 @@ public:
|
||||||
/** Get the song title. Returns false if the song is not found or the function is not implemented.
|
/** Get the song title. Returns false if the song is not found or the function is not implemented.
|
||||||
* If the song as no name, result is filled with the filename.
|
* If the song as no name, result is filled with the filename.
|
||||||
*/
|
*/
|
||||||
virtual bool getSongTitle(const std::string &filename, std::string &result) =0;
|
virtual bool getSongTitle(const std::string &filename, std::string &result, float &length) =0;
|
||||||
/** enable or disable the background music system. disable it when you want to play your own mp3 for instance
|
/** enable or disable the background music system. disable it when you want to play your own mp3 for instance
|
||||||
*/
|
*/
|
||||||
virtual void enableBackgroundMusic(bool enable) =0;
|
virtual void enableBackgroundMusic(bool enable) =0;
|
||||||
|
|
|
@ -4,8 +4,8 @@ ADD_SUBDIRECTORY(shape_viewer)
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
ADD_SUBDIRECTORY(cegui)
|
ADD_SUBDIRECTORY(cegui)
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF()
|
||||||
|
|
||||||
#IF(WITH_QT)
|
#IF(WITH_QT)
|
||||||
# ADD_SUBDIRECTORY(qtnel)
|
# ADD_SUBDIRECTORY(qtnel)
|
||||||
#ENDIF(WITH_QT)
|
#ENDIF()
|
||||||
|
|
|
@ -2,20 +2,20 @@ ADD_SUBDIRECTORY(misc)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
ADD_SUBDIRECTORY(3d)
|
ADD_SUBDIRECTORY(3d)
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GEORGES)
|
IF(WITH_GEORGES)
|
||||||
ADD_SUBDIRECTORY(georges)
|
ADD_SUBDIRECTORY(georges)
|
||||||
ENDIF(WITH_GEORGES)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NET)
|
IF(WITH_NET)
|
||||||
ADD_SUBDIRECTORY(net)
|
ADD_SUBDIRECTORY(net)
|
||||||
ENDIF(WITH_NET)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_PACS)
|
IF(WITH_PACS)
|
||||||
ADD_SUBDIRECTORY(pacs)
|
ADD_SUBDIRECTORY(pacs)
|
||||||
ENDIF(WITH_PACS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
ADD_SUBDIRECTORY(sound)
|
ADD_SUBDIRECTORY(sound)
|
||||||
ENDIF(WITH_SOUND)
|
ENDIF()
|
||||||
|
|
|
@ -8,7 +8,7 @@ ADD_DEFINITIONS(-DUDP_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_udp/\\"")
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
ADD_DEFINITIONS(-DUSE_3D)
|
ADD_DEFINITIONS(-DUSE_3D)
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(nl_sample_udpclient nelmisc nelnet nel3d)
|
TARGET_LINK_LIBRARIES(nl_sample_udpclient nelmisc nelnet nel3d)
|
||||||
TARGET_LINK_LIBRARIES(nl_sample_udpserver nelmisc nelnet)
|
TARGET_LINK_LIBRARIES(nl_sample_udpserver nelmisc nelnet)
|
||||||
|
@ -22,4 +22,4 @@ INSTALL(FILES bench_service.cfg client.cfg readme.txt DESTINATION ${NL_SHARE_PRE
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
INSTALL(FILES n019003l.pfb DESTINATION ${NL_SHARE_PREFIX}/nl_sample_udp COMPONENT samplesnet)
|
INSTALL(FILES n019003l.pfb DESTINATION ${NL_SHARE_PREFIX}/nl_sample_udp COMPONENT samplesnet)
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
|
@ -730,12 +730,12 @@ ADD_DEFINITIONS(${LIBVR_DEFINITIONS})
|
||||||
|
|
||||||
IF(WITH_PCH)
|
IF(WITH_PCH)
|
||||||
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
|
||||||
ENDIF(WITH_PCH)
|
ENDIF()
|
||||||
|
|
||||||
NL_GEN_PC(nel-3d.pc)
|
NL_GEN_PC(nel-3d.pc)
|
||||||
|
|
||||||
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||||
INSTALL(TARGETS nel3d LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
INSTALL(TARGETS nel3d LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
||||||
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
ENDIF()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(driver)
|
ADD_SUBDIRECTORY(driver)
|
||||||
|
|
|
@ -50,14 +50,14 @@ IDriver::~IDriver()
|
||||||
{
|
{
|
||||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||||
nlassert( rTexDrvInfos.size() == 0 );
|
nlassert(rTexDrvInfos.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
nlassert(_TexDrvShares.size()==0);
|
nlassert(_TexDrvShares.empty());
|
||||||
nlassert(_MatDrvInfos.size()==0);
|
nlassert(_MatDrvInfos.empty());
|
||||||
nlassert(_VBDrvInfos.size()==0);
|
nlassert(_VBDrvInfos.empty());
|
||||||
nlassert(_IBDrvInfos.size()==0);
|
nlassert(_IBDrvInfos.empty());
|
||||||
nlassert(_GPUPrgDrvInfos.size()==0);
|
nlassert(_GPUPrgDrvInfos.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
IF(WITH_DRIVER_OPENGL)
|
IF(WITH_DRIVER_OPENGL)
|
||||||
ADD_SUBDIRECTORY(opengl)
|
ADD_SUBDIRECTORY(opengl)
|
||||||
ENDIF(WITH_DRIVER_OPENGL)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGLES)
|
IF(WITH_DRIVER_OPENGLES)
|
||||||
ADD_SUBDIRECTORY(opengles)
|
ADD_SUBDIRECTORY(opengles)
|
||||||
ENDIF(WITH_DRIVER_OPENGLES)
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DIRECT3D)
|
IF(WITH_DRIVER_DIRECT3D)
|
||||||
ADD_SUBDIRECTORY(direct3d)
|
ADD_SUBDIRECTORY(direct3d)
|
||||||
ENDIF(WITH_DRIVER_DIRECT3D)
|
ENDIF()
|
||||||
ENDIF(WIN32)
|
ENDIF()
|
||||||
|
|
|
@ -4,7 +4,7 @@ NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY})
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
|
NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
|
||||||
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
|
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
|
||||||
|
|
|
@ -2267,7 +2267,10 @@ bool CDriverD3D::getCurrentScreenMode(GfxMode &gfxMode)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDriverD3D::setWindowTitle(const ucstring &title)
|
void CDriverD3D::setWindowTitle(const ucstring &title)
|
||||||
{
|
{
|
||||||
SetWindowTextW(_HWnd,(WCHAR*)title.c_str());
|
if (!SetWindowTextW(_HWnd, (WCHAR*)title.c_str()))
|
||||||
|
{
|
||||||
|
nlwarning("SetWindowText failed: %s", formatErrorMessage(getLastError()).c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -125,7 +125,7 @@ uint8 *CVBDrvInfosD3D::lock (uint begin, uint end, bool readOnly)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlinfo("Buffer %s at %x is Locked", (*it)->VertexBufferPtr->getName().c_str(), (int) *it);
|
nlinfo("Buffer %s at %p is Locked", (*it)->VertexBufferPtr->getName().c_str(), *it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 32155 $ on $Date: 2015-10-22 23:25:39 -0400 (Thu, 22 Oct 2015) $
|
** Khronos $Revision: 33061 $ on $Date: 2016-07-14 20:14:13 -0400 (Thu, 14 Jul 2016) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
@ -53,7 +53,7 @@ extern "C" {
|
||||||
#define GLAPI extern
|
#define GLAPI extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GL_GLEXT_VERSION 20151022
|
#define GL_GLEXT_VERSION 20160714
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: gl
|
* API: gl
|
||||||
|
@ -4657,8 +4657,13 @@ GLAPI void APIENTRY glVertexBlendARB (GLint count);
|
||||||
|
|
||||||
#ifndef GL_ARB_vertex_buffer_object
|
#ifndef GL_ARB_vertex_buffer_object
|
||||||
#define GL_ARB_vertex_buffer_object 1
|
#define GL_ARB_vertex_buffer_object 1
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
typedef intptr_t GLsizeiptrARB;
|
||||||
|
typedef intptr_t GLintptrARB;
|
||||||
|
#else
|
||||||
typedef ptrdiff_t GLsizeiptrARB;
|
typedef ptrdiff_t GLsizeiptrARB;
|
||||||
typedef ptrdiff_t GLintptrARB;
|
typedef ptrdiff_t GLintptrARB;
|
||||||
|
#endif
|
||||||
#define GL_BUFFER_SIZE_ARB 0x8764
|
#define GL_BUFFER_SIZE_ARB 0x8764
|
||||||
#define GL_BUFFER_USAGE_ARB 0x8765
|
#define GL_BUFFER_USAGE_ARB 0x8765
|
||||||
#define GL_ARRAY_BUFFER_ARB 0x8892
|
#define GL_ARRAY_BUFFER_ARB 0x8892
|
||||||
|
@ -5596,6 +5601,10 @@ GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLf
|
||||||
#define GL_AMD_shader_atomic_counter_ops 1
|
#define GL_AMD_shader_atomic_counter_ops 1
|
||||||
#endif /* GL_AMD_shader_atomic_counter_ops */
|
#endif /* GL_AMD_shader_atomic_counter_ops */
|
||||||
|
|
||||||
|
#ifndef GL_AMD_shader_explicit_vertex_parameter
|
||||||
|
#define GL_AMD_shader_explicit_vertex_parameter 1
|
||||||
|
#endif /* GL_AMD_shader_explicit_vertex_parameter */
|
||||||
|
|
||||||
#ifndef GL_AMD_shader_stencil_export
|
#ifndef GL_AMD_shader_stencil_export
|
||||||
#define GL_AMD_shader_stencil_export 1
|
#define GL_AMD_shader_stencil_export 1
|
||||||
#endif /* GL_AMD_shader_stencil_export */
|
#endif /* GL_AMD_shader_stencil_export */
|
||||||
|
@ -8636,6 +8645,20 @@ GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei s
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_EXT_vertex_weighting */
|
#endif /* GL_EXT_vertex_weighting */
|
||||||
|
|
||||||
|
#ifndef GL_EXT_window_rectangles
|
||||||
|
#define GL_EXT_window_rectangles 1
|
||||||
|
#define GL_INCLUSIVE_EXT 0x8F10
|
||||||
|
#define GL_EXCLUSIVE_EXT 0x8F11
|
||||||
|
#define GL_WINDOW_RECTANGLE_EXT 0x8F12
|
||||||
|
#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
|
||||||
|
#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
|
||||||
|
#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
|
||||||
|
typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_EXT_window_rectangles */
|
||||||
|
|
||||||
#ifndef GL_EXT_x11_sync_object
|
#ifndef GL_EXT_x11_sync_object
|
||||||
#define GL_EXT_x11_sync_object 1
|
#define GL_EXT_x11_sync_object 1
|
||||||
#define GL_SYNC_X11_FENCE_EXT 0x90E1
|
#define GL_SYNC_X11_FENCE_EXT 0x90E1
|
||||||
|
@ -8813,6 +8836,11 @@ GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRG
|
||||||
#define GL_INTERLACE_READ_INGR 0x8568
|
#define GL_INTERLACE_READ_INGR 0x8568
|
||||||
#endif /* GL_INGR_interlace_read */
|
#endif /* GL_INGR_interlace_read */
|
||||||
|
|
||||||
|
#ifndef GL_INTEL_conservative_rasterization
|
||||||
|
#define GL_INTEL_conservative_rasterization 1
|
||||||
|
#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE
|
||||||
|
#endif /* GL_INTEL_conservative_rasterization */
|
||||||
|
|
||||||
#ifndef GL_INTEL_fragment_shader_ordering
|
#ifndef GL_INTEL_fragment_shader_ordering
|
||||||
#define GL_INTEL_fragment_shader_ordering 1
|
#define GL_INTEL_fragment_shader_ordering 1
|
||||||
#endif /* GL_INTEL_fragment_shader_ordering */
|
#endif /* GL_INTEL_fragment_shader_ordering */
|
||||||
|
@ -9129,6 +9157,17 @@ GLAPI void APIENTRY glBlendBarrierNV (void);
|
||||||
#define GL_NV_blend_square 1
|
#define GL_NV_blend_square 1
|
||||||
#endif /* GL_NV_blend_square */
|
#endif /* GL_NV_blend_square */
|
||||||
|
|
||||||
|
#ifndef GL_NV_clip_space_w_scaling
|
||||||
|
#define GL_NV_clip_space_w_scaling 1
|
||||||
|
#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C
|
||||||
|
#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D
|
||||||
|
#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E
|
||||||
|
typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_NV_clip_space_w_scaling */
|
||||||
|
|
||||||
#ifndef GL_NV_command_list
|
#ifndef GL_NV_command_list
|
||||||
#define GL_NV_command_list 1
|
#define GL_NV_command_list 1
|
||||||
#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
|
#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
|
||||||
|
@ -9231,6 +9270,17 @@ GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat valu
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_NV_conservative_raster_dilate */
|
#endif /* GL_NV_conservative_raster_dilate */
|
||||||
|
|
||||||
|
#ifndef GL_NV_conservative_raster_pre_snap_triangles
|
||||||
|
#define GL_NV_conservative_raster_pre_snap_triangles 1
|
||||||
|
#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D
|
||||||
|
#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E
|
||||||
|
#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F
|
||||||
|
typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_NV_conservative_raster_pre_snap_triangles */
|
||||||
|
|
||||||
#ifndef GL_NV_copy_depth_to_color
|
#ifndef GL_NV_copy_depth_to_color
|
||||||
#define GL_NV_copy_depth_to_color 1
|
#define GL_NV_copy_depth_to_color 1
|
||||||
#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
|
#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
|
||||||
|
@ -10223,6 +10273,11 @@ GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname,
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_NV_register_combiners2 */
|
#endif /* GL_NV_register_combiners2 */
|
||||||
|
|
||||||
|
#ifndef GL_NV_robustness_video_memory_purge
|
||||||
|
#define GL_NV_robustness_video_memory_purge 1
|
||||||
|
#define GL_PURGED_CONTEXT_RESET_NV 0x92BB
|
||||||
|
#endif /* GL_NV_robustness_video_memory_purge */
|
||||||
|
|
||||||
#ifndef GL_NV_sample_locations
|
#ifndef GL_NV_sample_locations
|
||||||
#define GL_NV_sample_locations 1
|
#define GL_NV_sample_locations 1
|
||||||
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
|
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
|
||||||
|
@ -10255,6 +10310,10 @@ GLAPI void APIENTRY glResolveDepthValuesNV (void);
|
||||||
#define GL_NV_shader_atomic_float 1
|
#define GL_NV_shader_atomic_float 1
|
||||||
#endif /* GL_NV_shader_atomic_float */
|
#endif /* GL_NV_shader_atomic_float */
|
||||||
|
|
||||||
|
#ifndef GL_NV_shader_atomic_float64
|
||||||
|
#define GL_NV_shader_atomic_float64 1
|
||||||
|
#endif /* GL_NV_shader_atomic_float64 */
|
||||||
|
|
||||||
#ifndef GL_NV_shader_atomic_fp16_vector
|
#ifndef GL_NV_shader_atomic_fp16_vector
|
||||||
#define GL_NV_shader_atomic_fp16_vector 1
|
#define GL_NV_shader_atomic_fp16_vector 1
|
||||||
#endif /* GL_NV_shader_atomic_fp16_vector */
|
#endif /* GL_NV_shader_atomic_fp16_vector */
|
||||||
|
@ -10318,6 +10377,10 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs
|
||||||
#define GL_NV_shader_thread_shuffle 1
|
#define GL_NV_shader_thread_shuffle 1
|
||||||
#endif /* GL_NV_shader_thread_shuffle */
|
#endif /* GL_NV_shader_thread_shuffle */
|
||||||
|
|
||||||
|
#ifndef GL_NV_stereo_view_rendering
|
||||||
|
#define GL_NV_stereo_view_rendering 1
|
||||||
|
#endif /* GL_NV_stereo_view_rendering */
|
||||||
|
|
||||||
#ifndef GL_NV_tessellation_program5
|
#ifndef GL_NV_tessellation_program5
|
||||||
#define GL_NV_tessellation_program5 1
|
#define GL_NV_tessellation_program5 1
|
||||||
#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
|
#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
|
||||||
|
@ -11088,6 +11151,26 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot
|
||||||
#define GL_NV_viewport_array2 1
|
#define GL_NV_viewport_array2 1
|
||||||
#endif /* GL_NV_viewport_array2 */
|
#endif /* GL_NV_viewport_array2 */
|
||||||
|
|
||||||
|
#ifndef GL_NV_viewport_swizzle
|
||||||
|
#define GL_NV_viewport_swizzle 1
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A
|
||||||
|
#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B
|
||||||
|
typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_NV_viewport_swizzle */
|
||||||
|
|
||||||
#ifndef GL_OML_interlace
|
#ifndef GL_OML_interlace
|
||||||
#define GL_OML_interlace 1
|
#define GL_OML_interlace 1
|
||||||
#define GL_INTERLACE_OML 0x8980
|
#define GL_INTERLACE_OML 0x8980
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,10 +33,10 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 31597 $ on $Date: 2015-06-25 16:32:35 -0400 (Thu, 25 Jun 2015) $
|
** Khronos $Revision: 32889 $ on $Date: 2016-05-31 07:09:51 -0400 (Tue, 31 May 2016) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GLX_GLXEXT_VERSION 20150623
|
#define GLX_GLXEXT_VERSION 20160531
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: glx
|
* API: glx
|
||||||
|
@ -317,6 +317,11 @@ void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||||
#endif
|
#endif
|
||||||
#endif /* GLX_EXT_import_context */
|
#endif /* GLX_EXT_import_context */
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_libglvnd
|
||||||
|
#define GLX_EXT_libglvnd 1
|
||||||
|
#define GLX_VENDOR_NAMES_EXT 0x20F6
|
||||||
|
#endif /* GLX_EXT_libglvnd */
|
||||||
|
|
||||||
#ifndef GLX_EXT_stereo_tree
|
#ifndef GLX_EXT_stereo_tree
|
||||||
#define GLX_EXT_stereo_tree 1
|
#define GLX_EXT_stereo_tree 1
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -543,6 +548,11 @@ int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int vi
|
||||||
#endif
|
#endif
|
||||||
#endif /* GLX_NV_present_video */
|
#endif /* GLX_NV_present_video */
|
||||||
|
|
||||||
|
#ifndef GLX_NV_robustness_video_memory_purge
|
||||||
|
#define GLX_NV_robustness_video_memory_purge 1
|
||||||
|
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
|
||||||
|
#endif /* GLX_NV_robustness_video_memory_purge */
|
||||||
|
|
||||||
#ifndef GLX_NV_swap_group
|
#ifndef GLX_NV_swap_group
|
||||||
#define GLX_NV_swap_group 1
|
#define GLX_NV_swap_group 1
|
||||||
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 31597 $ on $Date: 2015-06-25 16:32:35 -0400 (Thu, 25 Jun 2015) $
|
** Khronos $Revision: 32686 $ on $Date: 2016-04-19 21:08:44 -0400 (Tue, 19 Apr 2016) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
@ -41,7 +41,7 @@ extern "C" {
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WGL_WGLEXT_VERSION 20150623
|
#define WGL_WGLEXT_VERSION 20160419
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: wgl
|
* API: wgl
|
||||||
|
|
|
@ -196,18 +196,6 @@ CDriverGL::CDriverGL()
|
||||||
_backBufferHeight = 0;
|
_backBufferHeight = 0;
|
||||||
_backBufferWidth = 0;
|
_backBufferWidth = 0;
|
||||||
|
|
||||||
// autorelease pool for memory management
|
|
||||||
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
|
||||||
|
|
||||||
// init the application object
|
|
||||||
[NSApplication sharedApplication];
|
|
||||||
|
|
||||||
// create the menu in the top screen bar
|
|
||||||
setupApplicationMenu();
|
|
||||||
|
|
||||||
// finish the application launching
|
|
||||||
[NSApp finishLaunching];
|
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
_dpy = 0;
|
_dpy = 0;
|
||||||
|
@ -373,10 +361,6 @@ CDriverGL::~CDriverGL()
|
||||||
{
|
{
|
||||||
H_AUTO_OGL(CDriverGL_CDriverGLDtor)
|
H_AUTO_OGL(CDriverGL_CDriverGLDtor)
|
||||||
release();
|
release();
|
||||||
|
|
||||||
#if defined(NL_OS_MAC)
|
|
||||||
[_autoreleasePool release];
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -638,7 +622,7 @@ bool CDriverGL::setupDisplay()
|
||||||
checkForPerPixelLightingSupport();
|
checkForPerPixelLightingSupport();
|
||||||
|
|
||||||
#ifndef USE_OPENGLES
|
#ifndef USE_OPENGLES
|
||||||
// if EXTVertexShader is used, bind the standard GL arrays, and allocate constant
|
// if EXTVertexShader is used, bind the standard GL arrays, and allocate constant
|
||||||
if (!_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram && _Extensions.EXTVertexShader)
|
if (!_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram && _Extensions.EXTVertexShader)
|
||||||
{
|
{
|
||||||
_EVSPositionHandle = nglBindParameterEXT(GL_CURRENT_VERTEX_EXT);
|
_EVSPositionHandle = nglBindParameterEXT(GL_CURRENT_VERTEX_EXT);
|
||||||
|
@ -676,8 +660,8 @@ bool CDriverGL::setupDisplay()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset the vbl interval
|
// Get initial VBL interval
|
||||||
setSwapVBLInterval(_Interval);
|
_Interval = getSwapVBLInterval();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -942,13 +926,6 @@ bool CDriverGL::swapBuffers()
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
// TODO: maybe do this somewhere else?
|
|
||||||
if(_DestroyWindow)
|
|
||||||
{
|
|
||||||
[_autoreleasePool release];
|
|
||||||
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
|
||||||
}
|
|
||||||
|
|
||||||
[_ctx flushBuffer];
|
[_ctx flushBuffer];
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
@ -2288,16 +2265,22 @@ void CDriverGL::setSwapVBLInterval(uint interval)
|
||||||
H_AUTO_OGL(CDriverGL_setSwapVBLInterval);
|
H_AUTO_OGL(CDriverGL_setSwapVBLInterval);
|
||||||
|
|
||||||
if (!_Initialized)
|
if (!_Initialized)
|
||||||
|
{
|
||||||
|
nlwarning("OpenGL driver not initialized when calling setSwapVBLInterval");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
|
||||||
|
// don't try to change VBL if interval didn't change
|
||||||
|
if (_Interval == interval) return;
|
||||||
|
|
||||||
#ifdef USE_OPENGLES
|
#ifdef USE_OPENGLES
|
||||||
res = eglSwapInterval(_EglDisplay, _Interval) == EGL_TRUE;
|
res = eglSwapInterval(_EglDisplay, interval) == EGL_TRUE;
|
||||||
#elif defined(NL_OS_WINDOWS)
|
#elif defined(NL_OS_WINDOWS)
|
||||||
if(_Extensions.WGLEXTSwapControl)
|
if(_Extensions.WGLEXTSwapControl)
|
||||||
{
|
{
|
||||||
res = nwglSwapIntervalEXT(_Interval) == TRUE;
|
res = nwglSwapIntervalEXT(interval) == TRUE;
|
||||||
}
|
}
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
[_ctx setValues:(GLint*)&interval forParameter:NSOpenGLCPSwapInterval];
|
[_ctx setValues:(GLint*)&interval forParameter:NSOpenGLCPSwapInterval];
|
||||||
|
|
|
@ -1685,6 +1685,7 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
{
|
{
|
||||||
ext.ARBFragmentProgram = false;
|
ext.ARBFragmentProgram = false;
|
||||||
ext.NVFragmentProgram2 = false;
|
ext.NVFragmentProgram2 = false;
|
||||||
|
ext.ARBFragmentShader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.OESDrawTexture = setupOESDrawTexture(glext);
|
ext.OESDrawTexture = setupOESDrawTexture(glext);
|
||||||
|
@ -1991,24 +1992,32 @@ bool registerWGlExtensions(CGlExtensions &ext, HDC hDC)
|
||||||
|
|
||||||
if (ext.WGLNVGPUAffinity)
|
if (ext.WGLNVGPUAffinity)
|
||||||
{
|
{
|
||||||
uint i = 0;
|
uint gpuIndex = 0;
|
||||||
|
|
||||||
HGPUNV hGPU;
|
HGPUNV hGPU;
|
||||||
|
|
||||||
while(nwglEnumGpusNV(i, &hGPU))
|
// list all GPUs
|
||||||
|
while (nwglEnumGpusNV(gpuIndex, &hGPU))
|
||||||
{
|
{
|
||||||
uint j = 0;
|
uint j = 0;
|
||||||
|
|
||||||
PGPU_DEVICE lpGpuDevice = NULL;
|
_GPU_DEVICE gpuDevice;
|
||||||
|
gpuDevice.cb = sizeof(gpuDevice);
|
||||||
|
|
||||||
while(nwglEnumGpuDevicesNV(hGPU, j, lpGpuDevice))
|
// list all devices connected to GPU
|
||||||
|
while(nwglEnumGpuDevicesNV(hGPU, j, &gpuDevice))
|
||||||
{
|
{
|
||||||
nlinfo("Device: %s - %s - flags: %u", lpGpuDevice->DeviceName, lpGpuDevice->DeviceString, lpGpuDevice->Flags);
|
nlinfo("Device: %s / %s / flags: %u", gpuDevice.DeviceName, gpuDevice.DeviceString, (uint)gpuDevice.Flags);
|
||||||
|
|
||||||
|
if (gpuDevice.Flags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)
|
||||||
|
{
|
||||||
|
nlinfo("Virtual screen: (%d,%d)-(%d,%d)", (sint)gpuDevice.rcVirtualScreen.left, (sint)gpuDevice.rcVirtualScreen.top, (sint)gpuDevice.rcVirtualScreen.right, (sint)gpuDevice.rcVirtualScreen.bottom);
|
||||||
|
}
|
||||||
|
|
||||||
++j;
|
++j;
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
++gpuIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,9 +343,14 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc)
|
||||||
retrieveATIDriverVersion();
|
retrieveATIDriverVersion();
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
// nothing to do
|
|
||||||
nlunreferenced(windowIcon);
|
nlunreferenced(windowIcon);
|
||||||
|
|
||||||
|
// autorelease pool for memory management
|
||||||
|
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
// init the application object
|
||||||
|
[NSApplication sharedApplication];
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
nlunreferenced(windowIcon);
|
nlunreferenced(windowIcon);
|
||||||
|
@ -485,7 +490,7 @@ bool CDriverGL::unInit()
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
// nothing to do
|
[_autoreleasePool release];
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
|
@ -1466,6 +1471,12 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
|
// create the menu in the top screen bar
|
||||||
|
setupApplicationMenu();
|
||||||
|
|
||||||
|
// finish the application launching
|
||||||
|
[NSApp finishLaunching];
|
||||||
|
|
||||||
// describe how the window should look like and behave
|
// describe how the window should look like and behave
|
||||||
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
||||||
NSMiniaturizableWindowMask | NSResizableWindowMask;
|
NSMiniaturizableWindowMask | NSResizableWindowMask;
|
||||||
|
@ -1486,7 +1497,7 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
[[CocoaApplicationDelegate alloc] initWithDriver:this];
|
[[CocoaApplicationDelegate alloc] initWithDriver:this];
|
||||||
|
|
||||||
// set the application delegate, this will handle window/app close events
|
// set the application delegate, this will handle window/app close events
|
||||||
[NSApp setDelegate:(id<NSFileManagerDelegate>)appDelegate];
|
[NSApp setDelegate:(id<NSApplicationDelegate>)appDelegate];
|
||||||
|
|
||||||
// bind the close button of the window to applicationShouldTerminate
|
// bind the close button of the window to applicationShouldTerminate
|
||||||
id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton];
|
id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton];
|
||||||
|
@ -1642,6 +1653,7 @@ bool CDriverGL::destroyWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
|
|
||||||
if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well
|
if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well
|
||||||
|
@ -2299,7 +2311,10 @@ void CDriverGL::setWindowTitle(const ucstring &title)
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
SetWindowTextW(_win, (WCHAR*)title.c_str());
|
if (!SetWindowTextW(_win, (WCHAR*)title.c_str()))
|
||||||
|
{
|
||||||
|
nlwarning("SetWindowText failed: %s", formatErrorMessage(getLastError()).c_str());
|
||||||
|
}
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
|
|
|
@ -442,8 +442,15 @@ void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
||||||
processMessage(event, &server);
|
processMessage(event, &server);
|
||||||
}
|
}
|
||||||
|
|
||||||
// forward the event to the cocoa application
|
@try
|
||||||
[NSApp sendEvent:event];
|
{
|
||||||
|
// forward the event to the cocoa application
|
||||||
|
[NSApp sendEvent:event];
|
||||||
|
}
|
||||||
|
@catch(NSException *e)
|
||||||
|
{
|
||||||
|
nlwarning("Exception when sending event: %s", [[e reason] UTF8String]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_server = &server;
|
_server = &server;
|
||||||
|
|
|
@ -528,7 +528,7 @@ void CDRU::drawTrianglesUnlit(const NLMISC::CTriangleUV *trilist, sint ntris,
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDRU::drawTrianglesUnlit(const std::vector<NLMISC::CTriangleUV> &trilist, CMaterial &mat, IDriver& driver)
|
void CDRU::drawTrianglesUnlit(const std::vector<NLMISC::CTriangleUV> &trilist, CMaterial &mat, IDriver& driver)
|
||||||
{
|
{
|
||||||
if(trilist.size()==0)
|
if(trilist.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CDRU::drawTrianglesUnlit( &(*trilist.begin()), (uint)trilist.size(), mat, driver);
|
CDRU::drawTrianglesUnlit( &(*trilist.begin()), (uint)trilist.size(), mat, driver);
|
||||||
|
@ -570,7 +570,7 @@ void CDRU::drawLinesUnlit(const NLMISC::CLine *linelist, sint nlines, CMateria
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDRU::drawLinesUnlit(const std::vector<NLMISC::CLine> &linelist, CMaterial &mat, IDriver& driver)
|
void CDRU::drawLinesUnlit(const std::vector<NLMISC::CLine> &linelist, CMaterial &mat, IDriver& driver)
|
||||||
{
|
{
|
||||||
if(linelist.size()==0)
|
if(linelist.empty())
|
||||||
return;
|
return;
|
||||||
CDRU::drawLinesUnlit( &(*linelist.begin()), (sint)linelist.size(), mat, driver);
|
CDRU::drawLinesUnlit( &(*linelist.begin()), (sint)linelist.size(), mat, driver);
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,7 +457,7 @@ CFontGenerator::CFontGenerator (const std::string &fontFileName, const std::stri
|
||||||
nlerror ("FT_New_Face() failed with file '%s': %s", fontFileName.c_str(), getFT2Error(error));
|
nlerror ("FT_New_Face() failed with file '%s': %s", fontFileName.c_str(), getFT2Error(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fontExFileName != "")
|
if (!fontExFileName.empty())
|
||||||
{
|
{
|
||||||
error = FT_Attach_File (_Face, fontExFileName.c_str ());
|
error = FT_Attach_File (_Face, fontExFileName.c_str ());
|
||||||
if (error)
|
if (error)
|
||||||
|
|
|
@ -1831,9 +1831,9 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
textName= tile->getRelativeFileName(CTile::additive);
|
textName= tile->getRelativeFileName(CTile::additive);
|
||||||
else
|
else
|
||||||
textName= "";
|
textName.clear();
|
||||||
// If no additive for this tile, rdrpass is NULL.
|
// If no additive for this tile, rdrpass is NULL.
|
||||||
if(textName=="")
|
if(textName.empty())
|
||||||
tileInfo->AdditiveRdrPass= NULL;
|
tileInfo->AdditiveRdrPass= NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1844,7 +1844,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
|
|
||||||
// We may have an alpha part for additive.
|
// We may have an alpha part for additive.
|
||||||
textName= tile->getRelativeFileName (CTile::alpha);
|
textName= tile->getRelativeFileName (CTile::alpha);
|
||||||
if(textName!="")
|
if(!textName.empty())
|
||||||
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
||||||
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
||||||
|
|
||||||
|
@ -1866,7 +1866,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
{
|
{
|
||||||
textName= tile->getRelativeFileName(CTile::diffuse);
|
textName= tile->getRelativeFileName(CTile::diffuse);
|
||||||
if(textName!="")
|
if(!textName.empty())
|
||||||
// Avoid using Clamp for diffuse, because of recent NVidia GL drivers Bugs in 77.72
|
// Avoid using Clamp for diffuse, because of recent NVidia GL drivers Bugs in 77.72
|
||||||
pass.TextureDiffuse= findTileTexture(TileBank.getAbsPath()+textName, false);
|
pass.TextureDiffuse= findTileTexture(TileBank.getAbsPath()+textName, false);
|
||||||
else
|
else
|
||||||
|
@ -1880,7 +1880,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
{
|
{
|
||||||
textName= tile->getRelativeFileName (CTile::alpha);
|
textName= tile->getRelativeFileName (CTile::alpha);
|
||||||
if(textName!="")
|
if(!textName.empty())
|
||||||
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
||||||
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
||||||
}
|
}
|
||||||
|
@ -2859,7 +2859,7 @@ void CLandscape::setupAutomaticLightDir(const CVector &lightDir)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CVector CLandscape::getHeightFieldDeltaZ(float x, float y) const
|
CVector CLandscape::getHeightFieldDeltaZ(float x, float y) const
|
||||||
{
|
{
|
||||||
if(_HeightField.ZPatchs.size()==0)
|
if(_HeightField.ZPatchs.empty())
|
||||||
return CVector::Null;
|
return CVector::Null;
|
||||||
|
|
||||||
// map to _HeightField coordinates.
|
// map to _HeightField coordinates.
|
||||||
|
|
|
@ -213,9 +213,9 @@ void CLandscapeUser::refreshAllZonesAround(const CVector &pos, float radius, std
|
||||||
refreshZonesAround (pos, radius, za, zr);
|
refreshZonesAround (pos, radius, za, zr);
|
||||||
|
|
||||||
// some zone added or removed??
|
// some zone added or removed??
|
||||||
if(za != "")
|
if(!za.empty())
|
||||||
zonesAdded.push_back(za);
|
zonesAdded.push_back(za);
|
||||||
if(zr != "")
|
if(!zr.empty())
|
||||||
zonesRemoved.push_back(zr);
|
zonesRemoved.push_back(zr);
|
||||||
|
|
||||||
_ZoneManager.checkZonesAround ((uint)pos.x, (uint)(-pos.y), (uint)radius);
|
_ZoneManager.checkZonesAround ((uint)pos.x, (uint)(-pos.y), (uint)radius);
|
||||||
|
|
|
@ -174,7 +174,7 @@ UInstanceGroup *CLandscapeIGManager::loadZoneIG(const std::string &name)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LAND_MNGR_LOAD_ZONEIG
|
NL3D_HAUTO_LAND_MNGR_LOAD_ZONEIG
|
||||||
|
|
||||||
if(name=="")
|
if(name.empty())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -232,7 +232,7 @@ void CLandscapeIGManager::unloadArrayZoneIG(const std::vector<std::string> &name
|
||||||
void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LAND_MNGR_UNLOAD_ZONEIG
|
NL3D_HAUTO_LAND_MNGR_UNLOAD_ZONEIG
|
||||||
if(name=="")
|
if(name.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -255,7 +255,7 @@ void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
||||||
{
|
{
|
||||||
if(name=="")
|
if(name.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -272,7 +272,7 @@ bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
UInstanceGroup *CLandscapeIGManager::getIG(const std::string &name) const
|
UInstanceGroup *CLandscapeIGManager::getIG(const std::string &name) const
|
||||||
{
|
{
|
||||||
if(name=="")
|
if(name.empty())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
|
|
@ -134,7 +134,7 @@ void CLandscapeVBAllocator::resetReallocation()
|
||||||
uint CLandscapeVBAllocator::allocateVertex()
|
uint CLandscapeVBAllocator::allocateVertex()
|
||||||
{
|
{
|
||||||
// if no more free, allocate.
|
// if no more free, allocate.
|
||||||
if( _VertexFreeMemory.size()==0 )
|
if( _VertexFreeMemory.empty() )
|
||||||
{
|
{
|
||||||
// enlarge capacity.
|
// enlarge capacity.
|
||||||
uint newResize;
|
uint newResize;
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace NL3D
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(Vertices.size());
|
nlassert(!Vertices.empty());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
||||||
sint i;
|
sint i;
|
||||||
|
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
if(m.Vertices.empty() || m.Faces.empty())
|
||||||
{
|
{
|
||||||
_VBuffer.setNumVertices(0);
|
_VBuffer.setNumVertices(0);
|
||||||
_VBuffer.setName("CMeshGeom");
|
_VBuffer.setName("CMeshGeom");
|
||||||
|
@ -436,7 +436,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the vertex buffer preferred memory
|
// Set the vertex buffer preferred memory
|
||||||
bool avoidVBHard= _Skinned || ( _MeshMorpher && _MeshMorpher->BlendShapes.size()>0 );
|
bool avoidVBHard= _Skinned || ( _MeshMorpher && !_MeshMorpher->BlendShapes.empty() );
|
||||||
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
||||||
|
|
||||||
// End!!
|
// End!!
|
||||||
|
@ -638,7 +638,7 @@ void CMeshGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount,
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.size()==0)
|
if(mBlock.RdrPass.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Global alpha ?
|
// Global alpha ?
|
||||||
|
@ -790,7 +790,7 @@ void CMeshGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.size()==0)
|
if(mBlock.RdrPass.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Render all pass.
|
// Render all pass.
|
||||||
|
@ -840,7 +840,7 @@ void CMeshGeom::renderSimpleWithMaterial(IDriver *drv, const CMatrix &worldMatri
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.size()==0)
|
if(mBlock.RdrPass.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Render all pass.
|
// Render all pass.
|
||||||
|
@ -998,10 +998,10 @@ void CMeshGeom::compileRunTime()
|
||||||
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
||||||
|
|
||||||
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
||||||
bool supportMeshBlockRendering= !_Skinned && _MeshMorpher->BlendShapes.size()==0;
|
bool supportMeshBlockRendering= !_Skinned && _MeshMorpher->BlendShapes.empty();
|
||||||
|
|
||||||
// true only if one matrix block, and at least one rdrPass.
|
// true only if one matrix block, and at least one rdrPass.
|
||||||
supportMeshBlockRendering= supportMeshBlockRendering && _MatrixBlocks.size()==1 && _MatrixBlocks[0].RdrPass.size()>0;
|
supportMeshBlockRendering= supportMeshBlockRendering && _MatrixBlocks.size()==1 && !_MatrixBlocks[0].RdrPass.empty();
|
||||||
if (supportMeshBlockRendering && _MeshVertexProgram)
|
if (supportMeshBlockRendering && _MeshVertexProgram)
|
||||||
{
|
{
|
||||||
supportMeshBlockRendering = supportMeshBlockRendering && _MeshVertexProgram->supportMeshBlockRendering();
|
supportMeshBlockRendering = supportMeshBlockRendering && _MeshVertexProgram->supportMeshBlockRendering();
|
||||||
|
@ -1021,7 +1021,7 @@ void CMeshGeom::compileRunTime()
|
||||||
if(supportMBRPerMaterial)
|
if(supportMBRPerMaterial)
|
||||||
_SupportMBRFlags|= MBRSortPerMaterial;
|
_SupportMBRFlags|= MBRSortPerMaterial;
|
||||||
|
|
||||||
bool avoidVBHard= _Skinned || ( _MeshMorpher && _MeshMorpher->BlendShapes.size()>0 );
|
bool avoidVBHard= _Skinned || ( _MeshMorpher && !_MeshMorpher->BlendShapes.empty() );
|
||||||
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,9 +407,10 @@ void CMeshMorpher::updateRawSkin (CVertexBuffer *vbOri,
|
||||||
rFactor*= 0.01f;
|
rFactor*= 0.01f;
|
||||||
uint32 numVertices= (uint32)rBS.VertRefs.size();
|
uint32 numVertices= (uint32)rBS.VertRefs.size();
|
||||||
// don't know why, but cases happen where deltaNorm not empty while deltaPos is
|
// don't know why, but cases happen where deltaNorm not empty while deltaPos is
|
||||||
bool hasPos= rBS.deltaPos.size()>0;
|
bool hasPos = !rBS.deltaPos.empty();
|
||||||
bool hasNorm= rBS.deltaNorm.size()>0;
|
bool hasNorm = !rBS.deltaNorm.empty();
|
||||||
bool hasUV= rBS.deltaUV.size()>0;
|
bool hasUV = !rBS.deltaUV.empty();
|
||||||
|
|
||||||
for (j = 0; j < numVertices; ++j)
|
for (j = 0; j < numVertices; ++j)
|
||||||
{
|
{
|
||||||
// Get the vertex Index in the VBufferFinal
|
// Get the vertex Index in the VBufferFinal
|
||||||
|
|
|
@ -180,7 +180,7 @@ void CMeshMRMGeom::CLod::optimizeTriangleOrder()
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(Vertices.size());
|
nlassert(!Vertices.empty());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +236,7 @@ void CMeshMRMGeom::build(CMesh::CMeshBuild &m, std::vector<CMesh::CMeshBuild*>
|
||||||
uint numMaxMaterial, const CMRMParameters ¶ms)
|
uint numMaxMaterial, const CMRMParameters ¶ms)
|
||||||
{
|
{
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
if(m.Vertices.empty() || m.Faces.empty())
|
||||||
{
|
{
|
||||||
_VBufferFinal.setNumVertices(0);
|
_VBufferFinal.setNumVertices(0);
|
||||||
_VBufferFinal.reserve(0);
|
_VBufferFinal.reserve(0);
|
||||||
|
@ -308,7 +308,7 @@ void CMeshMRMGeom::build(CMesh::CMeshBuild &m, std::vector<CMesh::CMeshBuild*>
|
||||||
_LevelDetail.MaxFaceUsed= 0;
|
_LevelDetail.MaxFaceUsed= 0;
|
||||||
_LevelDetail.MinFaceUsed= 0;
|
_LevelDetail.MinFaceUsed= 0;
|
||||||
// Count of primitive block
|
// Count of primitive block
|
||||||
if(_Lods.size()>0)
|
if (!_Lods.empty())
|
||||||
{
|
{
|
||||||
uint pb;
|
uint pb;
|
||||||
// Compute MinFaces.
|
// Compute MinFaces.
|
||||||
|
@ -469,7 +469,7 @@ void CMeshMRMGeom::applyGeomorph(std::vector<CMRMWedgeGeom> &geoms, float alpha
|
||||||
void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod, uint8 *vertexDestPtr)
|
void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod, uint8 *vertexDestPtr)
|
||||||
{
|
{
|
||||||
// no geomorphs? quit.
|
// no geomorphs? quit.
|
||||||
if(geoms.size()==0)
|
if(geoms.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clamp(alphaLod, 0.f, 1.f);
|
clamp(alphaLod, 0.f, 1.f);
|
||||||
|
@ -900,7 +900,7 @@ inline sint CMeshMRMGeom::chooseLod(float alphaMRM, float &alphaLod)
|
||||||
void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
if(_Lods.size()==0)
|
if(_Lods.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -922,7 +922,7 @@ void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCou
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.size()==0)
|
if(lod.RdrPass.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1104,7 +1104,7 @@ void CMeshMRMGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_MeshMRMGeom_renderSkin );
|
H_AUTO( NL3D_MeshMRMGeom_renderSkin );
|
||||||
|
|
||||||
if(_Lods.size()==0)
|
if(_Lods.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1126,7 +1126,7 @@ void CMeshMRMGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.size()==0)
|
if(lod.RdrPass.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ sint CMeshMRMGeom::renderSkinGroupGeom(CMeshMRMInstance *mi, float alphaMRM, uin
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.size()==0)
|
if(lod.RdrPass.empty())
|
||||||
// return no vertices added
|
// return no vertices added
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1942,7 +1942,7 @@ void CMeshMRMGeom::loadFirstLod(NLMISC::IStream &f)
|
||||||
|
|
||||||
|
|
||||||
// If empty MRM, quit.
|
// If empty MRM, quit.
|
||||||
if(_LodInfos.size()==0)
|
if(_LodInfos.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the version is <4, then SkinWeights are serialised per Lod.
|
/* If the version is <4, then SkinWeights are serialised per Lod.
|
||||||
|
@ -2431,7 +2431,7 @@ void CMeshMRMGeom::compileRunTime()
|
||||||
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
||||||
|
|
||||||
// Compute if can support SkinGrouping rendering
|
// Compute if can support SkinGrouping rendering
|
||||||
if(_Lods.size()==0 || !_Skinned)
|
if(_Lods.empty() || !_Skinned)
|
||||||
{
|
{
|
||||||
_SupportSkinGrouping= false;
|
_SupportSkinGrouping= false;
|
||||||
_SupportShadowSkinGrouping= false;
|
_SupportShadowSkinGrouping= false;
|
||||||
|
@ -2451,7 +2451,7 @@ void CMeshMRMGeom::compileRunTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
||||||
_SupportMeshBlockRendering= !_Skinned && _MeshMorpher.BlendShapes.size()==0;
|
_SupportMeshBlockRendering= !_Skinned && _MeshMorpher.BlendShapes.empty();
|
||||||
|
|
||||||
// \todo yoyo: support later MeshVertexProgram
|
// \todo yoyo: support later MeshVertexProgram
|
||||||
_SupportMeshBlockRendering= _SupportMeshBlockRendering && _MeshVertexProgram==NULL;
|
_SupportMeshBlockRendering= _SupportMeshBlockRendering && _MeshVertexProgram==NULL;
|
||||||
|
@ -3367,7 +3367,7 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
|
||||||
|
|
||||||
// Case of MeshMorpher
|
// Case of MeshMorpher
|
||||||
//========
|
//========
|
||||||
if(_MeshMorpher.BlendShapes.size()>0)
|
if(!_MeshMorpher.BlendShapes.empty())
|
||||||
{
|
{
|
||||||
skinLod.VertexRemap.resize((uint32)vertexFinalRemap.size());
|
skinLod.VertexRemap.resize((uint32)vertexFinalRemap.size());
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace NL3D
|
||||||
void CMeshMRMGeom::applySkin(CLod &lod, const CSkeletonModel *skeleton)
|
void CMeshMRMGeom::applySkin(CLod &lod, const CSkeletonModel *skeleton)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.size()==0)
|
if(_SkinWeights.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr.
|
// get vertexPtr.
|
||||||
|
|
|
@ -380,7 +380,7 @@ static void applyArraySkinTangentSpaceT(uint numMatrixes, uint32 *infPtr, CMesh:
|
||||||
void CMeshMRMGeom::applySkinWithNormal(CLod &lod, const CSkeletonModel *skeleton)
|
void CMeshMRMGeom::applySkinWithNormal(CLod &lod, const CSkeletonModel *skeleton)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.size()==0)
|
if(_SkinWeights.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr / normalOff.
|
// get vertexPtr / normalOff.
|
||||||
|
@ -446,7 +446,7 @@ void CMeshMRMGeom::applySkinWithTangentSpace(CLod &lod, const CSkeletonModel *sk
|
||||||
uint tangentSpaceTexCoord)
|
uint tangentSpaceTexCoord)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.size()==0)
|
if(_SkinWeights.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr / normalOff / tangent space offset.
|
// get vertexPtr / normalOff / tangent space offset.
|
||||||
|
@ -1468,7 +1468,7 @@ void CMeshMRMGeom::applyArrayRawSkinNormal4(CRawVertexNormalSkin4 *src, uint8 *
|
||||||
void CMeshMRMGeom::applyRawSkinWithNormal(CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton, uint8 *vbHard, float alphaLod)
|
void CMeshMRMGeom::applyRawSkinWithNormal(CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton, uint8 *vbHard, float alphaLod)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.size()==0)
|
if(_SkinWeights.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Some assert
|
// Some assert
|
||||||
|
|
|
@ -160,7 +160,7 @@ void CMeshMRMSkinnedGeom::CLod::buildPrimitiveBlock(uint renderPass, const CInde
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(Vertices.size());
|
nlassert(!Vertices.empty());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ void CMeshMRMSkinnedGeom::build(CMesh::CMeshBuild &m,
|
||||||
uint numMaxMaterial, const CMRMParameters ¶ms)
|
uint numMaxMaterial, const CMRMParameters ¶ms)
|
||||||
{
|
{
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
if(m.Vertices.empty() || m.Faces.empty())
|
||||||
{
|
{
|
||||||
_VBufferFinal.clear();
|
_VBufferFinal.clear();
|
||||||
_Lods.clear();
|
_Lods.clear();
|
||||||
|
@ -261,7 +261,7 @@ void CMeshMRMSkinnedGeom::build(CMesh::CMeshBuild &m,
|
||||||
_LevelDetail.MaxFaceUsed= 0;
|
_LevelDetail.MaxFaceUsed= 0;
|
||||||
_LevelDetail.MinFaceUsed= 0;
|
_LevelDetail.MinFaceUsed= 0;
|
||||||
// Count of primitive block
|
// Count of primitive block
|
||||||
if(_Lods.size()>0)
|
if(!_Lods.empty())
|
||||||
{
|
{
|
||||||
uint pb;
|
uint pb;
|
||||||
// Compute MinFaces.
|
// Compute MinFaces.
|
||||||
|
@ -421,7 +421,7 @@ void CMeshMRMSkinnedGeom::applyGeomorph(std::vector<CMRMWedgeGeom> &geoms, floa
|
||||||
void CMeshMRMSkinnedGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod)
|
void CMeshMRMSkinnedGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod)
|
||||||
{
|
{
|
||||||
// no geomorphs? quit.
|
// no geomorphs? quit.
|
||||||
if(geoms.size()==0)
|
if(geoms.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clamp(alphaLod, 0.f, 1.f);
|
clamp(alphaLod, 0.f, 1.f);
|
||||||
|
@ -579,7 +579,7 @@ inline sint CMeshMRMSkinnedGeom::chooseLod(float alphaMRM, float &alphaLod)
|
||||||
void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
if(_Lods.size()==0)
|
if(_Lods.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float pol
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.size()==0)
|
if(lod.RdrPass.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ sint CMeshMRMSkinnedGeom::renderSkinGroupGeom(CMeshMRMSkinnedInstance *mi, float
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.size()==0)
|
if(lod.RdrPass.empty())
|
||||||
// return no vertices added
|
// return no vertices added
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -3119,7 +3119,7 @@ bool CMRMBuilder::buildMRMSewingMeshes(const CMesh::CMeshBuild &mbuild, uint nWa
|
||||||
{
|
{
|
||||||
nlassert(nWantedLods>=1);
|
nlassert(nWantedLods>=1);
|
||||||
nlassert(divisor>=1);
|
nlassert(divisor>=1);
|
||||||
if(mbuild.Interfaces.size()==0)
|
if(mbuild.Interfaces.empty())
|
||||||
return false;
|
return false;
|
||||||
// must have same size
|
// must have same size
|
||||||
if(mbuild.InterfaceLinks.size()!=mbuild.Vertices.size())
|
if(mbuild.InterfaceLinks.size()!=mbuild.Vertices.size())
|
||||||
|
|
|
@ -604,7 +604,8 @@ void CPatch::addRefTessBlocks()
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
TessBlockRefCount++;
|
TessBlockRefCount++;
|
||||||
if(TessBlocks.size()==0)
|
|
||||||
|
if (TessBlocks.empty())
|
||||||
{
|
{
|
||||||
// Allocate the tessblocks.
|
// Allocate the tessblocks.
|
||||||
//==========
|
//==========
|
||||||
|
@ -1629,7 +1630,7 @@ void CPatch::serial(NLMISC::IStream &f)
|
||||||
|
|
||||||
// then just copy to TileColors.
|
// then just copy to TileColors.
|
||||||
TileColors.resize(tmpArray.size());
|
TileColors.resize(tmpArray.size());
|
||||||
if(TileColors.size()>0)
|
if(!TileColors.empty())
|
||||||
{
|
{
|
||||||
memcpy(&TileColors[0], &tmpArray[0], TileColors.size()*sizeof(CTileColor));
|
memcpy(&TileColors[0], &tmpArray[0], TileColors.size()*sizeof(CTileColor));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1452,7 +1452,7 @@ void CPatch::computeSoftwareGeomorphAndAlpha()
|
||||||
// Need only to fill CTessVertex, so do it only for FarVertices
|
// Need only to fill CTessVertex, so do it only for FarVertices
|
||||||
// Hence Geomorph is done twice on edges of patches!!.
|
// Hence Geomorph is done twice on edges of patches!!.
|
||||||
// If not too near for precise, fast compute of geomorph.
|
// If not too near for precise, fast compute of geomorph.
|
||||||
if( TessBlocks.size()==0 )
|
if( TessBlocks.empty() )
|
||||||
{
|
{
|
||||||
// Just update all vertices of master block.
|
// Just update all vertices of master block.
|
||||||
computeGeomorphVertexList(MasterBlock.FarVertexList);
|
computeGeomorphVertexList(MasterBlock.FarVertexList);
|
||||||
|
|
|
@ -540,7 +540,7 @@ bool CPatchDLMContext::generate(CPatch *patch, CTextureDLM *textureDLM, CPatch
|
||||||
#ifndef NL_DLM_TILE_RES
|
#ifndef NL_DLM_TILE_RES
|
||||||
|
|
||||||
// retrieve patch tileColor pointer.
|
// retrieve patch tileColor pointer.
|
||||||
nlassert(_Patch->TileColors.size()>0);
|
nlassert(!_Patch->TileColors.empty());
|
||||||
CTileColor *tileColor= &_Patch->TileColors[0];
|
CTileColor *tileColor= &_Patch->TileColors[0];
|
||||||
|
|
||||||
// skip 1 tiles colors per column and per row
|
// skip 1 tiles colors per column and per row
|
||||||
|
@ -898,7 +898,7 @@ void CPatchDLMContext::compileLighting(TCompileType compType, CRGBA modulateCt
|
||||||
if(! (_IsSrcTextureFullBlack && _IsDstTextureFullBlack) )
|
if(! (_IsSrcTextureFullBlack && _IsDstTextureFullBlack) )
|
||||||
{
|
{
|
||||||
// if lightMap allocated
|
// if lightMap allocated
|
||||||
if(_LightMap.size()>0 && _DLMTexture)
|
if(!_LightMap.empty() && _DLMTexture)
|
||||||
{
|
{
|
||||||
// If the srcTexture is full black (ie no pointLight influence touch it),
|
// If the srcTexture is full black (ie no pointLight influence touch it),
|
||||||
if(_IsSrcTextureFullBlack)
|
if(_IsSrcTextureFullBlack)
|
||||||
|
|
|
@ -226,7 +226,7 @@ void CPSFace::step(TPSProcessPass pass)
|
||||||
else if (pass == PSMotion)
|
else if (pass == PSMotion)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// rotate all precomputed basis
|
// rotate all precomputed basis
|
||||||
for (CPSVector< CPlaneBasisPair >::V::iterator it = _PrecompBasis.begin(); it != _PrecompBasis.end(); ++it)
|
for (CPSVector< CPlaneBasisPair >::V::iterator it = _PrecompBasis.begin(); it != _PrecompBasis.end(); ++it)
|
||||||
|
@ -394,7 +394,7 @@ void CPSFace::deleteElement(uint32 index)
|
||||||
NL_PS_FUNC(CPSFace_deleteElement)
|
NL_PS_FUNC(CPSFace_deleteElement)
|
||||||
CPSQuad::deleteElement(index);
|
CPSQuad::deleteElement(index);
|
||||||
deletePlaneBasisElement(index);
|
deletePlaneBasisElement(index);
|
||||||
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// replace ourself by the last element...
|
// replace ourself by the last element...
|
||||||
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
||||||
|
@ -407,7 +407,7 @@ void CPSFace::resize(uint32 size)
|
||||||
NL_PS_FUNC(CPSFace_resize)
|
NL_PS_FUNC(CPSFace_resize)
|
||||||
nlassert(size < (1 << 16));
|
nlassert(size < (1 << 16));
|
||||||
resizePlaneBasis(size);
|
resizePlaneBasis(size);
|
||||||
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
_IndexInPrecompBasis.resize(size);
|
_IndexInPrecompBasis.resize(size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1994,7 +1994,7 @@ void CPSConstraintMesh::deleteElement(uint32 index)
|
||||||
deleteSizeElement(index);
|
deleteSizeElement(index);
|
||||||
deletePlaneBasisElement(index);
|
deletePlaneBasisElement(index);
|
||||||
// TODO : avoid code cuplication with CPSFace ...
|
// TODO : avoid code cuplication with CPSFace ...
|
||||||
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// replace ourself by the last element...
|
// replace ourself by the last element...
|
||||||
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
||||||
|
@ -2011,7 +2011,7 @@ void CPSConstraintMesh::resize(uint32 size)
|
||||||
resizeSize(size);
|
resizeSize(size);
|
||||||
resizePlaneBasis(size);
|
resizePlaneBasis(size);
|
||||||
// TODO : avoid code cuplication with CPSFace ...
|
// TODO : avoid code cuplication with CPSFace ...
|
||||||
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
_IndexInPrecompBasis.resize(size);
|
_IndexInPrecompBasis.resize(size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ void CQuadEffect::processPoly(const TPoint2DVect &poly
|
||||||
static TRasters rDest;
|
static TRasters rDest;
|
||||||
float currY;
|
float currY;
|
||||||
makeRasters(poly, quadWidth, quadHeight, rDest, currY);
|
makeRasters(poly, quadWidth, quadHeight, rDest, currY);
|
||||||
if (dest.size())
|
if (!dest.empty())
|
||||||
{
|
{
|
||||||
TRasters::const_iterator it, endIt = rDest.end();
|
TRasters::const_iterator it, endIt = rDest.end();
|
||||||
for (it = rDest.begin(); it != endIt; ++it)
|
for (it = rDest.begin(); it != endIt; ++it)
|
||||||
|
|
|
@ -451,7 +451,6 @@ void CInstanceGroup::serial (NLMISC::IStream& f)
|
||||||
_PointLightArray.clear();
|
_PointLightArray.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (version >= 2)
|
if (version >= 2)
|
||||||
f.serial(_GlobalPos);
|
f.serial(_GlobalPos);
|
||||||
|
|
||||||
|
@ -574,10 +573,11 @@ bool CInstanceGroup::addToScene (CScene& scene, IDriver *driver, uint selectedTe
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_Instances[i] = scene.createInstance (shapeName);
|
_Instances[i] = scene.createInstance (shapeName);
|
||||||
}
|
|
||||||
if( _Instances[i] == NULL )
|
if (_Instances[i] == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("Not found '%s' file", shapeName.c_str());
|
nlwarning("Not found '%s' file", shapeName.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1121,7 +1121,7 @@ void CInstanceGroup::setClusterSystemForInstances(CInstanceGroup *pIG)
|
||||||
void CInstanceGroup::getDynamicPortals (std::vector<std::string> &names)
|
void CInstanceGroup::getDynamicPortals (std::vector<std::string> &names)
|
||||||
{
|
{
|
||||||
for (uint32 i = 0; i < _Portals.size(); ++i)
|
for (uint32 i = 0; i < _Portals.size(); ++i)
|
||||||
if (_Portals[i].getName() != "")
|
if (!_Portals[i].getName().empty())
|
||||||
names.push_back (_Portals[i].getName());
|
names.push_back (_Portals[i].getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -705,7 +705,7 @@ void CShadowMapManager::renderProject(CScene *scene)
|
||||||
}
|
}
|
||||||
driver->activeVertexBuffer (CopyQuads);
|
driver->activeVertexBuffer (CopyQuads);
|
||||||
|
|
||||||
if (_ShadowCasters.size()>0)
|
if (!_ShadowCasters.empty())
|
||||||
{
|
{
|
||||||
// get the transform to compute shadow map.
|
// get the transform to compute shadow map.
|
||||||
CTransform *sc= _ShadowCasters[0];
|
CTransform *sc= _ShadowCasters[0];
|
||||||
|
|
|
@ -119,7 +119,7 @@ bool CTextureDLM::canCreateLightMap(uint w, uint h)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// If empty, test if there is an empty block.
|
// If empty, test if there is an empty block.
|
||||||
return _EmptyBlocks.size()>0;
|
return !_EmptyBlocks.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ bool CTextureDLM::createLightMap(uint w, uint h, uint &x, uint &y)
|
||||||
if(_FreeBlocks[lMapType]==NULL)
|
if(_FreeBlocks[lMapType]==NULL)
|
||||||
{
|
{
|
||||||
// list is empty => allocate a block from _EmptyBlocks.
|
// list is empty => allocate a block from _EmptyBlocks.
|
||||||
nlassert(_EmptyBlocks.size()>0);
|
nlassert(!_EmptyBlocks.empty());
|
||||||
|
|
||||||
// pop a block from empty list
|
// pop a block from empty list
|
||||||
CBlock *block= &_Blocks[_EmptyBlocks.back()];
|
CBlock *block= &_Blocks[_EmptyBlocks.back()];
|
||||||
|
|
|
@ -108,7 +108,7 @@ void CTileBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
if (f.isReading())
|
if (f.isReading())
|
||||||
{
|
{
|
||||||
// Checks
|
// Checks
|
||||||
nlassert (_DisplacementMap.size()>0);
|
nlassert (!_DisplacementMap.empty());
|
||||||
|
|
||||||
// Set first empty
|
// Set first empty
|
||||||
_DisplacementMap[0].setEmpty ();
|
_DisplacementMap[0].setEmpty ();
|
||||||
|
@ -264,7 +264,7 @@ sint CTileBank::getNumBitmap (CTile::TBitmap bitmap) const
|
||||||
if (!_TileVector[i].isFree())
|
if (!_TileVector[i].isFree())
|
||||||
{
|
{
|
||||||
const std::string &str=_TileVector[i].getRelativeFileName (bitmap);
|
const std::string &str=_TileVector[i].getRelativeFileName (bitmap);
|
||||||
if (str!="")
|
if (!str.empty())
|
||||||
{
|
{
|
||||||
std::vector<char> vect (str.length()+1);
|
std::vector<char> vect (str.length()+1);
|
||||||
memcpy (&*vect.begin(), str.c_str(), str.length()+1);
|
memcpy (&*vect.begin(), str.c_str(), str.length()+1);
|
||||||
|
@ -543,7 +543,7 @@ CTileNoiseMap *CTileBank::getTileNoiseMap (uint tileNumber, uint tileSubNoise)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_DisplacementMap.size()==0 || _DisplacementMap[0]._TileNoiseMap)
|
if (_DisplacementMap.empty() || _DisplacementMap[0]._TileNoiseMap)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Checks
|
// Checks
|
||||||
|
@ -583,7 +583,7 @@ void CTileBank::removeDisplacementMap (uint mapId)
|
||||||
if (mapId==_DisplacementMap.size()-1)
|
if (mapId==_DisplacementMap.size()-1)
|
||||||
{
|
{
|
||||||
// Resize the array ?
|
// Resize the array ?
|
||||||
while ((mapId>0)&&(_DisplacementMap[mapId]._FileName==""))
|
while ((mapId>0)&&(_DisplacementMap[mapId]._FileName.empty()))
|
||||||
_DisplacementMap.resize (mapId--);
|
_DisplacementMap.resize (mapId--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -608,7 +608,7 @@ uint CTileBank::getDisplacementMap (const string &fileName)
|
||||||
for (noiseTile=0; noiseTile<_DisplacementMap.size(); noiseTile++)
|
for (noiseTile=0; noiseTile<_DisplacementMap.size(); noiseTile++)
|
||||||
{
|
{
|
||||||
// Same name ?
|
// Same name ?
|
||||||
if (_DisplacementMap[noiseTile]._FileName=="")
|
if (_DisplacementMap[noiseTile]._FileName.empty())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (noiseTile==_DisplacementMap.size())
|
if (noiseTile==_DisplacementMap.size())
|
||||||
|
@ -1433,7 +1433,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
while (ite!=_Tile128.end())
|
while (ite!=_Tile128.end())
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (bank.getTile (*ite)->getRelativeFileName(type)!="")
|
if (!bank.getTile (*ite)->getRelativeFileName(type).empty())
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1450,7 +1450,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
while (ite!=_Tile256.end())
|
while (ite!=_Tile256.end())
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (bank.getTile (*ite)->getRelativeFileName(type)!="")
|
if (!bank.getTile (*ite)->getRelativeFileName(type).empty())
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1474,7 +1474,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
if (nTile!=-1)
|
if (nTile!=-1)
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (bank.getTile (nTile)->getRelativeFileName(type)!="")
|
if (!bank.getTile (nTile)->getRelativeFileName(type).empty())
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1564,7 +1564,7 @@ const CTileVegetableDesc &CTileSet::getTileVegetableDesc() const
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CTileSet::loadTileVegetableDesc()
|
void CTileSet::loadTileVegetableDesc()
|
||||||
{
|
{
|
||||||
if(_TileVegetableDescFileName!="")
|
if(!_TileVegetableDescFileName.empty())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ void CVegetableBlendLayerModel::render(IDriver *driver)
|
||||||
|
|
||||||
nlassert(VegetableManager);
|
nlassert(VegetableManager);
|
||||||
|
|
||||||
if(SortBlocks.size()==0)
|
if(SortBlocks.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Setup VegetableManager renderState (like pre-setuped material)
|
// Setup VegetableManager renderState (like pre-setuped material)
|
||||||
|
|
|
@ -1019,12 +1019,12 @@ void CVegetableManager::reserveIgCompile(CVegetableInstanceGroup *ig, const CV
|
||||||
{
|
{
|
||||||
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= ig->_RdrPass[rdrPass];
|
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= ig->_RdrPass[rdrPass];
|
||||||
nlassert(vegetRdrPass.TriangleIndices.getNumIndexes()==0);
|
nlassert(vegetRdrPass.TriangleIndices.getNumIndexes()==0);
|
||||||
nlassert(vegetRdrPass.TriangleLocalIndices.size()==0);
|
nlassert(vegetRdrPass.TriangleLocalIndices.empty());
|
||||||
nlassert(vegetRdrPass.Vertices.size()==0);
|
nlassert(vegetRdrPass.Vertices.empty());
|
||||||
nlassert(vegetRdrPass.LightedInstances.size()==0);
|
nlassert(vegetRdrPass.LightedInstances.empty());
|
||||||
}
|
}
|
||||||
// Do the same for all quadrants of the zsort rdrPass.
|
// Do the same for all quadrants of the zsort rdrPass.
|
||||||
nlassert(ig->_TriangleQuadrantOrderArray.size()==0);
|
nlassert(ig->_TriangleQuadrantOrderArray.empty());
|
||||||
nlassert(ig->_TriangleQuadrantOrderNumTriangles==0);
|
nlassert(ig->_TriangleQuadrantOrderNumTriangles==0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -2553,7 +2553,7 @@ bool CVegetableManager::updateLightingIGPart()
|
||||||
}
|
}
|
||||||
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= _ULRootIg->_RdrPass[_ULCurrentIgRdrPass];
|
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= _ULRootIg->_RdrPass[_ULCurrentIgRdrPass];
|
||||||
|
|
||||||
// if all instances are processed for this pass (especially if size()==0 !!)
|
// if all instances are processed for this pass (especially if empty() !!)
|
||||||
if(_ULCurrentIgInstance>= vegetRdrPass.LightedInstances.size())
|
if(_ULCurrentIgInstance>= vegetRdrPass.LightedInstances.size())
|
||||||
{
|
{
|
||||||
// skip to the next rdrPass.
|
// skip to the next rdrPass.
|
||||||
|
|
|
@ -186,7 +186,7 @@ bool CVegetableVBAllocator::exceedMaxVertexInBufferHard(uint numAddVerts) cons
|
||||||
uint CVegetableVBAllocator::allocateVertex()
|
uint CVegetableVBAllocator::allocateVertex()
|
||||||
{
|
{
|
||||||
// if no more free, allocate.
|
// if no more free, allocate.
|
||||||
if( _VertexFreeMemory.size()==0 )
|
if( _VertexFreeMemory.empty() )
|
||||||
{
|
{
|
||||||
// enlarge capacity.
|
// enlarge capacity.
|
||||||
uint newResize;
|
uint newResize;
|
||||||
|
|
|
@ -500,7 +500,7 @@ void CWaterModel::traverseRender()
|
||||||
sint startY;
|
sint startY;
|
||||||
projPoly.computeBorders(rasters, startY);
|
projPoly.computeBorders(rasters, startY);
|
||||||
|
|
||||||
if (rasters.size())
|
if (!rasters.empty())
|
||||||
{
|
{
|
||||||
//===========================//
|
//===========================//
|
||||||
// perform Water animation //
|
// perform Water animation //
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ void CZone::refineAll()
|
||||||
{
|
{
|
||||||
nlassert(Compiled);
|
nlassert(Compiled);
|
||||||
|
|
||||||
if(Patchs.size()==0)
|
if(Patchs.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// DO NOT do a forceNoRenderClip(), to avoid big allocation of Near/Far VB vertices in driver.
|
// DO NOT do a forceNoRenderClip(), to avoid big allocation of Near/Far VB vertices in driver.
|
||||||
|
@ -1150,7 +1150,7 @@ void CZone::averageTesselationVertices()
|
||||||
{
|
{
|
||||||
nlassert(Compiled);
|
nlassert(Compiled);
|
||||||
|
|
||||||
if(Patchs.size()==0)
|
if(Patchs.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// averageTesselationVertices of ALL patchs.
|
// averageTesselationVertices of ALL patchs.
|
||||||
|
@ -1250,8 +1250,10 @@ void CZone::resetRenderFarAndDeleteVBFV()
|
||||||
void CZone::forceMergeAtTileLevel()
|
void CZone::forceMergeAtTileLevel()
|
||||||
{
|
{
|
||||||
CPatch *pPatch=0;
|
CPatch *pPatch=0;
|
||||||
if(Patchs.size()>0)
|
|
||||||
|
if (!Patchs.empty())
|
||||||
pPatch= &(*Patchs.begin());
|
pPatch= &(*Patchs.begin());
|
||||||
|
|
||||||
for(sint n=(sint)Patchs.size();n>0;n--, pPatch++)
|
for(sint n=(sint)Patchs.size();n>0;n--, pPatch++)
|
||||||
{
|
{
|
||||||
pPatch->forceMergeAtTileLevel();
|
pPatch->forceMergeAtTileLevel();
|
||||||
|
@ -1446,7 +1448,7 @@ void CZone::applyHeightField(const CLandscape &landScape)
|
||||||
vector<CBezierPatch> patchs;
|
vector<CBezierPatch> patchs;
|
||||||
|
|
||||||
// no patch, do nothing.
|
// no patch, do nothing.
|
||||||
if(Patchs.size()==0)
|
if(Patchs.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// 0. Unpack patchs to Bezier Patchs.
|
// 0. Unpack patchs to Bezier Patchs.
|
||||||
|
|
|
@ -3113,7 +3113,7 @@ void CZoneLighter::addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT)
|
||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
void CZoneLighter::makeQuadGridFromWaterShapes(NLMISC::CAABBox zoneBBox)
|
void CZoneLighter::makeQuadGridFromWaterShapes(NLMISC::CAABBox zoneBBox)
|
||||||
{
|
{
|
||||||
if (!_WaterShapes.size()) return;
|
if (_WaterShapes.empty()) return;
|
||||||
|
|
||||||
NLMISC::CAABBox tmpBox;
|
NLMISC::CAABBox tmpBox;
|
||||||
|
|
||||||
|
|
|
@ -2,40 +2,40 @@ ADD_SUBDIRECTORY(misc)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
ADD_SUBDIRECTORY(3d)
|
ADD_SUBDIRECTORY(3d)
|
||||||
ENDIF(WITH_3D)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GUI)
|
IF(WITH_GUI)
|
||||||
ADD_SUBDIRECTORY(gui)
|
ADD_SUBDIRECTORY(gui)
|
||||||
ENDIF(WITH_GUI)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_GEORGES)
|
IF(WITH_GEORGES)
|
||||||
ADD_SUBDIRECTORY(georges)
|
ADD_SUBDIRECTORY(georges)
|
||||||
ENDIF(WITH_GEORGES)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LIGO)
|
IF(WITH_LIGO)
|
||||||
ADD_SUBDIRECTORY(ligo)
|
ADD_SUBDIRECTORY(ligo)
|
||||||
ENDIF(WITH_LIGO)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_LOGIC)
|
IF(WITH_LOGIC)
|
||||||
ADD_SUBDIRECTORY(logic)
|
ADD_SUBDIRECTORY(logic)
|
||||||
ENDIF(WITH_LOGIC)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NET)
|
IF(WITH_NET)
|
||||||
ADD_SUBDIRECTORY(net)
|
ADD_SUBDIRECTORY(net)
|
||||||
ENDIF(WITH_NET)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
ADD_SUBDIRECTORY(sound)
|
ADD_SUBDIRECTORY(sound)
|
||||||
ENDIF(WITH_SOUND)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
ADD_SUBDIRECTORY(cegui)
|
ADD_SUBDIRECTORY(cegui)
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_PACS)
|
IF(WITH_PACS)
|
||||||
ADD_SUBDIRECTORY(pacs)
|
ADD_SUBDIRECTORY(pacs)
|
||||||
ENDIF(WITH_PACS)
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_NEL_TOOLS)
|
IF(WITH_NEL_TOOLS)
|
||||||
ADD_SUBDIRECTORY(pipeline)
|
ADD_SUBDIRECTORY(pipeline)
|
||||||
ENDIF(WITH_NEL_TOOLS)
|
ENDIF()
|
||||||
|
|
|
@ -14,4 +14,4 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_CEGUIRENDERER_EXPORTS)
|
||||||
|
|
||||||
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||||
INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION ${NL_BIN_PREFIX} LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION ${NL_BIN_PREFIX} LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
||||||
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
ENDIF()
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue