Compare commits
1400 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcadee8575 | ||
|
|
77f8855fd6 | ||
|
|
b4243dc95b | ||
|
|
2f4d254bc6 | ||
|
|
e98e9391bf | ||
|
|
e1757d68a5 | ||
|
|
a46f1145f5 | ||
|
|
8561af1f84 | ||
|
|
0880c762c9 | ||
|
|
886619a099 | ||
|
|
64f4df5005 | ||
|
|
fd5e9fa85f | ||
|
|
6a0506386d | ||
|
|
c5787381aa | ||
|
|
22ed61f69c | ||
|
|
f6e204e4fb | ||
|
|
6f5abf105d | ||
|
|
8106a949bd | ||
|
|
497012f98e | ||
|
|
46f57756e7 | ||
|
|
6a6f3d61bb | ||
|
|
956af9177e | ||
|
|
f2d1c820f5 | ||
|
|
5999998ead | ||
|
|
293820747f | ||
|
|
4b97f76aa7 | ||
|
|
2e465ba04a | ||
|
|
7c367d4e9c | ||
|
|
773ee898f7 | ||
|
|
8b85b9b06b | ||
|
|
7c092411b0 | ||
|
|
e237c02295 | ||
|
|
4b36cd4a58 | ||
|
|
a20f4450e9 | ||
|
|
bc99ceee12 | ||
|
|
2c3e37024e | ||
|
|
a399bd7b62 | ||
|
|
c90c303fd4 | ||
|
|
29236442de | ||
|
|
b93f4fa879 | ||
|
|
971083415c | ||
|
|
a1a23cf6c5 | ||
|
|
51974891a8 | ||
|
|
7670094e7d | ||
|
|
69addc1d52 | ||
|
|
ab4e0127c5 | ||
|
|
ba9e7d8056 | ||
|
|
878b200217 | ||
|
|
1ffa9f7c0c | ||
|
|
d46b8f9963 | ||
|
|
1b52b3e685 | ||
|
|
5eef36c47a | ||
|
|
5c156a9d86 | ||
|
|
4f72de8289 | ||
|
|
a9c165f8a4 | ||
|
|
767bdc1a30 | ||
|
|
f09b828217 | ||
|
|
d2b28f60ff | ||
|
|
21b1d5b52e | ||
|
|
f61becccb3 | ||
|
|
0da6696e83 | ||
|
|
4091bf9da5 | ||
|
|
da86dd08c4 | ||
|
|
59a12dfe1d | ||
|
|
468f28941f | ||
|
|
a987bcac6f | ||
|
|
782d71a745 | ||
|
|
212bd47d36 | ||
|
|
bcf301ce6a | ||
|
|
01b4f52fb0 | ||
|
|
2cc41405d2 | ||
|
|
37c6636788 | ||
|
|
80c24532ba | ||
|
|
4702e3d586 | ||
|
|
466f901105 | ||
|
|
ed4e91ee7f | ||
|
|
ee6f919ea7 | ||
|
|
9f84fe6d5a | ||
|
|
2580ca7afd | ||
|
|
aee0e75971 | ||
|
|
ce4b35ba1a | ||
|
|
dc77a053ea | ||
|
|
565153c5f7 | ||
|
|
6aab72beb8 | ||
|
|
c8bd1f5f5b | ||
|
|
5f2b3a10ff | ||
|
|
1466539d88 | ||
|
|
01b02fd6b1 | ||
|
|
16a6af820a | ||
|
|
ac7e5cb742 | ||
|
|
2dbbec88f7 | ||
|
|
6dc9210a7e | ||
|
|
4a6031ba38 | ||
|
|
466cc0b98d | ||
|
|
ed6dcb6a5b | ||
|
|
ec8d2646cd | ||
|
|
bca94dc4be | ||
|
|
8e00ae1d44 | ||
|
|
99303883dc | ||
|
|
ea2b1e179e | ||
|
|
bf10ab4bb1 | ||
|
|
0f24c79ce9 | ||
|
|
c5ad7849ac | ||
|
|
d66c730c30 | ||
|
|
61730f3ee1 | ||
|
|
1cc2933c32 | ||
|
|
34b42cc5d7 | ||
|
|
4cb43c6747 | ||
|
|
189590edb9 | ||
|
|
c711847b4e | ||
|
|
b3fcd87a20 | ||
|
|
3654ff5f5c | ||
|
|
31c5b00fed | ||
|
|
2484555854 | ||
|
|
9600965bcf | ||
|
|
1bd6ba61a7 | ||
|
|
899d09bfcc | ||
|
|
35433cb8a4 | ||
|
|
7d9642210d | ||
|
|
8126418ef3 | ||
|
|
d0a6772245 | ||
|
|
3f921251ee | ||
|
|
cf94149dc1 | ||
|
|
74d26eac86 | ||
|
|
225d174ec6 | ||
|
|
3bc4d6fd63 | ||
|
|
94787c6da8 | ||
|
|
6d2b530330 | ||
|
|
c2fbb6f10f | ||
|
|
2f54cf26a9 | ||
|
|
9945fc1767 | ||
|
|
186cf58197 | ||
|
|
1c80ae45d8 | ||
|
|
2c992c3f16 | ||
|
|
e2f7a0ef5c | ||
|
|
665df2fe4e | ||
|
|
311020034e | ||
|
|
564a9abf42 | ||
|
|
6a60fa3458 | ||
|
|
94cf62f510 | ||
|
|
1920f529be | ||
|
|
1234cf42e9 | ||
|
|
ed9307097b | ||
|
|
f16bde1ac8 | ||
|
|
49b027f2a0 | ||
|
|
ff2c0e52b4 | ||
|
|
8094d13c2e | ||
|
|
37839ff247 | ||
|
|
e32b13e226 | ||
|
|
3a678f5a9b | ||
|
|
b8cfb5c8be | ||
|
|
476721b4b9 | ||
|
|
b4a37bf20d | ||
|
|
4a6a81b5d4 | ||
|
|
d9392d5c39 | ||
|
|
279d919164 | ||
|
|
9e47335f98 | ||
|
|
43ab8a2e36 | ||
|
|
b5cb6459b0 | ||
|
|
4622be4cef | ||
|
|
b9e522fd8d | ||
|
|
71f2dee332 | ||
|
|
b86e402fc0 | ||
|
|
658be9bd58 | ||
|
|
65df86e741 | ||
|
|
0197a47007 | ||
|
|
ce42937e3f | ||
|
|
aec4278292 | ||
|
|
8fef329437 | ||
|
|
128d30bd4b | ||
|
|
7dea17cdc7 | ||
|
|
82386fe2ef | ||
|
|
c2f56f1881 | ||
|
|
68fc758e94 | ||
|
|
1cd7706461 | ||
|
|
2e5141bd25 | ||
|
|
f6d8573221 | ||
|
|
562982cc30 | ||
|
|
df13aa408b | ||
|
|
4329d46ac4 | ||
|
|
bf9e900731 | ||
|
|
40ad9fad32 | ||
|
|
3951f6f516 | ||
|
|
58d94e9883 | ||
|
|
55c0ba5b06 | ||
|
|
e327c5ad0e | ||
|
|
bf176ffd4d | ||
|
|
6a7695a8f0 | ||
|
|
4bb63a9827 | ||
|
|
2a40ca6295 | ||
|
|
e9c99089e1 | ||
|
|
93af7491ee | ||
|
|
2075d92369 | ||
|
|
9bcd3298ba | ||
|
|
2f9a43effd | ||
|
|
535a01ea30 | ||
|
|
1193f9bb65 | ||
|
|
623b993fa9 | ||
|
|
7773f6b4f7 | ||
|
|
2b47e62dd8 | ||
|
|
3d21dc309c | ||
|
|
6dadfaffac | ||
|
|
f0ef3a4569 | ||
|
|
140f5d3b0a | ||
|
|
22f314d158 | ||
|
|
8653ee79ea | ||
|
|
0cc146a170 | ||
|
|
56378772cc | ||
|
|
64561fa57b | ||
|
|
b34021abd5 | ||
|
|
c6b17c9005 | ||
|
|
331023e878 | ||
|
|
d47fb4da03 | ||
|
|
40faef0bf8 | ||
|
|
b8c9d9c0f3 | ||
|
|
d33ae35fb3 | ||
|
|
5f56d2d38f | ||
|
|
d7e7701927 | ||
|
|
005ec30d7b | ||
|
|
15a8e1f08f | ||
|
|
2d06d455cd | ||
|
|
f2b773dac7 | ||
|
|
14774b03ad | ||
|
|
190e3e8c2f | ||
|
|
0464e611c7 | ||
|
|
f7386e8e70 | ||
|
|
a5be867238 | ||
|
|
002cbce499 | ||
|
|
5f38bb4bf2 | ||
|
|
726141d6da | ||
|
|
ed09681479 | ||
|
|
d194dfbc09 | ||
|
|
8ef3e923e8 | ||
|
|
564410ac7e | ||
|
|
f2beb4443a | ||
|
|
1a88370566 | ||
|
|
01b4339b6f | ||
|
|
308a249891 | ||
|
|
1244d5df03 | ||
|
|
f26425f17a | ||
|
|
b28313559d | ||
|
|
d933472a16 | ||
|
|
6c034506c3 | ||
|
|
8979f12111 | ||
|
|
289d1055e5 | ||
|
|
41ebd51fca | ||
|
|
07569d008d | ||
|
|
e5f3d1d8bc | ||
|
|
f670c774d3 | ||
|
|
7c41dc2e7e | ||
|
|
7c40f3332f | ||
|
|
2df95bb4bd | ||
|
|
68a4975fe1 | ||
|
|
41c56f706a | ||
|
|
56962a26cc | ||
|
|
7f776c0d53 | ||
|
|
bee0109e33 | ||
|
|
fd6b367746 | ||
|
|
5e12a9d057 | ||
|
|
5228451c9c | ||
|
|
c78770138d | ||
|
|
947cf57100 | ||
|
|
4a59efadeb | ||
|
|
66b929c3fa | ||
|
|
c1d1059a9a | ||
|
|
ccacdf7e6b | ||
|
|
69100fcca3 | ||
|
|
cd8edf933f | ||
|
|
00e9960d77 | ||
|
|
c9eac98d53 | ||
|
|
7fc90d3dce | ||
|
|
12890af0cc | ||
|
|
3724cf0e68 | ||
|
|
1cfd782bdd | ||
|
|
1351a2695e | ||
|
|
e49b484c2f | ||
|
|
66a94c6778 | ||
|
|
278459bdf2 | ||
|
|
ed88e55e04 | ||
|
|
5e1a102de4 | ||
|
|
27ed3ca4b9 | ||
|
|
4ea1b8d666 | ||
|
|
bfe221d571 | ||
|
|
be65834e1b | ||
|
|
3b54658e52 | ||
|
|
3462f403fe | ||
|
|
6675bb2276 | ||
|
|
3e0b75c4f7 | ||
|
|
621a342809 | ||
|
|
3ad4770b44 | ||
|
|
2c2d127683 | ||
|
|
6271dba5bf | ||
|
|
c85f8345f2 | ||
|
|
1ef5dc2c5d | ||
|
|
181c6ddd9d | ||
|
|
8ed9934a87 | ||
|
|
99f9b98258 | ||
|
|
e2cc2d600b | ||
|
|
6397261a33 | ||
|
|
b368664d96 | ||
|
|
5617a4e59b | ||
|
|
f137502020 | ||
|
|
6a114ae027 | ||
|
|
8cb1e73fc0 | ||
|
|
293ab2c2a2 | ||
|
|
98bb191c4a | ||
|
|
d3d72eb03c | ||
|
|
a3bf40fd69 | ||
|
|
a1d06e682e | ||
|
|
48003c8bc9 | ||
|
|
0552c9fde2 | ||
|
|
f7cc3a9e73 | ||
|
|
af8bb2a992 | ||
|
|
ac2d16b15c | ||
|
|
6fb3c399de | ||
|
|
0c44b11e9c | ||
|
|
5f4e4a0d54 | ||
|
|
7d56d772d4 | ||
|
|
c848af3960 | ||
|
|
ee745a20ef | ||
|
|
30f26f462b | ||
|
|
344dc90d56 | ||
|
|
9b29fd1385 | ||
|
|
c8a9efe5c8 | ||
|
|
940994288b | ||
|
|
3e8fbc8179 | ||
|
|
1644ee6fad | ||
|
|
d419d29cc8 | ||
|
|
d5fae8dba7 | ||
|
|
7935b2e957 | ||
|
|
8f0bda3dab | ||
|
|
8de93f4120 | ||
|
|
84da9d4758 | ||
|
|
20c4090f71 | ||
|
|
f3e18d135c | ||
|
|
0ca9047f8c | ||
|
|
90e9bce8de | ||
|
|
6d1e9ee3d4 | ||
|
|
7331001bb2 | ||
|
|
aac8382cf0 | ||
|
|
5272c48b7a | ||
|
|
81862e30d1 | ||
|
|
adb0efdf97 | ||
|
|
2677f06d44 | ||
|
|
3a031e9364 | ||
|
|
d2a8863384 | ||
|
|
81277c2b25 | ||
|
|
a90cdd9c7e | ||
|
|
2faca7d7e2 | ||
|
|
7be177e9ab | ||
|
|
f2b39196a0 | ||
|
|
a8f85f0d91 | ||
|
|
b0ad7f6bf7 | ||
|
|
7b5d7376c6 | ||
|
|
8bb694a910 | ||
|
|
25f3f77849 | ||
|
|
06dfeb72d7 | ||
|
|
f9878e75e3 | ||
|
|
58ede9caee | ||
|
|
24beaf6ce4 | ||
|
|
e46380f2d9 | ||
|
|
ffe729a53b | ||
|
|
f3afe45e72 | ||
|
|
059fc7c4fa | ||
|
|
cb295bfabc | ||
|
|
0ac2560508 | ||
|
|
98d315b3f7 | ||
|
|
28de2ceed8 | ||
|
|
28c814e4ef | ||
|
|
fdffe2e06a | ||
|
|
fb08f81e75 | ||
|
|
9affd767e4 | ||
|
|
9ccb015411 | ||
|
|
e5b81dd825 | ||
|
|
fe33db1620 | ||
|
|
2e02f5ac2c | ||
|
|
198d567df2 | ||
|
|
b1ecf08013 | ||
|
|
7c9eb35568 | ||
|
|
1839a37294 | ||
|
|
bd39b29c1d | ||
|
|
1cc7c6b4cf | ||
|
|
0cf4663c7d | ||
|
|
424221201c | ||
|
|
a14df55bd8 | ||
|
|
c16fa02558 | ||
|
|
8946aa9ee5 | ||
|
|
c4f868cd89 | ||
|
|
cc88b1edcd | ||
|
|
b3f918970b | ||
|
|
3d26f79b8b | ||
|
|
3d8e05fa2a | ||
|
|
aaeb90436c | ||
|
|
42f4c816b7 | ||
|
|
8d06ea5a15 | ||
|
|
9f23dcb0c4 | ||
|
|
5f1047c574 | ||
|
|
8d1c345580 | ||
|
|
3a17bf519f | ||
|
|
7599b00a13 | ||
|
|
f5492144ad | ||
|
|
d61f89e3c9 | ||
|
|
879cd79fdc | ||
|
|
c2f15ff47c | ||
|
|
c9226f6b63 | ||
|
|
95ff7acd6d | ||
|
|
0673e70aca | ||
|
|
fd53ff014e | ||
|
|
f5cbae3958 | ||
|
|
273c9b3479 | ||
|
|
3f9f79c155 | ||
|
|
3a5b8a1075 | ||
|
|
5a9ad787d5 | ||
|
|
7f7267027e | ||
|
|
c19ef521b3 | ||
|
|
83270e13f8 | ||
|
|
cfc71a47db | ||
|
|
45228f920d | ||
|
|
627c0a6b57 | ||
|
|
573c493d5d | ||
|
|
c5329968f7 | ||
|
|
d235e045d8 | ||
|
|
bb26127ed5 | ||
|
|
beddc1cb21 | ||
|
|
acc6f6b3c3 | ||
|
|
30f6dc2b2d | ||
|
|
e0194d4d06 | ||
|
|
a224c392e8 | ||
|
|
a6e08bfc0f | ||
|
|
b755880dd3 | ||
|
|
b082bce2b1 | ||
|
|
1c13ace366 | ||
|
|
da8692f6a3 | ||
|
|
b81373366b | ||
|
|
aa37a0b539 | ||
|
|
b71ee44505 | ||
|
|
dea8ac2cf8 | ||
|
|
3a78568a6f | ||
|
|
6898697246 | ||
|
|
820b223ea9 | ||
|
|
769c6a2e03 | ||
|
|
7991a53f3b | ||
|
|
d1f386860c | ||
|
|
eec7385045 | ||
|
|
2d8fbb89c9 | ||
|
|
7cf55fa993 | ||
|
|
c260158a2c | ||
|
|
3b654a0986 | ||
|
|
bd60dfb61d | ||
|
|
a07f90c158 | ||
|
|
9b6c34213b | ||
|
|
c58df7a3d9 | ||
|
|
62462165b7 | ||
|
|
4069878d54 | ||
|
|
72479ce61e | ||
|
|
db547a53d6 | ||
|
|
37c8c80b82 | ||
|
|
b279f4ce02 | ||
|
|
4e34328156 | ||
|
|
757cf4c8e7 | ||
|
|
1e0741cf17 | ||
|
|
e0ec2bd886 | ||
|
|
dd5a3352fe | ||
|
|
054825807a | ||
|
|
b2b5dd4eb8 | ||
|
|
2b92c10625 | ||
|
|
29f20096fd | ||
|
|
8bbb6cf541 | ||
|
|
03d4dde6a4 | ||
|
|
68fd65b55a | ||
|
|
7d97ebf581 | ||
|
|
2b40e044c4 | ||
|
|
2bc0360d8e | ||
|
|
cd68104de1 | ||
|
|
7da511fc32 | ||
|
|
84608b67fa | ||
|
|
121ba63347 | ||
|
|
1ea476b634 | ||
|
|
8c31a0e2c5 | ||
|
|
a3365512b3 | ||
|
|
c231e555da | ||
|
|
4a0e78fcbc | ||
|
|
eb348c08ad | ||
|
|
e15a284ae5 | ||
|
|
2f0b6e1e09 | ||
|
|
feaa9e7def | ||
|
|
50007bbc62 | ||
|
|
6c15ee6556 | ||
|
|
320ae772f3 | ||
|
|
be923a9ecb | ||
|
|
a94ad1c1fa | ||
|
|
98ee2cbd7e | ||
|
|
c164bd200e | ||
|
|
d2983deb48 | ||
|
|
5071cbfc2e | ||
|
|
7acce90927 | ||
|
|
f86a194962 | ||
|
|
a93ea1b90b | ||
|
|
f1bb636f91 | ||
|
|
e55c8e20e5 | ||
|
|
5d75b3b223 | ||
|
|
c2eeea8b70 | ||
|
|
b98d0461d1 | ||
|
|
a3493f5f6b | ||
|
|
52245a7fef | ||
|
|
af8eb800e6 | ||
|
|
c37cb7b2c4 | ||
|
|
f8c8734e79 | ||
|
|
b7ef79f1b7 | ||
|
|
28e464f368 | ||
|
|
26a7de79c7 | ||
|
|
4ddac28142 | ||
|
|
fec7e95406 | ||
|
|
60db043325 | ||
|
|
dc34799317 | ||
|
|
77eb745abc | ||
|
|
b005b2a53a | ||
|
|
c6cc69b01b | ||
|
|
1e4da55190 | ||
|
|
7c3ba8bd9a | ||
|
|
c7de0ccf99 | ||
|
|
b601fa2037 | ||
|
|
cab39e31a1 | ||
|
|
79f42837f2 | ||
|
|
0378869938 | ||
|
|
fc488959ea | ||
|
|
cd340f0fb6 | ||
|
|
626351e897 | ||
|
|
d176a58d33 | ||
|
|
88639c2052 | ||
|
|
322484c286 | ||
|
|
324f12641a | ||
|
|
cd02bbd1cb | ||
|
|
22609412e4 | ||
|
|
f0b3527bb5 | ||
|
|
893946879a | ||
|
|
685fda1565 | ||
|
|
f3df997b5b | ||
|
|
2d222c721b | ||
|
|
adfc916ea0 | ||
|
|
f8b355c9d8 | ||
|
|
d7c7360205 | ||
|
|
2524b407be | ||
|
|
32c44e4883 | ||
|
|
95ab62b286 | ||
|
|
ebd852a060 | ||
|
|
4fdc1f3311 | ||
|
|
4992d19e8f | ||
|
|
c639b4cf6c | ||
|
|
ee465c4169 | ||
|
|
5a7e0b05a4 | ||
|
|
d770034e5c | ||
|
|
fcb751ae4a | ||
|
|
e350824896 | ||
|
|
1586475232 | ||
|
|
17c0da930f | ||
|
|
c985afa4f4 | ||
|
|
3631396329 | ||
|
|
7cb6b29f1b | ||
|
|
5f487f4ce1 | ||
|
|
e1c3585b46 | ||
|
|
7766172831 | ||
|
|
10f57e9a87 | ||
|
|
59cb20bab8 | ||
|
|
2266a2a662 | ||
|
|
5ff3700203 | ||
|
|
065c56fce4 | ||
|
|
ee3f48bcae | ||
|
|
a2c055c379 | ||
|
|
99703b1121 | ||
|
|
4008cf519c | ||
|
|
6dc2e9e6df | ||
|
|
7317f28ab3 | ||
|
|
a62b7d5ce7 | ||
|
|
d2b32564b8 | ||
|
|
c847bfb6a5 | ||
|
|
b6e36275bb | ||
|
|
5e5dafac26 | ||
|
|
9127b41923 | ||
|
|
74cd0ddd8b | ||
|
|
b57b4dd102 | ||
|
|
0b08c6bef1 | ||
|
|
1405a7c103 | ||
|
|
1d0214ed54 | ||
|
|
21340ac775 | ||
|
|
d2b1fb8b5d | ||
|
|
179e2627eb | ||
|
|
c010c098fc | ||
|
|
4218011417 | ||
|
|
2e97a396ce | ||
|
|
58ba9e3617 | ||
|
|
27961f45f0 | ||
|
|
1e94239d06 | ||
|
|
a619d4e82a | ||
|
|
a2bf387147 | ||
|
|
d8da1b7ab5 | ||
|
|
79a81258ec | ||
|
|
1b5b11907e | ||
|
|
0a80dd0d87 | ||
|
|
64931839cc | ||
|
|
f6cf4e2878 | ||
|
|
e1cf05c327 | ||
|
|
1c2c10fc58 | ||
|
|
1c6bdf7aef | ||
|
|
b80be075d7 | ||
|
|
fb39f2d511 | ||
|
|
2b8c630922 | ||
|
|
c420751ffc | ||
|
|
92fd0f56b4 | ||
|
|
28b1ed82a5 | ||
|
|
1850cd159d | ||
|
|
9630632120 | ||
|
|
8e18f2ab43 | ||
|
|
f599278d8d | ||
|
|
e89e57b5a0 | ||
|
|
e3fe8d046a | ||
|
|
56d23a03cf | ||
|
|
5de463638c | ||
|
|
d6b5e9f5a5 | ||
|
|
4ddc33e881 | ||
|
|
bf17e716e9 | ||
|
|
43806994eb | ||
|
|
c4a5b0acc8 | ||
|
|
8c71d22bea | ||
|
|
618ca2f011 | ||
|
|
f04156da0e | ||
|
|
4ab397dfb2 | ||
|
|
7eab3337bf | ||
|
|
2f68adf73d | ||
|
|
6f5202c8cf | ||
|
|
313732ae25 | ||
|
|
e3ca2594bc | ||
|
|
812ce207dd | ||
|
|
3b9a0cfbc8 | ||
|
|
2a7fd8caa5 | ||
|
|
46dff21e97 | ||
|
|
f4a22ef857 | ||
|
|
0cadfbaddb | ||
|
|
e0b9f23dad | ||
|
|
7071ac29e8 | ||
|
|
5578849508 | ||
|
|
d096c043f0 | ||
|
|
2882cb728f | ||
|
|
f9e3afaad2 | ||
|
|
4f87e82a19 | ||
|
|
a2701faa2b | ||
|
|
9f2d8e6fff | ||
|
|
174a2d36aa | ||
|
|
2773c22f9b | ||
|
|
50f9fbd728 | ||
|
|
8f96442cc7 | ||
|
|
0269affb69 | ||
|
|
1c9fcbb387 | ||
|
|
368afacd14 | ||
|
|
9f160b11fa | ||
|
|
323c0a7e1e | ||
|
|
48541479fb | ||
|
|
97a6f8aeb0 | ||
|
|
2e8e641024 | ||
|
|
1df39f81ee | ||
|
|
136cffbab9 | ||
|
|
2493c401f9 | ||
|
|
90285944d9 | ||
|
|
aa0fea6931 | ||
|
|
8a4ab08810 | ||
|
|
bd442fb412 | ||
|
|
d04067bd09 | ||
|
|
a62d433262 | ||
|
|
cb16e4edf0 | ||
|
|
b2eb601fc4 | ||
|
|
0ce0f81144 | ||
|
|
ae308a274c | ||
|
|
e536820629 | ||
|
|
d2a42e47ce | ||
|
|
62628a66bd | ||
|
|
0478d90578 | ||
|
|
d29832ce5c | ||
|
|
a0875697cd | ||
|
|
45c7c711ad | ||
|
|
c03250f09b | ||
|
|
50f7893b2f | ||
|
|
6c219bd628 | ||
|
|
8208730130 | ||
|
|
dc96269bc6 | ||
|
|
3546b5777b | ||
|
|
a45b4ffb43 | ||
|
|
d08d2fdec8 | ||
|
|
b47ff37612 | ||
|
|
1ec0eed867 | ||
|
|
3054be307e | ||
|
|
0d22841da1 | ||
|
|
d20dbaa7d2 | ||
|
|
a7886443c5 | ||
|
|
674abf478b | ||
|
|
0f96939828 | ||
|
|
2f4689ba37 | ||
|
|
045234912c | ||
|
|
049c1e16b0 | ||
|
|
c7ca3d9261 | ||
|
|
a6cd08e056 | ||
|
|
d340b74bb9 | ||
|
|
fcf4cf88ea | ||
|
|
758d45af68 | ||
|
|
50d21405cf | ||
|
|
8ea58c8a7e | ||
|
|
7c1af50bda | ||
|
|
fd4155f4b6 | ||
|
|
1d6e2b4182 | ||
|
|
630819cfe5 | ||
|
|
4b04bc573b | ||
|
|
e38615d15b | ||
|
|
f140b4f35c | ||
|
|
167d336274 | ||
|
|
0fca6ee425 | ||
|
|
748a952e81 | ||
|
|
a30119706d | ||
|
|
77cdc0fa4c | ||
|
|
3bdf6e553d | ||
|
|
546422609a | ||
|
|
b971799638 | ||
|
|
bedb567eba | ||
|
|
b4cf0b429b | ||
|
|
ca5fb91350 | ||
|
|
621c0a0249 | ||
|
|
d0b7a983d1 | ||
|
|
54cf0a6a91 | ||
|
|
bde8782328 | ||
|
|
c8d95e58c3 | ||
|
|
95cd6cf775 | ||
|
|
dd7ab5a0ff | ||
|
|
865061faf0 | ||
|
|
02c06f1654 | ||
|
|
0aa6fa9302 | ||
|
|
8a08964755 | ||
|
|
413c24bde8 | ||
|
|
f9fe8a056a | ||
|
|
d8c95f844f | ||
|
|
61b1128d76 | ||
|
|
1317f26d04 | ||
|
|
7112e163e6 | ||
|
|
4b4c8c8e37 | ||
|
|
3a159111f3 | ||
|
|
f6beee3693 | ||
|
|
4f32024d3b | ||
|
|
edb6c0e8e9 | ||
|
|
74af7dc80e | ||
|
|
e284efa648 | ||
|
|
4a0b012f5b | ||
|
|
e643bcfc98 | ||
|
|
526079d76c | ||
|
|
0c8f2f1ea0 | ||
|
|
6e05e8d84b | ||
|
|
cff27f33dc | ||
|
|
ed67f77f9f | ||
|
|
eb0477f9d7 | ||
|
|
5fa50192a7 | ||
|
|
bba6ecba65 | ||
|
|
dcc8013028 | ||
|
|
0ddfdad180 | ||
|
|
466b4bf5e4 | ||
|
|
a5632c08c7 | ||
|
|
1dea1123de | ||
|
|
c419c4d560 | ||
|
|
269576805b | ||
|
|
0b52275e53 | ||
|
|
9c06bbb8eb | ||
|
|
da5717f66e | ||
|
|
8250ec1872 | ||
|
|
1efc71db0c | ||
|
|
062b8da2d3 | ||
|
|
15ef9140da | ||
|
|
2dc609ff6b | ||
|
|
8c7fceb081 | ||
|
|
778b89d5c9 | ||
|
|
b61cba8e01 | ||
|
|
0c585aca39 | ||
|
|
da2a9a5bf5 | ||
|
|
47797f4cec | ||
|
|
aef77312aa | ||
|
|
9a424ff264 | ||
|
|
022fba2ba4 | ||
|
|
adba4cf1fa | ||
|
|
0e21b53c2f | ||
|
|
13816b696f | ||
|
|
04ea11c61e | ||
|
|
523717477d | ||
|
|
6d0b1889f2 | ||
|
|
bb67cba384 | ||
|
|
14e7b4aefe | ||
|
|
1b9ce0b511 | ||
|
|
bf5e7b794e | ||
|
|
d7ee098a10 | ||
|
|
736696ac36 | ||
|
|
0b4d789afb | ||
|
|
55ad048b3a | ||
|
|
252fdcdd1e | ||
|
|
13e2af8990 | ||
|
|
8ecbf79199 | ||
|
|
03d686a246 | ||
|
|
f03249f5d5 | ||
|
|
0d8dfb41bc | ||
|
|
38c6302f11 | ||
|
|
dcc13b447c | ||
|
|
5d2eb3e4cf | ||
|
|
c8427140bd | ||
|
|
23228e111c | ||
|
|
2257e8ebe7 | ||
|
|
3c87835f82 | ||
|
|
bc8c95a7f7 | ||
|
|
369a3ed909 | ||
|
|
eb747e2304 | ||
|
|
e0df1a763c | ||
|
|
fe764ae97f | ||
|
|
0fc962454d | ||
|
|
b1b415e862 | ||
|
|
b5f0355015 | ||
|
|
d11899561b | ||
|
|
71f3002717 | ||
|
|
9f03d1be05 | ||
|
|
899d1955c0 | ||
|
|
c962922e75 | ||
|
|
562353929e | ||
|
|
4c8bd8d3ca | ||
|
|
e31c088470 | ||
|
|
172eee49e5 | ||
|
|
14fd78a5af | ||
|
|
c056eacfab | ||
|
|
ca2477a521 | ||
|
|
c06c627002 | ||
|
|
6edd21bfe6 | ||
|
|
f1e6092b94 | ||
|
|
1014841e2c | ||
|
|
dd49033a08 | ||
|
|
07835ea832 | ||
|
|
a8e8f6d409 | ||
|
|
54fe7a8606 | ||
|
|
f9897b607b | ||
|
|
798f4c1a69 | ||
|
|
7a04780841 | ||
|
|
d3e1edcc93 | ||
|
|
50a0902f92 | ||
|
|
84da051385 | ||
|
|
c77699dcd5 | ||
|
|
02865a9179 | ||
|
|
410d2a83a2 | ||
|
|
d46f96a8d6 | ||
|
|
ce1b58dd13 | ||
|
|
05b8e08ee8 | ||
|
|
24a05a2ebe | ||
|
|
2dc46964b4 | ||
|
|
30df7dacde | ||
|
|
fa628ce4d1 | ||
|
|
92eb988f2a | ||
|
|
ecc820f784 | ||
|
|
85cb3cb0d0 | ||
|
|
ec91f9a026 | ||
|
|
8fd728ca59 | ||
|
|
cf1ce7d7e5 | ||
|
|
54fc42cc73 | ||
|
|
a39844f9f3 | ||
|
|
2195c2af37 | ||
|
|
a3b37f58e3 | ||
|
|
d3dbbed6af | ||
|
|
9b75abdb09 | ||
|
|
bdf4c1a272 | ||
|
|
647e6afa14 | ||
|
|
0e08d7d703 | ||
|
|
8776876e93 | ||
|
|
1271eeb808 | ||
|
|
77ebb91d37 | ||
|
|
ca64b81785 | ||
|
|
4e6eaa2849 | ||
|
|
188704d177 | ||
|
|
4aa943b871 | ||
|
|
68c498163d | ||
|
|
0b35781d55 | ||
|
|
f838fa5d45 | ||
|
|
2922f78c20 | ||
|
|
5be20f26f3 | ||
|
|
0a01adf101 | ||
|
|
5e3e46847e | ||
|
|
c68b7ff4a8 | ||
|
|
740153475c | ||
|
|
71c363e115 | ||
|
|
8f40538d01 | ||
|
|
733fca3d49 | ||
|
|
d7e5d07a77 | ||
|
|
e199a1a1d6 | ||
|
|
e8a0762eee | ||
|
|
8cea1705d1 | ||
|
|
a6236ab593 | ||
|
|
bb22201f4a | ||
|
|
2eaf9a2c22 | ||
|
|
c92ccf8a44 | ||
|
|
7a5857e838 | ||
|
|
b24635d24e | ||
|
|
1230748ef5 | ||
|
|
f95be54bd5 | ||
|
|
97a6f3a7b2 | ||
|
|
f1063afea1 | ||
|
|
0dfef2ab25 | ||
|
|
8e59d9800d | ||
|
|
1ccd8cfd89 | ||
|
|
f4a713a500 | ||
|
|
4a9ff22eeb | ||
|
|
7dd616357f | ||
|
|
d42e380698 | ||
|
|
75c47e96b6 | ||
|
|
6523cf43be | ||
|
|
5d96bd8966 | ||
|
|
d39ad79986 | ||
|
|
b9c3ca535d | ||
|
|
5e501b9611 | ||
|
|
983a7e31dc | ||
|
|
693781a014 | ||
|
|
aee659b518 | ||
|
|
271c37442d | ||
|
|
7a1633abdf | ||
|
|
14ee1c5189 | ||
|
|
c262210cf3 | ||
|
|
6707e481de | ||
|
|
0bc98aad3b | ||
|
|
34fd992fb9 | ||
|
|
f62fded4bd | ||
|
|
aa7c5e652c | ||
|
|
632725e788 | ||
|
|
98516a2a22 | ||
|
|
b578b639e8 | ||
|
|
b5f1d5b435 | ||
|
|
efe83160a1 | ||
|
|
e29776d2b2 | ||
|
|
9dbdf75c14 | ||
|
|
583ea76c85 | ||
|
|
8e7574b9ae | ||
|
|
b8f1468ab5 | ||
|
|
4b318d072a | ||
|
|
1f53b80c9b | ||
|
|
707dc2f56f | ||
|
|
a1e7014524 | ||
|
|
aacc250481 | ||
|
|
fbb144ede4 | ||
|
|
b26bd29325 | ||
|
|
b7edebf272 | ||
|
|
dd74e69ab7 | ||
|
|
e4544bec97 | ||
|
|
dad825d68d | ||
|
|
a9cf5743a3 | ||
|
|
21164d1f01 | ||
|
|
eeb3a096d4 | ||
|
|
87b955b2ce | ||
|
|
da13f3599c | ||
|
|
727a91b689 | ||
|
|
873b399ee8 | ||
|
|
a6e905020d | ||
|
|
9fe563c9f3 | ||
|
|
755d4c242b | ||
|
|
8308a0f769 | ||
|
|
e23a6f533c | ||
|
|
31aa797f0e | ||
|
|
086af65f89 | ||
|
|
e11b70415d | ||
|
|
b8ca422e71 | ||
|
|
a68a345c32 | ||
|
|
31dbe29cae | ||
|
|
5bb9cda747 | ||
|
|
afb567265e | ||
|
|
dfb049d13c | ||
|
|
734d17c429 | ||
|
|
684ab3e3e5 | ||
|
|
a3c2009a48 | ||
|
|
f77df0ab83 | ||
|
|
cd25894a39 | ||
|
|
95f56f040a | ||
|
|
39721e5bcd | ||
|
|
8e622eaca6 | ||
|
|
4cbe3a63f8 | ||
|
|
8a9296c6c2 | ||
|
|
bf3dbd66b8 | ||
|
|
fa007905d1 | ||
|
|
ac593a694e | ||
|
|
f93c0b401f | ||
|
|
027c3be694 | ||
|
|
5ccfc3257b | ||
|
|
60e6f1000a | ||
|
|
2065e45011 | ||
|
|
6df030d706 | ||
|
|
5c786e40ed | ||
|
|
bc93f2792d | ||
|
|
8c86c1cd0f | ||
|
|
563f252dc1 | ||
|
|
a41ce2d281 | ||
|
|
f47395531f | ||
|
|
ab01a68d92 | ||
|
|
e486b9b1e8 | ||
|
|
c2c8e7f281 | ||
|
|
01bd9baf54 | ||
|
|
b8a2122b28 | ||
|
|
a95b834711 | ||
|
|
578b11ce48 | ||
|
|
548d1b6757 | ||
|
|
6847833752 | ||
|
|
4bca069708 | ||
|
|
0773f290cd | ||
|
|
4f4a6d4588 | ||
|
|
5adc705eab | ||
|
|
05274c108e | ||
|
|
ca6745e955 | ||
|
|
a8cf4a51b3 | ||
|
|
330e30607a | ||
|
|
f33429f1bb | ||
|
|
8f14d86a5e | ||
|
|
7d73969c57 | ||
|
|
6fcbe9d0de | ||
|
|
e5886e0959 | ||
|
|
8ff1f46d08 | ||
|
|
fb96010d2a | ||
|
|
7c6d21f67a | ||
|
|
fb9101598a | ||
|
|
cfea4f4ccf | ||
|
|
4bfd4b38bc | ||
|
|
a388ddb0d0 | ||
|
|
3bedb5f6d4 | ||
|
|
0abb0c916c | ||
|
|
78eace26b3 | ||
|
|
899ba7fded | ||
|
|
c161a47970 | ||
|
|
f89a5aaa27 | ||
|
|
b4f0ea4c78 | ||
|
|
3242683ee3 | ||
|
|
32039e8b58 | ||
|
|
b77b5bbabc | ||
|
|
44cc052d40 | ||
|
|
f14ad54c84 | ||
|
|
f0a6ffcabf | ||
|
|
e50899dc68 | ||
|
|
a8062d732e | ||
|
|
39b3f58e13 | ||
|
|
9e354801d8 | ||
|
|
df0b7a08cf | ||
|
|
40b5627f7b | ||
|
|
f26a5e9d62 | ||
|
|
abb4b1ac7c | ||
|
|
62ee456084 | ||
|
|
55b5f60b68 | ||
|
|
cd66c61214 | ||
|
|
62e8400c3c | ||
|
|
de95e07907 | ||
|
|
b05f6ee9da | ||
|
|
b90d905cc5 | ||
|
|
56bc3ae67a | ||
|
|
be5d2f20bc | ||
|
|
d40256fb31 | ||
|
|
691a5395ca | ||
|
|
8c946dc706 | ||
|
|
6ced17242b | ||
|
|
0841479ccc | ||
|
|
0fa7848b19 | ||
|
|
989c40e59a | ||
|
|
df41722c98 | ||
|
|
9214750a90 | ||
|
|
9fee430d7d | ||
|
|
62b6531468 | ||
|
|
0c75255da7 | ||
|
|
3e4f099ef2 | ||
|
|
2653567d82 | ||
|
|
7a48138404 | ||
|
|
32d3f9e929 | ||
|
|
1c0abf39fb | ||
|
|
86a657f49c | ||
|
|
25937e42fe | ||
|
|
4afc6f5b6a | ||
|
|
48e6e4eb98 | ||
|
|
89be63603a | ||
|
|
e62261edb2 | ||
|
|
af58abb7ec | ||
|
|
0383d4492f | ||
|
|
5e7f64daaf | ||
|
|
b3b1a8b530 | ||
|
|
c474ab344a | ||
|
|
1449169b0a | ||
|
|
77809f704e | ||
|
|
79965fade1 | ||
|
|
d15ac7640c | ||
|
|
6a95f3b692 | ||
|
|
ac03994861 | ||
|
|
3227a44e0f | ||
|
|
c3e593c20e | ||
|
|
731e907653 | ||
|
|
bf9899a99b | ||
|
|
6e3f404a1c | ||
|
|
379543a405 | ||
|
|
c5de5cf65c | ||
|
|
af91c02504 | ||
|
|
8320480971 | ||
|
|
0e349736b7 | ||
|
|
710b75b3a9 | ||
|
|
07302b45fd | ||
|
|
ae09d3e397 | ||
|
|
6b84bfac15 | ||
|
|
5e611669ab | ||
|
|
35c409f744 | ||
|
|
01bf430b1a | ||
|
|
0180f965f7 | ||
|
|
8c69c4bcf0 | ||
|
|
a75ed131b7 | ||
|
|
ae0ad8af92 | ||
|
|
eef327f18b | ||
|
|
bd26be78a9 | ||
|
|
a62186c927 | ||
|
|
422db14725 | ||
|
|
949a9ab5dc | ||
|
|
e545281387 | ||
|
|
78561d7ac7 | ||
|
|
681c85b122 | ||
|
|
83338c1ee1 | ||
|
|
0824055b29 | ||
|
|
8a6bb4c00a | ||
|
|
0fe3a2623a | ||
|
|
6e73b33b91 | ||
|
|
b9799a938a | ||
|
|
3b7f801f90 | ||
|
|
24b570d89c | ||
|
|
58e08a972d | ||
|
|
47bdf3ecea | ||
|
|
69d67e57a6 | ||
|
|
615fe30ba8 | ||
|
|
947f08a4d4 | ||
|
|
a17b849d84 | ||
|
|
466cc68580 | ||
|
|
bb18bef58e | ||
|
|
d219087950 | ||
|
|
2a072bfc67 | ||
|
|
a5b03d1c0f | ||
|
|
1d2995666f | ||
|
|
e8ec5d750c | ||
|
|
f36d4eb03a | ||
|
|
e9f4b917d1 | ||
|
|
13666ac62a | ||
|
|
2f2e1fbe8f | ||
|
|
05ec61d0b0 | ||
|
|
aa250836f6 | ||
|
|
e395d2fdf8 | ||
|
|
ba68d2e231 | ||
|
|
c28b241c69 | ||
|
|
4d8f75fb32 | ||
|
|
8dfeeee231 | ||
|
|
bc838629d9 | ||
|
|
110faf188b | ||
|
|
c358ffe8e2 | ||
|
|
475de32aea | ||
|
|
46fa98419c | ||
|
|
16daa6850e | ||
|
|
a9eb118897 | ||
|
|
6cd64783f1 | ||
|
|
5485c8263e | ||
|
|
2207a7c6b1 | ||
|
|
96a851993e | ||
|
|
73916e6483 | ||
|
|
701f53e8e6 | ||
|
|
855e1d9caa | ||
|
|
966be89d98 | ||
|
|
38eac50597 | ||
|
|
6be5a24d5e | ||
|
|
9b18f15655 | ||
|
|
9508ed20a7 | ||
|
|
1f5a6bb6b6 | ||
|
|
2bf0a912fb | ||
|
|
897e175d3c | ||
|
|
bc0709b9c6 | ||
|
|
ed701f9c88 | ||
|
|
79a179f569 | ||
|
|
f62c2beb1a | ||
|
|
c563e79c55 | ||
|
|
fa07fcf5a7 | ||
|
|
1c40bcf63d | ||
|
|
890d1f91ff | ||
|
|
8fbce02226 | ||
|
|
62a7704a4f | ||
|
|
eaf790c118 | ||
|
|
e9429b382d | ||
|
|
feb09158ec | ||
|
|
b21dbc46bb | ||
|
|
bb4109f982 | ||
|
|
21729724a7 | ||
|
|
a67b992216 | ||
|
|
269903ff75 | ||
|
|
1ff4094467 | ||
|
|
b780878a55 | ||
|
|
46db0d8d50 | ||
|
|
b16058dc83 | ||
|
|
9c06d76b1e | ||
|
|
773a2a3855 | ||
|
|
383cd45432 | ||
|
|
5ac64dfa96 | ||
|
|
cfe82e7f1f | ||
|
|
3888bfee18 | ||
|
|
9dadc8c054 | ||
|
|
dfa40d8939 | ||
|
|
e797a5eb0e | ||
|
|
3c69f34b2f | ||
|
|
31867a8bbf | ||
|
|
fd5dae59ae | ||
|
|
8543405219 | ||
|
|
25fbeb2080 | ||
|
|
56ea5b27fd | ||
|
|
e335848169 | ||
|
|
09f3376259 | ||
|
|
0b6e69de7e | ||
|
|
f5fcf385e4 | ||
|
|
22b12223ef | ||
|
|
3fc035f568 | ||
|
|
b2065b43a5 | ||
|
|
dbd1eb0d68 | ||
|
|
dedd75dc4f | ||
|
|
1a6e99a9e3 | ||
|
|
4c0038a8ec | ||
|
|
8d76b798c9 | ||
|
|
47d9c6d0b5 | ||
|
|
defb530e8b | ||
|
|
0b70603a0c | ||
|
|
3d1d138074 | ||
|
|
bb2537dbaf | ||
|
|
7ee66bebe2 | ||
|
|
f2e57d72ef | ||
|
|
770f46157b | ||
|
|
0843505fae | ||
|
|
a4e732da5f | ||
|
|
2b9245ba2e | ||
|
|
d8207424fa | ||
|
|
7a5cd5b659 | ||
|
|
18ac6dcb60 | ||
|
|
4cce1f73c8 | ||
|
|
5e71af2ed7 | ||
|
|
d8389e6fa7 | ||
|
|
865ab0572d | ||
|
|
3f3ead0988 | ||
|
|
a380161283 | ||
|
|
1e488fef6d | ||
|
|
c6672b3347 | ||
|
|
e5c0a362d7 | ||
|
|
4d61305095 | ||
|
|
18c6330af7 | ||
|
|
af81f692de | ||
|
|
ada7e3ca30 | ||
|
|
41357e579a | ||
|
|
9f10d9510d | ||
|
|
1368cd6816 | ||
|
|
b3b2da1428 | ||
|
|
fdab6d0efb | ||
|
|
91029955f6 | ||
|
|
990b5f9bb4 | ||
|
|
09f4528bfb | ||
|
|
8f2c92d198 | ||
|
|
b11511b7b9 | ||
|
|
1c627317ec | ||
|
|
2bd2a7a64b | ||
|
|
0965bc576c | ||
|
|
6b20a85071 | ||
|
|
fd070315e9 | ||
|
|
b3709a0343 | ||
|
|
b35d1b7005 | ||
|
|
aad24fa5c5 | ||
|
|
a0fb5cdaa7 | ||
|
|
9f388fd7b8 | ||
|
|
96e88b97ef | ||
|
|
63b67d62ef | ||
|
|
e7a0867cf3 | ||
|
|
e956b7da51 | ||
|
|
283f5298d5 | ||
|
|
2d6a400967 | ||
|
|
0688cda8d2 | ||
|
|
142322528c | ||
|
|
7a9a4f3e1e | ||
|
|
d140d28af9 | ||
|
|
f2883801ec | ||
|
|
c965df0901 | ||
|
|
1d2daaae71 | ||
|
|
46e9d874e0 | ||
|
|
a9fd9e6f2a | ||
|
|
75ba6cc67d | ||
|
|
1720f2ebe4 | ||
|
|
9616a43cb0 | ||
|
|
c42e501f6f | ||
|
|
210c97986d | ||
|
|
323b49de17 | ||
|
|
d81497d29f | ||
|
|
e2347651e9 | ||
|
|
dcb349d55d | ||
|
|
5be98205d4 | ||
|
|
e7f4a1d5a2 | ||
|
|
a7ba5145cc | ||
|
|
d4a56c6d94 | ||
|
|
36347aba83 | ||
|
|
4f8cbb8c06 | ||
|
|
aa1e0ce067 | ||
|
|
eec85de620 | ||
|
|
03f2192684 | ||
|
|
078a6980b9 | ||
|
|
1fcb478a2a | ||
|
|
9e482bcb22 | ||
|
|
2bb4df78ad | ||
|
|
63d7e18456 | ||
|
|
9ed99176f7 | ||
|
|
38983e30fb | ||
|
|
af020ad558 | ||
|
|
55e3ddb465 | ||
|
|
b7f2d741e7 | ||
|
|
690f3614c1 | ||
|
|
f827d77600 | ||
|
|
48c0c6eb39 | ||
|
|
966c5aa409 | ||
|
|
2131067436 | ||
|
|
aa9cc7a50d | ||
|
|
8943439629 | ||
|
|
2c1f1255fa | ||
|
|
f79b28117d | ||
|
|
173de071f6 | ||
|
|
a4da61ae0b | ||
|
|
580a7a4599 | ||
|
|
d02df9e451 | ||
|
|
4e4dbd4012 | ||
|
|
8e05524027 | ||
|
|
67836ecf67 | ||
|
|
a974ca096c | ||
|
|
361d3542a4 | ||
|
|
1db2ffe02b | ||
|
|
235693f134 | ||
|
|
1e0243aa3d | ||
|
|
2631ae91e7 | ||
|
|
e71d94aa69 | ||
|
|
4b96251852 | ||
|
|
193fc27ba2 | ||
|
|
a6ae79f9b1 | ||
|
|
9ce9a1f472 | ||
|
|
b9a6fb8468 | ||
|
|
2cfc90736d | ||
|
|
886a05549d | ||
|
|
9f06333a86 | ||
|
|
b28e4e06ae | ||
|
|
8b7b0649a8 | ||
|
|
be41d8f734 | ||
|
|
036d5b84d1 | ||
|
|
f514243c1b | ||
|
|
0d27d0cbc7 | ||
|
|
744def3c1f | ||
|
|
e73ebfdb76 | ||
|
|
eb0247d27a | ||
|
|
eefa0957ab | ||
|
|
9d8028009e | ||
|
|
398014b118 | ||
|
|
a54937b4b8 | ||
|
|
11a3c93ab0 | ||
|
|
a50ec32474 | ||
|
|
0dc6bd937d | ||
|
|
b124ca5ad3 | ||
|
|
abeb12ac75 | ||
|
|
f010120e52 | ||
|
|
2b7071f862 | ||
|
|
bd6496fe4a | ||
|
|
a7d3d08057 | ||
|
|
de6db7fa5a | ||
|
|
d7c8b00d90 | ||
|
|
578e5b7191 | ||
|
|
7811d8857c | ||
|
|
27e69cab1e | ||
|
|
72080e79e9 | ||
|
|
16a2b28c1b | ||
|
|
02c629a0b0 | ||
|
|
6cd7941fd2 | ||
|
|
8cc2499f0a | ||
|
|
0681b88cbc | ||
|
|
0367711e93 | ||
|
|
ee8afcb19a | ||
|
|
07a03d17c1 | ||
|
|
e40cee8708 | ||
|
|
242fc85245 | ||
|
|
76c314c2ac | ||
|
|
ab4e195bb4 | ||
|
|
be6ad2a919 | ||
|
|
f168d6b60a | ||
|
|
585465d8c3 | ||
|
|
9c23439b85 | ||
|
|
0f7036cb16 | ||
|
|
2d690dba45 | ||
|
|
e8dd91f98d | ||
|
|
36b8d3f9c9 | ||
|
|
8c58a9c276 | ||
|
|
5652a79327 | ||
|
|
6bc47b6e8d | ||
|
|
8028423c70 | ||
|
|
fa83ad8008 | ||
|
|
728434e8ef | ||
|
|
1ce35de4bd | ||
|
|
31124b1b0f | ||
|
|
d2468d9f04 | ||
|
|
af41a652e4 | ||
|
|
1a06263ac0 | ||
|
|
dc1efa8a05 | ||
|
|
e5b09a0876 | ||
|
|
b7454f5f43 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
|||||||
* text=auto
|
|
||||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,5 +1,3 @@
|
|||||||
/installed.xml
|
|
||||||
/indra/llcommon/llversionviewer.h
|
|
||||||
/indra/build-*
|
/indra/build-*
|
||||||
/indra/tools/vstool/obj/
|
/indra/tools/vstool/obj/
|
||||||
*.aps
|
*.aps
|
||||||
@@ -12,13 +10,14 @@
|
|||||||
/indra/viewer-*
|
/indra/viewer-*
|
||||||
/indra/newview/vivox-runtime/
|
/indra/newview/vivox-runtime/
|
||||||
/indra/newview/dbghelp.dll
|
/indra/newview/dbghelp.dll
|
||||||
|
indra/newview/res/viewer_icon.*
|
||||||
|
indra/newview/res-sdl/viewer_icon.*
|
||||||
/libraries/
|
/libraries/
|
||||||
/lib/
|
/lib/
|
||||||
*.pyc
|
*.pyc
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
*.bak
|
*.bak
|
||||||
*~
|
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
/LICENSES/
|
/LICENSES/
|
||||||
/edited-files.txt
|
/edited-files.txt
|
||||||
@@ -26,12 +25,4 @@ qtcreator-build/
|
|||||||
/.pc
|
/.pc
|
||||||
/build-*
|
/build-*
|
||||||
/viewer-*
|
/viewer-*
|
||||||
/indra/newview/res/viewerRes.rc
|
/Pipfile.lock
|
||||||
/indra/newview/res/viewerRes_bc.rc
|
|
||||||
/indra/newview/English.lproj/InfoPlist.strings
|
|
||||||
/indra/newview/linux_tools/handle_secondlifeprotocol.sh
|
|
||||||
/indra/newview/linux_tools/install.sh
|
|
||||||
/indra/newview/linux_tools/refresh_desktop_app_entry.sh
|
|
||||||
/indra/newview/linux_tools/wrapper.sh
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,81 +0,0 @@
|
|||||||
->> Features implemented in Ascent:
|
|
||||||
|
|
||||||
In-World:
|
|
||||||
-------------------------------------------------
|
|
||||||
* Alpha skins and Tattoo Layers
|
|
||||||
* Inventory Pre-caching
|
|
||||||
* Avatar Radar
|
|
||||||
* Multiple Attachment Points
|
|
||||||
* Idle time of avatars around you (Not perfect)
|
|
||||||
* Client tags/coloring for various clients, and extra client definitions
|
|
||||||
* Force Away button to fake being away if you really want to avoid someone :V
|
|
||||||
* Double-Click teleport (Not all the functionality of Emerald yet)
|
|
||||||
Preferences (Options are in Ascent Options):
|
|
||||||
* Disable Look At
|
|
||||||
* Disable Point At and beam end
|
|
||||||
* Fetch inventory in background on login (No waiting for caching when searching)
|
|
||||||
* Display your client tag to yourself
|
|
||||||
* Display your client tag color to yourself
|
|
||||||
* Rez objects as land group when possible
|
|
||||||
* Some settings can now be saved per account after changing an option in the preferences. Currently affected settings:
|
|
||||||
Edit Beam color
|
|
||||||
Client Tag Color
|
|
||||||
Communication Window:
|
|
||||||
- Friend List:
|
|
||||||
* Friend List Online/Total counts (Not perfect)
|
|
||||||
* Shows what rights your friends have given you (Mod, See on map, Online)
|
|
||||||
|
|
||||||
Chat Bar:
|
|
||||||
* Emerald-style Chatbar as Commandline (See Preferences)
|
|
||||||
* MU-style poses.
|
|
||||||
* OOC Auto-close.
|
|
||||||
|
|
||||||
Instant Messages:
|
|
||||||
* MU-style poses.
|
|
||||||
* OOC Auto-close.
|
|
||||||
|
|
||||||
Advanced -> Ascent:
|
|
||||||
* Fake Away Status
|
|
||||||
* Force Ground Sit (Lets you sit anywhere)
|
|
||||||
* Phantom Avatar (Prevents you visually from being pushed.)
|
|
||||||
* Toggle IM Notification (Ability to hide '%n is typing...' notification from being sent.)
|
|
||||||
* Close All Dialogs
|
|
||||||
* Message Log
|
|
||||||
* Message Builder
|
|
||||||
* Sound Explorer
|
|
||||||
* Asset Blacklist
|
|
||||||
* AO options
|
|
||||||
|
|
||||||
Object Pie Menus:
|
|
||||||
* Measure: Select on one object, then another, to get the exact distance between the two
|
|
||||||
* Data: Reports prim rotation and position in a format usable in LSL scripts.
|
|
||||||
* Script Counter
|
|
||||||
|
|
||||||
Self Pie Menu:
|
|
||||||
* Animation Explorer
|
|
||||||
|
|
||||||
Agent Pie Menus:
|
|
||||||
* Script Counter
|
|
||||||
* Copy Agent UUID
|
|
||||||
* Debug
|
|
||||||
|
|
||||||
Parcel Window:
|
|
||||||
-------------------------------------------------
|
|
||||||
- General tab:
|
|
||||||
- Objects tab:
|
|
||||||
* In Sim/Online/Offline indicators for Parcel Object Owner listings (Online is currently wonky - This is an issue with SL, Emerald has the same problem.)
|
|
||||||
|
|
||||||
Build Window:
|
|
||||||
-------------------------------------------------
|
|
||||||
- General tab:
|
|
||||||
* Last Owner shown in Build "General" Tab
|
|
||||||
* Group object is set to has a "View" button to see the group's profile
|
|
||||||
* Copy Object Key button
|
|
||||||
- Build Tab:
|
|
||||||
* Copy/Paste Position buttons
|
|
||||||
* Copy/Paste Size buttons
|
|
||||||
* Copy/Paste Rotation buttons
|
|
||||||
* Copy/Paste Primitive Parameters buttons
|
|
||||||
|
|
||||||
Known issues:
|
|
||||||
Online/Total counts in the friends list sometimes go haywire. Not often or by a large margin, but it happens.
|
|
||||||
14
Pipfile
Normal file
14
Pipfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[[source]]
|
||||||
|
url = "https://pypi.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
name = "pypi"
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
llbase = "*"
|
||||||
|
certifi = "*"
|
||||||
|
autobuild = {hg = "https://bitbucket.org/alchemyviewer/autobuild-1.1"}
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "2.7"
|
||||||
2
README
2
README
@@ -18,7 +18,7 @@ as those based upon the OpenSim platform.
|
|||||||
Singularity is maintained by a small group of volunteers who can be contacted
|
Singularity is maintained by a small group of volunteers who can be contacted
|
||||||
both, in-world (SingularityViewer group) as well as on IRC (#SingularityViewer
|
both, in-world (SingularityViewer group) as well as on IRC (#SingularityViewer
|
||||||
@ FreeNode). Bug requests and features requests can be submitted through our
|
@ FreeNode). Bug requests and features requests can be submitted through our
|
||||||
Issue Tracker (http://code.google.com/p/singularity-viewer/issues/list or from
|
Issue Tracker (http://links.singularityviewer.org/?to=issues or from
|
||||||
the viewer menu: Help --> Bug Reporting --> Singularity Issue Tracker...)
|
the viewer menu: Help --> Bug Reporting --> Singularity Issue Tracker...)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
3235
autobuild.xml
Normal file
3235
autobuild.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
SLASSET_LIBS_WIN32=http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/export/slviewer-win32-libs-oss-viewer-1.23.4.0.zip
|
|
||||||
SLASSET_MD5=http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/export/md5sums-oss-viewer-1.23.4.0.txt
|
|
||||||
SLASSET_LIBS_DARWIN=http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/export/slviewer-darwin-libs-oss-viewer-1.23.4.0.tar.gz
|
|
||||||
SLASSET_ART=http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/export/slviewer-artwork-oss-viewer-1.23.4.0.zip
|
|
||||||
SLASSET_LIBS_LINUXI386=http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/export/slviewer-linux-libs-oss-viewer-1.23.4.0.tar.gz
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
For full release notes, see:
|
|
||||||
http://wiki.secondlife.com/wiki/Release_Notes
|
|
||||||
|
|
||||||
For a log of viewer changes, see:
|
|
||||||
doc/viewer-changes.txt
|
|
||||||
@@ -236,6 +236,14 @@
|
|||||||
<boolean>false</boolean>
|
<boolean>false</boolean>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
|
<key>ObjectAnimation</key>
|
||||||
|
<map>
|
||||||
|
<key>flavor</key>
|
||||||
|
<string>template</string>
|
||||||
|
<key>trusted-sender</key>
|
||||||
|
<boolean>false</boolean>
|
||||||
|
</map>
|
||||||
|
|
||||||
<key>AvatarAppearance</key>
|
<key>AvatarAppearance</key>
|
||||||
<map>
|
<map>
|
||||||
<key>flavor</key>
|
<key>flavor</key>
|
||||||
|
|||||||
@@ -3,19 +3,12 @@
|
|||||||
# cmake_minimum_required should appear before any
|
# cmake_minimum_required should appear before any
|
||||||
# other commands to guarantee full compatibility
|
# other commands to guarantee full compatibility
|
||||||
# with the version specified
|
# with the version specified
|
||||||
|
## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly
|
||||||
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
|
if(WIN32)
|
||||||
|
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
|
||||||
# Eventually the third-party support modules (cmake/*.cmake) should
|
else()
|
||||||
# know the full path to all libraries. Until that happens we need
|
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
|
||||||
# per-configuration link directory "libraries/<arch>/lib/debug" for
|
endif()
|
||||||
# Debug and "libraries/<arch>/lib/release" for Release,
|
|
||||||
# RelWithDebInfo, and MinSizeRel. CMake 2.6 does not directly support
|
|
||||||
# per-configuration link directory specification. However, we can set
|
|
||||||
# CMP0003 to OLD and link to one library (apr) on a per-configuration
|
|
||||||
# basis to convince CMake to add the proper link directory. This line
|
|
||||||
# can be removed when we use full paths for all libraries.
|
|
||||||
#cmake_policy(SET CMP0003 OLD)
|
|
||||||
|
|
||||||
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
||||||
"The root project/makefile/solution name. Defaults to Singularity.")
|
"The root project/makefile/solution name. Defaults to Singularity.")
|
||||||
@@ -24,27 +17,20 @@ project(${ROOT_PROJECT_NAME})
|
|||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
include(00-Common)
|
||||||
# Load versions now. Install locations need them.
|
|
||||||
include(BuildVersion)
|
include(BuildVersion)
|
||||||
include(UnixInstall)
|
|
||||||
|
|
||||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||||
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
||||||
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
endif (NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
# Create a 'prepare' target in which to perform setup actions. This
|
|
||||||
# must be the first target created so other targets can depend on it.
|
|
||||||
if(NOT STANDALONE)
|
|
||||||
# We prepare prebuilt binaries when not building standalone.
|
|
||||||
set(prepare_depends ${CMAKE_BINARY_DIR}/prepare/prebuilt)
|
|
||||||
endif(NOT STANDALONE)
|
|
||||||
if(WINDOWS)
|
|
||||||
set(prepare_depends ${prepare_depends} copy_win_libs)
|
|
||||||
endif(WINDOWS)
|
|
||||||
add_custom_target(prepare DEPENDS ${prepare_depends})
|
|
||||||
|
|
||||||
|
include(Abseil-CPP)
|
||||||
|
# Dependencies
|
||||||
|
add_subdirectory(${ABSEIL_SRC_DIR} ${ABSEIL_BIN_DIR})
|
||||||
add_subdirectory(cmake)
|
add_subdirectory(cmake)
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine)
|
add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine)
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
|
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
|
||||||
@@ -66,12 +52,6 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llvfs)
|
|||||||
add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
|
add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
|
add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
|
||||||
|
|
||||||
if(STANDALONE)
|
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}llqtwebkit)
|
|
||||||
endif(STANDALONE)
|
|
||||||
|
|
||||||
#add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
|
|
||||||
|
|
||||||
if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
||||||
add_subdirectory(${LIBS_CLOSED_PREFIX}copy_win_scripts)
|
add_subdirectory(${LIBS_CLOSED_PREFIX}copy_win_scripts)
|
||||||
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
||||||
@@ -83,42 +63,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
|||||||
# viewer plugins directory
|
# viewer plugins directory
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
||||||
|
|
||||||
# llplugin testbed code (is this the right way to include it?)
|
|
||||||
#if (NOT LINUX)
|
|
||||||
# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
|
|
||||||
#endif (NOT LINUX)
|
|
||||||
|
|
||||||
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
||||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||||
add_dependencies(viewer secondlife-bin)
|
add_dependencies(viewer ${VIEWER_BRANDING_ID}-bin)
|
||||||
|
|
||||||
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
|
if (WINDOWS)
|
||||||
# packages in the PREBUILT property of the 'prepare' target.
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BRANDING_ID}-bin)
|
||||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
endif (WINDOWS)
|
||||||
|
|
||||||
# Create a script to download the needed binaries.
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/DownloadPrebuilt.cmake.in
|
|
||||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake @ONLY)
|
|
||||||
|
|
||||||
# Drive the download script at build time. Depend on 'install.xml'
|
|
||||||
# to aqcuire new binaries when needed.
|
|
||||||
add_custom_command(
|
|
||||||
COMMENT "Obtaining prebuilt binaries..."
|
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/prepare/prebuilt
|
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
|
||||||
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
|
|
||||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if(WINDOWS)
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/CopyWinLibs.cmake.in
|
|
||||||
${CMAKE_BINARY_DIR}/CopyWinLibs.cmake @ONLY)
|
|
||||||
add_custom_command(
|
|
||||||
COMMENT "Copying prebuilt libraries to viewer executable directory"
|
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/CopyWinLibs
|
|
||||||
COMMAND ${CMAKE_COMMAND} -DCUR_CONFIG:STRING=${CMAKE_CFG_INTDIR} -P ${CMAKE_BINARY_DIR}/CopyWinLibs.cmake
|
|
||||||
DEPENDS ${CMAKE_BINARY_DIR}/prepare/prebuilt ${CMAKE_BINARY_DIR}/CopyWinLibs.cmake
|
|
||||||
)
|
|
||||||
add_custom_target(copy_win_libs DEPENDS ${CMAKE_BINARY_DIR}/CopyWinLibs)
|
|
||||||
endif(WINDOWS)
|
|
||||||
|
|||||||
@@ -39,5 +39,9 @@ set_source_files_properties(${aistatemachine_HEADER_FILES}
|
|||||||
list(APPEND aistatemachine_SOURCE_FILES ${aistatemachine_HEADER_FILES})
|
list(APPEND aistatemachine_SOURCE_FILES ${aistatemachine_HEADER_FILES})
|
||||||
|
|
||||||
add_library (aistatemachine ${aistatemachine_SOURCE_FILES})
|
add_library (aistatemachine ${aistatemachine_SOURCE_FILES})
|
||||||
add_dependencies(aistatemachine prepare)
|
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
aistatemachine
|
||||||
|
PUBLIC
|
||||||
|
llcommon
|
||||||
|
)
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ void print_statemachine_diagnostics(U64 total_clocks, AIStateMachine::StateTimer
|
|||||||
|
|
||||||
AIStateMachine::StateTimerBase::DumpTimers(msg);
|
AIStateMachine::StateTimerBase::DumpTimers(msg);
|
||||||
|
|
||||||
llwarns << msg.str() << llendl;
|
LL_WARNS() << msg.str() << LL_ENDL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1264,7 +1264,7 @@ void AIStateMachine::abort(void)
|
|||||||
// Block until the current run finished.
|
// Block until the current run finished.
|
||||||
if (!mRunMutex.try_lock())
|
if (!mRunMutex.try_lock())
|
||||||
{
|
{
|
||||||
llwarns << "AIStateMachine::abort() blocks because the statemachine is still executing code in another thread." << llendl;
|
LL_WARNS() << "AIStateMachine::abort() blocks because the statemachine is still executing code in another thread." << LL_ENDL;
|
||||||
mRunMutex.lock();
|
mRunMutex.lock();
|
||||||
}
|
}
|
||||||
mRunMutex.unlock();
|
mRunMutex.unlock();
|
||||||
@@ -1463,6 +1463,6 @@ void stopEngineThread(void)
|
|||||||
{
|
{
|
||||||
ms_sleep(10);
|
ms_sleep(10);
|
||||||
}
|
}
|
||||||
llinfos << "State machine thread" << (!AIEngineThread::sInstance->isStopped() ? " not" : "") << " stopped after " << ((400 - count) * 10) << "ms." << llendl;
|
LL_INFOS() << "State machine thread" << (!AIEngineThread::sInstance->isStopped() ? " not" : "") << " stopped after " << ((400 - count) * 10) << "ms." << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ void AIStateMachineThreadBase::abort_impl(void)
|
|||||||
{
|
{
|
||||||
// The thread is still happily running (and will clean up itself).
|
// The thread is still happily running (and will clean up itself).
|
||||||
// Lets make sure we're not flooded with this situation.
|
// Lets make sure we're not flooded with this situation.
|
||||||
llwarns << "Thread state machine aborted while the thread is still running. That is a waste of CPU and should be avoided." << llendl;
|
LL_WARNS() << "Thread state machine aborted while the thread is still running. That is a waste of CPU and should be avoided." << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "aistatemachine.h"
|
#include "aistatemachine.h"
|
||||||
#include "llthread.h"
|
#include "llthread.h"
|
||||||
#include "aithreadsafe.h"
|
#include "aithreadsafe.h"
|
||||||
|
#include <boost/format.hpp>
|
||||||
|
|
||||||
#ifdef EXAMPLE_CODE // undefined
|
#ifdef EXAMPLE_CODE // undefined
|
||||||
|
|
||||||
@@ -235,7 +236,7 @@ class AIStateMachineThread : public AIStateMachineThreadBase {
|
|||||||
/*virtual*/ const char* getName() const
|
/*virtual*/ const char* getName() const
|
||||||
{
|
{
|
||||||
#define STRIZE(arg) #arg
|
#define STRIZE(arg) #arg
|
||||||
return "AIStateMachineThread<"STRIZE(THREAD_IMPL)">";
|
return (boost::format("%1%%2%%3%") % "AIStateMachineThread<" % STRIZE(THREAD_IMPL) % ">").str().c_str();
|
||||||
#undef STRIZE
|
#undef STRIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
|||||||
|
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
|
||||||
|
|
||||||
# Portable compilation flags.
|
# Portable compilation flags.
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
||||||
@@ -31,31 +30,12 @@ if(NON_RELEASE_CRASH_REPORTING)
|
|||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Don't bother with a MinSizeRel build.
|
# Don't bother with a MinSizeRel build.
|
||||||
|
|
||||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
|
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
|
||||||
"Supported build types." FORCE)
|
"Supported build types." FORCE)
|
||||||
|
|
||||||
# Platform-specific compilation flags.
|
# Platform-specific compilation flags.
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
# Various libs are compiler specific, generate some variables here we can just use
|
|
||||||
# when we require them instead of reimplementing the test each time.
|
|
||||||
if (MSVC10)
|
|
||||||
set(MSVC_DIR 10.0)
|
|
||||||
set(MSVC_SUFFIX 100)
|
|
||||||
elseif (MSVC12)
|
|
||||||
set(MSVC_DIR 12.0)
|
|
||||||
set(MSVC_SUFFIX 120)
|
|
||||||
endif (MSVC10)
|
|
||||||
|
|
||||||
# Remove default /Zm1000 flag that cmake inserts
|
|
||||||
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
|
|
||||||
# Always use /Zm140
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm140")
|
|
||||||
|
|
||||||
# Don't build DLLs.
|
# Don't build DLLs.
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
|
||||||
@@ -65,56 +45,79 @@ if (WINDOWS)
|
|||||||
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP"
|
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP"
|
||||||
CACHE STRING "C++ compiler release-with-debug options" FORCE)
|
CACHE STRING "C++ compiler release-with-debug options" FORCE)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE
|
set(CMAKE_CXX_FLAGS_RELEASE
|
||||||
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /fp:fast -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /Zo /MD /MP /Ob2 /Zc:inline /fp:fast -D_ITERATOR_DEBUG_LEVEL=0"
|
||||||
CACHE STRING "C++ compiler release options" FORCE)
|
CACHE STRING "C++ compiler release options" FORCE)
|
||||||
set(CMAKE_C_FLAGS_RELEASE
|
set(CMAKE_C_FLAGS_RELEASE
|
||||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
|
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
|
||||||
CACHE STRING "C compiler release options" FORCE)
|
CACHE STRING "C compiler release options" FORCE)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
|
||||||
|
if (WORD_SIZE EQUAL 32)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||||
|
endif (WORD_SIZE EQUAL 32)
|
||||||
|
|
||||||
|
if (USE_LTO)
|
||||||
|
if(INCREMENTAL_LINK)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG:INCREMENTAL")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LTCG:INCREMENTAL")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /LTCG:INCREMENTAL")
|
||||||
|
else(INCREMENTAL_LINK)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LTCG")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
|
||||||
|
endif(INCREMENTAL_LINK)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF /OPT:ICF /LTCG")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF /OPT:ICF /LTCG")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
|
||||||
|
elseif (INCREMENTAL_LINK)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS} /INCREMENTAL /VERBOSE:INCR")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL /VERBOSE:INCR")
|
||||||
|
else ()
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF /INCREMENTAL:NO")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF /INCREMENTAL:NO")
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
||||||
set(CMAKE_C_STANDARD_LIBRARIES "")
|
set(CMAKE_C_STANDARD_LIBRARIES "")
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
/DLL_WINDOWS=1
|
/DLL_WINDOWS=1
|
||||||
|
/DNOMINMAX
|
||||||
/DUNICODE
|
/DUNICODE
|
||||||
/D_UNICODE
|
/D_UNICODE
|
||||||
|
/DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
|
||||||
/GS
|
/GS
|
||||||
/TP
|
/TP
|
||||||
/W3
|
/W3
|
||||||
/c
|
/c
|
||||||
/Zc:forScope
|
/Zc:forScope
|
||||||
/Zc:wchar_t-
|
/Zc:rvalueCast
|
||||||
|
/Zc:wchar_t
|
||||||
/nologo
|
/nologo
|
||||||
/Oy-
|
/Oy-
|
||||||
|
/Zm140
|
||||||
|
/wd4267
|
||||||
|
/wd4244
|
||||||
)
|
)
|
||||||
|
|
||||||
# SSE2 is implied on win64
|
|
||||||
if(WORD_SIZE EQUAL 32)
|
|
||||||
add_definitions(/arch:SSE2 /D_ATL_XP_TARGETING)
|
|
||||||
else(WORD_SIZE EQUAL 32)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4267 /wd4250 /wd4244")
|
|
||||||
endif(WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
if (MSVC12)
|
if (USE_LTO)
|
||||||
# configure win32 API for windows vista+ compatibility
|
add_compile_options(
|
||||||
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
/GL
|
||||||
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
/Gy
|
||||||
else (MSVC12)
|
/Gw
|
||||||
# configure win32 API for windows XP+ compatibility
|
)
|
||||||
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
endif (USE_LTO)
|
||||||
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
|
||||||
endif (MSVC12)
|
if (WORD_SIZE EQUAL 32)
|
||||||
|
add_compile_options(/arch:SSE2)
|
||||||
|
endif (WORD_SIZE EQUAL 32)
|
||||||
|
|
||||||
# Are we using the crummy Visual Studio KDU build workaround?
|
|
||||||
if (NOT DISABLE_FATAL_WARNINGS)
|
if (NOT DISABLE_FATAL_WARNINGS)
|
||||||
add_definitions(/WX)
|
add_definitions(/WX)
|
||||||
endif (NOT DISABLE_FATAL_WARNINGS)
|
endif (NOT DISABLE_FATAL_WARNINGS)
|
||||||
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
# configure win32 API for windows Vista+ compatibility
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
|
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
||||||
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
|
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
||||||
|
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
set (GCC_EXTRA_OPTIMIZATIONS "-ffast-math")
|
set (GCC_EXTRA_OPTIMIZATIONS "-ffast-math")
|
||||||
@@ -122,20 +125,26 @@ set (GCC_EXTRA_OPTIMIZATIONS "-ffast-math")
|
|||||||
if (LINUX)
|
if (LINUX)
|
||||||
set(CMAKE_SKIP_RPATH TRUE)
|
set(CMAKE_SKIP_RPATH TRUE)
|
||||||
|
|
||||||
add_definitions(
|
add_compile_options(
|
||||||
-DLL_LINUX=1
|
-fvisibility=hidden
|
||||||
-DAPPID=secondlife
|
-fexceptions
|
||||||
-D_REENTRANT
|
-fno-math-errno
|
||||||
-fexceptions
|
-fno-strict-aliasing
|
||||||
-fno-math-errno
|
-fsigned-char
|
||||||
-fno-strict-aliasing
|
-g
|
||||||
-fsigned-char
|
-pthread
|
||||||
-fvisibility=hidden
|
)
|
||||||
-g
|
|
||||||
-pthread
|
|
||||||
)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ")
|
add_definitions(
|
||||||
|
-DLL_LINUX=1
|
||||||
|
-DAPPID=secondlife
|
||||||
|
-D_REENTRANT
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
|
||||||
|
|
||||||
# Don't catch SIGCHLD in our base application class for the viewer
|
# Don't catch SIGCHLD in our base application class for the viewer
|
||||||
# some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh!
|
# some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh!
|
||||||
@@ -190,50 +199,37 @@ if (LINUX)
|
|||||||
|
|
||||||
# End of hacks.
|
# End of hacks.
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
if (NOT STANDALONE)
|
||||||
# this stops us requiring a really recent glibc at runtime
|
# this stops us requiring a really recent glibc at runtime
|
||||||
add_definitions(-fno-stack-protector)
|
add_definitions(-fno-stack-protector)
|
||||||
endif (NOT STANDALONE)
|
endif (NOT STANDALONE)
|
||||||
if (${ARCH} STREQUAL "x86_64")
|
if (${ARCH} STREQUAL "x86_64")
|
||||||
add_definitions(-DLINUX64=1 -pipe)
|
add_definitions(-pipe)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math -funroll-loops")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math -funroll-loops")
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ffast-math")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ffast-math")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ffast-math")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ffast-math")
|
||||||
else (${ARCH} STREQUAL "x86_64")
|
else (${ARCH} STREQUAL "x86_64")
|
||||||
if (NOT STANDALONE)
|
if (NOT STANDALONE)
|
||||||
set(MARCH_FLAG " -march=pentium4")
|
set(MARCH_FLAG " -march=pentium4")
|
||||||
endif (NOT STANDALONE)
|
endif (NOT STANDALONE)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse3")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse3")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -mfpmath=sse,387 -msse3 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${MARCH_FLAG} -mfpmath=sse,387 -msse3 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse3 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse3 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||||
endif (${ARCH} STREQUAL "x86_64")
|
endif (${ARCH} STREQUAL "x86_64")
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
if (NOT STANDALONE)
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse3")
|
||||||
# this stops us requiring a really recent glibc at runtime
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse3")
|
||||||
add_definitions(-fno-stack-protector)
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -msse3")
|
||||||
endif (NOT STANDALONE)
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${MARCH_FLAG} -msse3")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse3")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse3")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -msse2")
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${MARCH_FLAG} -msse2")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
if (NOT STANDALONE)
|
||||||
# this stops us requiring a really recent glibc at runtime
|
set(MARCH_FLAG " -axsse4.1 -msse3")
|
||||||
add_definitions(-fno-stack-protector)
|
|
||||||
endif (NOT STANDALONE)
|
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
|
||||||
set(MARCH_FLAG " -axsse4.1 -msse2")
|
|
||||||
endif (NOT STANDALONE)
|
endif (NOT STANDALONE)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline-functions")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline-functions")
|
||||||
@@ -311,13 +307,14 @@ if (STANDALONE)
|
|||||||
add_definitions(-DLL_STANDALONE=1)
|
add_definitions(-DLL_STANDALONE=1)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
set(${ARCH}_linux_INCLUDES
|
set(${ARCH}_linux_INCLUDES
|
||||||
ELFIO
|
|
||||||
atk-1.0
|
atk-1.0
|
||||||
|
cairo
|
||||||
glib-2.0
|
glib-2.0
|
||||||
|
gdk-pixbuf-2.0
|
||||||
gstreamer-0.10
|
gstreamer-0.10
|
||||||
gtk-2.0
|
gtk-2.0
|
||||||
freetype2
|
|
||||||
pango-1.0
|
pango-1.0
|
||||||
|
pixman-1
|
||||||
)
|
)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
include(BerkeleyDB)
|
|
||||||
include(Linking)
|
include(Linking)
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
@@ -13,39 +12,41 @@ if (STANDALONE)
|
|||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(apr_suite)
|
use_prebuilt_binary(apr_suite)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
|
if (LLCOMMON_LINK_SHARED)
|
||||||
|
set(APR_selector "lib")
|
||||||
|
else (LLCOMMON_LINK_SHARED)
|
||||||
|
set(APR_selector "")
|
||||||
|
endif (LLCOMMON_LINK_SHARED)
|
||||||
set(APR_LIBRARIES
|
set(APR_LIBRARIES
|
||||||
debug libapr-1.lib
|
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
|
||||||
optimized libapr-1.lib
|
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
|
||||||
)
|
)
|
||||||
set(APRICONV_LIBRARIES
|
set(APRICONV_LIBRARIES
|
||||||
debug libapriconv-1.lib
|
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
|
||||||
optimized libapriconv-1.lib
|
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
|
||||||
)
|
)
|
||||||
set(APRUTIL_LIBRARIES
|
set(APRUTIL_LIBRARIES
|
||||||
debug libaprutil-1.lib
|
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
|
||||||
optimized libaprutil-1.lib
|
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
if(NOT LLCOMMON_LINK_SHARED)
|
||||||
|
list(APPEND APR_LIBRARIES Rpcrt4)
|
||||||
|
endif(NOT LLCOMMON_LINK_SHARED)
|
||||||
elseif (DARWIN)
|
elseif (DARWIN)
|
||||||
set(APR_LIBRARIES
|
if (LLCOMMON_LINK_SHARED)
|
||||||
debug libapr-1.0.dylib
|
set(APR_selector "0.dylib")
|
||||||
optimized libapr-1.0.dylib
|
set(APRUTIL_selector "0.dylib")
|
||||||
)
|
else (LLCOMMON_LINK_SHARED)
|
||||||
set(APRUTIL_LIBRARIES
|
set(APR_selector "a")
|
||||||
debug libaprutil-1.dylib
|
set(APRUTIL_selector "a")
|
||||||
optimized libaprutil-1.dylib
|
endif (LLCOMMON_LINK_SHARED)
|
||||||
)
|
set(APR_LIBRARIES libapr-1.${APR_selector})
|
||||||
|
set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector})
|
||||||
set(APRICONV_LIBRARIES iconv)
|
set(APRICONV_LIBRARIES iconv)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(APR_LIBRARIES apr-1)
|
set(APR_LIBRARIES apr-1)
|
||||||
set(APRUTIL_LIBRARIES aprutil-1)
|
set(APRUTIL_LIBRARIES aprutil-1)
|
||||||
set(APRICONV_LIBRARIES iconv)
|
set(APRICONV_LIBRARIES iconv)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
set(APR_INCLUDE_DIR
|
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
|
||||||
${LIBS_PREBUILT_DIR}/include/apr-1
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/apr-1
|
|
||||||
)
|
|
||||||
|
|
||||||
if (LINUX)
|
|
||||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
|
|
||||||
endif (LINUX)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
8
indra/cmake/Abseil-CPP.cmake
Normal file
8
indra/cmake/Abseil-CPP.cmake
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
include(Prebuilt)
|
||||||
|
|
||||||
|
set(BUILD_TESTING OFF)
|
||||||
|
use_prebuilt_binary(abseil-cpp)
|
||||||
|
set(ABSEIL_SRC_DIR ${LIBS_PREBUILT_DIR}/abseil-cpp)
|
||||||
|
set(ABSEIL_BIN_DIR ${CMAKE_BINARY_DIR}/abseil-cpp)
|
||||||
|
|
||||||
@@ -8,11 +8,8 @@ if (STANDALONE)
|
|||||||
pkg_check_modules(VORBISENC REQUIRED vorbisenc)
|
pkg_check_modules(VORBISENC REQUIRED vorbisenc)
|
||||||
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(ogg-vorbis)
|
use_prebuilt_binary(ogg_vorbis)
|
||||||
set(VORBIS_INCLUDE_DIRS
|
set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
|
set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
|
||||||
set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
|
set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
set(DB_FIND_QUIETLY ON)
|
|
||||||
set(DB_FIND_REQUIRED ON)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
include(FindBerkeleyDB)
|
|
||||||
else (STANDALONE)
|
|
||||||
if (LINUX)
|
|
||||||
# Need to add dependency pthread explicitely to support ld.gold.
|
|
||||||
use_prebuilt_binary(db)
|
|
||||||
set(DB_LIBRARIES db-5.1 pthread)
|
|
||||||
else (LINUX)
|
|
||||||
set(DB_LIBRARIES db-4.2)
|
|
||||||
endif (LINUX)
|
|
||||||
set(DB_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
|
||||||
@@ -11,11 +11,8 @@ if (STANDALONE)
|
|||||||
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
|
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(boost)
|
use_prebuilt_binary(boost)
|
||||||
set(Boost_INCLUDE_DIRS
|
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
set(Boost_VERSION "1.60")
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
set(Boost_VERSION "1.52")
|
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(Boost_CONTEXT_LIBRARY
|
set(Boost_CONTEXT_LIBRARY
|
||||||
|
|||||||
38
indra/cmake/BuildBranding.cmake
Normal file
38
indra/cmake/BuildBranding.cmake
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
if (WINDOWS)
|
||||||
|
#message(WARNING, ${CMAKE_CURRENT_BINARY_DIR}/newview/viewerRes.rc.in)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/res/viewerRes.rc.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
|
||||||
|
)
|
||||||
|
endif (WINDOWS)
|
||||||
|
|
||||||
|
if (DARWIN)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/English.lproj/InfoPlist.strings.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/English.lproj/InfoPlist.strings
|
||||||
|
)
|
||||||
|
endif (DARWIN)
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/linux_tools/wrapper.sh
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/linux_tools/handle_secondlifeprotocol.sh
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/linux_tools/install.sh
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/linux_tools/refresh_desktop_app_entry.sh
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
endif (LINUX)
|
||||||
20
indra/cmake/BuildPackagesInfo.cmake
Normal file
20
indra/cmake/BuildPackagesInfo.cmake
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
# Construct the version and copyright information based on package data.
|
||||||
|
include(Python)
|
||||||
|
include(Variables)
|
||||||
|
|
||||||
|
# packages-formatter.py runs autobuild install --versions, which needs to know
|
||||||
|
# the build_directory, which (on Windows) depends on AUTOBUILD_ADDRSIZE.
|
||||||
|
# Within an autobuild build, AUTOBUILD_ADDRSIZE is already set. But when
|
||||||
|
# building in an IDE, it probably isn't. Set it explicitly using
|
||||||
|
# run_build_test.py.
|
||||||
|
add_custom_command(OUTPUT packages-info.txt
|
||||||
|
COMMENT Generating packages-info.txt for the about box
|
||||||
|
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
|
||||||
|
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
|
||||||
|
${CMAKE_SOURCE_DIR}/../autobuild.xml
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
|
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE}
|
||||||
|
${PYTHON_EXECUTABLE}
|
||||||
|
${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt
|
||||||
|
)
|
||||||
@@ -1,81 +1,55 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
# Construct the viewer version number based on the indra/VIEWER_VERSION file
|
||||||
|
|
||||||
# Read version components from the header file.
|
if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/newview/
|
||||||
file(STRINGS ${LIBS_OPEN_DIR}/llcommon/llversionviewer.h.in lines
|
set(VIEWER_VERSION_BASE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/newview/VIEWER_VERSION.txt")
|
||||||
REGEX " LL_VERSION_")
|
|
||||||
foreach(line ${lines})
|
|
||||||
string(REGEX REPLACE ".*LL_VERSION_([A-Z]+).*" "\\1" comp "${line}")
|
|
||||||
string(REGEX REPLACE ".* = ([0-9]+);.*" "\\1" value "${line}")
|
|
||||||
set(v${comp} "${value}")
|
|
||||||
endforeach(line)
|
|
||||||
|
|
||||||
execute_process(
|
if ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
|
||||||
COMMAND git rev-list HEAD
|
file(STRINGS ${VIEWER_VERSION_BASE_FILE} VIEWER_SHORT_VERSION REGEX "^[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||||
OUTPUT_VARIABLE GIT_REV_LIST_STR
|
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VIEWER_VERSION_MAJOR ${VIEWER_SHORT_VERSION})
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" VIEWER_VERSION_MINOR ${VIEWER_SHORT_VERSION})
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" VIEWER_VERSION_PATCH ${VIEWER_SHORT_VERSION})
|
||||||
)
|
|
||||||
|
|
||||||
if(GIT_REV_LIST_STR)
|
if (DEFINED ENV{revision})
|
||||||
string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR})
|
set(VIEWER_VERSION_REVISION $ENV{revision})
|
||||||
else()
|
message("Revision (from environment): ${VIEWER_VERSION_REVISION}")
|
||||||
string(REPLACE "\n" ";" GIT_REV_LIST "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GIT_REV_LIST)
|
else (DEFINED ENV{revision})
|
||||||
list(LENGTH GIT_REV_LIST vBUILD)
|
execute_process(
|
||||||
else()
|
COMMAND git rev-list HEAD
|
||||||
set(vBUILD 99)
|
OUTPUT_VARIABLE GIT_REV_LIST_STR
|
||||||
endif()
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
configure_file(
|
if(GIT_REV_LIST_STR)
|
||||||
${CMAKE_SOURCE_DIR}/llcommon/llversionviewer.h.in
|
string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR})
|
||||||
${CMAKE_SOURCE_DIR}/llcommon/llversionviewer.h
|
else()
|
||||||
)
|
string(REPLACE "\n" ";" GIT_REV_LIST "")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WINDOWS)
|
if(GIT_REV_LIST)
|
||||||
configure_file(
|
list(LENGTH GIT_REV_LIST VIEWER_VERSION_REVISION)
|
||||||
${CMAKE_SOURCE_DIR}/newview/res/viewerRes.rc.in
|
else(GIT_REV_LIST)
|
||||||
${CMAKE_SOURCE_DIR}/newview/res/viewerRes.rc
|
set(VIEWER_VERSION_REVISION 99)
|
||||||
)
|
endif(GIT_REV_LIST)
|
||||||
endif (WINDOWS)
|
endif (DEFINED ENV{revision})
|
||||||
|
message("Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
|
||||||
|
else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
|
||||||
|
message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'")
|
||||||
|
endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
|
||||||
|
|
||||||
if (DARWIN)
|
if ("${VIEWER_VERSION_REVISION}" STREQUAL "")
|
||||||
configure_file(
|
message("Ultimate fallback, revision was blank or not set: will use 0")
|
||||||
${CMAKE_SOURCE_DIR}/newview/English.lproj/InfoPlist.strings.in
|
set(VIEWER_VERSION_REVISION 0)
|
||||||
${CMAKE_SOURCE_DIR}/newview/English.lproj/InfoPlist.strings
|
endif ("${VIEWER_VERSION_REVISION}" STREQUAL "")
|
||||||
)
|
|
||||||
endif (DARWIN)
|
|
||||||
|
|
||||||
if (LINUX)
|
|
||||||
configure_file(
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh.in
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
configure_file(
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh.in
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
configure_file(
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh.in
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
configure_file(
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh.in
|
|
||||||
${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
endif (LINUX)
|
|
||||||
|
|
||||||
|
|
||||||
# Compose the version.
|
|
||||||
set(${ROOT_PROJECT_NAME}_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}")
|
|
||||||
if (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
|
|
||||||
message(STATUS "Version is ${${ROOT_PROJECT_NAME}_VERSION}")
|
|
||||||
else (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
|
|
||||||
message(FATAL_ERROR "Could not determine version (${${ROOT_PROJECT_NAME}_VERSION})")
|
|
||||||
endif (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
|
|
||||||
|
|
||||||
|
set(VIEWER_CHANNEL_VERSION_DEFINES
|
||||||
|
"LL_VIEWER_CHANNEL=\"${VIEWER_CHANNEL}\""
|
||||||
|
"LL_VIEWER_CHANNEL_GRK=L\"${VIEWER_CHANNEL_GRK}\""
|
||||||
|
"LL_VIEWER_VERSION_MAJOR=${VIEWER_VERSION_MAJOR}"
|
||||||
|
"LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}"
|
||||||
|
"LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}"
|
||||||
|
"LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}"
|
||||||
|
)
|
||||||
|
endif (NOT DEFINED VIEWER_SHORT_VERSION)
|
||||||
|
|||||||
@@ -20,8 +20,5 @@ else (STANDALONE)
|
|||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(CARES_LIBRARIES cares)
|
set(CARES_LIBRARIES cares)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
set(CARES_INCLUDE_DIRS
|
set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/ares)
|
||||||
${LIBS_PREBUILT_DIR}/include/ares
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/ares
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
45
indra/cmake/CEFPlugin.cmake
Normal file
45
indra/cmake/CEFPlugin.cmake
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
include(Linking)
|
||||||
|
include(Prebuilt)
|
||||||
|
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
set(CEFPLUGIN OFF CACHE BOOL
|
||||||
|
"CEFPLUGIN support for the llplugin/llmedia test apps.")
|
||||||
|
else (USESYSTEMLIBS)
|
||||||
|
use_prebuilt_binary(dullahan)
|
||||||
|
set(CEFPLUGIN ON CACHE BOOL
|
||||||
|
"CEFPLUGIN support for the llplugin/llmedia test apps.")
|
||||||
|
set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
|
|
||||||
|
if (WINDOWS)
|
||||||
|
set(CEF_PLUGIN_LIBRARIES
|
||||||
|
libcef.lib
|
||||||
|
libcef_dll_wrapper.lib
|
||||||
|
dullahan.lib
|
||||||
|
)
|
||||||
|
elseif (DARWIN)
|
||||||
|
FIND_LIBRARY(APPKIT_LIBRARY AppKit)
|
||||||
|
if (NOT APPKIT_LIBRARY)
|
||||||
|
message(FATAL_ERROR "AppKit not found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FIND_LIBRARY(CEF_LIBRARY "Chromium Embedded Framework" ${ARCH_PREBUILT_DIRS_RELEASE})
|
||||||
|
if (NOT CEF_LIBRARY)
|
||||||
|
message(FATAL_ERROR "CEF not found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CEF_PLUGIN_LIBRARIES
|
||||||
|
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
|
||||||
|
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
|
||||||
|
${APPKIT_LIBRARY}
|
||||||
|
${CEF_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
elseif (LINUX)
|
||||||
|
set(CEF_PLUGIN_LIBRARIES
|
||||||
|
dullahan
|
||||||
|
cef_dll_wrapper.a
|
||||||
|
cef
|
||||||
|
)
|
||||||
|
endif (WINDOWS)
|
||||||
@@ -8,44 +8,40 @@ set(cmake_SOURCE_FILES
|
|||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
|
|
||||||
00-Common.cmake
|
00-Common.cmake
|
||||||
|
Abseil-CPP.cmake
|
||||||
AIStateMachine.cmake
|
AIStateMachine.cmake
|
||||||
APR.cmake
|
APR.cmake
|
||||||
Audio.cmake
|
Audio.cmake
|
||||||
BasicPluginBase.cmake
|
BasicPluginBase.cmake
|
||||||
BerkeleyDB.cmake
|
|
||||||
Boost.cmake
|
Boost.cmake
|
||||||
|
BuildBranding.cmake
|
||||||
BuildVersion.cmake
|
BuildVersion.cmake
|
||||||
CARes.cmake
|
CARes.cmake
|
||||||
|
CEFPlugin.cmake
|
||||||
CMakeCopyIfDifferent.cmake
|
CMakeCopyIfDifferent.cmake
|
||||||
CURL.cmake
|
|
||||||
Colladadom.cmake
|
Colladadom.cmake
|
||||||
ConfigurePkgConfig.cmake
|
ConfigurePkgConfig.cmake
|
||||||
CopyBackToSource.cmake
|
CURL.cmake
|
||||||
CopyWinLibs.cmake
|
Copy3rdPartyLibs.cmake
|
||||||
Cwdebug.cmake
|
Cwdebug.cmake
|
||||||
DBusGlib.cmake
|
DBusGlib.cmake
|
||||||
DirectX.cmake
|
DeploySharedLibs.cmake
|
||||||
DownloadPrebuilt.cmake.in
|
|
||||||
ELFIO.cmake
|
|
||||||
EXPAT.cmake
|
EXPAT.cmake
|
||||||
ExamplePlugin.cmake
|
ExamplePlugin.cmake
|
||||||
FMODEX.cmake
|
|
||||||
FMODSTUDIO.cmake
|
|
||||||
FindAPR.cmake
|
FindAPR.cmake
|
||||||
FindBerkeleyDB.cmake
|
FindAutobuild.cmake
|
||||||
FindCARes.cmake
|
FindCARes.cmake
|
||||||
FindColladadom.cmake
|
FindColladadom.cmake
|
||||||
FindELFIO.cmake
|
|
||||||
FindGLOD.cmake
|
FindGLOD.cmake
|
||||||
FindGoogleBreakpad.cmake
|
FindGoogleBreakpad.cmake
|
||||||
FindGooglePerfTools.cmake
|
FindGooglePerfTools.cmake
|
||||||
FindHunSpell.cmake
|
FindHunSpell.cmake
|
||||||
FindJsonCpp.cmake
|
|
||||||
FindLLQtWebkit.cmake
|
|
||||||
FindNDOF.cmake
|
FindNDOF.cmake
|
||||||
FindOpenJPEG.cmake
|
FindOpenJPEG.cmake
|
||||||
FindTut.cmake
|
FindTut.cmake
|
||||||
|
FindURIPARSER.cmake
|
||||||
FindXmlRpcEpi.cmake
|
FindXmlRpcEpi.cmake
|
||||||
|
FMODSTUDIO.cmake
|
||||||
FreeType.cmake
|
FreeType.cmake
|
||||||
GLOD.cmake
|
GLOD.cmake
|
||||||
GStreamer010Plugin.cmake
|
GStreamer010Plugin.cmake
|
||||||
@@ -55,7 +51,7 @@ set(cmake_SOURCE_FILES
|
|||||||
GooglePerfTools.cmake
|
GooglePerfTools.cmake
|
||||||
Hunspell.cmake
|
Hunspell.cmake
|
||||||
JPEG.cmake
|
JPEG.cmake
|
||||||
JsonCpp.cmake
|
Json.cmake
|
||||||
LLAddBuildTest.cmake
|
LLAddBuildTest.cmake
|
||||||
LLAppearance.cmake
|
LLAppearance.cmake
|
||||||
LLAudio.cmake
|
LLAudio.cmake
|
||||||
@@ -70,9 +66,8 @@ set(cmake_SOURCE_FILES
|
|||||||
LLPlugin.cmake
|
LLPlugin.cmake
|
||||||
LLPrimitive.cmake
|
LLPrimitive.cmake
|
||||||
LLPhysicsExtensions.cmake
|
LLPhysicsExtensions.cmake
|
||||||
LLSharedLibs.cmake
|
|
||||||
LLQtWebkit.cmake
|
|
||||||
LLRender.cmake
|
LLRender.cmake
|
||||||
|
LLSharedLibs.cmake
|
||||||
LLUI.cmake
|
LLUI.cmake
|
||||||
LLVFS.cmake
|
LLVFS.cmake
|
||||||
LLWindow.cmake
|
LLWindow.cmake
|
||||||
@@ -91,17 +86,16 @@ set(cmake_SOURCE_FILES
|
|||||||
Prebuilt.cmake
|
Prebuilt.cmake
|
||||||
PulseAudio.cmake
|
PulseAudio.cmake
|
||||||
Python.cmake
|
Python.cmake
|
||||||
Qt4.cmake
|
|
||||||
QuickTimePlugin.cmake
|
|
||||||
RunBuildTest.cmake
|
|
||||||
StateMachine.cmake
|
StateMachine.cmake
|
||||||
TemplateCheck.cmake
|
TemplateCheck.cmake
|
||||||
Tut.cmake
|
Tut.cmake
|
||||||
UI.cmake
|
UI.cmake
|
||||||
UnixInstall.cmake
|
UnixInstall.cmake
|
||||||
|
URIPARSER.cmake
|
||||||
Variables.cmake
|
Variables.cmake
|
||||||
ViewerMiscLibs.cmake
|
ViewerMiscLibs.cmake
|
||||||
WebKitLibPlugin.cmake
|
WinManifest.cmake
|
||||||
|
LibVLCPlugin.cmake
|
||||||
XmlRpcEpi.cmake
|
XmlRpcEpi.cmake
|
||||||
ZLIB.cmake
|
ZLIB.cmake
|
||||||
)
|
)
|
||||||
@@ -110,7 +104,6 @@ source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
|
|||||||
|
|
||||||
set(master_SOURCE_FILES
|
set(master_SOURCE_FILES
|
||||||
../CMakeLists.txt
|
../CMakeLists.txt
|
||||||
../develop.py
|
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group("Master Rules" FILES ${master_SOURCE_FILES})
|
source_group("Master Rules" FILES ${master_SOURCE_FILES})
|
||||||
|
|||||||
@@ -10,16 +10,11 @@ else (STANDALONE)
|
|||||||
use_prebuilt_binary(curl)
|
use_prebuilt_binary(curl)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(CURL_LIBRARIES
|
set(CURL_LIBRARIES
|
||||||
debug libcurld
|
debug libcurl_a_debug
|
||||||
optimized libcurl)
|
optimized libcurl_a)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(CURL_LIBRARIES curl)
|
use_prebuilt_binary(libidn)
|
||||||
if(LINUX AND WORD_SIZE EQUAL 64)
|
set(CURL_LIBRARIES curl idn)
|
||||||
list(APPEND CURL_LIBRARIES idn)
|
|
||||||
endif(LINUX AND WORD_SIZE EQUAL 64)
|
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
set(CURL_INCLUDE_DIRS
|
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -10,49 +10,22 @@ if (STANDALONE)
|
|||||||
include (FindColladadom)
|
include (FindColladadom)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(colladadom)
|
use_prebuilt_binary(colladadom)
|
||||||
|
|
||||||
if (NOT WINDOWS AND NOT LINUX)
|
|
||||||
use_prebuilt_binary(pcre)
|
|
||||||
endif (NOT WINDOWS AND NOT LINUX)
|
|
||||||
|
|
||||||
if (NOT DARWIN AND NOT WINDOWS)
|
|
||||||
use_prebuilt_binary(libxml)
|
|
||||||
endif (NOT DARWIN AND NOT WINDOWS)
|
|
||||||
|
|
||||||
set(COLLADADOM_INCLUDE_DIRS
|
set(COLLADADOM_INCLUDE_DIRS
|
||||||
${LIBS_PREBUILT_DIR}/include/collada
|
${LIBS_PREBUILT_DIR}/include/collada
|
||||||
${LIBS_PREBUILT_DIR}/include/collada/1.4
|
${LIBS_PREBUILT_DIR}/include/collada/1.4
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/collada
|
)
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/collada/1.4
|
|
||||||
)
|
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
if(MSVC12)
|
set(COLLADADOM_LIBRARIES
|
||||||
use_prebuilt_binary(pcre)
|
debug libcollada14dom23-sd
|
||||||
use_prebuilt_binary(libxml)
|
optimized libcollada14dom23-s
|
||||||
set(COLLADADOM_LIBRARIES
|
)
|
||||||
debug libcollada14dom23-sd
|
else(WINDOWS)
|
||||||
optimized libcollada14dom23-s
|
set(COLLADADOM_LIBRARIES
|
||||||
libxml2_a
|
debug collada14dom-d
|
||||||
debug pcrecppd
|
optimized collada14dom
|
||||||
optimized pcrecpp
|
minizip
|
||||||
debug pcred
|
)
|
||||||
optimized pcre
|
|
||||||
${BOOST_SYSTEM_LIBRARIES}
|
|
||||||
)
|
|
||||||
else(MSVC12)
|
|
||||||
add_definitions(-DDOM_DYNAMIC)
|
|
||||||
set(COLLADADOM_LIBRARIES
|
|
||||||
debug libcollada14dom22-d
|
|
||||||
optimized libcollada14dom22
|
|
||||||
)
|
|
||||||
endif(MSVC12)
|
|
||||||
else (WINDOWS)
|
|
||||||
set(COLLADADOM_LIBRARIES
|
|
||||||
collada14dom
|
|
||||||
minizip
|
|
||||||
xml2
|
|
||||||
)
|
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
|||||||
283
indra/cmake/Copy3rdPartyLibs.cmake
Normal file
283
indra/cmake/Copy3rdPartyLibs.cmake
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
# The copy_win_libs folder contains file lists and a script used to
|
||||||
|
# copy dlls, exes and such needed to run the SecondLife from within
|
||||||
|
# VisualStudio.
|
||||||
|
|
||||||
|
include(CMakeCopyIfDifferent)
|
||||||
|
include(Linking)
|
||||||
|
include(Variables)
|
||||||
|
include(LLCommon)
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# set up platform specific lists of files that need to be copied
|
||||||
|
###################################################################
|
||||||
|
if(WINDOWS)
|
||||||
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||||
|
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||||
|
include(InstallRequiredSystemLibrariesAL)
|
||||||
|
|
||||||
|
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release")
|
||||||
|
|
||||||
|
#*******************************
|
||||||
|
# VIVOX - *NOTE: no debug version
|
||||||
|
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
set(vivox_files
|
||||||
|
SLVoice.exe
|
||||||
|
vivoxplatform.dll
|
||||||
|
)
|
||||||
|
if (ADDRESS_SIZE EQUAL 64)
|
||||||
|
list(APPEND vivox_files
|
||||||
|
vivoxsdk_x64.dll
|
||||||
|
ortp_x64.dll
|
||||||
|
)
|
||||||
|
else (ADDRESS_SIZE EQUAL 64)
|
||||||
|
list(APPEND vivox_files
|
||||||
|
vivoxsdk.dll
|
||||||
|
ortp.dll
|
||||||
|
)
|
||||||
|
endif (ADDRESS_SIZE EQUAL 64)
|
||||||
|
|
||||||
|
#*******************************
|
||||||
|
# Misc shared libs
|
||||||
|
|
||||||
|
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||||
|
set(debug_files
|
||||||
|
libapr-1.dll
|
||||||
|
libaprutil-1.dll
|
||||||
|
libapriconv-1.dll
|
||||||
|
glod.dll
|
||||||
|
libhunspell.dll
|
||||||
|
)
|
||||||
|
|
||||||
|
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
set(release_files
|
||||||
|
libapr-1.dll
|
||||||
|
libaprutil-1.dll
|
||||||
|
libapriconv-1.dll
|
||||||
|
glod.dll
|
||||||
|
libhunspell.dll
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ADDRESS_SIZE EQUAL 64)
|
||||||
|
list(APPEND debug_files
|
||||||
|
libcrypto-1_1-x64.dll
|
||||||
|
libssl-1_1-x64.dll
|
||||||
|
)
|
||||||
|
list(APPEND release_files
|
||||||
|
libcrypto-1_1-x64.dll
|
||||||
|
libssl-1_1-x64.dll
|
||||||
|
)
|
||||||
|
else(ADDRESS_SIZE EQUAL 64)
|
||||||
|
list(APPEND debug_files
|
||||||
|
libcrypto-1_1.dll
|
||||||
|
libssl-1_1.dll
|
||||||
|
)
|
||||||
|
list(APPEND release_files
|
||||||
|
libcrypto-1_1.dll
|
||||||
|
libssl-1_1.dll
|
||||||
|
)
|
||||||
|
endif(ADDRESS_SIZE EQUAL 64)
|
||||||
|
|
||||||
|
if(NOT DISABLE_TCMALLOC)
|
||||||
|
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
|
||||||
|
set(release_files ${release_files} libtcmalloc_minimal.dll)
|
||||||
|
endif(NOT DISABLE_TCMALLOC)
|
||||||
|
|
||||||
|
if (FMODSTUDIO)
|
||||||
|
set(debug_files ${debug_files} fmodL.dll)
|
||||||
|
set(release_files ${release_files} fmod.dll)
|
||||||
|
endif (FMODSTUDIO)
|
||||||
|
|
||||||
|
foreach(redistfullfile IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||||
|
get_filename_component(redistfilepath ${redistfullfile} DIRECTORY )
|
||||||
|
get_filename_component(redistfilename ${redistfullfile} NAME)
|
||||||
|
copy_if_different(
|
||||||
|
${redistfilepath}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||||
|
out_targets
|
||||||
|
${redistfilename}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${redistfilepath}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
|
||||||
|
out_targets
|
||||||
|
${redistfilename}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
elseif(DARWIN)
|
||||||
|
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources")
|
||||||
|
|
||||||
|
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
set(vivox_files
|
||||||
|
SLVoice
|
||||||
|
ca-bundle.crt
|
||||||
|
libsndfile.dylib
|
||||||
|
libvivoxoal.dylib
|
||||||
|
libortp.dylib
|
||||||
|
libvivoxplatform.dylib
|
||||||
|
libvivoxsdk.dylib
|
||||||
|
)
|
||||||
|
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||||
|
set(debug_files
|
||||||
|
)
|
||||||
|
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
set(release_files
|
||||||
|
libapr-1.0.dylib
|
||||||
|
libapr-1.dylib
|
||||||
|
libaprutil-1.0.dylib
|
||||||
|
libaprutil-1.dylib
|
||||||
|
libexception_handler.dylib
|
||||||
|
libexpat.1.5.2.dylib
|
||||||
|
libexpat.dylib
|
||||||
|
libGLOD.dylib
|
||||||
|
libhunspell-1.3.0.dylib
|
||||||
|
libndofdev.dylib
|
||||||
|
)
|
||||||
|
|
||||||
|
if (FMODSTUDIO)
|
||||||
|
list(APPEND debug_files libfmodL.dylib)
|
||||||
|
list(APPEND release_files libfmod.dylib)
|
||||||
|
endif (FMODSTUDIO)
|
||||||
|
|
||||||
|
elseif(LINUX)
|
||||||
|
# linux is weird, multiple side by side configurations aren't supported
|
||||||
|
# and we don't seem to have any debug shared libs built yet anyways...
|
||||||
|
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}")
|
||||||
|
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}")
|
||||||
|
|
||||||
|
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
set(vivox_files
|
||||||
|
libsndfile.so.1
|
||||||
|
libortp.so
|
||||||
|
libvivoxoal.so.1
|
||||||
|
libvivoxplatform.so
|
||||||
|
libvivoxsdk.so
|
||||||
|
SLVoice
|
||||||
|
)
|
||||||
|
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||||
|
# or ARCH_PREBUILT_DIRS
|
||||||
|
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||||
|
set(debug_files
|
||||||
|
)
|
||||||
|
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||||
|
# or ARCH_PREBUILT_DIRS
|
||||||
|
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||||
|
# *FIX - figure out what to do with duplicate libalut.so here -brad
|
||||||
|
set(release_files
|
||||||
|
libapr-1.so.0
|
||||||
|
libaprutil-1.so.0
|
||||||
|
libatk-1.0.so
|
||||||
|
libexpat.so
|
||||||
|
libexpat.so.1
|
||||||
|
libfreetype.so.6.12.3
|
||||||
|
libfreetype.so.6
|
||||||
|
libfreetype.so
|
||||||
|
libGLOD.so
|
||||||
|
libgmodule-2.0.so
|
||||||
|
libgobject-2.0.so
|
||||||
|
libopenal.so
|
||||||
|
libfontconfig.so.1.8.0
|
||||||
|
libfontconfig.so.1
|
||||||
|
libfontconfig.so
|
||||||
|
)
|
||||||
|
|
||||||
|
if (USE_TCMALLOC)
|
||||||
|
set(release_files ${release_files} "libtcmalloc_minimal.so")
|
||||||
|
endif (USE_TCMALLOC)
|
||||||
|
|
||||||
|
if (FMODSTUDIO)
|
||||||
|
set(debug_files ${debug_files} "libfmodL.so")
|
||||||
|
set(release_files ${release_files} "libfmod.so")
|
||||||
|
endif (FMODSTUDIO)
|
||||||
|
|
||||||
|
else(WINDOWS)
|
||||||
|
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
|
||||||
|
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
|
||||||
|
set(vivox_files "")
|
||||||
|
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||||
|
# or ARCH_PREBUILT_DIRS
|
||||||
|
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
|
||||||
|
set(debug_files "")
|
||||||
|
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||||
|
# or ARCH_PREBUILT_DIRS
|
||||||
|
set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
|
||||||
|
set(release_files "")
|
||||||
|
|
||||||
|
set(debug_llkdu_src "")
|
||||||
|
set(debug_llkdu_dst "")
|
||||||
|
set(release_llkdu_src "")
|
||||||
|
set(release_llkdu_dst "")
|
||||||
|
set(relwithdebinfo_llkdu_dst "")
|
||||||
|
endif(WINDOWS)
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# Done building the file lists, now set up the copy commands.
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${vivox_src_dir}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||||
|
out_targets
|
||||||
|
${vivox_files}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${vivox_src_dir}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||||
|
out_targets
|
||||||
|
${vivox_files}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${vivox_src_dir}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
|
||||||
|
out_targets
|
||||||
|
${vivox_files}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#copy_if_different(
|
||||||
|
# ${debug_src_dir}
|
||||||
|
# "${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||||
|
# out_targets
|
||||||
|
# ${debug_files}
|
||||||
|
# )
|
||||||
|
#set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${release_src_dir}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||||
|
out_targets
|
||||||
|
${release_files}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
copy_if_different(
|
||||||
|
${release_src_dir}
|
||||||
|
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
|
||||||
|
out_targets
|
||||||
|
${release_files}
|
||||||
|
)
|
||||||
|
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||||
|
|
||||||
|
if(NOT USESYSTEMLIBS)
|
||||||
|
add_custom_target(
|
||||||
|
stage_third_party_libs ALL
|
||||||
|
DEPENDS ${third_party_targets}
|
||||||
|
)
|
||||||
|
endif(NOT USESYSTEMLIBS)
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
# Copies a binary back to the source directory
|
|
||||||
|
|
||||||
MACRO(COPY_BACK_TO_SOURCE target)
|
|
||||||
SET(FROM $<TARGET_FILE:${target}>)
|
|
||||||
SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
#MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
|
|
||||||
ADD_CUSTOM_COMMAND(
|
|
||||||
TARGET ${target} POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
|
|
||||||
DEPENDS ${FROM}
|
|
||||||
COMMENT "Copying ${target} to ${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
)
|
|
||||||
ENDMACRO(COPY_BACK_TO_SOURCE)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# The copy_win_libs folder contains file lists and a script used to
|
|
||||||
# copy dlls, exes and such needed to run the SecondLife from within
|
|
||||||
# VisualStudio.
|
|
||||||
|
|
||||||
set(LIBS_PREBUILT_DIR "@LIBS_PREBUILT_DIR@")
|
|
||||||
set(LIBS_PREBUILT_LEGACY_DIR "@LIBS_PREBUILT_LEGACY_DIR@")
|
|
||||||
set(MSVC10 "@MSVC10@")
|
|
||||||
set(WORD_SIZE "@WORD_SIZE@")
|
|
||||||
|
|
||||||
set(LIBS_RELEASE_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/release
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
|
|
||||||
)
|
|
||||||
set(LIBS_DEBUG_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/debug
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/debug
|
|
||||||
)
|
|
||||||
|
|
||||||
function(copy_files paths names dest)
|
|
||||||
string(FIND ${dest} ${CUR_CONFIG} idx)
|
|
||||||
if(${idx} LESS 0)
|
|
||||||
return()
|
|
||||||
endif(${idx} LESS 0)
|
|
||||||
foreach(f ${names})
|
|
||||||
foreach(p ${paths})
|
|
||||||
set(from_file "${p}/${f}")
|
|
||||||
set(to_dest "${CMAKE_BINARY_DIR}/newview/${dest}/")
|
|
||||||
if(EXISTS ${from_file})
|
|
||||||
message("Copying ${from_file} to ${to_dest}")
|
|
||||||
if(NOT EXISTS ${to_dest})
|
|
||||||
execute_process(COMMAND md "${to_dest}")
|
|
||||||
endif(NOT EXISTS ${to_dest})
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${from_file}" "${to_dest}${f}" RESULT_VARIABLE result)
|
|
||||||
if(${result})
|
|
||||||
message(SEND_ERROR "Unsuccessful.")
|
|
||||||
endif(${result})
|
|
||||||
set(found 1)
|
|
||||||
break()
|
|
||||||
endif(EXISTS ${from_file})
|
|
||||||
endforeach(p)
|
|
||||||
if(NOT found)
|
|
||||||
message(SEND_ERROR "Failed to find library: ${f}")
|
|
||||||
endif(NOT found)
|
|
||||||
endforeach(f)
|
|
||||||
endfunction(copy_files)
|
|
||||||
|
|
||||||
set(vivox_files
|
|
||||||
ca-bundle.crt
|
|
||||||
libsndfile-1.dll
|
|
||||||
ortp.dll
|
|
||||||
SLVoice.exe
|
|
||||||
vivoxoal.dll
|
|
||||||
vivoxplatform.dll
|
|
||||||
vivoxsdk.dll
|
|
||||||
zlib1.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "Release" )
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "RelWithDebInfo")
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}" "${vivox_files}" "Debug")
|
|
||||||
|
|
||||||
set(release_files
|
|
||||||
libhunspell.dll
|
|
||||||
libapr-1.dll
|
|
||||||
libaprutil-1.dll
|
|
||||||
libapriconv-1.dll
|
|
||||||
libeay32.dll
|
|
||||||
ssleay32.dll
|
|
||||||
glod.dll
|
|
||||||
qtcore4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}" "${release_files}" "Debug")
|
|
||||||
|
|
||||||
if(MSVC10)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}" "libcollada14dom22-d.dll" "Debug")
|
|
||||||
endif(MSVC10)
|
|
||||||
|
|
||||||
if(WORD_SIZE EQUAL 32)
|
|
||||||
set(release_files
|
|
||||||
libcollada14dom22.dll
|
|
||||||
libtcmalloc_minimal.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
|
|
||||||
endif(WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
set(plugins_release_files
|
|
||||||
libeay32.dll
|
|
||||||
qtcore4.dll
|
|
||||||
qtgui4.dll
|
|
||||||
qtnetwork4.dll
|
|
||||||
qtopengl4.dll
|
|
||||||
qtwebkit4.dll
|
|
||||||
ssleay32.dll
|
|
||||||
qtxmlpatterns4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "Release/llplugin")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "RelWithDebInfo/llplugin")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/Release")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/RelWithDebInfo")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
# Debug config runtime files required for the plugins
|
|
||||||
set(plugins_debug_files
|
|
||||||
libeay32.dll
|
|
||||||
qtcored4.dll
|
|
||||||
qtguid4.dll
|
|
||||||
qtnetworkd4.dll
|
|
||||||
qtopengld4.dll
|
|
||||||
qtwebkitd4.dll
|
|
||||||
ssleay32.dll
|
|
||||||
qtxmlpatternsd4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "Debug/llplugin")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "../test_apps/llplugintest/Debug")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
|
||||||
set(plugin_image_release_files
|
|
||||||
qgif4.dll
|
|
||||||
qico4.dll
|
|
||||||
qjpeg4.dll
|
|
||||||
qmng4.dll
|
|
||||||
qsvg4.dll
|
|
||||||
qtiff4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "Release/llplugin/imageformats")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "RelWithDebInfo/llplugin/imageformats")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/Release")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/RelWithDebInfo")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
|
|
||||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
|
||||||
set(plugin_image_debug_files
|
|
||||||
qgifd4.dll
|
|
||||||
qicod4.dll
|
|
||||||
qjpegd4.dll
|
|
||||||
qmngd4.dll
|
|
||||||
qsvgd4.dll
|
|
||||||
qtiffd4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "Debug/llplugin/imageformats")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "../test_apps/llplugintest/imageformats/Debug")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
|
||||||
set(plugin_codec_release_files
|
|
||||||
qcncodecs4.dll
|
|
||||||
qjpcodecs4.dll
|
|
||||||
qkrcodecs4.dll
|
|
||||||
qtwcodecs4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "Release/llplugin/codecs")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "RelWithDebInfo/llplugin/codecs")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/Release")
|
|
||||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/RelWithDebInfo")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
|
||||||
set(plugin_codec_debug_files
|
|
||||||
qcncodecsd4.dll
|
|
||||||
qjpcodecsd4.dll
|
|
||||||
qkrcodecsd4.dll
|
|
||||||
qtwcodecsd4.dll
|
|
||||||
)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "Debug/llplugin/codecs")
|
|
||||||
if(0)
|
|
||||||
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "../test_apps/llplugintest/codecs/Debug")
|
|
||||||
endif(0)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,12 +7,11 @@ if (STANDALONE)
|
|||||||
pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
|
pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
|
||||||
|
|
||||||
elseif (LINUX)
|
elseif (LINUX)
|
||||||
use_prebuilt_binary(dbusglib)
|
use_prebuilt_binary(dbus-glib)
|
||||||
set(DBUSGLIB_FOUND ON FORCE BOOL)
|
set(DBUSGLIB_FOUND ON FORCE BOOL)
|
||||||
set(DBUSGLIB_INCLUDE_DIRS
|
set(DBUSGLIB_INCLUDE_DIRS
|
||||||
${LIBS_PREBUILT_DIR}/include/dbus
|
${LIBS_PREBUILT_DIR}/include/dbus
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/dbus
|
)
|
||||||
)
|
|
||||||
# We don't need to explicitly link against dbus-glib itself, because
|
# We don't need to explicitly link against dbus-glib itself, because
|
||||||
# the viewer probes for the system's copy at runtime.
|
# the viewer probes for the system's copy at runtime.
|
||||||
set(DBUSGLIB_LIBRARIES
|
set(DBUSGLIB_LIBRARIES
|
||||||
|
|||||||
70
indra/cmake/DeploySharedLibs.cmake
Normal file
70
indra/cmake/DeploySharedLibs.cmake
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# DeploySharedLibs.cmake
|
||||||
|
# This is a script to be run at build time! Its not part of the cmake configuration!
|
||||||
|
# See indra/cmake/LLSharedLibs.cmake for a macro that simplifies adding a command to a target to run this script.
|
||||||
|
|
||||||
|
# This script requires a few cmake variable to be set on the command line:
|
||||||
|
# BIN_NAME= The full path the the binary to search for dependecies.
|
||||||
|
# SEARCH_DIRS= The full paths to dirs to search for dependencies.
|
||||||
|
# DST_PATH= The full path where the dependecies will be copied.
|
||||||
|
get_filename_component(current_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||||
|
include(GetPrerequisites)
|
||||||
|
|
||||||
|
message("Getting recursive dependencies for file: ${BIN_NAME}")
|
||||||
|
|
||||||
|
set(EXCLUDE_SYSTEM 1)
|
||||||
|
set(RECURSE 0)
|
||||||
|
get_filename_component(EXE_PATH ${BIN_NAME} PATH)
|
||||||
|
|
||||||
|
get_prerequisites( ${BIN_NAME} RESULTS ${EXCLUDE_SYSTEM} ${RECURSE} "${EXE_PATH}" "${SEARCH_DIRS}" )
|
||||||
|
|
||||||
|
foreach(DEP ${RESULTS})
|
||||||
|
Message("Processing dependency: ${DEP}")
|
||||||
|
get_filename_component(DEP_FILE ${DEP} NAME)
|
||||||
|
set(DEP_FILES ${DEP_FILES} ${DEP_FILE})
|
||||||
|
endforeach(DEP)
|
||||||
|
|
||||||
|
if(DEP_FILES)
|
||||||
|
list(REMOVE_DUPLICATES DEP_FILES)
|
||||||
|
endif(DEP_FILES)
|
||||||
|
|
||||||
|
foreach(DEP_FILE ${DEP_FILES})
|
||||||
|
if(FOUND_FILES)
|
||||||
|
list(FIND FOUND_FILES ${DEP_FILE} FOUND)
|
||||||
|
else(FOUND_FILES)
|
||||||
|
set(FOUND -1)
|
||||||
|
endif(FOUND_FILES)
|
||||||
|
|
||||||
|
if(FOUND EQUAL -1)
|
||||||
|
find_path(DEP_PATH ${DEP_FILE} PATHS ${SEARCH_DIRS} NO_DEFAULT_PATH)
|
||||||
|
if(DEP_PATH)
|
||||||
|
set(FOUND_FILES ${FOUND_FILES} "${DEP_PATH}/${DEP_FILE}")
|
||||||
|
set(DEP_PATH NOTFOUND) #reset DEP_PATH for the next find_path call.
|
||||||
|
else(DEP_PATH)
|
||||||
|
set(MISSING_FILES ${MISSING_FILES} ${DEP_FILE})
|
||||||
|
endif(DEP_PATH)
|
||||||
|
endif(FOUND EQUAL -1)
|
||||||
|
endforeach(DEP_FILE)
|
||||||
|
|
||||||
|
if(MISSING_FILES)
|
||||||
|
message("Missing:")
|
||||||
|
foreach(FILE ${MISSING_FILES})
|
||||||
|
message(" ${FILE}")
|
||||||
|
endforeach(FILE)
|
||||||
|
message("Searched in:")
|
||||||
|
foreach(SEARCH_DIR ${SEARCH_DIRS})
|
||||||
|
message(" ${SEARCH_DIR}")
|
||||||
|
endforeach(SEARCH_DIR)
|
||||||
|
message(FATAL_ERROR "Failed")
|
||||||
|
endif(MISSING_FILES)
|
||||||
|
|
||||||
|
if(FOUND_FILES)
|
||||||
|
foreach(FILE ${FOUND_FILES})
|
||||||
|
get_filename_component(DST_FILE ${FILE} NAME)
|
||||||
|
set(DST_FILE "${DST_PATH}/${DST_FILE}")
|
||||||
|
message("Copying ${FILE} to ${DST_FILE}")
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST_FILE}
|
||||||
|
)
|
||||||
|
endforeach(FILE ${FOUND_FILES})
|
||||||
|
endif(FOUND_FILES)
|
||||||
|
message("Success!")
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
include(Variables)
|
|
||||||
|
|
||||||
if (WINDOWS)
|
|
||||||
if (WORD_SIZE EQUAL 32)
|
|
||||||
set (DIRECTX_ARCHITECTURE x86)
|
|
||||||
elseif (WORD_SIZE EQUAL 64)
|
|
||||||
set (DIRECTX_ARCHITECTURE x64)
|
|
||||||
else (WORD_SIZE EQUAL 32)
|
|
||||||
set (DIRECTX_ARCHITECTURE x86)
|
|
||||||
endif (WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
SET(program_files $ENV{ProgramW6432})
|
|
||||||
if(NOT program_files)
|
|
||||||
SET(program_files $ENV{ProgramFiles})
|
|
||||||
endif(NOT program_files)
|
|
||||||
SET(program_files_x86 "ProgramFiles(x86)")
|
|
||||||
SET(program_files_x86 $ENV{${program_files_x86}})
|
|
||||||
|
|
||||||
find_path(DIRECTX_ROOT_DIR Include/dxdiag.h
|
|
||||||
PATHS
|
|
||||||
"$ENV{DXSDK_DIR}"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (June 2010)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (June 2010)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (February 2010)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (February 2010)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (March 2009)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (March 2009)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (August 2008)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (August 2008)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (June 2008)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (June 2008)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (March 2008)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (March 2008)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (November 2007)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (November 2007)"
|
|
||||||
"${program_files}/Microsoft DirectX SDK (August 2007)"
|
|
||||||
"${program_files_x86}/Microsoft DirectX SDK (August 2007)"
|
|
||||||
)
|
|
||||||
|
|
||||||
if (DIRECTX_ROOT_DIR)
|
|
||||||
set (DIRECTX_INCLUDE_DIR "${DIRECTX_ROOT_DIR}/Include")
|
|
||||||
set (DIRECTX_LIBRARY_DIR "${DIRECTX_ROOT_DIR}/Lib/${DIRECTX_ARCHITECTURE}")
|
|
||||||
else (DIRECTX_ROOT_DIR)
|
|
||||||
find_path (WIN_KIT_ROOT_DIR Include/um/windows.h
|
|
||||||
PATHS
|
|
||||||
"${program_files}/Windows Kits/8.1"
|
|
||||||
"${program_files_x86}/Windows Kits/8.1"
|
|
||||||
"${program_files}/Windows Kits/8.0"
|
|
||||||
"${program_files_x86}/Windows Kits/8.0"
|
|
||||||
)
|
|
||||||
|
|
||||||
find_path (WIN_KIT_LIB_DIR dxguid.lib
|
|
||||||
"${WIN_KIT_ROOT_DIR}/Lib/winv6.3/um/${DIRECTX_ARCHITECTURE}"
|
|
||||||
"${WIN_KIT_ROOT_DIR}/Lib/Win8/um/${DIRECTX_ARCHITECTURE}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if (WIN_KIT_ROOT_DIR AND WIN_KIT_LIB_DIR)
|
|
||||||
set (DIRECTX_INCLUDE_DIR "${WIN_KIT_ROOT_DIR}/Include/um" "${WIN_KIT_ROOT_DIR}/Include/shared")
|
|
||||||
set (DIRECTX_LIBRARY_DIR "${WIN_KIT_LIB_DIR}")
|
|
||||||
endif (WIN_KIT_ROOT_DIR AND WIN_KIT_LIB_DIR)
|
|
||||||
endif (DIRECTX_ROOT_DIR)
|
|
||||||
|
|
||||||
if (DIRECTX_INCLUDE_DIR)
|
|
||||||
include_directories(${DIRECTX_INCLUDE_DIR})
|
|
||||||
if (DIRECTX_FIND_QUIETLY)
|
|
||||||
message(STATUS "Found DirectX include: ${DIRECTX_INCLUDE_DIR}")
|
|
||||||
endif (DIRECTX_FIND_QUIETLY)
|
|
||||||
else (DIRECTX_INCLUDE_DIR)
|
|
||||||
message(FATAL_ERROR "Could not find DirectX SDK Include")
|
|
||||||
endif (DIRECTX_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if (DIRECTX_LIBRARY_DIR)
|
|
||||||
if (DIRECTX_FIND_QUIETLY)
|
|
||||||
message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}")
|
|
||||||
endif (DIRECTX_FIND_QUIETLY)
|
|
||||||
else (DIRECTX_LIBRARY_DIR)
|
|
||||||
message(FATAL_ERROR "Could not find DirectX SDK Libraries")
|
|
||||||
endif (DIRECTX_LIBRARY_DIR)
|
|
||||||
|
|
||||||
endif (WINDOWS)
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# This script drives download of prebuilt packages during the build.
|
|
||||||
# The top-level CMakeLists.txt configures packages and tool locations.
|
|
||||||
set(packages "@PREBUILT_PACKAGES@")
|
|
||||||
set(python "@PYTHON_EXECUTABLE@")
|
|
||||||
set(install_dir "@CMAKE_BINARY_DIR@/packages")
|
|
||||||
set(scp "@SCP_EXECUTABLE@")
|
|
||||||
set(scripts_dir "@SCRIPTS_DIR@")
|
|
||||||
set(sentinel_dir "@CMAKE_BINARY_DIR@/prepare")
|
|
||||||
set(prebuilt_type "@PREBUILT_TYPE@")
|
|
||||||
|
|
||||||
# In proprietary mode we use scp for download.
|
|
||||||
set(proprietary "@INSTALL_PROPRIETARY@")
|
|
||||||
if(proprietary)
|
|
||||||
set(scp_option "--scp=${scp}")
|
|
||||||
set(proprietary_message " proprietary")
|
|
||||||
endif(proprietary)
|
|
||||||
|
|
||||||
foreach(package ${packages})
|
|
||||||
if(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
|
||||||
# This package is missing or out of date.
|
|
||||||
message(STATUS "Obtaining${proprietary_message} prebuilt '${package}'")
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${python} install.py -p${prebuilt_type} --install-dir=${install_dir} --installed-manifest=${install_dir}/installed.xml ${scp_option} ${package}
|
|
||||||
WORKING_DIRECTORY ${scripts_dir}
|
|
||||||
RESULT_VARIABLE result
|
|
||||||
)
|
|
||||||
if(result STREQUAL 0)
|
|
||||||
# Write a sentinel to avoid attempting a download again.
|
|
||||||
file(WRITE ${sentinel_dir}/${package}_installed "Obtained '${package}'")
|
|
||||||
else(result STREQUAL 0)
|
|
||||||
# Remove the sentinel to ensure a download is attempted again.
|
|
||||||
file(REMOVE ${sentinel_dir}/prebuilt
|
|
||||||
${sentinel_dir}/${package}_installed)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"Failed to download or unpack prebuilt '${package}'. "
|
|
||||||
"Process returned: ${result}")
|
|
||||||
endif(result STREQUAL 0)
|
|
||||||
else(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
|
||||||
# This package is ready.
|
|
||||||
message(STATUS "Prebuilt '${package}' is up-to-date")
|
|
||||||
endif(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
|
||||||
endforeach(package)
|
|
||||||
|
|
||||||
# Store a sentinel to avoid running this script unnecessarily.
|
|
||||||
file(WRITE ${sentinel_dir}/prebuilt "All prebuilts obtained successfully\n")
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
set(ELFIO_FIND_QUIETLY ON)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
include(FindELFIO)
|
|
||||||
elseif (LINUX)
|
|
||||||
use_prebuilt_binary(elfio)
|
|
||||||
set(ELFIO_LIBRARIES ELFIO)
|
|
||||||
set(ELFIO_INCLUDE_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
set(ELFIO_FOUND "YES")
|
|
||||||
endif (STANDALONE)
|
|
||||||
|
|
||||||
if (ELFIO_FOUND)
|
|
||||||
add_definitions(-DLL_ELFBIN=1)
|
|
||||||
else (ELFIO_FOUND)
|
|
||||||
set(ELFIO_INCLUDE_DIR "")
|
|
||||||
endif (ELFIO_FOUND)
|
|
||||||
@@ -9,16 +9,9 @@ if (STANDALONE)
|
|||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(expat)
|
use_prebuilt_binary(expat)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
if (MSVC12)
|
set(EXPAT_LIBRARIES expat)
|
||||||
set(EXPAT_LIBRARIES expat)
|
|
||||||
else (MSVC12)
|
|
||||||
set(EXPAT_LIBRARIES libexpatMT)
|
|
||||||
endif (MSVC12)
|
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(EXPAT_LIBRARIES expat)
|
set(EXPAT_LIBRARIES expat)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
set(EXPAT_INCLUDE_DIRS
|
set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
include(Linking)
|
|
||||||
|
|
||||||
if (FMODEX AND FMODSTUDIO)
|
|
||||||
message( FATAL_ERROR "You can not enable two FMOD variants at the same time." )
|
|
||||||
endif (FMODEX AND FMODSTUDIO)
|
|
||||||
|
|
||||||
unset(FMOD_LIBRARY_RELEASE CACHE)
|
|
||||||
unset(FMOD_LIBRARY_DEBUG CACHE)
|
|
||||||
unset(FMOD_INCLUDE_DIR CACHE)
|
|
||||||
|
|
||||||
set(FMOD_EXTERNAL_LIB OFF)
|
|
||||||
|
|
||||||
if(STANDALONE OR WINDOWS)
|
|
||||||
if (NOT FMODEX_SDK_DIR AND WINDOWS)
|
|
||||||
GET_FILENAME_COMPONENT(REG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Programmers\ API\ Windows] ABSOLUTE)
|
|
||||||
set(FMODEX_SDK_DIR ${REG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
|
|
||||||
endif (NOT FMODEX_SDK_DIR AND WINDOWS)
|
|
||||||
if(NOT FMODEX_SDK_DIR AND STANDALONE)
|
|
||||||
message(FATAL_ERROR "FMODEX_SDK_DIR not set!")
|
|
||||||
endif(NOT FMODEX_SDK_DIR AND STANDALONE)
|
|
||||||
endif(STANDALONE OR WINDOWS)
|
|
||||||
|
|
||||||
if(FMODEX_SDK_DIR)
|
|
||||||
set(fmod_lib_paths "${FMODEX_SDK_DIR}/api" "${FMODEX_SDK_DIR}/api/lib" )
|
|
||||||
set(fmod_inc_paths "${FMODEX_SDK_DIR}/api/inc")
|
|
||||||
|
|
||||||
if(WINDOWS)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
|
|
||||||
endif(WINDOWS)
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
|
||||||
find_library(FMOD_LIBRARY_RELEASE fmodex64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LIBRARY_DEBUG fmodexL64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
else(WORD_SIZE EQUAL 64)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
|
|
||||||
find_library(FMOD_LIBRARY_RELEASE fmodex PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LIBRARY_DEBUG fmodexL PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
if(WINDOWS)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
|
||||||
find_library(FMOD_LINK_LIBRARY_RELEASE fmodex64_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LINK_LIBRARY_DEBUG fmodexL64_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
else(WORD_SIZE EQUAL 64)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
|
|
||||||
find_library(FMOD_LINK_LIBRARY_RELEASE fmodex_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LINK_LIBRARY_DEBUG fmodexL_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
else(WINDOWS)
|
|
||||||
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
|
||||||
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
|
||||||
endif(WINDOWS)
|
|
||||||
find_path(FMOD_INCLUDE_DIR fmod.hpp ${fmod_inc_paths})
|
|
||||||
if(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
if(STANDALONE)
|
|
||||||
message(FATAL_ERROR "Provided FMODEX_SDK_DIR path not found '{$FMODEX_SDK_DIR}'")
|
|
||||||
else(STANDALONE)
|
|
||||||
message(STATUS "Provided FMODEX_SDK_DIR path not found '${FMODEX_SDK_DIR}'. Falling back to prebuilts")
|
|
||||||
endif(STANDALONE)
|
|
||||||
else(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
message(STATUS "Using system-provided FMOD Ex Libraries")
|
|
||||||
set(FMOD_EXTERNAL_LIB ON)
|
|
||||||
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
endif (FMODEX_SDK_DIR)
|
|
||||||
|
|
||||||
if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
if(WINDOWS)
|
|
||||||
set(lib_suffix .dll)
|
|
||||||
elseif(DARWIN)
|
|
||||||
set(lib_suffix .dylib)
|
|
||||||
else(WINDOWS)
|
|
||||||
set(lib_suffix .so)
|
|
||||||
endif(WINDOWS)
|
|
||||||
if(WINDOWS)
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmodex64${lib_suffix})
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodexL64${lib_suffix})
|
|
||||||
else(WORD_SIZE EQUAL 64)
|
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmodex${lib_suffix})
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodexL${lib_suffix})
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
else(WINDOWS)
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmodex64${lib_suffix})
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodex64L${lib_suffix})
|
|
||||||
else(WORD_SIZE EQUAL 64)
|
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmodex${lib_suffix})
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodexL${lib_suffix})
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
endif(WINDOWS)
|
|
||||||
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
|
||||||
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
|
||||||
if(WINDOWS)
|
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
|
||||||
endif(WINDOWS)
|
|
||||||
use_prebuilt_binary(fmodex)
|
|
||||||
set(FMOD_INCLUDE_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/include/fmodex)
|
|
||||||
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
|
||||||
set(FMOD ON)
|
|
||||||
if (NOT FMOD_LIBRARY_DEBUG) #Use release library in debug configuration if debug library is absent.
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${FMOD_LIBRARY_RELEASE})
|
|
||||||
endif (NOT FMOD_LIBRARY_DEBUG)
|
|
||||||
else (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
|
||||||
message(STATUS "No support for FMOD EX audio (need to set FMODEX_SDK_DIR?)")
|
|
||||||
set(FMOD OFF)
|
|
||||||
set(FMODEX OFF)
|
|
||||||
endif (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if (FMOD)
|
|
||||||
message(STATUS "Building with FMOD Ex audio support")
|
|
||||||
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX")
|
|
||||||
endif (FMOD)
|
|
||||||
@@ -1,70 +1,8 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
include(Linking)
|
include(Variables)
|
||||||
|
if (FMODSTUDIO)
|
||||||
if (FMODEX AND FMODSTUDIO)
|
use_prebuilt_binary(fmodstudio)
|
||||||
message( FATAL_ERROR "You can not enable two FMOD variants at the same time." )
|
|
||||||
endif (FMODEX AND FMODSTUDIO)
|
|
||||||
|
|
||||||
unset(FMOD_LIBRARY_RELEASE CACHE)
|
|
||||||
unset(FMOD_LIBRARY_DEBUG CACHE)
|
|
||||||
unset(FMOD_INCLUDE_DIR CACHE)
|
|
||||||
|
|
||||||
set(FMOD_EXTERNAL_LIB OFF)
|
|
||||||
|
|
||||||
if(STANDALONE OR WINDOWS)
|
|
||||||
if (NOT FMODSTUDIO_SDK_DIR AND WINDOWS)
|
|
||||||
#GET_FILENAME_COMPONENT(REG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Studio\ API\ Windows] ABSOLUTE)
|
|
||||||
#set(FMODSTUDIO_SDK_DIR ${REG_DIR} CACHE PATH "Path to the FMOD Studio SDK." FORCE)
|
|
||||||
endif (NOT FMODSTUDIO_SDK_DIR AND WINDOWS)
|
|
||||||
if(NOT FMODSTUDIO_SDK_DIR AND STANDALONE)
|
|
||||||
message(FATAL_ERROR "FMODSTUDIO_SDK_DIR not set!")
|
|
||||||
endif(NOT FMODSTUDIO_SDK_DIR AND STANDALONE)
|
|
||||||
endif(STANDALONE OR WINDOWS)
|
|
||||||
|
|
||||||
if(FMODSTUDIO_SDK_DIR)
|
|
||||||
if(LINUX AND WORD_SIZE EQUAL 32)
|
|
||||||
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86" )
|
|
||||||
elseif(LINUX)
|
|
||||||
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86_64")
|
|
||||||
else(LINUX AND WORD_SIZE EQUAL 32)
|
|
||||||
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib")
|
|
||||||
endif(LINUX AND WORD_SIZE EQUAL 32)
|
|
||||||
set(fmod_inc_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/inc")
|
|
||||||
|
|
||||||
if(WINDOWS)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
|
|
||||||
endif(WINDOWS)
|
|
||||||
if(WORD_SIZE EQUAL 64 AND WINDOWS)
|
|
||||||
find_library(FMOD_LIBRARY_RELEASE fmod64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LIBRARY_DEBUG fmodL64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
else(WORD_SIZE EQUAL 64 AND WINDOWS)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
|
|
||||||
find_library(FMOD_LIBRARY_RELEASE fmod PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
find_library(FMOD_LIBRARY_DEBUG fmodL PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
|
|
||||||
endif(WORD_SIZE EQUAL 64 AND WINDOWS)
|
|
||||||
if(WINDOWS)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
|
||||||
else(WINDOWS)
|
|
||||||
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
|
||||||
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
|
||||||
endif(WINDOWS)
|
|
||||||
find_path(FMOD_INCLUDE_DIR fmod.hpp ${fmod_inc_paths})
|
|
||||||
if(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
if(STANDALONE)
|
|
||||||
message(FATAL_ERROR "Provided FMODSTUDIO_SDK_DIR path not found '{$FMODSTUDIO_SDK_DIR}'")
|
|
||||||
else(STANDALONE)
|
|
||||||
message(STATUS "Provided FMODSTUDIO_SDK_DIR path not found '${FMODSTUDIO_SDK_DIR}'. Falling back to prebuilts")
|
|
||||||
endif(STANDALONE)
|
|
||||||
else(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
message(STATUS "Using system-provided FMOD Studio Libraries")
|
|
||||||
set(FMOD_EXTERNAL_LIB ON)
|
|
||||||
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
endif (FMODSTUDIO_SDK_DIR)
|
|
||||||
|
|
||||||
if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
set(lib_suffix .dll)
|
set(lib_suffix .dll)
|
||||||
elseif(DARWIN)
|
elseif(DARWIN)
|
||||||
@@ -73,27 +11,27 @@ if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
|||||||
set(lib_suffix .so)
|
set(lib_suffix .so)
|
||||||
endif(WINDOWS)
|
endif(WINDOWS)
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
if(WORD_SIZE EQUAL 64)
|
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod${lib_suffix})
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod64${lib_suffix})
|
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL${lib_suffix})
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL64${lib_suffix})
|
|
||||||
else(WORD_SIZE EQUAL 64)
|
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod${lib_suffix})
|
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL${lib_suffix})
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
else(WINDOWS)
|
else(WINDOWS)
|
||||||
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmod${lib_suffix})
|
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmod${lib_suffix})
|
||||||
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodL${lib_suffix})
|
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodL${lib_suffix})
|
||||||
endif(WINDOWS)
|
endif(WINDOWS)
|
||||||
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
||||||
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
||||||
|
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
|
||||||
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
|
||||||
endif(WINDOWS)
|
endif(WINDOWS)
|
||||||
use_prebuilt_binary(fmodstudio)
|
|
||||||
set(FMOD_INCLUDE_DIR
|
set (FMOD_LIBRARY
|
||||||
${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
debug ${FMOD_LINK_LIBRARY_DEBUG}
|
||||||
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
|
optimized ${FMOD_LINK_LIBRARY_RELEASE}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
||||||
|
endif(FMODSTUDIO)
|
||||||
|
|
||||||
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
||||||
set(FMOD ON)
|
set(FMOD ON)
|
||||||
@@ -108,5 +46,6 @@ endif (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
|||||||
|
|
||||||
if (FMOD)
|
if (FMOD)
|
||||||
message(STATUS "Building with FMOD Studio audio support")
|
message(STATUS "Building with FMOD Studio audio support")
|
||||||
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO")
|
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO=1")
|
||||||
endif (FMOD)
|
endif (FMOD)
|
||||||
|
|
||||||
|
|||||||
43
indra/cmake/FindAutobuild.cmake
Normal file
43
indra/cmake/FindAutobuild.cmake
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
#
|
||||||
|
# Find the autobuild tool
|
||||||
|
#
|
||||||
|
# Output variables:
|
||||||
|
#
|
||||||
|
# AUTOBUILD_EXECUTABLE - path to autobuild executable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF (NOT AUTOBUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
# If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var
|
||||||
|
IF (DEFINED ENV{AUTOBUILD})
|
||||||
|
SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD})
|
||||||
|
ELSE (DEFINED ENV{AUTOBUILD})
|
||||||
|
IF(WIN32)
|
||||||
|
SET(AUTOBUILD_EXE_NAMES autobuild.exe autobuild.cmd)
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(AUTOBUILD_EXE_NAMES autobuild)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
SET(AUTOBUILD_EXECUTABLE)
|
||||||
|
FIND_PROGRAM(
|
||||||
|
AUTOBUILD_EXECUTABLE
|
||||||
|
NAMES ${AUTOBUILD_EXE_NAMES}
|
||||||
|
PATHS
|
||||||
|
ENV PATH
|
||||||
|
${CMAKE_SOURCE_DIR}/..
|
||||||
|
${CMAKE_SOURCE_DIR}/../..
|
||||||
|
${CMAKE_SOURCE_DIR}/../../..
|
||||||
|
PATH_SUFFIXES "/autobuild/bin/"
|
||||||
|
)
|
||||||
|
ENDIF (DEFINED ENV{AUTOBUILD})
|
||||||
|
|
||||||
|
IF (NOT AUTOBUILD_EXECUTABLE)
|
||||||
|
IF (AUTOBUILD_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could not find autobuild executable")
|
||||||
|
ENDIF (AUTOBUILD_FIND_REQUIRED)
|
||||||
|
ENDIF (NOT AUTOBUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
|
||||||
|
ENDIF (NOT AUTOBUILD_EXECUTABLE)
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# - Find BerkeleyDB
|
|
||||||
# Find the BerkeleyDB includes and library
|
|
||||||
# This module defines
|
|
||||||
# DB_INCLUDE_DIR, where to find db.h, etc.
|
|
||||||
# DB_LIBRARIES, the libraries needed to use BerkeleyDB.
|
|
||||||
# DB_FOUND, If false, do not try to use BerkeleyDB.
|
|
||||||
# also defined, but not for general use are
|
|
||||||
# DB_LIBRARY, where to find the BerkeleyDB library.
|
|
||||||
|
|
||||||
FIND_PATH(DB_INCLUDE_DIR db.h
|
|
||||||
/usr/local/include/db4
|
|
||||||
/usr/local/include
|
|
||||||
/usr/include/db4
|
|
||||||
/usr/include
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(DB_NAMES ${DB_NAMES} db)
|
|
||||||
FIND_LIBRARY(DB_LIBRARY
|
|
||||||
NAMES ${DB_NAMES}
|
|
||||||
PATHS /usr/lib /usr/local/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
IF (DB_LIBRARY AND DB_INCLUDE_DIR)
|
|
||||||
SET(DB_LIBRARIES ${DB_LIBRARY})
|
|
||||||
SET(DB_FOUND "YES")
|
|
||||||
ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
|
|
||||||
SET(DB_FOUND "NO")
|
|
||||||
ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
IF (DB_FOUND)
|
|
||||||
IF (NOT DB_FIND_QUIETLY)
|
|
||||||
MESSAGE(STATUS "Found BerkeleyDB: ${DB_LIBRARIES}")
|
|
||||||
ENDIF (NOT DB_FIND_QUIETLY)
|
|
||||||
ELSE (DB_FOUND)
|
|
||||||
IF (DB_FIND_REQUIRED)
|
|
||||||
MESSAGE(FATAL_ERROR "Could not find BerkeleyDB library")
|
|
||||||
ENDIF (DB_FIND_REQUIRED)
|
|
||||||
ENDIF (DB_FOUND)
|
|
||||||
|
|
||||||
# Deprecated declarations.
|
|
||||||
SET (NATIVE_DB_INCLUDE_PATH ${DB_INCLUDE_DIR} )
|
|
||||||
GET_FILENAME_COMPONENT (NATIVE_DB_LIB_PATH ${DB_LIBRARY} PATH)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
|
||||||
DB_LIBRARY
|
|
||||||
DB_INCLUDE_DIR
|
|
||||||
)
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# - Find ELFIO
|
|
||||||
# Find the ELFIO includes and library
|
|
||||||
# This module defines
|
|
||||||
# ELFIO_INCLUDE_DIR, where to find elfio.h, etc.
|
|
||||||
# ELFIO_LIBRARIES, the libraries needed to use ELFIO.
|
|
||||||
# ELFIO_FOUND, If false, do not try to use ELFIO.
|
|
||||||
# also defined, but not for general use are
|
|
||||||
# ELFIO_LIBRARY, where to find the ELFIO library.
|
|
||||||
|
|
||||||
FIND_PATH(ELFIO_INCLUDE_DIR ELFIO/ELFIO.h
|
|
||||||
/usr/local/include
|
|
||||||
/usr/include
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(ELFIO_NAMES ${ELFIO_NAMES} ELFIO)
|
|
||||||
FIND_LIBRARY(ELFIO_LIBRARY
|
|
||||||
NAMES ${ELFIO_NAMES}
|
|
||||||
PATHS /usr/lib /usr/local/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
IF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
|
|
||||||
SET(ELFIO_LIBRARIES ${ELFIO_LIBRARY})
|
|
||||||
SET(ELFIO_FOUND "YES")
|
|
||||||
ELSE (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
|
|
||||||
SET(ELFIO_FOUND "NO")
|
|
||||||
ENDIF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
IF (ELFIO_FOUND)
|
|
||||||
IF (NOT ELFIO_FIND_QUIETLY)
|
|
||||||
MESSAGE(STATUS "Found ELFIO: ${ELFIO_LIBRARIES}")
|
|
||||||
ENDIF (NOT ELFIO_FIND_QUIETLY)
|
|
||||||
ELSE (ELFIO_FOUND)
|
|
||||||
IF (ELFIO_FIND_REQUIRED)
|
|
||||||
MESSAGE(FATAL_ERROR "Could not find ELFIO library")
|
|
||||||
ENDIF (ELFIO_FIND_REQUIRED)
|
|
||||||
ENDIF (ELFIO_FOUND)
|
|
||||||
|
|
||||||
# Deprecated declarations.
|
|
||||||
SET (NATIVE_ELFIO_INCLUDE_PATH ${ELFIO_INCLUDE_DIR} )
|
|
||||||
GET_FILENAME_COMPONENT (NATIVE_ELFIO_LIB_PATH ${ELFIO_LIBRARY} PATH)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
|
||||||
ELFIO_LIBRARY
|
|
||||||
ELFIO_INCLUDE_DIR
|
|
||||||
)
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# - Find JSONCpp
|
|
||||||
# Find the JSONCpp includes and library
|
|
||||||
# This module defines
|
|
||||||
# JSONCPP_FOUND, System has libjsoncpp.
|
|
||||||
# JSONCPP_INCLUDE_DIRS - The libjsoncpp include directories.
|
|
||||||
# JSONCPP_LIBRARIES - The libraries needed to use libjsoncpp.
|
|
||||||
# JSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp.
|
|
||||||
|
|
||||||
FIND_PACKAGE(PkgConfig)
|
|
||||||
PKG_CHECK_MODULES(PC_JSONCPP jsoncpp)
|
|
||||||
SET(JSONCPP_DEFINITIONS ${PC_JSONCPP_CFLAGS_OTHER})
|
|
||||||
|
|
||||||
FIND_PATH(JSONCPP_INCLUDE_DIR json/reader.h
|
|
||||||
HINTS ${PC_JSONCPP_INCLUDE_DIR} ${PC_JSONCPP_INCLUDE_DIRS}
|
|
||||||
PATH_SUFFIXES jsoncpp)
|
|
||||||
|
|
||||||
# Get the GCC compiler version
|
|
||||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
|
||||||
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
|
||||||
OUTPUT_VARIABLE _gcc_COMPILER_VERSION
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
|
|
||||||
# Try to find a library that was compiled with the same compiler version as we currently use.
|
|
||||||
FIND_LIBRARY(JSONCPP_LIBRARY
|
|
||||||
NAMES libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so libjsoncpp.so
|
|
||||||
HINTS ${PC_JSONCPP_LIBDIR} ${PC_JSONCPP_LIBRARY_DIRS}
|
|
||||||
PATHS /usr/lib /usr/local/lib)
|
|
||||||
|
|
||||||
SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
|
|
||||||
SET(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JSONCPP DEFAULT_MSG
|
|
||||||
JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# - Find llqtwebkit
|
|
||||||
# Find the llqtwebkit includes and library
|
|
||||||
# This module defines
|
|
||||||
# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
|
|
||||||
# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
|
|
||||||
# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
|
|
||||||
# also defined, but not for general use are
|
|
||||||
# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
|
|
||||||
# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
|
|
||||||
# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
|
|
||||||
# before compiling code that includes llqtwebkit library files.
|
|
||||||
|
|
||||||
# Try to use pkg-config first.
|
|
||||||
# This allows to have two different libllqtwebkit packages installed:
|
|
||||||
# one for viewer 2.x and one for viewer 1.x.
|
|
||||||
include(FindPkgConfig)
|
|
||||||
if (PKG_CONFIG_FOUND)
|
|
||||||
if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
||||||
set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
|
|
||||||
else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
||||||
set(_PACKAGE_ARGS libllqtwebkit)
|
|
||||||
endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
||||||
if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
|
|
||||||
# As virtually nobody will have a pkg-config file for this, do this check always quiet.
|
|
||||||
# Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
|
|
||||||
set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
|
|
||||||
endif ()
|
|
||||||
pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
|
|
||||||
endif (PKG_CONFIG_FOUND)
|
|
||||||
set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
|
|
||||||
|
|
||||||
find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
|
|
||||||
set(LLQTWEBKIT_LIBRARIES llqtwebkit)
|
|
||||||
get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
|
|
||||||
endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
|
|
||||||
|
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
|
|
||||||
# to TRUE if all listed variables are TRUE.
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(
|
|
||||||
LLQTWEBKIT
|
|
||||||
DEFAULT_MSG
|
|
||||||
LLQTWEBKIT_LIBRARY
|
|
||||||
LLQTWEBKIT_INCLUDE_DIR
|
|
||||||
LLQTWEBKIT_LIBRARIES
|
|
||||||
LLQTWEBKIT_LIBRARY_DIRS
|
|
||||||
)
|
|
||||||
|
|
||||||
mark_as_advanced(
|
|
||||||
LLQTWEBKIT_LIBRARY
|
|
||||||
LLQTWEBKIT_INCLUDE_DIR
|
|
||||||
LLQTWEBKIT_LIBRARIES
|
|
||||||
LLQTWEBKIT_LIBRARY_DIRS
|
|
||||||
LLQTWEBKIT_DEFINITIONS
|
|
||||||
)
|
|
||||||
|
|
||||||
46
indra/cmake/FindURIPARSER.cmake
Normal file
46
indra/cmake/FindURIPARSER.cmake
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
# - Find uriparser
|
||||||
|
# Find the URIPARSER includes and library
|
||||||
|
# This module defines
|
||||||
|
# URIPARSER_INCLUDE_DIRS, where to find uriparser.h, etc.
|
||||||
|
# URIPARSER_LIBRARY, the libraries needed to use uriparser.
|
||||||
|
# URIPARSER_FOUND, If false, do not try to use uriparser.
|
||||||
|
#
|
||||||
|
# This FindURIPARSER is about 43 times as fast the one provided with cmake (2.8.x),
|
||||||
|
# because it doesn't look up the version of uriparser, resulting in a dramatic
|
||||||
|
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
|
||||||
|
#
|
||||||
|
# Note: Since this file is only used for standalone, the windows
|
||||||
|
# specific parts were left out.
|
||||||
|
|
||||||
|
FIND_PATH(URIPARSER_INCLUDE_DIR uriparser/Uri.h
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(URIPARSER_LIBRARY uriparser)
|
||||||
|
|
||||||
|
if (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
|
||||||
|
SET(URIPARSER_INCLUDE_DIRS ${URIPARSER_INCLUDE_DIR})
|
||||||
|
SET(URIPARSER_LIBRARY ${URIPARSER_LIBRARY})
|
||||||
|
SET(URIPARSER_FOUND "YES")
|
||||||
|
else (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
|
||||||
|
SET(URIPARSER_FOUND "NO")
|
||||||
|
endif (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if (URIPARSER_FOUND)
|
||||||
|
if (NOT URIPARSER_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found URIPARSER: ${URIPARSER_LIBRARY}")
|
||||||
|
SET(URIPARSER_FIND_QUIETLY TRUE)
|
||||||
|
endif (NOT URIPARSER_FIND_QUIETLY)
|
||||||
|
else (URIPARSER_FOUND)
|
||||||
|
if (URIPARSER_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find URIPARSER library")
|
||||||
|
endif (URIPARSER_FIND_REQUIRED)
|
||||||
|
endif (URIPARSER_FOUND)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
URIPARSER_LIBRARY
|
||||||
|
URIPARSER_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
@@ -7,18 +7,7 @@ if (STANDALONE)
|
|||||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(freetype)
|
use_prebuilt_binary(freetype)
|
||||||
if(MSVC12)
|
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2)
|
||||||
set(FREETYPE_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include/freetype2
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/freetype2
|
|
||||||
)
|
|
||||||
else(MSVC12)
|
|
||||||
set(FREETYPE_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (MSVC12)
|
|
||||||
|
|
||||||
set(FREETYPE_LIBRARIES freetype)
|
set(FREETYPE_LIBRARIES freetype)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ set(GLOD_FIND_REQUIRED ON)
|
|||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
include(FindGLOD)
|
include(FindGLOD)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(GLOD)
|
use_prebuilt_binary(glod)
|
||||||
set(GLOD_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include
|
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/glod)
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
set(GLOD_LIBRARIES GLOD)
|
||||||
)
|
|
||||||
set(GLOD_LIBRARIES glod)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -1,30 +1,9 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
|
|
||||||
pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
|
pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
|
||||||
pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
|
pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
|
||||||
|
|
||||||
else (STANDALONE)
|
|
||||||
|
|
||||||
# Possibly libxml and glib should have their own .cmake file instead...
|
|
||||||
use_prebuilt_binary(glib) # gstreamer needs glib
|
|
||||||
use_prebuilt_binary(libxml)
|
|
||||||
use_prebuilt_binary(gstreamer)
|
|
||||||
set(GSTREAMER010_FOUND ON FORCE BOOL)
|
|
||||||
set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
|
|
||||||
set(GSTREAMER010_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include/gstreamer-0.10
|
|
||||||
${LIBS_PREBUILT_DIR}/includeg/lib-2.0
|
|
||||||
${LIBS_PREBUILT_DIR}/include/libxml2
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/gstreamer-0.10
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/glib-2.0
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/libxml2
|
|
||||||
)
|
|
||||||
|
|
||||||
endif (STANDALONE)
|
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
# We don't need to explicitly link against gstreamer itself, because
|
# We don't need to explicitly link against gstreamer itself, because
|
||||||
|
|||||||
@@ -4,16 +4,13 @@ include(Prebuilt)
|
|||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
include(FindHunSpell)
|
include(FindHunSpell)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(hunspell)
|
use_prebuilt_binary(libhunspell)
|
||||||
|
|
||||||
set(HUNSPELL_INCLUDE_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/include/hunspell
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/hunspell
|
|
||||||
)
|
|
||||||
|
|
||||||
if (LINUX OR DARWIN)
|
if (LINUX OR DARWIN)
|
||||||
set(HUNSPELL_LIBRARY hunspell-1.3)
|
set(HUNSPELL_LIBRARY hunspell-1.3)
|
||||||
else (LINUX OR DARWIN)
|
else (LINUX OR DARWIN)
|
||||||
set(HUNSPELL_LIBRARY libhunspell)
|
set(HUNSPELL_LIBRARY libhunspell)
|
||||||
endif (LINUX OR DARWIN)
|
endif (LINUX OR DARWIN)
|
||||||
|
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
|
||||||
|
use_prebuilt_binary(dictionaries)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
741
indra/cmake/InstallRequiredSystemLibrariesAL.cmake
Normal file
741
indra/cmake/InstallRequiredSystemLibrariesAL.cmake
Normal file
@@ -0,0 +1,741 @@
|
|||||||
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
InstallRequiredSystemLibraries
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Include this module to search for compiler-provided system runtime
|
||||||
|
libraries and add install rules for them. Some optional variables
|
||||||
|
may be set prior to including the module to adjust behavior:
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS``
|
||||||
|
Specify additional runtime libraries that may not be detected.
|
||||||
|
After inclusion any detected libraries will be appended to this.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP``
|
||||||
|
Set to TRUE to skip calling the :command:`install(PROGRAMS)` command to
|
||||||
|
allow the includer to specify its own install rule, using the value of
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS`` to get the list of libraries.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_DEBUG_LIBRARIES``
|
||||||
|
Set to TRUE to install the debug runtime libraries when available
|
||||||
|
with MSVC tools.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY``
|
||||||
|
Set to TRUE to install only the debug runtime libraries with MSVC
|
||||||
|
tools even if the release runtime libraries are also available.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_UCRT_LIBRARIES``
|
||||||
|
Set to TRUE to install the Windows Universal CRT libraries for
|
||||||
|
app-local deployment (e.g. to Windows XP). This is meaningful
|
||||||
|
only with MSVC from Visual Studio 2015 or higher.
|
||||||
|
|
||||||
|
One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
|
||||||
|
to an absolute path to tell CMake to look for Windows 10 SDKs in
|
||||||
|
a custom location. The specified directory is expected to contain
|
||||||
|
``Redist/ucrt/DLLs/*`` directories.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_MFC_LIBRARIES``
|
||||||
|
Set to TRUE to install the MSVC MFC runtime libraries.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_OPENMP_LIBRARIES``
|
||||||
|
Set to TRUE to install the MSVC OpenMP runtime libraries
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION``
|
||||||
|
Specify the :command:`install(PROGRAMS)` command ``DESTINATION``
|
||||||
|
option. If not specified, the default is ``bin`` on Windows
|
||||||
|
and ``lib`` elsewhere.
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS``
|
||||||
|
Set to TRUE to disable warnings about required library files that
|
||||||
|
do not exist. (For example, Visual Studio Express editions may
|
||||||
|
not provide the redistributable files.)
|
||||||
|
|
||||||
|
``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT``
|
||||||
|
Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
|
||||||
|
option. If not specified, no such option will be used.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
cmake_policy(PUSH)
|
||||||
|
cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
|
||||||
|
|
||||||
|
set(_IRSL_HAVE_Intel FALSE)
|
||||||
|
set(_IRSL_HAVE_MSVC FALSE)
|
||||||
|
foreach(LANG IN ITEMS C CXX Fortran)
|
||||||
|
if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel")
|
||||||
|
if(NOT _IRSL_HAVE_Intel)
|
||||||
|
get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_Intel_archdir intel64)
|
||||||
|
else()
|
||||||
|
set(_Intel_archdir x86)
|
||||||
|
endif()
|
||||||
|
set(_Intel_compiler_ver ${CMAKE_${LANG}_COMPILER_VERSION})
|
||||||
|
if(WIN32)
|
||||||
|
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../redist/${_Intel_archdir}/compiler" ABSOLUTE)
|
||||||
|
elseif(APPLE)
|
||||||
|
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib" ABSOLUTE)
|
||||||
|
else()
|
||||||
|
if(EXISTS "${_Intel_basedir}/../lib/${_Intel_archdir}_lin")
|
||||||
|
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../lib/${_Intel_archdir}" ABSOLUTE)
|
||||||
|
else()
|
||||||
|
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib/${_Intel_archdir}_lin" ABSOLUTE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
set(_IRSL_HAVE_Intel TRUE)
|
||||||
|
endif()
|
||||||
|
elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
set(_IRSL_HAVE_MSVC TRUE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
|
||||||
|
|
||||||
|
if(CMAKE_CL_64)
|
||||||
|
if(MSVC_VERSION GREATER 1599)
|
||||||
|
# VS 10 and later:
|
||||||
|
set(CMAKE_MSVC_ARCH x64)
|
||||||
|
else()
|
||||||
|
# VS 9 and earlier:
|
||||||
|
set(CMAKE_MSVC_ARCH amd64)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(CMAKE_MSVC_ARCH x86)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
|
||||||
|
get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE)
|
||||||
|
|
||||||
|
if(MSVC_VERSION EQUAL 1300)
|
||||||
|
set(__install__libs
|
||||||
|
"${SYSTEMROOT}/system32/msvcp70.dll"
|
||||||
|
"${SYSTEMROOT}/system32/msvcr70.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_VERSION EQUAL 1310)
|
||||||
|
set(__install__libs
|
||||||
|
"${SYSTEMROOT}/system32/msvcp71.dll"
|
||||||
|
"${SYSTEMROOT}/system32/msvcr71.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_TOOLSET_VERSION EQUAL 80)
|
||||||
|
# Find the runtime library redistribution directory.
|
||||||
|
get_filename_component(msvc_install_dir
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
|
||||||
|
if(DEFINED MSVC80_REDIST_DIR AND EXISTS "${MSVC80_REDIST_DIR}")
|
||||||
|
set(MSVC_REDIST_DIR "${MSVC80_REDIST_DIR}") # use old cache entry
|
||||||
|
endif()
|
||||||
|
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
|
||||||
|
PATHS
|
||||||
|
"${msvc_install_dir}/../../VC/redist"
|
||||||
|
"${base_dir}/VC/redist"
|
||||||
|
)
|
||||||
|
mark_as_advanced(MSVC_REDIST_DIR)
|
||||||
|
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
|
||||||
|
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs
|
||||||
|
"${MSVC_CRT_DIR}/Microsoft.VC80.CRT.manifest"
|
||||||
|
"${MSVC_CRT_DIR}/msvcm80.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcp80.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcr80.dll"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(__install__libs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_CRT_DIR
|
||||||
|
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
|
||||||
|
"${MSVC_CRT_DIR}/msvcm80d.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcp80d.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcr80d.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_TOOLSET_VERSION EQUAL 90)
|
||||||
|
# Find the runtime library redistribution directory.
|
||||||
|
get_filename_component(msvc_install_dir
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
|
||||||
|
get_filename_component(msvc_express_install_dir
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
|
||||||
|
if(DEFINED MSVC90_REDIST_DIR AND EXISTS "${MSVC90_REDIST_DIR}")
|
||||||
|
set(MSVC_REDIST_DIR "${MSVC90_REDIST_DIR}") # use old cache entry
|
||||||
|
endif()
|
||||||
|
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
|
||||||
|
PATHS
|
||||||
|
"${msvc_install_dir}/../../VC/redist"
|
||||||
|
"${msvc_express_install_dir}/../../VC/redist"
|
||||||
|
"${base_dir}/VC/redist"
|
||||||
|
)
|
||||||
|
mark_as_advanced(MSVC_REDIST_DIR)
|
||||||
|
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
|
||||||
|
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs
|
||||||
|
"${MSVC_CRT_DIR}/Microsoft.VC90.CRT.manifest"
|
||||||
|
"${MSVC_CRT_DIR}/msvcm90.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcp90.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcr90.dll"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(__install__libs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_CRT_DIR
|
||||||
|
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
|
||||||
|
"${MSVC_CRT_DIR}/msvcm90d.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcp90d.dll"
|
||||||
|
"${MSVC_CRT_DIR}/msvcr90d.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(MSVC_REDIST_NAME "")
|
||||||
|
set(_MSVC_DLL_VERSION "")
|
||||||
|
set(_MSVC_IDE_VERSION "")
|
||||||
|
if(MSVC_VERSION GREATER_EQUAL 2000)
|
||||||
|
message(WARNING "MSVC ${MSVC_VERSION} not yet supported.")
|
||||||
|
elseif(MSVC_VERSION_VERSION GREATER_EQUAL 143)
|
||||||
|
message(WARNING "MSVC toolset v${MSVC_VERSION_VERSION} not yet supported.")
|
||||||
|
elseif(MSVC_TOOLSET_VERSION EQUAL 142)
|
||||||
|
set(MSVC_REDIST_NAME VC142)
|
||||||
|
set(_MSVC_DLL_VERSION 140)
|
||||||
|
set(_MSVC_IDE_VERSION 16)
|
||||||
|
if(MSVC_VERSION EQUAL 1920)
|
||||||
|
# VS2019 named this differently prior to update 1.
|
||||||
|
set(MSVC_REDIST_NAME VC141)
|
||||||
|
endif()
|
||||||
|
elseif(MSVC_TOOLSET_VERSION EQUAL 141)
|
||||||
|
set(MSVC_REDIST_NAME VC141)
|
||||||
|
set(_MSVC_DLL_VERSION 140)
|
||||||
|
set(_MSVC_IDE_VERSION 15)
|
||||||
|
if(MSVC_VERSION EQUAL 1910)
|
||||||
|
# VS2017 named this differently prior to update 3.
|
||||||
|
set(MSVC_REDIST_NAME VC150)
|
||||||
|
endif()
|
||||||
|
elseif(MSVC_TOOLSET_VERSION)
|
||||||
|
set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION})
|
||||||
|
math(EXPR _MSVC_DLL_VERSION "${MSVC_TOOLSET_VERSION} / 10 * 10")
|
||||||
|
math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_MSVCRT_DLL_VERSION "")
|
||||||
|
set(_MSVCRT_IDE_VERSION "")
|
||||||
|
if(_MSVC_IDE_VERSION GREATER_EQUAL 10)
|
||||||
|
set(_MSVCRT_DLL_VERSION "${_MSVC_DLL_VERSION}")
|
||||||
|
set(_MSVCRT_IDE_VERSION "${_MSVC_IDE_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_MSVCRT_DLL_VERSION)
|
||||||
|
set(v "${_MSVCRT_DLL_VERSION}")
|
||||||
|
set(vs "${_MSVCRT_IDE_VERSION}")
|
||||||
|
|
||||||
|
# Find the runtime library redistribution directory.
|
||||||
|
if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
|
||||||
|
set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
|
||||||
|
endif()
|
||||||
|
if(NOT vs VERSION_LESS 15)
|
||||||
|
set(_vs_redist_paths "")
|
||||||
|
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query
|
||||||
|
if(IS_DIRECTORY "${_vs_dir}")
|
||||||
|
file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*")
|
||||||
|
endif()
|
||||||
|
unset(_vs_dir)
|
||||||
|
else()
|
||||||
|
get_filename_component(_vs_dir
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
|
||||||
|
set(programfilesx86 "ProgramFiles(x86)")
|
||||||
|
set(_vs_redist_paths
|
||||||
|
"${_vs_dir}/../../VC/redist"
|
||||||
|
"${base_dir}/VC/redist"
|
||||||
|
"$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist"
|
||||||
|
"$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist"
|
||||||
|
)
|
||||||
|
unset(_vs_dir)
|
||||||
|
unset(programfilesx86)
|
||||||
|
endif()
|
||||||
|
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT PATHS ${_vs_redist_paths})
|
||||||
|
unset(_vs_redist_paths)
|
||||||
|
mark_as_advanced(MSVC_REDIST_DIR)
|
||||||
|
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT")
|
||||||
|
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs
|
||||||
|
"${MSVC_CRT_DIR}/msvcp${v}.dll"
|
||||||
|
)
|
||||||
|
if(NOT vs VERSION_LESS 14)
|
||||||
|
file(GLOB __msvcr_dlls "${MSVC_CRT_DIR}/*.dll")
|
||||||
|
list(APPEND __install__libs ${__msvcr_dlls})
|
||||||
|
else()
|
||||||
|
list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(__install__libs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_CRT_DIR
|
||||||
|
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugCRT")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_CRT_DIR}/msvcp${v}d.dll"
|
||||||
|
)
|
||||||
|
if(NOT vs VERSION_LESS 14)
|
||||||
|
list(APPEND __install__libs
|
||||||
|
"${MSVC_CRT_DIR}/vcruntime${v}d.dll"
|
||||||
|
"${MSVC_CRT_DIR}/concrt${v}d.dll"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14)
|
||||||
|
# Find the Windows Kits directory.
|
||||||
|
get_filename_component(windows_kits_dir
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
|
||||||
|
set(programfilesx86 "ProgramFiles(x86)")
|
||||||
|
if(";${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION};$ENV{UCRTVersion};$ENV{WindowsSDKVersion};" MATCHES [=[;(10\.[0-9.]+)[;\]]=])
|
||||||
|
set(__ucrt_version "${CMAKE_MATCH_1}/")
|
||||||
|
else()
|
||||||
|
set(__ucrt_version "")
|
||||||
|
endif()
|
||||||
|
find_path(WINDOWS_KITS_DIR
|
||||||
|
NAMES
|
||||||
|
Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
|
||||||
|
Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
|
||||||
|
PATHS
|
||||||
|
$ENV{CMAKE_WINDOWS_KITS_10_DIR}
|
||||||
|
"${windows_kits_dir}"
|
||||||
|
"$ENV{ProgramFiles}/Windows Kits/10"
|
||||||
|
"$ENV{${programfilesx86}}/Windows Kits/10"
|
||||||
|
)
|
||||||
|
mark_as_advanced(WINDOWS_KITS_DIR)
|
||||||
|
|
||||||
|
# Glob the list of UCRT DLLs.
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
if(EXISTS "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll")
|
||||||
|
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll")
|
||||||
|
else()
|
||||||
|
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll")
|
||||||
|
endif()
|
||||||
|
list(APPEND __install__libs ${__ucrt_dlls})
|
||||||
|
endif()
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
if(EXISTS "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/ucrtbased.dll")
|
||||||
|
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/*.dll")
|
||||||
|
else()
|
||||||
|
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll")
|
||||||
|
endif()
|
||||||
|
list(APPEND __install__libs ${__ucrt_dlls})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_MFC_LIBRARIES)
|
||||||
|
if(MSVC_VERSION EQUAL 1300)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${SYSTEMROOT}/system32/mfc70.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_VERSION EQUAL 1310)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${SYSTEMROOT}/system32/mfc71.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_VERSION EQUAL 1400)
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_MFC_DIR
|
||||||
|
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
|
||||||
|
"${MSVC_MFC_DIR}/mfc80d.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfc80ud.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm80d.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm80ud.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/Microsoft.VC80.MFC.manifest"
|
||||||
|
"${MSVC_MFC_DIR}/mfc80.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfc80u.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm80.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm80u.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# include the language dll's for vs8 as well as the actual dll's
|
||||||
|
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80chs.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80cht.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80enu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80esp.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80deu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80fra.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80ita.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80jpn.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc80kor.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_VERSION EQUAL 1500)
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_MFC_DIR
|
||||||
|
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
|
||||||
|
"${MSVC_MFC_DIR}/mfc90d.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfc90ud.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm90d.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm90ud.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/Microsoft.VC90.MFC.manifest"
|
||||||
|
"${MSVC_MFC_DIR}/mfc90.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfc90u.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm90.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm90u.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# include the language dll's for vs9 as well as the actual dll's
|
||||||
|
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
|
||||||
|
# Install the manifest that allows DLLs to be loaded from the
|
||||||
|
# directory containing the executable.
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90chs.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90cht.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90enu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90esp.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90deu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90fra.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90ita.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90jpn.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc90kor.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_MFC_DLL_VERSION "")
|
||||||
|
set(_MFC_IDE_VERSION "")
|
||||||
|
if(_MSVC_IDE_VERSION GREATER_EQUAL 10)
|
||||||
|
set(_MFC_DLL_VERSION ${_MSVC_DLL_VERSION})
|
||||||
|
set(_MFC_IDE_VERSION ${_MSVC_IDE_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_MFC_DLL_VERSION)
|
||||||
|
set(v "${_MFC_DLL_VERSION}")
|
||||||
|
set(vs "${_MFC_IDE_VERSION}")
|
||||||
|
|
||||||
|
# Starting with VS 15 the MFC DLLs may be in a different directory.
|
||||||
|
if (NOT vs VERSION_LESS 15)
|
||||||
|
file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*")
|
||||||
|
find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC
|
||||||
|
PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH)
|
||||||
|
mark_as_advanced(MSVC_REDIST_MFC_DIR)
|
||||||
|
unset(_MSVC_REDIST_DIRS)
|
||||||
|
else()
|
||||||
|
set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Multi-Byte Character Set versions of MFC are available as optional
|
||||||
|
# addon since Visual Studio 12. So for version 12 or higher, check
|
||||||
|
# whether they are available and exclude them if they are not.
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||||
|
set(MSVC_MFC_DIR
|
||||||
|
"${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugMFC")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfc${v}ud.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm${v}ud.dll"
|
||||||
|
)
|
||||||
|
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfc${v}d.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}d.dll")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfcm${v}d.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC")
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfc${v}u.dll"
|
||||||
|
"${MSVC_MFC_DIR}/mfcm${v}u.dll"
|
||||||
|
)
|
||||||
|
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfc${v}.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}.dll")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFC_DIR}/mfcm${v}.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# include the language dll's as well as the actual dll's
|
||||||
|
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC")
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
|
||||||
|
"${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# MSVC 8 was the first version with OpenMP
|
||||||
|
# Furthermore, there is no debug version of this
|
||||||
|
if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC)
|
||||||
|
set(_MSOMP_DLL_VERSION ${_MSVC_DLL_VERSION})
|
||||||
|
set(_MSOMP_IDE_VERSION ${_MSVC_IDE_VERSION})
|
||||||
|
|
||||||
|
if(_MSOMP_DLL_VERSION)
|
||||||
|
set(v "${_MSOMP_DLL_VERSION}")
|
||||||
|
set(vs "${_MSOMP_IDE_VERSION}")
|
||||||
|
set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.OPENMP")
|
||||||
|
|
||||||
|
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
|
||||||
|
set(__install__libs ${__install__libs}
|
||||||
|
"${MSVC_OPENMP_DIR}/vcomp${v}.dll")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(lib
|
||||||
|
${__install__libs}
|
||||||
|
)
|
||||||
|
if(EXISTS ${lib})
|
||||||
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
||||||
|
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
|
||||||
|
else()
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||||
|
message(WARNING "system runtime library file does not exist: '${lib}'")
|
||||||
|
# This warning indicates an incomplete Visual Studio installation
|
||||||
|
# or a bug somewhere above here in this file.
|
||||||
|
# If you would like to avoid this warning, fix the real problem, or
|
||||||
|
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
|
||||||
|
# this file.
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_IRSL_HAVE_Intel)
|
||||||
|
unset(__install_libs)
|
||||||
|
if(CMAKE_INSTALL_OPENMP_LIBRARIES)
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5md.dll" "${_Intel_redistdir}/libiompstubs5md.dll")
|
||||||
|
elseif(APPLE)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.dylib" "${_Intel_redistdir}/libiompstubs5.dylib")
|
||||||
|
else()
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.so" "${_Intel_redistdir}/libiompstubs5.so")
|
||||||
|
if(_Intel_compiler_ver VERSION_LESS 17)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libomp_db.so")
|
||||||
|
endif()
|
||||||
|
if(_Intel_compiler_ver VERSION_LESS 13)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libiompprof5.so")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(WIN32)
|
||||||
|
set(__install_dirs "${_Intel_redistdir}/1033")
|
||||||
|
if(EXISTS "${_Intel_redistdir}/1041")
|
||||||
|
list(APPEND __install_dirs "${_Intel_redistdir}/1041")
|
||||||
|
endif()
|
||||||
|
if(_Intel_compiler_ver VERSION_LESS 18)
|
||||||
|
list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c")
|
||||||
|
endif()
|
||||||
|
foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll
|
||||||
|
libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll")
|
||||||
|
endif()
|
||||||
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
||||||
|
foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
elseif(APPLE)
|
||||||
|
foreach(__Intel_lib IN ITEMS libchkp.dylib libcilkrts.5.dylib libcilkrts.dylib libimf.dylib libintlc.dylib libirc.dylib libirng.dylib libsvml.dylib)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
|
||||||
|
if(_Intel_compiler_ver VERSION_LESS 17)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.dylib")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
||||||
|
foreach(__Intel_lib IN ITEMS libifcore.dylib libifcoremt.dylib libifport.dylib libifportmt.dylib)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
foreach(__Intel_lib IN ITEMS libchkp.so libcilkrts.so libcilkrts.so.5 libimf.so libintlc.so libintlc.so.5 libirc.so libpdbx.so libpdbx.so.5 libsvml.so)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 13)
|
||||||
|
foreach(__Intel_lib IN ITEMS libirng.so liboffload.so liboffload.so.5)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
|
||||||
|
set(__install_dirs "${_Intel_redistdir}/irml")
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/cilk_db.so")
|
||||||
|
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15)
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so" "${_Intel_redistdir}/libgfxoffload.so")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16)
|
||||||
|
foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
if(_Intel_compiler_ver VERSION_LESS 15)
|
||||||
|
foreach(__Intel_lib IN ITEMS libcxaguard.so libcxaguard.so.5)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
||||||
|
foreach(__Intel_lib IN ITEMS libicaf.so libifcore.so libifcore.so.5 libifcoremt.so libifcoremt.so.5 libifport.so libifport.so.5)
|
||||||
|
|
||||||
|
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(lib IN LISTS __install_libs)
|
||||||
|
if(EXISTS ${lib})
|
||||||
|
list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
|
||||||
|
else()
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||||
|
message(WARNING "system runtime library file does not exist: '${lib}'")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(dir IN LISTS __install_dirs)
|
||||||
|
if(EXISTS ${dir})
|
||||||
|
list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES ${dir})
|
||||||
|
else()
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||||
|
message(WARNING "system runtime library file does not exist: '${dir}'")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WATCOM)
|
||||||
|
get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
|
||||||
|
if(CMAKE_C_COMPILER_VERSION)
|
||||||
|
set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
|
||||||
|
else()
|
||||||
|
set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
|
||||||
|
endif()
|
||||||
|
string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
|
||||||
|
list(GET _watcom_version_list 0 _watcom_major)
|
||||||
|
list(GET _watcom_version_list 1 _watcom_minor)
|
||||||
|
set( __install__libs
|
||||||
|
${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
|
||||||
|
${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
|
||||||
|
${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
|
||||||
|
foreach(lib
|
||||||
|
${__install__libs}
|
||||||
|
)
|
||||||
|
if(EXISTS ${lib})
|
||||||
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
||||||
|
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
|
||||||
|
else()
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||||
|
message(WARNING "system runtime library file does not exist: '${lib}'")
|
||||||
|
# This warning indicates an incomplete Watcom installation
|
||||||
|
# or a bug somewhere above here in this file.
|
||||||
|
# If you would like to avoid this warning, fix the real problem, or
|
||||||
|
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
|
||||||
|
# this file.
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Include system runtime libraries in the installation if any are
|
||||||
|
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
|
||||||
|
if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
|
||||||
|
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT)
|
||||||
|
set(_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT
|
||||||
|
COMPONENT ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT})
|
||||||
|
endif()
|
||||||
|
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
|
||||||
|
${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY ${CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
|
||||||
|
${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
cmake_policy(POP)
|
||||||
@@ -19,8 +19,5 @@ else (STANDALONE)
|
|||||||
elseif (WINDOWS)
|
elseif (WINDOWS)
|
||||||
set(JPEG_LIBRARIES jpeglib)
|
set(JPEG_LIBRARIES jpeglib)
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
set(JPEG_INCLUDE_DIRS
|
set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
6
indra/cmake/Json.cmake
Normal file
6
indra/cmake/Json.cmake
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
include(Prebuilt)
|
||||||
|
|
||||||
|
use_prebuilt_binary(modernjson)
|
||||||
|
set(JSON_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include")
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
set(JSONCPP_FIND_QUIETLY OFF)
|
|
||||||
set(JSONCPP_FIND_REQUIRED ON)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
include(FindJsonCpp)
|
|
||||||
else (STANDALONE)
|
|
||||||
use_prebuilt_binary(jsoncpp)
|
|
||||||
if (WINDOWS)
|
|
||||||
if(MSVC12)
|
|
||||||
set(JSONCPP_LIBRARIES
|
|
||||||
debug json_vc${MSVC_SUFFIX}debug_libmt.lib
|
|
||||||
optimized json_vc${MSVC_SUFFIX}_libmt)
|
|
||||||
else(MSVC12)
|
|
||||||
set(JSONCPP_LIBRARIES
|
|
||||||
debug json_vc${MSVC_SUFFIX}d
|
|
||||||
optimized json_vc${MSVC_SUFFIX})
|
|
||||||
endif(MSVC12)
|
|
||||||
elseif (DARWIN)
|
|
||||||
set(JSONCPP_LIBRARIES json_linux-gcc-4.0.1_libmt)
|
|
||||||
elseif (LINUX)
|
|
||||||
set(JSONCPP_LIBRARIES jsoncpp)
|
|
||||||
endif (WINDOWS)
|
|
||||||
set(JSONCPP_INCLUDE_DIR
|
|
||||||
${LIBS_PREBUILT_DIR}/include/jsoncpp
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/jsoncpp
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
|
||||||
@@ -105,17 +105,6 @@ MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
|
|||||||
IF (NOT "$ENV{LD_LIBRARY_PATH}" STREQUAL "")
|
IF (NOT "$ENV{LD_LIBRARY_PATH}" STREQUAL "")
|
||||||
SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}")
|
SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}")
|
||||||
ENDIF (NOT "$ENV{LD_LIBRARY_PATH}" STREQUAL "")
|
ENDIF (NOT "$ENV{LD_LIBRARY_PATH}" STREQUAL "")
|
||||||
ADD_CUSTOM_COMMAND(
|
|
||||||
OUTPUT ${TEST_OUTPUT}
|
|
||||||
COMMAND
|
|
||||||
${CMAKE_COMMAND}
|
|
||||||
"-DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
|
|
||||||
"-DTEST_CMD:STRING=${TEST_CMD}"
|
|
||||||
-P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
|
|
||||||
DEPENDS ${name}_test
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(${name}_test_ok ALL DEPENDS ${TEST_OUTPUT})
|
ADD_CUSTOM_TARGET(${name}_test_ok ALL DEPENDS ${TEST_OUTPUT})
|
||||||
IF (${parent})
|
IF (${parent})
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
include(Audio)
|
include(Audio)
|
||||||
|
include(OPENAL)
|
||||||
|
|
||||||
set(LLAUDIO_INCLUDE_DIRS
|
set(LLAUDIO_INCLUDE_DIRS
|
||||||
${LIBS_OPEN_DIR}/llaudio
|
${LIBS_OPEN_DIR}/llaudio
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ else (LINUX)
|
|||||||
set(LLCOMMON_LIBRARIES llcommon)
|
set(LLCOMMON_LIBRARIES llcommon)
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
|
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
|
||||||
if(LLCOMMON_LINK_SHARED)
|
if(LLCOMMON_LINK_SHARED)
|
||||||
add_definitions(-DLL_COMMON_LINK_SHARED=1)
|
add_definitions(-DLL_COMMON_LINK_SHARED=1)
|
||||||
endif(LLCOMMON_LINK_SHARED)
|
endif(LLCOMMON_LINK_SHARED)
|
||||||
|
|||||||
@@ -1,22 +1,32 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
# these should be moved to their own cmake file
|
||||||
|
include(Prebuilt)
|
||||||
|
include(Boost)
|
||||||
include(Colladadom)
|
include(Colladadom)
|
||||||
|
|
||||||
|
|
||||||
|
use_prebuilt_binary(libxml2)
|
||||||
|
|
||||||
set(LLPRIMITIVE_INCLUDE_DIRS
|
set(LLPRIMITIVE_INCLUDE_DIRS
|
||||||
${LIBS_OPEN_DIR}/llprimitive
|
${LIBS_OPEN_DIR}/llprimitive
|
||||||
${COLLADADOM_INCLUDE_DIRS}
|
${COLLADADOM_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(LLPRIMITIVE_LIBRARIES
|
set(LLPRIMITIVE_LIBRARIES
|
||||||
debug llprimitive
|
llprimitive
|
||||||
optimized llprimitive
|
${COLLADADOM_LIBRARIES}
|
||||||
${COLLADADOM_LIBRARIES}
|
libxml2_a
|
||||||
)
|
${BOOST_SYSTEM_LIBRARIES}
|
||||||
|
)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(LLPRIMITIVE_LIBRARIES
|
set(LLPRIMITIVE_LIBRARIES
|
||||||
llprimitive
|
llprimitive
|
||||||
${COLLADADOM_LIBRARIES}
|
${COLLADADOM_LIBRARIES}
|
||||||
)
|
${BOOST_SYSTEM_LIBRARIES}
|
||||||
|
minizip
|
||||||
|
xml2
|
||||||
|
)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
set(LLQTWEBKIT_INCLUDE_DIR
|
|
||||||
${LIBS_OPEN_DIR}/llqtwebkit
|
|
||||||
)
|
|
||||||
|
|
||||||
set(LLQTWEBKIT_LIBRARY
|
|
||||||
llqtwebkit
|
|
||||||
)
|
|
||||||
endif (STANDALONE)
|
|
||||||
@@ -1,33 +1,40 @@
|
|||||||
# ll_deploy_sharedlibs_command
|
# ll_deploy_sharedlibs_command
|
||||||
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
||||||
macro(ll_deploy_sharedlibs_command target_exe)
|
macro(ll_deploy_sharedlibs_command target_exe)
|
||||||
SET(OUTPUT_PATH $<TARGET_FILE:${target_exe}>)
|
set(TARGET_LOCATION $<TARGET_FILE:${target_exe}>)
|
||||||
|
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
|
||||||
if(DARWIN)
|
|
||||||
SET_TEST_PATH(SEARCH_DIRS)
|
|
||||||
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
|
|
||||||
if(IS_BUNDLE)
|
|
||||||
# If its a bundle the exe is not in the target location, this should find it.
|
|
||||||
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
|
|
||||||
endif(IS_BUNDLE)
|
|
||||||
elseif(WINDOWS)
|
|
||||||
SET_TEST_PATH(SEARCH_DIRS)
|
|
||||||
LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32")
|
|
||||||
elseif(LINUX)
|
|
||||||
SET_TEST_PATH(SEARCH_DIRS)
|
|
||||||
set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
|
|
||||||
endif(DARWIN)
|
|
||||||
|
|
||||||
add_custom_command(
|
# It's not clear that this does anything useful for us on Darwin. It has
|
||||||
TARGET ${target_exe} POST_BUILD
|
# been broken for some time now; the BIN_NAME was being constructed as a
|
||||||
COMMAND ${CMAKE_COMMAND}
|
# ridiculous nonexistent path with duplicated segments. Fixing that only
|
||||||
ARGS
|
# produces ominous spammy warnings: at the time the command below is run, we
|
||||||
"-DBIN_NAME=\"$<TARGET_FILE:${target_exe}>\""
|
# have not yet populated the nested mac-crash-logger.app/Contents/Resources
|
||||||
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
|
# with the .dylibs with which it was linked. Moreover, the form of the
|
||||||
"-DDST_PATH=\"${OUTPUT_PATH}\""
|
# embedded @executable_path/../Resources/mumble.dylib pathname confuses the
|
||||||
"-P"
|
# GetPrerequisites.cmake tool invoked by DeploySharedLibs.cmake. It seems
|
||||||
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"
|
# clear that we have long since accomplished by other means what this was
|
||||||
)
|
# originally supposed to do. Skipping it only eliminates an annoying
|
||||||
|
# non-fatal error.
|
||||||
|
if(NOT DARWIN)
|
||||||
|
if(WINDOWS)
|
||||||
|
SET_TEST_PATH(SEARCH_DIRS)
|
||||||
|
LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32")
|
||||||
|
elseif(LINUX)
|
||||||
|
SET_TEST_PATH(SEARCH_DIRS)
|
||||||
|
set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
|
||||||
|
endif(WINDOWS)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${target_exe} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
ARGS
|
||||||
|
"-DBIN_NAME=\"${TARGET_LOCATION}\""
|
||||||
|
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
|
||||||
|
"-DDST_PATH=\"${OUTPUT_PATH}\""
|
||||||
|
"-P"
|
||||||
|
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"
|
||||||
|
)
|
||||||
|
endif(NOT DARWIN)
|
||||||
|
|
||||||
endmacro(ll_deploy_sharedlibs_command)
|
endmacro(ll_deploy_sharedlibs_command)
|
||||||
|
|
||||||
@@ -38,8 +45,7 @@ macro(ll_stage_sharedlib DSO_TARGET)
|
|||||||
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
||||||
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
||||||
if(NOT WINDOWS)
|
if(NOT WINDOWS)
|
||||||
|
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
|
||||||
SET(DSO_PATH $<TARGET_FILE:${DSO_TARGET}>)
|
|
||||||
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
||||||
if(DARWIN)
|
if(DARWIN)
|
||||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
||||||
|
|||||||
@@ -14,18 +14,10 @@ if (STANDALONE)
|
|||||||
)
|
)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
use_prebuilt_binary(mesa)
|
|
||||||
use_prebuilt_binary(SDL)
|
use_prebuilt_binary(SDL)
|
||||||
set (SDL_FOUND TRUE)
|
set (SDL_FOUND TRUE)
|
||||||
set (SDL_INCLUDE_DIR
|
set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
set (SDL_LIBRARY SDL)
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
|
||||||
set (SDL_LIBRARY SDL)
|
|
||||||
else(WORD_SIZE EQUAL 64)
|
|
||||||
set (SDL_LIBRARY SDL directfb fusion direct)
|
|
||||||
endif(WORD_SIZE EQUAL 64)
|
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
|||||||
30
indra/cmake/LibVLCPlugin.cmake
Normal file
30
indra/cmake/LibVLCPlugin.cmake
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
include(Linking)
|
||||||
|
include(Prebuilt)
|
||||||
|
include(Variables)
|
||||||
|
|
||||||
|
if (LIBVLCPLUGIN)
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
else (USESYSTEMLIBS)
|
||||||
|
use_prebuilt_binary(vlc-bin)
|
||||||
|
set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
|
|
||||||
|
if (WINDOWS)
|
||||||
|
set(VLC_PLUGIN_LIBRARIES
|
||||||
|
libvlc.lib
|
||||||
|
libvlccore.lib
|
||||||
|
)
|
||||||
|
elseif (DARWIN)
|
||||||
|
set(VLC_PLUGIN_LIBRARIES
|
||||||
|
libvlc.dylib
|
||||||
|
libvlccore.dylib
|
||||||
|
)
|
||||||
|
elseif (LINUX)
|
||||||
|
# Specify a full path to make sure we get a static link
|
||||||
|
set(VLC_PLUGIN_LIBRARIES
|
||||||
|
${LIBS_PREBUILT_DIR}/lib/libvlc.a
|
||||||
|
${LIBS_PREBUILT_DIR}/lib/libvlccore.a
|
||||||
|
)
|
||||||
|
endif (WINDOWS)
|
||||||
|
endif (LIBVLCPLUGIN)
|
||||||
@@ -1,42 +1,50 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||||
|
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
|
||||||
|
set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins)
|
||||||
|
set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
|
||||||
|
set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
|
||||||
|
if (WINDOWS)
|
||||||
|
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||||
|
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||||
|
elseif (LINUX)
|
||||||
|
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
|
||||||
|
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
|
||||||
|
elseif (DARWIN)
|
||||||
|
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||||
|
set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
|
||||||
|
endif (WINDOWS)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE)
|
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
|
||||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
# specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then
|
||||||
endif(CMAKE_BUILD_TYPE)
|
# the 'release' directory (as a default fallback).
|
||||||
|
# *NOTE - we have to take special care to use CMAKE_CFG_INTDIR on IDE generators (like mac and
|
||||||
|
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
||||||
|
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
||||||
|
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
||||||
|
if(WINDOWS OR DARWIN)
|
||||||
|
# the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us
|
||||||
|
# fortunately both windows and darwin are case insensitive filesystems so this works.
|
||||||
|
set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/")
|
||||||
|
else(WINDOWS OR DARWIN)
|
||||||
|
# else block is for linux and any other makefile based generators
|
||||||
|
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||||
|
set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
|
||||||
|
endif(WINDOWS OR DARWIN)
|
||||||
|
|
||||||
if(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||||
# the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us
|
# When we're building something other than Release, append the
|
||||||
# fortunately both windows and darwin are case insensitive filesystems so this works.
|
# packages/lib/release directory to deal with autobuild packages that don't
|
||||||
set(ARCH_PREBUILT_LINK_DIRS
|
# provide (e.g.) lib/debug libraries.
|
||||||
${LIBS_PREBUILT_DIR}/lib
|
list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib
|
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||||
)
|
|
||||||
else(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
|
||||||
# else block is for linux and any other makefile based generators
|
|
||||||
set(ARCH_PREBUILT_LINK_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
|
|
||||||
)
|
|
||||||
endif(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
|
||||||
|
|
||||||
if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
|
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
|
||||||
# When we're building something other than Release, append the
|
|
||||||
# packages/lib/release directory to deal with autobuild packages that don't
|
|
||||||
# provide (e.g.) lib/debug libraries.
|
|
||||||
list(APPEND ARCH_PREBUILT_LINK_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/release
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
|
|
||||||
)
|
|
||||||
endif (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
|
|
||||||
endif (NOT STANDALONE)
|
|
||||||
|
|
||||||
link_directories(${ARCH_PREBUILT_LINK_DIRS})
|
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
set(DL_LIBRARY dl)
|
set(DL_LIBRARY dl)
|
||||||
@@ -46,10 +54,11 @@ else (LINUX)
|
|||||||
set(PTHREAD_LIBRARY "")
|
set(PTHREAD_LIBRARY "")
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(WINDOWS_LIBRARIES
|
set(WINDOWS_LIBRARIES
|
||||||
advapi32
|
advapi32
|
||||||
shell32
|
shell32
|
||||||
|
ole32
|
||||||
ws2_32
|
ws2_32
|
||||||
mswsock
|
mswsock
|
||||||
psapi
|
psapi
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ if (STANDALONE)
|
|||||||
message(STATUS "Building without N-DoF joystick support")
|
message(STATUS "Building without N-DoF joystick support")
|
||||||
endif(NOT NDOF_FOUND)
|
endif(NOT NDOF_FOUND)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(ndofdev)
|
if (WINDOWS OR DARWIN)
|
||||||
|
use_prebuilt_binary(libndofdev)
|
||||||
|
elseif (LINUX)
|
||||||
|
use_prebuilt_binary(libndofdev-open)
|
||||||
|
endif (WINDOWS OR DARWIN)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(NDOF_LIBRARY libndofdev)
|
set(NDOF_LIBRARY libndofdev)
|
||||||
@@ -15,10 +19,11 @@ else (STANDALONE)
|
|||||||
set(NDOF_LIBRARY ndofdev)
|
set(NDOF_LIBRARY ndofdev)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
set(NDOF_INCLUDE_DIR
|
if (WINDOWS)
|
||||||
${LIBS_PREBUILT_DIR}/include/ndofdev
|
set(NDOF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/ndofdev
|
else (WINDOWS)
|
||||||
)
|
set(NDOF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/ndofdev)
|
||||||
|
endif (WINDOWS)
|
||||||
set(NDOF_FOUND 1)
|
set(NDOF_FOUND 1)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
@@ -26,6 +31,8 @@ if (NDOF_FOUND)
|
|||||||
add_definitions(-DLIB_NDOF=1)
|
add_definitions(-DLIB_NDOF=1)
|
||||||
include_directories(${NDOF_INCLUDE_DIR})
|
include_directories(${NDOF_INCLUDE_DIR})
|
||||||
else (NDOF_FOUND)
|
else (NDOF_FOUND)
|
||||||
|
message(STATUS "Building without N-DoF joystick support")
|
||||||
set(NDOF_INCLUDE_DIR "")
|
set(NDOF_INCLUDE_DIR "")
|
||||||
set(NDOF_LIBRARY "")
|
set(NDOF_LIBRARY "")
|
||||||
endif (NDOF_FOUND)
|
endif (NDOF_FOUND)
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
|
||||||
set(NVAPI ON CACHE BOOL "Use NVAPI.")
|
|
||||||
|
|
||||||
if (NVAPI)
|
if (NVAPI)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
use_prebuilt_binary(nvapi)
|
use_prebuilt_binary(nvapi)
|
||||||
|
|||||||
@@ -16,16 +16,13 @@ if (OPENAL)
|
|||||||
pkg_check_modules(OPENAL_LIB REQUIRED openal)
|
pkg_check_modules(OPENAL_LIB REQUIRED openal)
|
||||||
pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
|
pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(openal-soft)
|
use_prebuilt_binary(openal)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
set(OPENAL_LIBRARIES
|
set(OPENAL_LIBRARIES
|
||||||
openal
|
openal
|
||||||
alut
|
alut
|
||||||
)
|
)
|
||||||
set(OPENAL_INCLUDE_DIRS
|
set(OPENAL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (OPENAL)
|
endif (OPENAL)
|
||||||
|
|
||||||
if (OPENAL)
|
if (OPENAL)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
include(Variables)
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if (NOT (STANDALONE OR DARWIN))
|
if (NOT (STANDALONE OR DARWIN))
|
||||||
@@ -8,3 +10,5 @@ if (NOT (STANDALONE OR DARWIN))
|
|||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||||
)
|
)
|
||||||
endif (NOT (STANDALONE OR DARWIN))
|
endif (NOT (STANDALONE OR DARWIN))
|
||||||
|
|
||||||
|
include(FindOpenGL)
|
||||||
|
|||||||
@@ -7,16 +7,13 @@ set(OpenSSL_FIND_REQUIRED ON)
|
|||||||
if (STANDALONE OR USE_SYSTEM_OPENSSL)
|
if (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||||
include(FindOpenSSL)
|
include(FindOpenSSL)
|
||||||
else (STANDALONE OR USE_SYSTEM_OPENSSL)
|
else (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||||
use_prebuilt_binary(openSSL)
|
use_prebuilt_binary(openssl)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(OPENSSL_LIBRARIES ssleay32 libeay32)
|
set(OPENSSL_LIBRARIES libssl libcrypto)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(OPENSSL_LIBRARIES ssl)
|
set(OPENSSL_LIBRARIES ssl)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
set(OPENSSL_INCLUDE_DIRS
|
set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
${LIBS_PREBUILT_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
)
|
|
||||||
endif (STANDALONE OR USE_SYSTEM_OPENSSL)
|
endif (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ if (STANDALONE)
|
|||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(libpng)
|
use_prebuilt_binary(libpng)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
if(MSVC12)
|
set(PNG_LIBRARIES libpng16)
|
||||||
set(PNG_LIBRARIES libpng16)
|
|
||||||
else(MSVC12)
|
|
||||||
set(PNG_LIBRARIES libpng15)
|
|
||||||
endif(MSVC12)
|
|
||||||
elseif(DARWIN)
|
elseif(DARWIN)
|
||||||
set(PNG_LIBRARIES png15)
|
set(PNG_LIBRARIES png15)
|
||||||
else(LINUX)
|
else(LINUX)
|
||||||
@@ -36,15 +32,5 @@ else (STANDALONE)
|
|||||||
set(PNG_LIBRARIES png16)
|
set(PNG_LIBRARIES png16)
|
||||||
endif ()
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
if (WINDOWS)
|
set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
|
||||||
set(PNG_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include/${PNG_LIBRARIES}
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/${PNG_LIBRARIES}
|
|
||||||
)
|
|
||||||
else (WINDOWS)
|
|
||||||
set(PNG_INCLUDE_DIRS
|
|
||||||
${LIBS_PREBUILT_DIR}/include/lib${PNG_LIBRARIES}
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/lib${PNG_LIBRARIES}
|
|
||||||
)
|
|
||||||
endif (WINDOWS)
|
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -3,14 +3,62 @@
|
|||||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||||
|
|
||||||
|
include(FindAutobuild)
|
||||||
|
if(INSTALL_PROPRIETARY)
|
||||||
|
include(FindSCP)
|
||||||
|
endif(INSTALL_PROPRIETARY)
|
||||||
|
|
||||||
|
set(PREBUILD_TRACKING_DIR ${AUTOBUILD_INSTALL_DIR}/cmake_tracking)
|
||||||
|
# For the library installation process;
|
||||||
|
# see cmake/Prebuild.cmake for the counterpart code.
|
||||||
|
if ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed")
|
||||||
|
file(MAKE_DIRECTORY ${PREBUILD_TRACKING_DIR})
|
||||||
|
file(WRITE ${PREBUILD_TRACKING_DIR}/sentinel_installed "0")
|
||||||
|
endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed")
|
||||||
|
|
||||||
|
# The use_prebuilt_binary macro handles automated installation of package
|
||||||
|
# dependencies using autobuild. The goal is that 'autobuild install' should
|
||||||
|
# only be run when we know we need to install a new package. This should be
|
||||||
|
# the case in a clean checkout, or if autobuild.xml has been updated since the
|
||||||
|
# last run (encapsulated by the file ${PREBUILD_TRACKING_DIR}/sentinel_installed),
|
||||||
|
# or if a previous attempt to install the package has failed (the exit status
|
||||||
|
# of previous attempts is serialized in the file
|
||||||
|
# ${PREBUILD_TRACKING_DIR}/${_binary}_installed)
|
||||||
macro (use_prebuilt_binary _binary)
|
macro (use_prebuilt_binary _binary)
|
||||||
if(NOT STANDALONE)
|
if (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS})
|
||||||
list(FIND PREBUILT_PACKAGES ${_binary} _index)
|
endif (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||||
if(_index LESS 0)
|
|
||||||
set_property(TARGET prepare APPEND PROPERTY PREBUILT ${_binary})
|
if (NOT USESYSTEMLIBS_${_binary})
|
||||||
endif(_index LESS 0)
|
if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed")
|
||||||
endif(NOT STANDALONE)
|
file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed")
|
||||||
|
if(DEBUG_PREBUILT)
|
||||||
|
message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"")
|
||||||
|
endif(DEBUG_PREBUILT)
|
||||||
|
endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed")
|
||||||
|
|
||||||
|
if(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0)
|
||||||
|
if(DEBUG_PREBUILT)
|
||||||
|
message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install
|
||||||
|
--install-dir=${AUTOBUILD_INSTALL_DIR}
|
||||||
|
${_binary} ")
|
||||||
|
endif(DEBUG_PREBUILT)
|
||||||
|
execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}"
|
||||||
|
install
|
||||||
|
--install-dir=${AUTOBUILD_INSTALL_DIR}
|
||||||
|
${_binary}
|
||||||
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
|
RESULT_VARIABLE ${_binary}_installed
|
||||||
|
)
|
||||||
|
file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}")
|
||||||
|
endif(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0)
|
||||||
|
|
||||||
|
if(NOT ${_binary}_installed EQUAL 0)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"Failed to download or unpack prebuilt '${_binary}'."
|
||||||
|
" Process returned ${${_binary}_installed}.")
|
||||||
|
endif (NOT ${_binary}_installed EQUAL 0)
|
||||||
|
endif (NOT USESYSTEMLIBS_${_binary})
|
||||||
endmacro (use_prebuilt_binary _binary)
|
endmacro (use_prebuilt_binary _binary)
|
||||||
|
|
||||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
|
set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
|
||||||
|
|
||||||
if (PULSEAUDIO)
|
if (PULSEAUDIO)
|
||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
@@ -13,9 +13,8 @@ if (PULSEAUDIO)
|
|||||||
use_prebuilt_binary(pulseaudio)
|
use_prebuilt_binary(pulseaudio)
|
||||||
set(PULSEAUDIO_FOUND ON FORCE BOOL)
|
set(PULSEAUDIO_FOUND ON FORCE BOOL)
|
||||||
set(PULSEAUDIO_INCLUDE_DIRS
|
set(PULSEAUDIO_INCLUDE_DIRS
|
||||||
${LIBS_PREBUILT_DIR}/include
|
${LIBS_PREBUILT_DIR}/include
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
)
|
||||||
)
|
|
||||||
# We don't need to explicitly link against pulseaudio itself, because
|
# We don't need to explicitly link against pulseaudio itself, because
|
||||||
# the viewer probes for the system's copy at runtime.
|
# the viewer probes for the system's copy at runtime.
|
||||||
set(PULSEAUDIO_LIBRARIES
|
set(PULSEAUDIO_LIBRARIES
|
||||||
|
|||||||
@@ -5,22 +5,30 @@ set(PYTHONINTERP_FOUND)
|
|||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
# On Windows, explicitly avoid Cygwin Python.
|
# On Windows, explicitly avoid Cygwin Python.
|
||||||
|
|
||||||
find_program(PYTHON_EXECUTABLE
|
if (DEFINED ENV{VIRTUAL_ENV})
|
||||||
NAMES python25.exe python23.exe python.exe
|
find_program(PYTHON_EXECUTABLE
|
||||||
NO_DEFAULT_PATH # added so that cmake does not find cygwin python
|
NAMES python.exe
|
||||||
PATHS
|
PATHS
|
||||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
"$ENV{VIRTUAL_ENV}\\scripts"
|
||||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
NO_DEFAULT_PATH
|
||||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
)
|
||||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
else()
|
||||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
find_program(PYTHON_EXECUTABLE
|
||||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
NAMES python25.exe python23.exe python.exe
|
||||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
NO_DEFAULT_PATH # added so that cmake does not find cygwin python
|
||||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
PATHS
|
||||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||||
)
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||||
|
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||||
|
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||||
|
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||||
|
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||||
|
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
elseif (EXISTS /etc/arch-release)
|
elseif (EXISTS /etc/arch-release)
|
||||||
# On Archlinux, use Python 2
|
# On Archlinux, use Python 2
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
set(Qt4_FIND_REQUIRED ON)
|
|
||||||
|
|
||||||
include(FindQt4)
|
|
||||||
|
|
||||||
find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
|
|
||||||
include(${QT_USE_FILE})
|
|
||||||
add_definitions(${QT_DEFINITIONS})
|
|
||||||
endif (STANDALONE)
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
if(INSTALL_PROPRIETARY)
|
|
||||||
include(Prebuilt)
|
|
||||||
use_prebuilt_binary(quicktime)
|
|
||||||
endif(INSTALL_PROPRIETARY)
|
|
||||||
|
|
||||||
if (DARWIN)
|
|
||||||
include(CMakeFindFrameworks)
|
|
||||||
find_library(QUICKTIME_LIBRARY QuickTime)
|
|
||||||
elseif (WINDOWS AND WORD_SIZE EQUAL 32)
|
|
||||||
SET(program_files "ProgramFiles(x86)")
|
|
||||||
SET(program_files $ENV{${program_files}})
|
|
||||||
if(NOT program_files)
|
|
||||||
SET(program_files $ENV{ProgramW6432})
|
|
||||||
endif(NOT program_files)
|
|
||||||
if(NOT program_files)
|
|
||||||
SET(program_files $ENV{ProgramFiles})
|
|
||||||
endif(NOT program_files)
|
|
||||||
|
|
||||||
set(QUICKTIME_SDK_DIR "${program_files}/QuickTime SDK"
|
|
||||||
CACHE PATH "Location of the QuickTime SDK.")
|
|
||||||
|
|
||||||
find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
|
|
||||||
PATHS
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/debug
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/debug
|
|
||||||
"${QUICKTIME_SDK_DIR}\\libraries"
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
|
|
||||||
PATHS
|
|
||||||
${LIBS_PREBUILT_DIR}/lib/release
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
|
|
||||||
"${QUICKTIME_SDK_DIR}\\libraries"
|
|
||||||
)
|
|
||||||
|
|
||||||
if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
|
|
||||||
set(QUICKTIME_LIBRARY
|
|
||||||
optimized ${RELEASE_QUICKTIME_LIBRARY}
|
|
||||||
debug ${DEBUG_QUICKTIME_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${LIBS_PREBUILT_DIR}/include/quicktime
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/quicktime
|
|
||||||
"${QUICKTIME_SDK_DIR}\\CIncludes"
|
|
||||||
)
|
|
||||||
endif (DARWIN)
|
|
||||||
|
|
||||||
mark_as_advanced(QUICKTIME_LIBRARY)
|
|
||||||
|
|
||||||
if (QUICKTIME_LIBRARY)
|
|
||||||
set(QUICKTIME ON CACHE BOOL "Build with QuickTime streaming media support.")
|
|
||||||
endif (QUICKTIME_LIBRARY)
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#This cmake script is meant to be run as a build time custom command.
|
|
||||||
#The script is run using cmake w/ the -P option.
|
|
||||||
# parameters are passed to this scripts execution with the -D option.
|
|
||||||
# A full command line would look like this:
|
|
||||||
# cmake -D LD_LIBRARY_PATH=~/checkout/libraries -D TEST_CMD=./llunit_test -D ARGS=--touch=llunit_test_ok.txt -P RunBuildTest.cmake
|
|
||||||
|
|
||||||
# Parameters:
|
|
||||||
# LD_LIBRARY_PATH: string, What to set the LD_LIBRARY_PATH env var.
|
|
||||||
# TEST_CMD: string list, command to run the unit test with, followed by its args.
|
|
||||||
set(ENV{LD_LIBRARY_PATH} ${LD_LIBRARY_PATH})
|
|
||||||
#message("Running: ${TEST_CMD}")
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${TEST_CMD}
|
|
||||||
RESULT_VARIABLE RES
|
|
||||||
)
|
|
||||||
|
|
||||||
if(NOT ${RES} STREQUAL 0)
|
|
||||||
message(STATUS "Failure running: ${TEST_CMD}")
|
|
||||||
message(FATAL_ERROR "Error: ${RES}")
|
|
||||||
endif(NOT ${RES} STREQUAL 0)
|
|
||||||
@@ -8,7 +8,7 @@ macro (check_message_template _target)
|
|||||||
PRE_LINK
|
PRE_LINK
|
||||||
COMMAND ${PYTHON_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
ARGS ${SCRIPTS_DIR}/template_verifier.py
|
ARGS ${SCRIPTS_DIR}/template_verifier.py
|
||||||
--mode=development --cache_master
|
--mode=development --cache_master --master_url=${TEMPLATE_VERIFIER_MASTER_URL} ${TEMPLATE_VERIFIER_OPTIONS}
|
||||||
COMMENT "Verifying message template"
|
COMMENT "Verifying message template - See http://wiki.secondlife.com/wiki/Template_verifier.py"
|
||||||
)
|
)
|
||||||
endmacro (check_message_template)
|
endmacro (check_message_template)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
include(FreeType)
|
||||||
|
|
||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
@@ -32,11 +33,10 @@ if (STANDALONE)
|
|||||||
endforeach(pkg)
|
endforeach(pkg)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
use_prebuilt_binary(glib) # gtk-etc needs glib
|
|
||||||
use_prebuilt_binary(gtk-atk-pango-glib)
|
use_prebuilt_binary(gtk-atk-pango-glib)
|
||||||
set(UI_LIBRARIES
|
set(UI_LIBRARIES
|
||||||
atk-1.0
|
atk-1.0
|
||||||
X11
|
cairo
|
||||||
gdk-x11-2.0
|
gdk-x11-2.0
|
||||||
gdk_pixbuf-2.0
|
gdk_pixbuf-2.0
|
||||||
Xinerama
|
Xinerama
|
||||||
@@ -48,25 +48,19 @@ else (STANDALONE)
|
|||||||
gtk-x11-2.0
|
gtk-x11-2.0
|
||||||
pango-1.0
|
pango-1.0
|
||||||
pangoft2-1.0
|
pangoft2-1.0
|
||||||
pangox-1.0
|
|
||||||
pangoxft-1.0
|
pangoxft-1.0
|
||||||
pangocairo-1.0
|
pangocairo-1.0
|
||||||
|
pixman-1
|
||||||
|
X11
|
||||||
|
${FREETYPE_LIBRARIES}
|
||||||
)
|
)
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
include_directories (
|
include_directories (
|
||||||
${LIBS_PREBUILT_DIR}/packages/include
|
${LIBS_PREBUILT_DIR}/include
|
||||||
${LIBS_PREBUILT_DIR}/packages/include/cairo
|
|
||||||
${LIBS_PREBUILT_DIR}/packages/include/pixman-1
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/cairo
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/pixman-1
|
|
||||||
)
|
)
|
||||||
foreach(include ${${LL_ARCH}_INCLUDES})
|
foreach(include ${${LL_ARCH}_INCLUDES})
|
||||||
include_directories(
|
include_directories(${LIBS_PREBUILT_DIR}/include/${include})
|
||||||
${LIBS_PREBUILT_DIR}/include/${include}
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/${include}
|
|
||||||
)
|
|
||||||
endforeach(include)
|
endforeach(include)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|
||||||
|
|||||||
20
indra/cmake/URIPARSER.cmake
Normal file
20
indra/cmake/URIPARSER.cmake
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
set(URIPARSER_FIND_QUIETLY ON)
|
||||||
|
set(URIPARSER_FIND_REQUIRED ON)
|
||||||
|
|
||||||
|
include(Prebuilt)
|
||||||
|
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
include(FindURIPARSER)
|
||||||
|
else (USESYSTEMLIBS)
|
||||||
|
use_prebuilt_binary(uriparser)
|
||||||
|
if (WINDOWS)
|
||||||
|
set(URIPARSER_LIBRARY
|
||||||
|
debug uriparserd
|
||||||
|
optimized uriparser)
|
||||||
|
elseif (DARWIN OR LINUX)
|
||||||
|
set(URIPARSER_LIBRARY uriparser)
|
||||||
|
endif (WINDOWS)
|
||||||
|
set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
@@ -9,9 +9,7 @@
|
|||||||
# LINUX - Linux
|
# LINUX - Linux
|
||||||
# WINDOWS - Windows
|
# WINDOWS - Windows
|
||||||
|
|
||||||
|
|
||||||
# Relative and absolute paths to subtrees.
|
# Relative and absolute paths to subtrees.
|
||||||
|
|
||||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||||
|
|
||||||
@@ -19,60 +17,123 @@ if(NOT DEFINED COMMON_CMAKE_DIR)
|
|||||||
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
|
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
endif(NOT DEFINED COMMON_CMAKE_DIR)
|
endif(NOT DEFINED COMMON_CMAKE_DIR)
|
||||||
|
|
||||||
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
set(LIBS_CLOSED_PREFIX)
|
set(LIBS_CLOSED_PREFIX)
|
||||||
set(LIBS_OPEN_PREFIX)
|
set(LIBS_OPEN_PREFIX)
|
||||||
set(SCRIPTS_PREFIX ../scripts)
|
set(SCRIPTS_PREFIX ../scripts)
|
||||||
set(VIEWER_PREFIX)
|
set(VIEWER_PREFIX)
|
||||||
|
set(INTEGRATION_TESTS_PREFIX)
|
||||||
|
option(LL_TESTS "Build and run unit and integration tests (disable for build timing runs to reduce variation" OFF)
|
||||||
|
|
||||||
|
option(INCREMENTAL_LINK "Use incremental linking on win32 builds (enable for faster links on some machines)" OFF)
|
||||||
|
option(USE_PRECOMPILED_HEADERS "Enable use of precompiled header directives where supported." ON)
|
||||||
|
option(USE_LTO "Enable Whole Program Optimization and related folding and binary reduction routines" OFF)
|
||||||
|
option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF)
|
||||||
|
|
||||||
|
# Media Plugins
|
||||||
|
option(ENABLE_MEDIA_PLUGINS "Turn off building media plugins if they are imported by third-party library mechanism" ON)
|
||||||
|
option(LIBVLCPLUGIN "Turn off building support for libvlc plugin" ON)
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
set(LIBVLCPLUGIN OFF)
|
||||||
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
|
||||||
|
# Mallocs
|
||||||
|
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
|
||||||
|
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
||||||
|
|
||||||
|
# Audio Engines
|
||||||
|
option(FMODSTUDIO "Build with support for the FMOD Studio audio engine" ON)
|
||||||
|
|
||||||
|
# Window implementation
|
||||||
|
option(LLWINDOW_SDL2 "Use SDL2 for window and input handling" OFF)
|
||||||
|
|
||||||
|
# Proprietary Library Features
|
||||||
|
option(NVAPI "Use nvapi driver interface library" OFF)
|
||||||
|
|
||||||
|
if(LIBS_CLOSED_DIR)
|
||||||
|
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
|
||||||
|
else(LIBS_CLOSED_DIR)
|
||||||
|
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
|
||||||
|
endif(LIBS_CLOSED_DIR)
|
||||||
|
if(LIBS_COMMON_DIR)
|
||||||
|
file(TO_CMAKE_PATH "${LIBS_COMMON_DIR}" LIBS_COMMON_DIR)
|
||||||
|
else(LIBS_COMMON_DIR)
|
||||||
|
set(LIBS_COMMON_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
|
||||||
|
endif(LIBS_COMMON_DIR)
|
||||||
|
set(LIBS_OPEN_DIR ${LIBS_COMMON_DIR})
|
||||||
|
|
||||||
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
|
|
||||||
set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
|
|
||||||
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
||||||
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
|
|
||||||
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
|
set(AUTOBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/packages)
|
||||||
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
|
||||||
|
set(LIBS_PREBUILT_DIR ${AUTOBUILD_INSTALL_DIR} CACHE PATH
|
||||||
|
"Location of prebuilt libraries.")
|
||||||
|
|
||||||
|
if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||||
|
# We use this as a marker that you can try to use the proprietary libraries.
|
||||||
|
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
|
||||||
|
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||||
|
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
|
||||||
|
set(TEMPLATE_VERIFIER_MASTER_URL "https://forge.alchemyviewer.org/alchemy/tools/Master-Message-Template/raw/master/message_template.msg" CACHE STRING "Location of the master message template")
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||||
|
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
||||||
|
endif (NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
|
# If someone has specified an address size, use that to determine the
|
||||||
|
# architecture. Otherwise, let the architecture specify the address size.
|
||||||
|
set(ADDRESS_SIZE ${WORD_SIZE})
|
||||||
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
|
#message(STATUS "ADDRESS_SIZE is 32")
|
||||||
|
set(ARCH i686)
|
||||||
|
elseif (ADDRESS_SIZE EQUAL 64)
|
||||||
|
#message(STATUS "ADDRESS_SIZE is 64")
|
||||||
|
set(ARCH x86_64)
|
||||||
|
else (ADDRESS_SIZE EQUAL 32)
|
||||||
|
#message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'")
|
||||||
|
# Use Python's platform.machine() since uname -m isn't available everywhere.
|
||||||
|
# Even if you can assume cygwin uname -m, the answer depends on whether
|
||||||
|
# you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will
|
||||||
|
# report a 64-bit processor.
|
||||||
|
execute_process(COMMAND
|
||||||
|
"${Python2_EXECUTABLE}" "-c"
|
||||||
|
"import platform; print platform.machine()"
|
||||||
|
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# We expect values of the form i386, i686, x86_64, AMD64.
|
||||||
|
# In CMake, expressing ARCH.endswith('64') is awkward:
|
||||||
|
string(LENGTH "${ARCH}" ARCH_LENGTH)
|
||||||
|
math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2")
|
||||||
|
string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2)
|
||||||
|
if (ARCH_LAST_2 STREQUAL 64)
|
||||||
|
#message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
|
||||||
|
set(ADDRESS_SIZE 64)
|
||||||
|
else()
|
||||||
|
#message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
|
||||||
|
set(ADDRESS_SIZE 32)
|
||||||
|
endif ()
|
||||||
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||||
set(WINDOWS ON BOOL FORCE)
|
set(WINDOWS ON BOOL FORCE)
|
||||||
if (WORD_SIZE EQUAL 32)
|
|
||||||
set(ARCH i686)
|
|
||||||
set(LL_ARCH ${ARCH}_win32)
|
set(LL_ARCH ${ARCH}_win32)
|
||||||
set(LL_ARCH_DIR ${ARCH}-win32)
|
set(LL_ARCH_DIR ${ARCH}-win32)
|
||||||
elseif (WORD_SIZE EQUAL 64)
|
|
||||||
set(ARCH x86_64)
|
|
||||||
set(LL_ARCH ${ARCH}_win)
|
|
||||||
set(LL_ARCH_DIR ${ARCH}-win)
|
|
||||||
endif (WORD_SIZE EQUAL 32)
|
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(LINUX ON BOOl FORCE)
|
set(LINUX ON BOOL FORCE)
|
||||||
|
|
||||||
# If someone has specified a word size, use that to determine the
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
# architecture. Otherwise, let the architecture specify the word size.
|
|
||||||
if (WORD_SIZE EQUAL 32)
|
|
||||||
set(ARCH i686)
|
|
||||||
elseif (WORD_SIZE EQUAL 64)
|
|
||||||
set(ARCH x86_64)
|
|
||||||
else (WORD_SIZE EQUAL 32)
|
|
||||||
if(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
|
||||||
set(ARCH i686)
|
|
||||||
set(WORD_SIZE 32)
|
|
||||||
else(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
|
||||||
set(ARCH x86_64)
|
|
||||||
set(WORD_SIZE 64)
|
|
||||||
endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
|
||||||
endif (WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
if (NOT STANDALONE AND MULTIARCH_HACK)
|
|
||||||
if (WORD_SIZE EQUAL 32)
|
|
||||||
set(DEB_ARCHITECTURE i386)
|
set(DEB_ARCHITECTURE i386)
|
||||||
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
|
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
|
||||||
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH})
|
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||||
else (WORD_SIZE EQUAL 32)
|
else (ADDRESS_SIZE EQUAL 32)
|
||||||
set(DEB_ARCHITECTURE amd64)
|
set(DEB_ARCHITECTURE amd64)
|
||||||
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
|
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH
|
execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH
|
||||||
RESULT_VARIABLE DPKG_RESULT
|
RESULT_VARIABLE DPKG_RESULT
|
||||||
@@ -85,7 +146,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||||||
endif (DPKG_RESULT EQUAL 0)
|
endif (DPKG_RESULT EQUAL 0)
|
||||||
|
|
||||||
include(ConfigurePkgConfig)
|
include(ConfigurePkgConfig)
|
||||||
endif (NOT STANDALONE AND MULTIARCH_HACK)
|
|
||||||
|
|
||||||
set(LL_ARCH ${ARCH}_linux)
|
set(LL_ARCH ${ARCH}_linux)
|
||||||
set(LL_ARCH_DIR ${ARCH}-linux)
|
set(LL_ARCH_DIR ${ARCH}-linux)
|
||||||
@@ -94,94 +154,94 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(DARWIN 1)
|
set(DARWIN 1)
|
||||||
|
|
||||||
execute_process(
|
# Architecture
|
||||||
COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
|
set(CMAKE_OSX_SYSROOT macosx10.14)
|
||||||
OUTPUT_VARIABLE XCODE_VERSION )
|
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||||
string(REGEX REPLACE "(\r?\n)+$" "" XCODE_VERSION "${XCODE_VERSION}")
|
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS "x86_64")
|
||||||
|
|
||||||
# # To support a different SDK update these Xcode settings:
|
|
||||||
# if (XCODE_VERSION GREATER 4.9) # (Which would be 5.0+)
|
|
||||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
|
|
||||||
# set(CMAKE_OSX_SYSROOT macosx10.9)
|
|
||||||
# else (XCODE_VERION GREATER 4.9)
|
|
||||||
# if (XCODE_VERSION GREATER 4.5)
|
|
||||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
|
|
||||||
# set(CMAKE_OSX_SYSROOT macosx10.8)
|
|
||||||
# else (XCODE_VERSION GREATER 4.5)
|
|
||||||
# if (XCODE_VERSION GREATER 4.2)
|
|
||||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
|
||||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
|
||||||
# else (XCODE_VERSION GREATER 4.2)
|
|
||||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
|
||||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
|
||||||
# endif (XCODE_VERSION GREATER 4.2)
|
|
||||||
# endif (XCODE_VERSION GREATER 4.5)
|
|
||||||
# endif (XCODE_VERSION GREATER 4.9)
|
|
||||||
|
|
||||||
# Hardcode SDK we build against until we can test and allow newer ones
|
# Build Options
|
||||||
# as autodetected in the code above
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] "dwarf")
|
||||||
set(CMAKE_OSX_SYSROOT macosx10.6)
|
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Release] "dwarf-with-dsym")
|
||||||
|
|
||||||
# Support for Unix Makefiles generator
|
# Deployment
|
||||||
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
|
||||||
execute_process(COMMAND xcodebuild -version -sdk "${CMAKE_OSX_SYSROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
|
|
||||||
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
|
|
||||||
endif (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
|
||||||
|
|
||||||
# LLVM-GCC has been removed in Xcode5
|
|
||||||
if (XCODE_VERSION GREATER 4.9)
|
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
|
|
||||||
else (XCODE_VERSION GREATER 4.9)
|
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
|
||||||
endif (XCODE_VERSION GREATER 4.9)
|
|
||||||
|
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
|
# Linking
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING YES)
|
||||||
|
|
||||||
message(STATUS "Xcode version: ${XCODE_VERSION}")
|
# Apple Clang - Code Gen
|
||||||
message(STATUS "OSX sysroot: ${CMAKE_OSX_SYSROOT}")
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] YES)
|
||||||
message(STATUS "OSX deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS sse4.1)
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
|
||||||
# Build only for i386 by default, system default on MacOSX 10.6 is x86_64
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL[variant=Debug] 0)
|
||||||
set(CMAKE_OSX_ARCHITECTURES i386)
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL[variant=Release] 3)
|
||||||
set(ARCH i386)
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO)
|
||||||
set(WORD_SIZE 32)
|
|
||||||
|
# Apple Clang - Custom Compiler Flags
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_WARNING_CFLAGS "-Wall -Wextra -Wno-reorder -Wno-sign-compare -Wno-ignored-qualifiers -Wno-unused-local-typedef -Wno-unused-parameter")
|
||||||
|
|
||||||
|
# Apple Clang - Language - C++
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD c++14)
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||||
|
|
||||||
|
# Apple Clang - Warning Policies
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_TREAT_WARNINGS_AS_ERRORS YES)
|
||||||
|
|
||||||
set(LL_ARCH ${ARCH}_darwin)
|
set(LL_ARCH ${ARCH}_darwin)
|
||||||
set(LL_ARCH_DIR universal-darwin)
|
set(LL_ARCH_DIR universal-darwin)
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
|
||||||
set(LIBS_PREBUILT_DIR ${CMAKE_BINARY_DIR}/packages CACHE PATH
|
|
||||||
"Location of prebuilt libraries.")
|
|
||||||
|
|
||||||
set(LIBS_PREBUILT_LEGACY_DIR ${CMAKE_BINARY_DIR}/packages/libraries/${LL_ARCH_DIR} CACHE PATH
|
|
||||||
"Legacy location of prebuilt libraries.")
|
|
||||||
|
|
||||||
if (WINDOWS AND WORD_SIZE EQUAL 32)
|
|
||||||
set(PREBUILT_TYPE windows)
|
|
||||||
elseif (WINDOWS AND WORD_SIZE EQUAL 64)
|
|
||||||
set(PREBUILT_TYPE windows64)
|
|
||||||
elseif(DARWIN)
|
|
||||||
set(PREBUILT_TYPE darwin)
|
|
||||||
elseif(LINUX AND WORD_SIZE EQUAL 32)
|
|
||||||
set(PREBUILT_TYPE linux)
|
|
||||||
elseif(LINUX AND WORD_SIZE EQUAL 64)
|
|
||||||
set(PREBUILT_TYPE linux64)
|
|
||||||
endif(WINDOWS AND WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
# Default deploy grid
|
# Default deploy grid
|
||||||
set(GRID agni CACHE STRING "Target Grid")
|
set(GRID agni CACHE STRING "Target Grid")
|
||||||
|
|
||||||
set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name")
|
set(VIEWER_PRODUCT_NAME "Singularity" CACHE STRING "Viewer Base Name")
|
||||||
set(VIEWER_LOGIN_CHANNEL "${VIEWER_CHANNEL}" CACHE STRING "Fake login channel for A/B Testing")
|
string(TOLOWER ${VIEWER_PRODUCT_NAME} VIEWER_PRODUCT_NAME_LOWER)
|
||||||
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)")
|
|
||||||
|
set(VIEWER_CHANNEL_BASE "Test" CACHE STRING "Viewer Channel Name")
|
||||||
|
set(VIEWER_CHANNEL "${VIEWER_PRODUCT_NAME} ${VIEWER_CHANNEL_BASE}")
|
||||||
|
string(TOLOWER ${VIEWER_CHANNEL} VIEWER_CHANNEL_LOWER)
|
||||||
|
string(REPLACE " " "" VIEWER_CHANNEL_ONEWORD ${VIEWER_CHANNEL})
|
||||||
|
|
||||||
|
option(VIEWER_CHANNEL_GRK "Greek character(s) to represent the viewer channel for support purposes, override only for special branches" "")
|
||||||
|
if (NOT VIEWER_CHANNEL_GRK)
|
||||||
|
if (VIEWER_CHANNEL_BASE MATCHES "Test")
|
||||||
|
set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ"
|
||||||
|
elseif (VIEWER_CHANNEL_BASE MATCHES "Alpha")
|
||||||
|
set(VIEWER_CHANNEL_GRK "\\u03B1") # "α"
|
||||||
|
elseif (VIEWER_CHANNEL_BASE MATCHES "Beta")
|
||||||
|
set(VIEWER_CHANNEL_GRK "\\u03B2") # "β"
|
||||||
|
endif ()
|
||||||
|
endif (NOT VIEWER_CHANNEL_GRK)
|
||||||
|
|
||||||
|
if(VIEWER_CHANNEL_LOWER MATCHES "^${VIEWER_PRODUCT_NAME_LOWER} release")
|
||||||
|
set(VIEWER_PACKAGE_ID "${VIEWER_PRODUCT_NAME}Release")
|
||||||
|
set(VIEWER_EXE_STRING "${VIEWER_PRODUCT_NAME}Viewer")
|
||||||
|
set(VIEWER_SHORTCUT_STRING "${VIEWER_PRODUCT_NAME} Viewer")
|
||||||
|
else()
|
||||||
|
set(VIEWER_PACKAGE_ID ${VIEWER_CHANNEL_ONEWORD})
|
||||||
|
set(VIEWER_EXE_STRING ${VIEWER_CHANNEL_ONEWORD})
|
||||||
|
set(VIEWER_SHORTCUT_STRING ${VIEWER_CHANNEL})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used for resulting artifacts.")
|
||||||
|
|
||||||
|
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id")
|
||||||
|
|
||||||
|
option(ENABLE_SIGNING "Enable signing the viewer" OFF)
|
||||||
|
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
|
||||||
|
|
||||||
|
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
|
||||||
|
# Compiler and toolchain options
|
||||||
|
option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
||||||
|
option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
set(STANDALONE ON)
|
||||||
|
elseif (STANDALONE)
|
||||||
|
set(USESYSTEMLIBS ON)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
|
|
||||||
# *TODO: break out proper Branding-secondlife.cmake, Branding-snowglobe.cmake, etc
|
|
||||||
string(REGEX REPLACE " +" "" VIEWER_CHANNEL_ONE_WORD "${VIEWER_CHANNEL}")
|
|
||||||
set(VIEWER_BRANDING_NAME "${VIEWER_CHANNEL_ONE_WORD}")
|
|
||||||
set(VIEWER_BRANDING_NAME_CAMELCASE "${VIEWER_CHANNEL_ONE_WORD}")
|
|
||||||
|
|
||||||
set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
|
|
||||||
|
|
||||||
source_group("CMake Rules" FILES CMakeLists.txt)
|
source_group("CMake Rules" FILES CMakeLists.txt)
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,8 @@
|
|||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
if (NOT STANDALONE)
|
||||||
use_prebuilt_binary(vivox)
|
use_prebuilt_binary(slvoice)
|
||||||
if(LINUX)
|
if(LINUX)
|
||||||
use_prebuilt_binary(libuuid)
|
|
||||||
if (${ARCH} STREQUAL "x86_64")
|
|
||||||
use_prebuilt_binary(32bitcompatibilitylibs)
|
|
||||||
endif (${ARCH} STREQUAL "x86_64")
|
|
||||||
use_prebuilt_binary(fontconfig)
|
use_prebuilt_binary(fontconfig)
|
||||||
endif(LINUX)
|
endif(LINUX)
|
||||||
else (NOT STANDALONE)
|
else (NOT STANDALONE)
|
||||||
@@ -19,3 +15,5 @@ else (NOT STANDALONE)
|
|||||||
endif(LINUX AND ${ARCH} STREQUAL "x86_64")
|
endif(LINUX AND ${ARCH} STREQUAL "x86_64")
|
||||||
set(STANDALONE ON)
|
set(STANDALONE ON)
|
||||||
endif(NOT STANDALONE)
|
endif(NOT STANDALONE)
|
||||||
|
|
||||||
|
use_prebuilt_binary(fonts)
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
include(Linking)
|
|
||||||
include(Prebuilt)
|
|
||||||
include(LLQtWebkit)
|
|
||||||
include(Qt4)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
set(WEBKITLIBPLUGIN OFF CACHE BOOL
|
|
||||||
"WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
|
|
||||||
else (STANDALONE)
|
|
||||||
use_prebuilt_binary(llqtwebkit)
|
|
||||||
set(WEBKITLIBPLUGIN ON CACHE BOOL
|
|
||||||
"WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
|
|
||||||
endif (STANDALONE)
|
|
||||||
|
|
||||||
if (WINDOWS)
|
|
||||||
set(WEBKIT_PLUGIN_LIBRARIES
|
|
||||||
debug llqtwebkitd
|
|
||||||
debug QtWebKitd4
|
|
||||||
debug QtOpenGLd4
|
|
||||||
debug QtNetworkd4
|
|
||||||
debug QtGuid4
|
|
||||||
debug QtCored4
|
|
||||||
debug qtmaind
|
|
||||||
optimized llqtwebkit
|
|
||||||
optimized QtWebKit4
|
|
||||||
optimized QtOpenGL4
|
|
||||||
optimized QtNetwork4
|
|
||||||
optimized QtGui4
|
|
||||||
optimized QtCore4
|
|
||||||
optimized qtmain
|
|
||||||
)
|
|
||||||
elseif (DARWIN)
|
|
||||||
set(WEBKIT_PLUGIN_LIBRARIES
|
|
||||||
debug libllqtwebkit.dylib
|
|
||||||
optimized libllqtwebkit.dylib
|
|
||||||
)
|
|
||||||
elseif (LINUX)
|
|
||||||
if (STANDALONE)
|
|
||||||
set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
|
|
||||||
else (STANDALONE)
|
|
||||||
set(WEBKIT_PLUGIN_LIBRARIES
|
|
||||||
llqtwebkit
|
|
||||||
QtWebKit
|
|
||||||
QtOpenGL
|
|
||||||
QtNetwork
|
|
||||||
QtGui
|
|
||||||
QtCore
|
|
||||||
crypto
|
|
||||||
ssl
|
|
||||||
# qgif
|
|
||||||
# qjpeg
|
|
||||||
jpeg
|
|
||||||
fontconfig
|
|
||||||
X11
|
|
||||||
Xrender
|
|
||||||
Xext
|
|
||||||
GL
|
|
||||||
)
|
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4) # Singu TODO: update webkit
|
|
||||||
set(WEBKIT_PLUGIN_LIBRARIES ${WEBKIT_PLUGIN_LIBRARIES} jscore)
|
|
||||||
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
||||||
endif (STANDALONE)
|
|
||||||
endif (WINDOWS)
|
|
||||||
17
indra/cmake/WinManifest.cmake
Normal file
17
indra/cmake/WinManifest.cmake
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# - Embeds a specific manifest file in a Windows binary
|
||||||
|
# Defines the following:
|
||||||
|
# EMBED_MANIFEST - embed manifest in a windows binary with mt
|
||||||
|
# Parameters - _target is the target file, type - 1 for EXE, 2 for DLL
|
||||||
|
|
||||||
|
MACRO(EMBED_MANIFEST _target type)
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
TARGET ${_target}
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND "mt.exe"
|
||||||
|
ARGS
|
||||||
|
-manifest \"${CMAKE_SOURCE_DIR}\\tools\\manifests\\compatibility.manifest\"
|
||||||
|
-inputresource:\"$<TARGET_FILE:${_target}>\"\;\#${type}
|
||||||
|
-outputresource:\"$<TARGET_FILE:${_target}>\"\;\#${type}
|
||||||
|
COMMENT "Adding compatibility manifest to ${_target}"
|
||||||
|
)
|
||||||
|
ENDMACRO(EMBED_MANIFEST _target type)
|
||||||
@@ -8,9 +8,13 @@ if (STANDALONE)
|
|||||||
include(FindXmlRpcEpi)
|
include(FindXmlRpcEpi)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(xmlrpc-epi)
|
use_prebuilt_binary(xmlrpc-epi)
|
||||||
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
|
if (WINDOWS)
|
||||||
set(XMLRPCEPI_INCLUDE_DIRS
|
set(XMLRPCEPI_LIBRARIES
|
||||||
${LIBS_PREBUILT_DIR}/include
|
debug xmlrpc-epid
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
optimized xmlrpc-epi
|
||||||
)
|
)
|
||||||
|
else (WINDOWS)
|
||||||
|
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
|
||||||
|
endif (WINDOWS)
|
||||||
|
set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -13,13 +13,25 @@ else (STANDALONE)
|
|||||||
set(ZLIB_LIBRARIES
|
set(ZLIB_LIBRARIES
|
||||||
debug zlibd
|
debug zlibd
|
||||||
optimized zlib)
|
optimized zlib)
|
||||||
|
elseif (LINUX)
|
||||||
|
#
|
||||||
|
# When we have updated static libraries in competition with older
|
||||||
|
# shared libraries and we want the former to win, we need to do some
|
||||||
|
# extra work. The *_PRELOAD_ARCHIVES settings are invoked early
|
||||||
|
# and will pull in the entire archive to the binary giving it
|
||||||
|
# priority in symbol resolution. Beware of cmake moving the
|
||||||
|
# achive load itself to another place on the link command line. If
|
||||||
|
# that happens, you can try something like -Wl,-lz here to hide
|
||||||
|
# the archive. Also be aware that the linker will not tolerate a
|
||||||
|
# second whole-archive load of the archive. See viewer's
|
||||||
|
# CMakeLists.txt for more information.
|
||||||
|
#
|
||||||
|
set(ZLIB_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
|
||||||
|
set(ZLIB_LIBRARIES z)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(ZLIB_LIBRARIES z)
|
set(ZLIB_LIBRARIES z)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
if (WINDOWS OR LINUX)
|
if (WINDOWS OR LINUX)
|
||||||
set(ZLIB_INCLUDE_DIRS
|
set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib)
|
||||||
${LIBS_PREBUILT_DIR}/include/zlib
|
|
||||||
${LIBS_PREBUILT_LEGACY_DIR}/include/zlib
|
|
||||||
)
|
|
||||||
endif (WINDOWS OR LINUX)
|
endif (WINDOWS OR LINUX)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
/**
|
/**
|
||||||
* @file cmake_dummy.cpp
|
* @file cmake_dummy.cpp
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2008-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|||||||
340
indra/cmake/run_build_test.py
Normal file
340
indra/cmake/run_build_test.py
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
"""\
|
||||||
|
@file run_build_test.py
|
||||||
|
@author Nat Goodspeed
|
||||||
|
@date 2009-09-03
|
||||||
|
@brief Helper script to allow CMake to run some command after setting
|
||||||
|
environment variables.
|
||||||
|
|
||||||
|
CMake has commands to run an external program. But remember that each CMake
|
||||||
|
command must be backed by multiple build-system implementations. Unfortunately
|
||||||
|
it seems CMake can't promise that every target build system can set specified
|
||||||
|
environment variables before running the external program of interest.
|
||||||
|
|
||||||
|
This helper script is a workaround. It simply sets the requested environment
|
||||||
|
variables and then executes the program specified on the rest of its command
|
||||||
|
line.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
python run_build_test.py -DFOO=bar myprog somearg otherarg
|
||||||
|
|
||||||
|
sets environment variable FOO=bar, then runs:
|
||||||
|
myprog somearg otherarg
|
||||||
|
|
||||||
|
$LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||||
|
Second Life Viewer Source Code
|
||||||
|
Copyright (C) 2009-2010, Linden Research, Inc.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation;
|
||||||
|
version 2.1 of the License only.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
|
$/LicenseInfo$
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import errno
|
||||||
|
import HTMLParser
|
||||||
|
import re
|
||||||
|
import signal
|
||||||
|
import subprocess
|
||||||
|
import logging
|
||||||
|
|
||||||
|
def main(command, arguments=[], libpath=[], vars={}):
|
||||||
|
"""Pass:
|
||||||
|
command is the command to be executed
|
||||||
|
|
||||||
|
argument is a sequence (e.g. a list) of strings to be passed to command
|
||||||
|
|
||||||
|
libpath is a sequence of directory pathnames. These will be appended to
|
||||||
|
the platform-specific dynamic library search path environment variable.
|
||||||
|
|
||||||
|
vars is a dict of arbitrary (var, value) pairs to be added to the
|
||||||
|
environment before running 'command'.
|
||||||
|
|
||||||
|
This function runs the specified command, waits for it to terminate and
|
||||||
|
returns its return code. This will be negative if the command terminated
|
||||||
|
with a signal, else it will be the process's specified exit code.
|
||||||
|
"""
|
||||||
|
# Handle platform-dependent libpath first.
|
||||||
|
if sys.platform == "win32":
|
||||||
|
lpvars = ["PATH"]
|
||||||
|
elif sys.platform == "darwin":
|
||||||
|
lpvars = ["LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH"]
|
||||||
|
elif sys.platform.startswith("linux"):
|
||||||
|
lpvars = ["LD_LIBRARY_PATH"]
|
||||||
|
else:
|
||||||
|
# No idea what the right pathname might be! But only crump if this
|
||||||
|
# feature is requested.
|
||||||
|
if libpath:
|
||||||
|
raise RuntimeError("run_build_test: unknown platform %s" % sys.platform)
|
||||||
|
lpvars = []
|
||||||
|
for var in lpvars:
|
||||||
|
# Split the existing path. Bear in mind that the variable in question
|
||||||
|
# might not exist; instead of KeyError, just use an empty string.
|
||||||
|
dirs = os.environ.get(var, "").split(os.pathsep)
|
||||||
|
# Append the sequence in libpath
|
||||||
|
log.info("%s += %r" % (var, libpath))
|
||||||
|
for dir in libpath:
|
||||||
|
# append system paths at the end
|
||||||
|
if dir in ('/lib', '/usr/lib'):
|
||||||
|
dirs.append(dir)
|
||||||
|
# prepend non-system paths
|
||||||
|
else:
|
||||||
|
dirs.insert(0, dir)
|
||||||
|
|
||||||
|
# Filter out some useless pieces
|
||||||
|
clean_dirs = []
|
||||||
|
for dir in dirs:
|
||||||
|
if dir and dir not in ('', '.'):
|
||||||
|
clean_dirs.append(dir)
|
||||||
|
|
||||||
|
# Now rebuild the path string. This way we use a minimum of separators
|
||||||
|
# -- and we avoid adding a pointless separator when libpath is empty.
|
||||||
|
os.environ[var] = os.pathsep.join(clean_dirs)
|
||||||
|
log.info("%s = %r" % (var, os.environ[var]))
|
||||||
|
# Now handle arbitrary environment variables. The tricky part is ensuring
|
||||||
|
# that all the keys and values we try to pass are actually strings.
|
||||||
|
if vars:
|
||||||
|
log.info("Setting: %s" % ("\n".join(["%s=%s" % (key, value) for key, value in vars.iteritems()])))
|
||||||
|
os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()]))
|
||||||
|
# Run the child process.
|
||||||
|
command_list = [command]
|
||||||
|
command_list.extend(arguments)
|
||||||
|
log.info("Running: %s" % " ".join(command_list))
|
||||||
|
# Make sure we see all relevant output *before* child-process output.
|
||||||
|
sys.stdout.flush()
|
||||||
|
try:
|
||||||
|
return subprocess.call(command_list)
|
||||||
|
except OSError as err:
|
||||||
|
# If the caller is trying to execute a test program that doesn't
|
||||||
|
# exist, we want to produce a reasonable error message rather than a
|
||||||
|
# traceback. This happens when the build is halted by errors, but
|
||||||
|
# CMake tries to proceed with testing anyway <eyeroll/>. However, do
|
||||||
|
# NOT attempt to handle any error but "doesn't exist."
|
||||||
|
if err.errno != errno.ENOENT:
|
||||||
|
raise
|
||||||
|
# In practice, the pathnames into CMake's build tree are so long as to
|
||||||
|
# obscure the name of the test program. Just log its basename.
|
||||||
|
log.warn("No such program %s; check for preceding build errors" % \
|
||||||
|
os.path.basename(command[0]))
|
||||||
|
# What rc should we simulate for missing executable? Windows produces
|
||||||
|
# 9009.
|
||||||
|
return 9009
|
||||||
|
|
||||||
|
# swiped from vita, sigh, seems like a Bad Idea to introduce dependency
|
||||||
|
def translate_rc(rc):
|
||||||
|
"""
|
||||||
|
Accept an rc encoded as for subprocess.Popen.returncode:
|
||||||
|
None means still running
|
||||||
|
int >= 0 means terminated voluntarily with specified rc
|
||||||
|
int < 0 means terminated by signal (-rc)
|
||||||
|
|
||||||
|
Return a string explaining the outcome. In case of a signal, try to
|
||||||
|
name the corresponding symbol from the 'signal' module.
|
||||||
|
"""
|
||||||
|
if rc is None:
|
||||||
|
return "still running"
|
||||||
|
|
||||||
|
if rc >= 0:
|
||||||
|
return "terminated with rc %s" % rc
|
||||||
|
|
||||||
|
if sys.platform.startswith("win"):
|
||||||
|
# From http://stackoverflow.com/questions/20629027/process-finished-with-exit-code-1073741571
|
||||||
|
# [-1073741571] is the signed integer representation of Microsoft's
|
||||||
|
# "stack overflow/stack exhaustion" error code 0xC00000FD.
|
||||||
|
# Anytime you see strange, large negative exit codes in windows, convert
|
||||||
|
# them to hex and then look them up in the ntstatus error codes
|
||||||
|
# http://msdn.microsoft.com/en-us/library/cc704588.aspx
|
||||||
|
|
||||||
|
# Python bends over backwards to give you all the integer precision
|
||||||
|
# you need, avoiding truncation. But only with 32-bit signed ints is
|
||||||
|
# -1073741571 equivalent to 0xC00000FD! Explicitly truncate before
|
||||||
|
# converting.
|
||||||
|
hexrc = "0x%X" % (rc & 0xFFFFFFFF)
|
||||||
|
# At this point, we're only trying to format the rc to make it easier
|
||||||
|
# for a human being to understand. Any exception here -- file doesn't
|
||||||
|
# exist, HTML parsing error, unrecognized table structure, unknown key
|
||||||
|
# -- should NOT kill the script! It should only cause us to shrug and
|
||||||
|
# present our caller with the best information available.
|
||||||
|
try:
|
||||||
|
table = get_windows_table()
|
||||||
|
symbol, desc = table[hexrc]
|
||||||
|
except Exception, err:
|
||||||
|
log.error("(%s -- carrying on)" % err)
|
||||||
|
log.error("terminated with rc %s (%s)" % (rc, hexrc))
|
||||||
|
else:
|
||||||
|
log.info("terminated with rc %s: %s: %s" % (hexrc, symbol, desc))
|
||||||
|
|
||||||
|
else:
|
||||||
|
# On Posix, negative rc means the child was terminated by signal -rc.
|
||||||
|
rc = -rc
|
||||||
|
for attr in dir(signal):
|
||||||
|
if attr.startswith('SIG') and getattr(signal, attr) == rc:
|
||||||
|
strc = attr
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
strc = str(rc)
|
||||||
|
return "terminated by signal %s" % strc
|
||||||
|
|
||||||
|
class TableParser(HTMLParser.HTMLParser):
|
||||||
|
"""
|
||||||
|
This HTMLParser subclass is designed to parse the table we know exists
|
||||||
|
in windows-rcs.html, hopefully without building in too much knowledge of
|
||||||
|
the specific way that table is currently formatted.
|
||||||
|
"""
|
||||||
|
# regular expression matching any string containing only whitespace
|
||||||
|
whitespace = re.compile(r'\s*$')
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
# Because Python 2.x's HTMLParser is an old-style class, we must use
|
||||||
|
# old-style syntax to forward the __init__() call -- not super().
|
||||||
|
HTMLParser.HTMLParser.__init__(self)
|
||||||
|
# this will collect all the data, eventually
|
||||||
|
self.table = []
|
||||||
|
# Stack whose top (last item) indicates where to append current
|
||||||
|
# element data. When empty, don't collect data at all.
|
||||||
|
self.dest = []
|
||||||
|
|
||||||
|
def handle_starttag(self, tag, attrs):
|
||||||
|
if tag == "table":
|
||||||
|
# This is the outermost tag we recognize. Collect nested elements
|
||||||
|
# within self.table.
|
||||||
|
self.dest.append(self.table)
|
||||||
|
elif tag in ("tr", "td"):
|
||||||
|
# Nested elements whose contents we want to capture as sublists.
|
||||||
|
# To the list currently designated by the top of the dest stack,
|
||||||
|
# append a new empty sublist.
|
||||||
|
self.dest[-1].append([])
|
||||||
|
# Now push THAT new, empty list as the new top of the dest stack.
|
||||||
|
self.dest.append(self.dest[-1][-1])
|
||||||
|
elif tag == "p":
|
||||||
|
# We could handle <p> ... </p> just like <tr> or <td>, but that
|
||||||
|
# introduces an unnecessary extra level of nesting. Just skip.
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
# For any tag we don't recognize (notably <th>), push a new, empty
|
||||||
|
# list to the top of the dest stack. This new list is NOT
|
||||||
|
# referenced by anything in self.table; thus, when we pop it, any
|
||||||
|
# data we've collected inside that list will be discarded.
|
||||||
|
self.dest.append([])
|
||||||
|
|
||||||
|
def handle_endtag(self, tag):
|
||||||
|
# Because we avoid pushing self.dest for <p> in handle_starttag(), we
|
||||||
|
# must refrain from popping it for </p> here.
|
||||||
|
if tag != "p":
|
||||||
|
# For everything else, including unrecognized tags, pop the dest
|
||||||
|
# stack, reverting to outer collection.
|
||||||
|
self.dest.pop()
|
||||||
|
|
||||||
|
def handle_startendtag(self, tag, attrs):
|
||||||
|
# The table of interest contains <td> entries of the form:
|
||||||
|
# <p>0x00000000<br />STATUS_SUCCESS</p>
|
||||||
|
# The <br/> is very useful -- we definitely want two different data
|
||||||
|
# items for "0x00000000" and "STATUS_SUCCESS" -- but we don't need or
|
||||||
|
# want it to push, then discard, an empty list as it would if we let
|
||||||
|
# the default HTMLParser.handle_startendtag() call handle_starttag()
|
||||||
|
# followed by handle_endtag(). Just ignore <br/> or any other
|
||||||
|
# singleton tag.
|
||||||
|
pass
|
||||||
|
|
||||||
|
def handle_data(self, data):
|
||||||
|
# Outside the <table> of interest, self.dest is empty. Do not bother
|
||||||
|
# collecting data when self.dest is empty.
|
||||||
|
# HTMLParser calls handle_data() with every chunk of whitespace
|
||||||
|
# between tags. That would be lovely if our eventual goal was to
|
||||||
|
# reconstitute the original input stream with its existing formatting,
|
||||||
|
# but for us, whitespace only clutters the table. Ignore it.
|
||||||
|
if self.dest and not self.whitespace.match(data):
|
||||||
|
# Here we're within our <table> and we have non-whitespace data.
|
||||||
|
# Append it to the list designated by the top of the dest stack.
|
||||||
|
self.dest[-1].append(data)
|
||||||
|
|
||||||
|
# cache for get_windows_table()
|
||||||
|
_windows_table = None
|
||||||
|
|
||||||
|
def get_windows_table():
|
||||||
|
global _windows_table
|
||||||
|
# If we already loaded _windows_table, no need to load it all over again.
|
||||||
|
if _windows_table:
|
||||||
|
return _windows_table
|
||||||
|
|
||||||
|
# windows-rcs.html was fetched on 2015-03-24 with the following command:
|
||||||
|
# curl -o windows-rcs.html \
|
||||||
|
# https://msdn.microsoft.com/en-us/library/cc704588.aspx
|
||||||
|
parser = TableParser()
|
||||||
|
with open(os.path.join(os.path.dirname(__file__), "windows-rcs.html")) as hf:
|
||||||
|
# We tried feeding the file data to TableParser in chunks, to avoid
|
||||||
|
# buffering the entire file as a single string. Unfortunately its
|
||||||
|
# handle_data() cannot tell the difference between distinct calls
|
||||||
|
# separated by HTML tags, and distinct calls necessitated by a chunk
|
||||||
|
# boundary. Sigh! Read in the whole file. At the time this was
|
||||||
|
# written, it was only 500KB anyway.
|
||||||
|
parser.feed(hf.read())
|
||||||
|
parser.close()
|
||||||
|
table = parser.table
|
||||||
|
|
||||||
|
# With our parser, any <tr><th>...</th></tr> row leaves a table entry
|
||||||
|
# consisting only of an empty list. Remove any such.
|
||||||
|
while table and not table[0]:
|
||||||
|
table.pop(0)
|
||||||
|
|
||||||
|
# We expect rows of the form:
|
||||||
|
# [['0x00000000', 'STATUS_SUCCESS'],
|
||||||
|
# ['The operation completed successfully.']]
|
||||||
|
# The latter list will have multiple entries if Microsoft embedded <br/>
|
||||||
|
# or <p> ... </p> in the text, in which case joining with '\n' is
|
||||||
|
# appropriate.
|
||||||
|
# Turn that into a dict whose key is the hex string, and whose value is
|
||||||
|
# the pair (symbol, desc).
|
||||||
|
_windows_table = dict((key, (symbol, '\n'.join(desc)))
|
||||||
|
for (key, symbol), desc in table)
|
||||||
|
|
||||||
|
return _windows_table
|
||||||
|
|
||||||
|
log=logging.getLogger(__name__)
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import argparse
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("-d", "--debug", dest="loglevel", action="store_const",
|
||||||
|
const=logging.DEBUG, default=logging.INFO)
|
||||||
|
parser.add_argument("-D", "--define", dest="vars", default=[], action="append",
|
||||||
|
metavar="VAR=value",
|
||||||
|
help="Add VAR=value to the env variables defined")
|
||||||
|
parser.add_argument("-l", "--libpath", dest="libpath", default=[], action="append",
|
||||||
|
metavar="DIR",
|
||||||
|
help="Add DIR to the platform-dependent DLL search path")
|
||||||
|
parser.add_argument("command")
|
||||||
|
parser.add_argument('args', nargs=argparse.REMAINDER)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
log.setLevel(args.loglevel)
|
||||||
|
|
||||||
|
# What we have in opts.vars is a list of strings of the form "VAR=value"
|
||||||
|
# or possibly just "VAR". What we want is a dict. We can build that dict by
|
||||||
|
# constructing a list of ["VAR", "value"] pairs -- so split each
|
||||||
|
# "VAR=value" string on the '=' sign (but only once, in case we have
|
||||||
|
# "VAR=some=user=string"). To handle the case of just "VAR", append "" to
|
||||||
|
# the list returned by split(), then slice off anything after the pair we
|
||||||
|
# want.
|
||||||
|
rc = main(command=args.command, arguments=args.args, libpath=args.libpath,
|
||||||
|
vars=dict([(pair.split('=', 1) + [""])[:2] for pair in args.vars]))
|
||||||
|
if rc not in (None, 0):
|
||||||
|
log.error("Failure running: %s" % " ".join([args.command] + args.args))
|
||||||
|
log.error("Error %s: %s" % (rc, translate_rc(rc)))
|
||||||
|
sys.exit((rc < 0) and 255 or rc)
|
||||||
@@ -1,4 +1,28 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
"""\
|
||||||
|
@file start-client.py
|
||||||
|
|
||||||
|
$LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||||
|
Second Life Viewer Source Code
|
||||||
|
Copyright (C) 2010-2011, Linden Research, Inc.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation;
|
||||||
|
version 2.1 of the License only.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
|
$/LicenseInfo$
|
||||||
|
"""
|
||||||
import sys, getopt
|
import sys, getopt
|
||||||
import os
|
import os
|
||||||
import llstart
|
import llstart
|
||||||
|
|||||||
925
indra/develop.py
925
indra/develop.py
@@ -1,925 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#
|
|
||||||
# @file develop.py
|
|
||||||
# @authors Bryan O'Sullivan, Mark Palange, Aaron Brashears
|
|
||||||
# @brief Fire and forget script to appropriately configure cmake for SL.
|
|
||||||
#
|
|
||||||
# $LicenseInfo:firstyear=2007&license=viewergpl$
|
|
||||||
#
|
|
||||||
# Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
#
|
|
||||||
# Second Life Viewer Source Code
|
|
||||||
# The source code in this file ("Source Code") is provided by Linden Lab
|
|
||||||
# to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
# ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
# ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
# the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
#
|
|
||||||
# There are special exceptions to the terms and conditions of the GPL as
|
|
||||||
# it is applied to this Source Code. View the full text of the exception
|
|
||||||
# in the file doc/FLOSS-exception.txt in this software distribution, or
|
|
||||||
# online at
|
|
||||||
# http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
#
|
|
||||||
# By copying, modifying or distributing this software, you acknowledge
|
|
||||||
# that you have read and understood your obligations described above,
|
|
||||||
# and agree to abide by those obligations.
|
|
||||||
#
|
|
||||||
# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
|
||||||
# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
|
||||||
# COMPLETENESS OR PERFORMANCE.
|
|
||||||
# $/LicenseInfo$
|
|
||||||
|
|
||||||
|
|
||||||
import errno
|
|
||||||
import getopt
|
|
||||||
import os
|
|
||||||
import random
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import socket
|
|
||||||
import sys
|
|
||||||
import commands
|
|
||||||
import shlex
|
|
||||||
|
|
||||||
class CommandError(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def mkdir(path):
|
|
||||||
try:
|
|
||||||
os.mkdir(path)
|
|
||||||
return path
|
|
||||||
except OSError, err:
|
|
||||||
if err.errno != errno.EEXIST or not os.path.isdir(path):
|
|
||||||
raise
|
|
||||||
|
|
||||||
def prettyprint_path_for_cmake(path):
|
|
||||||
if 'a' <= path[0] <= 'z' and path[1] == ':':
|
|
||||||
# CMake wants DOS drive letters to be in uppercase. The above
|
|
||||||
# condition never asserts on platforms whose full path names
|
|
||||||
# always begin with a slash, so we don't need to test whether
|
|
||||||
# we are running on Windows.
|
|
||||||
path = path[0].upper() + path[1:]
|
|
||||||
return path
|
|
||||||
|
|
||||||
def getcwd():
|
|
||||||
return prettyprint_path_for_cmake(os.getcwd())
|
|
||||||
|
|
||||||
source_indra = prettyprint_path_for_cmake(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
|
|
||||||
def quote(opts):
|
|
||||||
return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"'
|
|
||||||
|
|
||||||
class PlatformSetup(object):
|
|
||||||
generator = None
|
|
||||||
build_types = {}
|
|
||||||
for t in ('Debug', 'Release', 'RelWithDebInfo'):
|
|
||||||
build_types[t.lower()] = t
|
|
||||||
|
|
||||||
build_type = build_types['relwithdebinfo']
|
|
||||||
standalone = 'OFF'
|
|
||||||
unattended = 'OFF'
|
|
||||||
universal = 'OFF'
|
|
||||||
project_name = 'Singularity'
|
|
||||||
distcc = True
|
|
||||||
cmake_opts = []
|
|
||||||
word_size = 32
|
|
||||||
using_express = False
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.script_dir = os.path.realpath(
|
|
||||||
os.path.dirname(__import__(__name__).__file__))
|
|
||||||
|
|
||||||
def os(self):
|
|
||||||
'''Return the name of the OS.'''
|
|
||||||
|
|
||||||
raise NotImplemented('os')
|
|
||||||
|
|
||||||
def arch(self):
|
|
||||||
'''Return the CPU architecture.'''
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
def platform(self):
|
|
||||||
'''Return a stringified two-tuple of the OS name and CPU
|
|
||||||
architecture.'''
|
|
||||||
|
|
||||||
ret = self.os()
|
|
||||||
if self.arch():
|
|
||||||
ret += '-' + self.arch()
|
|
||||||
return ret
|
|
||||||
|
|
||||||
def build_dirs(self):
|
|
||||||
'''Return the top-level directories in which builds occur.
|
|
||||||
This can return more than one directory, e.g. if doing a
|
|
||||||
32-bit viewer and server build on Linux.'''
|
|
||||||
|
|
||||||
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
|
|
||||||
prefix = '../'
|
|
||||||
else:
|
|
||||||
prefix = ''
|
|
||||||
|
|
||||||
return [prefix+'build-' + self.platform()]
|
|
||||||
|
|
||||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
|
||||||
'''Return the command line to run cmake with.'''
|
|
||||||
|
|
||||||
args = dict(
|
|
||||||
dir=src_dir,
|
|
||||||
generator=self.generator,
|
|
||||||
opts=quote(opts),
|
|
||||||
standalone=self.standalone,
|
|
||||||
unattended=self.unattended,
|
|
||||||
word_size=self.word_size,
|
|
||||||
type=self.build_type.upper(),
|
|
||||||
)
|
|
||||||
#if simple:
|
|
||||||
# return 'cmake %(opts)s %(dir)r' % args
|
|
||||||
return ('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
|
|
||||||
'-DSTANDALONE:BOOL=%(standalone)s '
|
|
||||||
'-DUNATTENDED:BOOL=%(unattended)s '
|
|
||||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
|
||||||
'-G %(generator)r %(opts)s %(dir)r' % args)
|
|
||||||
|
|
||||||
def run_cmake(self, args=[]):
|
|
||||||
'''Run cmake.'''
|
|
||||||
|
|
||||||
# do a sanity check to make sure we have a generator
|
|
||||||
if not hasattr(self, 'generator'):
|
|
||||||
raise "No generator available for '%s'" % (self.__name__,)
|
|
||||||
cwd = getcwd()
|
|
||||||
created = []
|
|
||||||
try:
|
|
||||||
for d in self.build_dirs():
|
|
||||||
simple = True
|
|
||||||
if mkdir(d):
|
|
||||||
created.append(d)
|
|
||||||
simple = False
|
|
||||||
try:
|
|
||||||
os.chdir(d)
|
|
||||||
cmd = self.cmake_commandline(source_indra, d, args, simple)
|
|
||||||
print 'Running %r in %r' % (cmd, d)
|
|
||||||
self.run(cmd, 'cmake')
|
|
||||||
finally:
|
|
||||||
os.chdir(cwd)
|
|
||||||
except:
|
|
||||||
# If we created a directory in which to run cmake and
|
|
||||||
# something went wrong, the directory probably just
|
|
||||||
# contains garbage, so delete it.
|
|
||||||
os.chdir(cwd)
|
|
||||||
for d in created:
|
|
||||||
print 'Cleaning %r' % d
|
|
||||||
shutil.rmtree(d)
|
|
||||||
raise
|
|
||||||
|
|
||||||
def parse_build_opts(self, arguments):
|
|
||||||
opts, targets = getopt.getopt(arguments, 'D:o:', ['option='])
|
|
||||||
build_opts = []
|
|
||||||
for o, a in opts:
|
|
||||||
if o in ('-o', '--option'):
|
|
||||||
build_opts.append(a)
|
|
||||||
return build_opts, targets
|
|
||||||
|
|
||||||
def run_build(self, opts, targets):
|
|
||||||
'''Build the default targets for this platform.'''
|
|
||||||
|
|
||||||
raise NotImplemented('run_build')
|
|
||||||
|
|
||||||
def cleanup(self):
|
|
||||||
'''Delete all build directories.'''
|
|
||||||
|
|
||||||
cleaned = 0
|
|
||||||
for d in self.build_dirs():
|
|
||||||
if os.path.isdir(d):
|
|
||||||
print 'Cleaning %r' % d
|
|
||||||
shutil.rmtree(d)
|
|
||||||
cleaned += 1
|
|
||||||
if not cleaned:
|
|
||||||
print 'Nothing to clean up!'
|
|
||||||
|
|
||||||
def is_internal_tree(self):
|
|
||||||
'''Indicate whether we are building in an internal source tree.'''
|
|
||||||
|
|
||||||
return os.path.isdir(os.path.join(self.script_dir, 'newsim'))
|
|
||||||
|
|
||||||
def find_in_path(self, name, defval=None, basename=False):
|
|
||||||
for ext in self.exe_suffixes:
|
|
||||||
name_ext = name + ext
|
|
||||||
if os.sep in name_ext:
|
|
||||||
path = os.path.abspath(name_ext)
|
|
||||||
if os.access(path, os.X_OK):
|
|
||||||
return [basename and os.path.basename(path) or path]
|
|
||||||
for p in os.getenv('PATH', self.search_path).split(os.pathsep):
|
|
||||||
path = os.path.join(p, name_ext)
|
|
||||||
if os.access(path, os.X_OK):
|
|
||||||
return [basename and os.path.basename(path) or path]
|
|
||||||
if defval:
|
|
||||||
return [defval]
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
class UnixSetup(PlatformSetup):
|
|
||||||
'''Generic Unixy build instructions.'''
|
|
||||||
|
|
||||||
search_path = '/usr/bin:/usr/local/bin'
|
|
||||||
exe_suffixes = ('',)
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
PlatformSetup.__init__(self)
|
|
||||||
super(UnixSetup, self).__init__()
|
|
||||||
self.generator = 'Unix Makefiles'
|
|
||||||
|
|
||||||
def os(self):
|
|
||||||
return 'unix'
|
|
||||||
|
|
||||||
def arch(self):
|
|
||||||
cpu = os.uname()[-1]
|
|
||||||
if cpu.endswith('386'):
|
|
||||||
cpu = 'i386'
|
|
||||||
elif cpu.endswith('86'):
|
|
||||||
cpu = 'i686'
|
|
||||||
elif cpu in ('athlon',):
|
|
||||||
cpu = 'i686'
|
|
||||||
elif cpu == 'Power Macintosh':
|
|
||||||
cpu = 'ppc'
|
|
||||||
elif cpu == 'x86_64' and self.word_size == 32:
|
|
||||||
cpu = 'i686'
|
|
||||||
return cpu
|
|
||||||
|
|
||||||
def run(self, command, name=None):
|
|
||||||
'''Run a program. If the program fails, raise an exception.'''
|
|
||||||
ret = os.system(command)
|
|
||||||
if ret:
|
|
||||||
if name is None:
|
|
||||||
name = command.split(None, 1)[0]
|
|
||||||
if os.WIFEXITED(ret):
|
|
||||||
st = os.WEXITSTATUS(ret)
|
|
||||||
if st == 127:
|
|
||||||
event = 'was not found'
|
|
||||||
else:
|
|
||||||
event = 'exited with status %d' % st
|
|
||||||
elif os.WIFSIGNALED(ret):
|
|
||||||
event = 'was killed by signal %d' % os.WTERMSIG(ret)
|
|
||||||
else:
|
|
||||||
event = 'died unexpectedly (!?) with 16-bit status %d' % ret
|
|
||||||
raise CommandError('the command %r %s' %
|
|
||||||
(name, event))
|
|
||||||
|
|
||||||
|
|
||||||
class LinuxSetup(UnixSetup):
|
|
||||||
def __init__(self):
|
|
||||||
UnixSetup.__init__(self)
|
|
||||||
super(LinuxSetup, self).__init__()
|
|
||||||
try:
|
|
||||||
self.debian_sarge = open('/etc/debian_version').read().strip() == '3.1'
|
|
||||||
except:
|
|
||||||
self.debian_sarge = False
|
|
||||||
|
|
||||||
def os(self):
|
|
||||||
return 'linux'
|
|
||||||
|
|
||||||
def build_dirs(self):
|
|
||||||
return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()]
|
|
||||||
|
|
||||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
|
||||||
args = dict(
|
|
||||||
dir=src_dir,
|
|
||||||
generator=self.generator,
|
|
||||||
opts=quote(opts),
|
|
||||||
standalone=self.standalone,
|
|
||||||
unattended=self.unattended,
|
|
||||||
type=self.build_type.upper(),
|
|
||||||
project_name=self.project_name,
|
|
||||||
word_size=self.word_size,
|
|
||||||
cxx="g++"
|
|
||||||
)
|
|
||||||
|
|
||||||
cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
|
|
||||||
'-G %(generator)r -DSTANDALONE:BOOL=%(standalone)s '
|
|
||||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
|
||||||
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
|
|
||||||
'%(opts)s %(dir)r')
|
|
||||||
% args)
|
|
||||||
if 'CXX' not in os.environ:
|
|
||||||
args.update({'cmd':cmd})
|
|
||||||
cmd = ('CXX=%(cxx)r %(cmd)s' % args)
|
|
||||||
return cmd
|
|
||||||
|
|
||||||
def run_build(self, opts, targets):
|
|
||||||
job_count = None
|
|
||||||
|
|
||||||
for i in range(len(opts)):
|
|
||||||
if opts[i].startswith('-j'):
|
|
||||||
try:
|
|
||||||
job_count = int(opts[i][2:])
|
|
||||||
except ValueError:
|
|
||||||
try:
|
|
||||||
job_count = int(opts[i+1])
|
|
||||||
except ValueError:
|
|
||||||
job_count = True
|
|
||||||
|
|
||||||
def get_cpu_count():
|
|
||||||
count = 0
|
|
||||||
for line in open('/proc/cpuinfo'):
|
|
||||||
if re.match(r'processor\s*:', line):
|
|
||||||
count += 1
|
|
||||||
return count
|
|
||||||
|
|
||||||
def localhost():
|
|
||||||
count = get_cpu_count()
|
|
||||||
return 'localhost/' + str(count), count
|
|
||||||
|
|
||||||
def get_distcc_hosts():
|
|
||||||
try:
|
|
||||||
hosts = []
|
|
||||||
name = os.getenv('DISTCC_DIR', '/etc/distcc') + '/hosts'
|
|
||||||
for l in open(name):
|
|
||||||
l = l[l.find('#')+1:].strip()
|
|
||||||
if l: hosts.append(l)
|
|
||||||
return hosts
|
|
||||||
except IOError:
|
|
||||||
return (os.getenv('DISTCC_HOSTS', '').split() or
|
|
||||||
[localhost()[0]])
|
|
||||||
|
|
||||||
def count_distcc_hosts():
|
|
||||||
cpus = 0
|
|
||||||
hosts = 0
|
|
||||||
for host in get_distcc_hosts():
|
|
||||||
m = re.match(r'.*/(\d+)', host)
|
|
||||||
hosts += 1
|
|
||||||
cpus += m and int(m.group(1)) or 1
|
|
||||||
return hosts, cpus
|
|
||||||
|
|
||||||
def mk_distcc_hosts(basename, range, num_cpus):
|
|
||||||
'''Generate a list of LL-internal machines to build on.'''
|
|
||||||
loc_entry, cpus = localhost()
|
|
||||||
hosts = [loc_entry]
|
|
||||||
dead = []
|
|
||||||
stations = [s for s in xrange(range) if s not in dead]
|
|
||||||
random.shuffle(stations)
|
|
||||||
hosts += ['%s%d.lindenlab.com/%d,lzo' % (basename, s, num_cpus) for s in stations]
|
|
||||||
cpus += 2 * len(stations)
|
|
||||||
return ' '.join(hosts), cpus
|
|
||||||
|
|
||||||
if job_count is None:
|
|
||||||
hosts, job_count = count_distcc_hosts()
|
|
||||||
if hosts == 1:
|
|
||||||
hostname = socket.gethostname()
|
|
||||||
if hostname.startswith('station'):
|
|
||||||
hosts, job_count = mk_distcc_hosts('station', 36, 2)
|
|
||||||
os.environ['DISTCC_HOSTS'] = hosts
|
|
||||||
if hostname.startswith('eniac'):
|
|
||||||
hosts, job_count = mk_distcc_hosts('eniac', 71, 2)
|
|
||||||
os.environ['DISTCC_HOSTS'] = hosts
|
|
||||||
if job_count > 4:
|
|
||||||
job_count = 4;
|
|
||||||
opts.extend(['-j', str(job_count)])
|
|
||||||
|
|
||||||
if targets:
|
|
||||||
targets = ' '.join(targets)
|
|
||||||
else:
|
|
||||||
targets = 'all'
|
|
||||||
|
|
||||||
for d in self.build_dirs():
|
|
||||||
cmd = 'make -C %r %s %s' % (d, ' '.join(opts), targets)
|
|
||||||
print 'Running %r' % cmd
|
|
||||||
self.run(cmd)
|
|
||||||
|
|
||||||
|
|
||||||
class DarwinSetup(UnixSetup):
|
|
||||||
def __init__(self):
|
|
||||||
UnixSetup.__init__(self)
|
|
||||||
super(DarwinSetup, self).__init__()
|
|
||||||
self.generator = 'Xcode'
|
|
||||||
|
|
||||||
def os(self):
|
|
||||||
return 'darwin'
|
|
||||||
|
|
||||||
def arch(self):
|
|
||||||
if self.universal == 'ON':
|
|
||||||
return 'universal'
|
|
||||||
else:
|
|
||||||
return UnixSetup.arch(self)
|
|
||||||
|
|
||||||
def build_dirs(self):
|
|
||||||
if(self.generator == 'Xcode'):
|
|
||||||
return PlatformSetup.build_dirs(self)
|
|
||||||
else:
|
|
||||||
return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()]
|
|
||||||
|
|
||||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
|
||||||
args = dict(
|
|
||||||
dir=src_dir,
|
|
||||||
generator=self.generator,
|
|
||||||
opts=quote(opts),
|
|
||||||
standalone=self.standalone,
|
|
||||||
word_size=self.word_size,
|
|
||||||
unattended=self.unattended,
|
|
||||||
project_name=self.project_name,
|
|
||||||
universal='',
|
|
||||||
type='',
|
|
||||||
)
|
|
||||||
if(self.generator != 'Xcode'):
|
|
||||||
args['type'] = '-DCMAKE_BUILD_TYPE=%s' % self.build_type.upper()
|
|
||||||
if self.universal == 'ON':
|
|
||||||
args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\''
|
|
||||||
#if simple:
|
|
||||||
# return 'cmake %(opts)s %(dir)r' % args
|
|
||||||
return ('cmake -G %(generator)r '
|
|
||||||
'%(type)s '
|
|
||||||
'-DSTANDALONE:BOOL=%(standalone)s '
|
|
||||||
'-DUNATTENDED:BOOL=%(unattended)s '
|
|
||||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
|
||||||
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
|
|
||||||
'%(universal)s '
|
|
||||||
'%(opts)s %(dir)r' % args)
|
|
||||||
|
|
||||||
def run_build(self, opts, targets):
|
|
||||||
if(self.generator != 'Xcode'):
|
|
||||||
if targets:
|
|
||||||
targets = ' '.join(targets)
|
|
||||||
else:
|
|
||||||
targets = 'all'
|
|
||||||
|
|
||||||
for d in self.build_dirs():
|
|
||||||
cmd = 'make -C %r %s %s' % (d, ' '.join(opts), targets)
|
|
||||||
print 'Running %r' % cmd
|
|
||||||
self.run(cmd)
|
|
||||||
return
|
|
||||||
|
|
||||||
cwd = getcwd()
|
|
||||||
if targets:
|
|
||||||
targets = ' '.join(['-target ' + repr(t) for t in targets])
|
|
||||||
else:
|
|
||||||
targets = ''
|
|
||||||
cmd = ('xcodebuild -configuration %s %s %s' %
|
|
||||||
(self.build_type, ' '.join(opts), targets))
|
|
||||||
for d in self.build_dirs():
|
|
||||||
try:
|
|
||||||
os.chdir(d)
|
|
||||||
print 'Running %r in %r' % (cmd, d)
|
|
||||||
self.run(cmd)
|
|
||||||
finally:
|
|
||||||
os.chdir(cwd)
|
|
||||||
|
|
||||||
|
|
||||||
class WindowsSetup(PlatformSetup):
|
|
||||||
gens = {
|
|
||||||
'vc100' : {
|
|
||||||
'gen' : r'Visual Studio 10',
|
|
||||||
'ver' : r'10.0'
|
|
||||||
},
|
|
||||||
'vc120' : {
|
|
||||||
'gen' : r'Visual Studio 12',
|
|
||||||
'ver' : r'12.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gens['vs2010'] = gens['vc100']
|
|
||||||
gens['vs2013'] = gens['vc120']
|
|
||||||
|
|
||||||
search_path = r'C:\windows'
|
|
||||||
exe_suffixes = ('.exe', '.bat', '.com')
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
PlatformSetup.__init__(self)
|
|
||||||
super(WindowsSetup, self).__init__()
|
|
||||||
self._generator = None
|
|
||||||
self.incredibuild = False
|
|
||||||
|
|
||||||
def _get_generator(self):
|
|
||||||
if self._generator is None:
|
|
||||||
for version in 'vc100'.split():
|
|
||||||
if self.find_visual_studio(version):
|
|
||||||
self._generator = version
|
|
||||||
print 'Building with ', self.gens[version]['gen']
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
print >> sys.stderr, 'Cannot find a Visual Studio installation, testing for express editions'
|
|
||||||
for version in 'vc100'.split():
|
|
||||||
if self.find_visual_studio_express(version):
|
|
||||||
self._generator = version
|
|
||||||
self.using_express = True
|
|
||||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
for version in 'vc100'.split():
|
|
||||||
if self.find_visual_studio_express_single(version):
|
|
||||||
self._generator = version
|
|
||||||
self.using_express = True
|
|
||||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
|
||||||
sys.exit(1)
|
|
||||||
return self._generator
|
|
||||||
|
|
||||||
def _set_generator(self, gen):
|
|
||||||
self._generator = gen
|
|
||||||
|
|
||||||
generator = property(_get_generator, _set_generator)
|
|
||||||
|
|
||||||
def get_gen_str(self, gen):
|
|
||||||
if gen is None:
|
|
||||||
gen = self._generator
|
|
||||||
return self.gens[gen.lower()]['ver']
|
|
||||||
|
|
||||||
def os(self):
|
|
||||||
return 'win32'
|
|
||||||
|
|
||||||
def build_dirs(self):
|
|
||||||
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
|
|
||||||
prefix = '../'
|
|
||||||
else:
|
|
||||||
prefix = ''
|
|
||||||
|
|
||||||
if self.word_size == 64:
|
|
||||||
return [prefix+'build-' + self.generator + '-Win64']
|
|
||||||
else:
|
|
||||||
return [prefix+'build-' + self.generator]
|
|
||||||
|
|
||||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
|
||||||
args = dict(
|
|
||||||
dir=src_dir,
|
|
||||||
generator=self.gens[self.generator.lower()]['gen'],
|
|
||||||
opts=quote(opts),
|
|
||||||
standalone=self.standalone,
|
|
||||||
unattended=self.unattended,
|
|
||||||
project_name=self.project_name,
|
|
||||||
word_size=self.word_size,
|
|
||||||
)
|
|
||||||
if self.word_size == 64:
|
|
||||||
args["generator"] += r' Win64'
|
|
||||||
|
|
||||||
#if simple:
|
|
||||||
# return 'cmake %(opts)s "%(dir)s"' % args
|
|
||||||
return ('cmake -G "%(generator)s" '
|
|
||||||
'-DSTANDALONE:BOOL=%(standalone)s '
|
|
||||||
'-DUNATTENDED:BOOL=%(unattended)s '
|
|
||||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
|
||||||
'-DROOT_PROJECT_NAME:STRING=\"%(project_name)s\" '
|
|
||||||
'%(opts)s "%(dir)s"' % args)
|
|
||||||
|
|
||||||
def get_HKLM_registry_value(self, key_str, value_str):
|
|
||||||
import _winreg
|
|
||||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
|
|
||||||
key = _winreg.OpenKey(reg, key_str)
|
|
||||||
value = _winreg.QueryValueEx(key, value_str)[0]
|
|
||||||
print 'Found: %s' % value
|
|
||||||
return value
|
|
||||||
|
|
||||||
def find_visual_studio(self, gen=None):
|
|
||||||
gen = self.get_gen_str(gen)
|
|
||||||
value_str = (r'EnvironmentDirectory')
|
|
||||||
key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' %
|
|
||||||
gen)
|
|
||||||
print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' %
|
|
||||||
(key_str, value_str))
|
|
||||||
try:
|
|
||||||
return self.get_HKLM_registry_value(key_str, value_str)
|
|
||||||
except WindowsError, err:
|
|
||||||
key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
|
|
||||||
gen)
|
|
||||||
|
|
||||||
try:
|
|
||||||
return self.get_HKLM_registry_value(key_str, value_str)
|
|
||||||
except:
|
|
||||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def find_msbuild(self, gen=None):
|
|
||||||
gen = self.get_gen_str(gen)
|
|
||||||
|
|
||||||
key_str = (r'SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0')
|
|
||||||
|
|
||||||
print ('Checking MSBuild support for vs ver = %s' % gen)
|
|
||||||
if not self.get_HKLM_registry_value(key_str+'\\'+gen, "VCTargetsPath"):
|
|
||||||
return (None, None)
|
|
||||||
print ('Reading MSBuild location from HKEY_LOCAL_MACHINE\%s\MSBuildToolsPath' %
|
|
||||||
key_str)
|
|
||||||
print key_str
|
|
||||||
try:
|
|
||||||
return (self.get_HKLM_registry_value(key_str, 'MSBuildToolsPath'), gen)
|
|
||||||
except WindowsError, err:
|
|
||||||
key_str = (r'SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\%s' %
|
|
||||||
gen)
|
|
||||||
|
|
||||||
try:
|
|
||||||
return (self.get_HKLM_registry_value(key_str, 'MSBuildToolsPath'), gen)
|
|
||||||
except WindowsError, err:
|
|
||||||
print 'Didn\'t find msbuild'
|
|
||||||
return (None, None)
|
|
||||||
|
|
||||||
def find_visual_studio_express(self, gen=None):
|
|
||||||
gen = self.get_gen_str(gen)
|
|
||||||
try:
|
|
||||||
import _winreg
|
|
||||||
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s\Setup\VC' %
|
|
||||||
gen)
|
|
||||||
value_str = (r'ProductDir')
|
|
||||||
print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' %
|
|
||||||
(key_str, value_str))
|
|
||||||
print key_str
|
|
||||||
|
|
||||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
|
|
||||||
key = _winreg.OpenKey(reg, key_str)
|
|
||||||
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
|
|
||||||
print 'Found: %s' % value
|
|
||||||
return value
|
|
||||||
except WindowsError, err:
|
|
||||||
print >> sys.stderr, "Didn't find ", gen
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def find_visual_studio_express_single(self, gen=None):
|
|
||||||
gen = self.get_gen_str(gen)
|
|
||||||
try:
|
|
||||||
import _winreg
|
|
||||||
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
|
|
||||||
gen)
|
|
||||||
value_str = (r'ProductDir')
|
|
||||||
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
|
|
||||||
(key_str, value_str))
|
|
||||||
print key_str
|
|
||||||
|
|
||||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
|
|
||||||
key = _winreg.OpenKey(reg, key_str)
|
|
||||||
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
|
|
||||||
print 'Found: %s' % value
|
|
||||||
return value
|
|
||||||
except WindowsError, err:
|
|
||||||
print >> sys.stderr, "Didn't find ", gen
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def get_build_cmd(self):
|
|
||||||
if self.incredibuild:
|
|
||||||
config = self.build_type
|
|
||||||
if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]:
|
|
||||||
config = '\"%s|Win32\"' % config
|
|
||||||
|
|
||||||
return "buildconsole \"%s.sln\" /build %s" % (self.project_name, config), None
|
|
||||||
environment = self.find_visual_studio()
|
|
||||||
if environment == '':
|
|
||||||
environment = self.find_visual_studio_express()
|
|
||||||
if environment == '':
|
|
||||||
environment = self.find_visual_studio_express_single()
|
|
||||||
if environment == '':
|
|
||||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
|
||||||
else:
|
|
||||||
build_dirs=self.build_dirs()
|
|
||||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
|
||||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
|
||||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
msbuild_dir, tool_ver = self.find_msbuild()
|
|
||||||
|
|
||||||
if msbuild_dir is not None and tool_ver is not None:
|
|
||||||
return ('\"%smsbuild.exe\" \"%s.sln\" /p:configuration=%s /p:VisualStudioVersion=%s' %
|
|
||||||
(msbuild_dir, self.project_name, self.build_type, tool_ver)), True
|
|
||||||
|
|
||||||
# devenv.com is CLI friendly, devenv.exe... not so much.
|
|
||||||
return ('"%sdevenv.com" \"%s.sln\" /build %s' %
|
|
||||||
(self.find_visual_studio(), self.project_name, self.build_type)), None
|
|
||||||
|
|
||||||
def run(self, command, name=None):
|
|
||||||
'''Run a program. If the program fails, raise an exception.'''
|
|
||||||
ret = os.system('\"'+command+'\"')
|
|
||||||
if ret:
|
|
||||||
if name is None:
|
|
||||||
name = os.path.normpath(shlex.split(command.encode('utf8'),posix=False)[0].strip('"'))
|
|
||||||
|
|
||||||
path = self.find_in_path(name)
|
|
||||||
if not path:
|
|
||||||
ret = 'was not found'
|
|
||||||
else:
|
|
||||||
ret = 'exited with status %d' % ret
|
|
||||||
raise CommandError('the command %r %s' %
|
|
||||||
(name, ret))
|
|
||||||
|
|
||||||
def run_cmake(self, args=[]):
|
|
||||||
'''Override to add the vstool.exe call after running cmake.'''
|
|
||||||
PlatformSetup.run_cmake(self, args)
|
|
||||||
if self.unattended == 'OFF':
|
|
||||||
if self.using_express == False:
|
|
||||||
self.run_vstool()
|
|
||||||
|
|
||||||
def run_vstool(self):
|
|
||||||
for build_dir in self.build_dirs():
|
|
||||||
stamp = os.path.join(build_dir, 'vstool.txt')
|
|
||||||
try:
|
|
||||||
prev_build = open(stamp).read().strip()
|
|
||||||
except IOError:
|
|
||||||
prev_build = ''
|
|
||||||
if prev_build == self.build_type:
|
|
||||||
# Only run vstool if the build type has changed.
|
|
||||||
continue
|
|
||||||
|
|
||||||
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
|
|
||||||
tool_path = os.path.join('tools','vstool','VSTool.exe')
|
|
||||||
else:
|
|
||||||
tool_path = os.path.join('indra','tools','vstool','VSTool.exe')
|
|
||||||
vstool_cmd = (tool_path +
|
|
||||||
' --solution \"' +
|
|
||||||
os.path.join(build_dir,'%s.sln' % self.project_name) +
|
|
||||||
'\" --config ' + self.build_type +
|
|
||||||
' --startup secondlife-bin')
|
|
||||||
print 'Running vstool %r in %r' % (vstool_cmd, getcwd())
|
|
||||||
self.run(vstool_cmd)
|
|
||||||
print >> open(stamp, 'w'), self.build_type
|
|
||||||
|
|
||||||
def run_build(self, opts, targets):
|
|
||||||
cwd = getcwd()
|
|
||||||
build_cmd, msbuild = self.get_build_cmd()
|
|
||||||
|
|
||||||
for d in self.build_dirs():
|
|
||||||
try:
|
|
||||||
os.chdir(d)
|
|
||||||
if targets:
|
|
||||||
if msbuild:
|
|
||||||
cmd = '%s /target:%s %s' % (build_cmd, ';'.join(targets), ' '.join(opts))
|
|
||||||
print 'Running build(targets) %r in %r' % (cmd, d)
|
|
||||||
self.run(cmd)
|
|
||||||
else:
|
|
||||||
for t in targets:
|
|
||||||
cmd = '%s /project %s %s' % (build_cmd, t, ' '.join(opts))
|
|
||||||
print 'Running build(targets) %r in %r' % (cmd, d)
|
|
||||||
self.run(cmd)
|
|
||||||
else:
|
|
||||||
cmd = '%s %s' % (build_cmd, ' '.join(opts))
|
|
||||||
print 'Running build %r in %r' % (cmd, d)
|
|
||||||
self.run(cmd)
|
|
||||||
finally:
|
|
||||||
os.chdir(cwd)
|
|
||||||
|
|
||||||
class CygwinSetup(WindowsSetup):
|
|
||||||
def __init__(self):
|
|
||||||
super(CygwinSetup, self).__init__()
|
|
||||||
self.generator = 'vc80'
|
|
||||||
|
|
||||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
|
||||||
dos_dir = commands.getoutput("cygpath -w %s" % src_dir)
|
|
||||||
args = dict(
|
|
||||||
dir=dos_dir,
|
|
||||||
generator=self.gens[self.generator.lower()]['gen'],
|
|
||||||
opts=quote(opts),
|
|
||||||
standalone=self.standalone,
|
|
||||||
unattended=self.unattended,
|
|
||||||
project_name=self.project_name,
|
|
||||||
word_size=self.word_size,
|
|
||||||
)
|
|
||||||
if self.word_size == 64:
|
|
||||||
args["generator"] += r' Win64'
|
|
||||||
#if simple:
|
|
||||||
# return 'cmake %(opts)s "%(dir)s"' % args
|
|
||||||
return ('cmake -G "%(generator)s" '
|
|
||||||
'-DUNATTENDED:BOOl=%(unattended)s '
|
|
||||||
'-DSTANDALONE:BOOL=%(standalone)s '
|
|
||||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
|
||||||
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
|
|
||||||
'%(opts)s "%(dir)s"' % args)
|
|
||||||
|
|
||||||
setup_platform = {
|
|
||||||
'darwin': DarwinSetup,
|
|
||||||
'linux2': LinuxSetup,
|
|
||||||
'linux3': LinuxSetup,
|
|
||||||
'win32' : WindowsSetup,
|
|
||||||
'cygwin' : CygwinSetup
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
usage_msg = '''
|
|
||||||
Usage: develop.py [options] [command [command-options]]
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h | --help print this help message
|
|
||||||
--standalone build standalone, without Linden prebuild libraries
|
|
||||||
--unattended build unattended, do not invoke any tools requiring
|
|
||||||
a human response
|
|
||||||
--universal build a universal binary on Mac OS X (unsupported)
|
|
||||||
-t | --type=NAME build type ("Debug", "Release", or "RelWithDebInfo")
|
|
||||||
-m32 | -m64 build architecture (32-bit or 64-bit)
|
|
||||||
-N | --no-distcc disable use of distcc
|
|
||||||
-G | --generator=NAME generator name
|
|
||||||
Windows: VC100 (VS2010) (default)
|
|
||||||
Mac OS X: Xcode (default), Unix Makefiles
|
|
||||||
Linux: Unix Makefiles (default), KDevelop3
|
|
||||||
-p | --project=NAME set the root project name. (Doesn't effect makefiles)
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
build configure and build default target
|
|
||||||
clean delete all build directories, does not affect sources
|
|
||||||
configure configure project by running cmake (default if none given)
|
|
||||||
printbuilddirs print the build directory that will be used
|
|
||||||
|
|
||||||
Command-options for "configure":
|
|
||||||
We use cmake variables to change the build configuration.
|
|
||||||
-DPACKAGE:BOOL=ON Create "package" target to make installers
|
|
||||||
-DLL_TESTS:BOOL=OFF Don't generate unit test projects
|
|
||||||
-DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project
|
|
||||||
-DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)
|
|
||||||
-DRELEASE_CRASH_REPORTING:BOOL=ON Enable Google Breakpad crash reporting
|
|
||||||
-DFMODSTUDIO:BOOL=ON Use FMOD Studio audio libraries
|
|
||||||
-DFMODEX:BOOL=ON Use FMOD Ex audio libraries
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
Set up a Visual Studio 2010 project with "package" target:
|
|
||||||
develop.py -G vc100 configure -DPACKAGE:BOOL=ON
|
|
||||||
'''
|
|
||||||
|
|
||||||
def main(arguments):
|
|
||||||
setup = setup_platform[sys.platform]()
|
|
||||||
try:
|
|
||||||
opts, args = getopt.getopt(
|
|
||||||
arguments,
|
|
||||||
'?hNt:p:G:m:',
|
|
||||||
['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=', 'project='])
|
|
||||||
except getopt.GetoptError, err:
|
|
||||||
print >> sys.stderr, 'Error:', err
|
|
||||||
print >> sys.stderr, """
|
|
||||||
Note: You must pass -D options to cmake after the "configure" command
|
|
||||||
For example: develop.py configure -DSERVER:BOOL=OFF"""
|
|
||||||
print >> sys.stderr, usage_msg.strip()
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
for o, a in opts:
|
|
||||||
if o in ('-?', '-h', '--help'):
|
|
||||||
print usage_msg.strip()
|
|
||||||
sys.exit(0)
|
|
||||||
elif o in ('--standalone',):
|
|
||||||
setup.standalone = 'ON'
|
|
||||||
elif o in ('--unattended',):
|
|
||||||
setup.unattended = 'ON'
|
|
||||||
elif o in ('-m',):
|
|
||||||
if a in ('32', '64'):
|
|
||||||
setup.word_size = int(a)
|
|
||||||
else:
|
|
||||||
print >> sys.stderr, 'Error: unknown word size', repr(a)
|
|
||||||
print >> sys.stderr, 'Supported word sizes: 32, 64'
|
|
||||||
sys.exit(1)
|
|
||||||
elif o in ('-t', '--type'):
|
|
||||||
try:
|
|
||||||
setup.build_type = setup.build_types[a.lower()]
|
|
||||||
except KeyError:
|
|
||||||
print >> sys.stderr, 'Error: unknown build type', repr(a)
|
|
||||||
print >> sys.stderr, 'Supported build types:'
|
|
||||||
types = setup.build_types.values()
|
|
||||||
types.sort()
|
|
||||||
for t in types:
|
|
||||||
print ' ', t
|
|
||||||
sys.exit(1)
|
|
||||||
elif o in ('-G', '--generator'):
|
|
||||||
setup.generator = a
|
|
||||||
elif o in ('-N', '--no-distcc'):
|
|
||||||
setup.distcc = False
|
|
||||||
elif o in ('-p', '--project'):
|
|
||||||
setup.project_name = a
|
|
||||||
elif o in ('--incredibuild'):
|
|
||||||
setup.incredibuild = True
|
|
||||||
else:
|
|
||||||
print >> sys.stderr, 'INTERNAL ERROR: unhandled option', repr(o)
|
|
||||||
sys.exit(1)
|
|
||||||
if not args:
|
|
||||||
setup.run_cmake()
|
|
||||||
return
|
|
||||||
try:
|
|
||||||
cmd = args.pop(0)
|
|
||||||
if cmd in ('cmake', 'configure'):
|
|
||||||
setup.run_cmake(args)
|
|
||||||
elif cmd == 'build':
|
|
||||||
if os.getenv('DISTCC_DIR') is None:
|
|
||||||
distcc_dir = os.path.join(getcwd(), '.distcc')
|
|
||||||
if not os.path.exists(distcc_dir):
|
|
||||||
os.mkdir(distcc_dir)
|
|
||||||
print "setting DISTCC_DIR to %s" % distcc_dir
|
|
||||||
os.environ['DISTCC_DIR'] = distcc_dir
|
|
||||||
else:
|
|
||||||
print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR')
|
|
||||||
for d in setup.build_dirs():
|
|
||||||
if not os.path.exists(d):
|
|
||||||
raise CommandError('run "develop.py cmake" first')
|
|
||||||
setup.run_cmake()
|
|
||||||
opts, targets = setup.parse_build_opts(args)
|
|
||||||
setup.run_build(opts, targets)
|
|
||||||
elif cmd == 'clean':
|
|
||||||
if args:
|
|
||||||
raise CommandError('clean takes no arguments')
|
|
||||||
setup.cleanup()
|
|
||||||
elif cmd == 'printbuilddirs':
|
|
||||||
for d in setup.build_dirs():
|
|
||||||
print >> sys.stdout, d
|
|
||||||
else:
|
|
||||||
print >> sys.stderr, 'Error: unknown subcommand', repr(cmd)
|
|
||||||
print >> sys.stderr, "(run 'develop.py --help' for help)"
|
|
||||||
sys.exit(1)
|
|
||||||
except getopt.GetoptError, err:
|
|
||||||
print >> sys.stderr, 'Error with %r subcommand: %s' % (cmd, err)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
try:
|
|
||||||
main(sys.argv[1:])
|
|
||||||
except CommandError, err:
|
|
||||||
print >> sys.stderr, 'Error:', err
|
|
||||||
sys.exit(1)
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file __init__.py
|
|
||||||
@brief Initialization file for the indra.base module.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2007&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
##
|
|
||||||
## $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
|
||||||
## Second Life Viewer Source Code
|
|
||||||
## Copyright (C) 2011, Linden Research, Inc.
|
|
||||||
##
|
|
||||||
## This library is free software; you can redistribute it and/or
|
|
||||||
## modify it under the terms of the GNU Lesser General Public
|
|
||||||
## License as published by the Free Software Foundation;
|
|
||||||
## version 2.1 of the License only.
|
|
||||||
##
|
|
||||||
## This library is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
## Lesser General Public License for more details.
|
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU Lesser General Public
|
|
||||||
## License along with this library; if not, write to the Free Software
|
|
||||||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
##
|
|
||||||
## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
|
||||||
## $/LicenseInfo$
|
|
||||||
from indra.base import llsd, lluuid
|
|
||||||
from datetime import datetime
|
|
||||||
import cllsd
|
|
||||||
import time, sys
|
|
||||||
|
|
||||||
class myint(int):
|
|
||||||
pass
|
|
||||||
|
|
||||||
values = (
|
|
||||||
'&<>',
|
|
||||||
u'\u81acj',
|
|
||||||
llsd.uri('http://foo<'),
|
|
||||||
lluuid.UUID(),
|
|
||||||
llsd.LLSD(['thing']),
|
|
||||||
1,
|
|
||||||
myint(31337),
|
|
||||||
sys.maxint + 10,
|
|
||||||
llsd.binary('foo'),
|
|
||||||
[],
|
|
||||||
{},
|
|
||||||
{u'f&\u1212': 3},
|
|
||||||
3.1,
|
|
||||||
True,
|
|
||||||
None,
|
|
||||||
datetime.fromtimestamp(time.time()),
|
|
||||||
)
|
|
||||||
|
|
||||||
def valuator(values):
|
|
||||||
for v in values:
|
|
||||||
yield v
|
|
||||||
|
|
||||||
longvalues = () # (values, list(values), iter(values), valuator(values))
|
|
||||||
|
|
||||||
for v in values + longvalues:
|
|
||||||
print '%r => %r' % (v, cllsd.llsd_to_xml(v))
|
|
||||||
|
|
||||||
a = [[{'a':3}]] * 1000000
|
|
||||||
|
|
||||||
s = time.time()
|
|
||||||
print hash(cllsd.llsd_to_xml(a))
|
|
||||||
e = time.time()
|
|
||||||
t1 = e - s
|
|
||||||
print t1
|
|
||||||
|
|
||||||
s = time.time()
|
|
||||||
print hash(llsd.LLSDXMLFormatter()._format(a))
|
|
||||||
e = time.time()
|
|
||||||
t2 = e - s
|
|
||||||
print t2
|
|
||||||
|
|
||||||
print 'Speedup:', t2 / t1
|
|
||||||
@@ -1,266 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file config.py
|
|
||||||
@brief Utility module for parsing and accessing the indra.xml config file.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2006&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2006-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import copy
|
|
||||||
import errno
|
|
||||||
import os
|
|
||||||
import traceback
|
|
||||||
import time
|
|
||||||
import types
|
|
||||||
|
|
||||||
from os.path import dirname, getmtime, join, realpath
|
|
||||||
from indra.base import llsd
|
|
||||||
|
|
||||||
_g_config = None
|
|
||||||
|
|
||||||
class IndraConfig(object):
|
|
||||||
"""
|
|
||||||
IndraConfig loads a 'indra' xml configuration file
|
|
||||||
and loads into memory. This representation in memory
|
|
||||||
can get updated to overwrite values or add new values.
|
|
||||||
|
|
||||||
The xml configuration file is considered a live file and changes
|
|
||||||
to the file are checked and reloaded periodically. If a value had
|
|
||||||
been overwritten via the update or set method, the loaded values
|
|
||||||
from the file are ignored (the values from the update/set methods
|
|
||||||
override)
|
|
||||||
"""
|
|
||||||
def __init__(self, indra_config_file):
|
|
||||||
self._indra_config_file = indra_config_file
|
|
||||||
self._reload_check_interval = 30 # seconds
|
|
||||||
self._last_check_time = 0
|
|
||||||
self._last_mod_time = 0
|
|
||||||
|
|
||||||
self._config_overrides = {}
|
|
||||||
self._config_file_dict = {}
|
|
||||||
self._combined_dict = {}
|
|
||||||
|
|
||||||
self._load()
|
|
||||||
|
|
||||||
def _load(self):
|
|
||||||
# if you initialize the IndraConfig with None, no attempt
|
|
||||||
# is made to load any files
|
|
||||||
if self._indra_config_file is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
config_file = open(self._indra_config_file)
|
|
||||||
self._config_file_dict = llsd.parse(config_file.read())
|
|
||||||
self._combine_dictionaries()
|
|
||||||
config_file.close()
|
|
||||||
|
|
||||||
self._last_mod_time = self._get_last_modified_time()
|
|
||||||
self._last_check_time = time.time() # now
|
|
||||||
|
|
||||||
def _get_last_modified_time(self):
|
|
||||||
"""
|
|
||||||
Returns the mtime (last modified time) of the config file,
|
|
||||||
if such exists.
|
|
||||||
"""
|
|
||||||
if self._indra_config_file is not None:
|
|
||||||
return os.path.getmtime(self._indra_config_file)
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def _combine_dictionaries(self):
|
|
||||||
self._combined_dict = {}
|
|
||||||
self._combined_dict.update(self._config_file_dict)
|
|
||||||
self._combined_dict.update(self._config_overrides)
|
|
||||||
|
|
||||||
def _reload_if_necessary(self):
|
|
||||||
now = time.time()
|
|
||||||
|
|
||||||
if (now - self._last_check_time) > self._reload_check_interval:
|
|
||||||
self._last_check_time = now
|
|
||||||
try:
|
|
||||||
modtime = self._get_last_modified_time()
|
|
||||||
if modtime > self._last_mod_time:
|
|
||||||
self._load()
|
|
||||||
except OSError, e:
|
|
||||||
if e.errno == errno.ENOENT: # file not found
|
|
||||||
# someone messed with our internal state
|
|
||||||
# or removed the file
|
|
||||||
|
|
||||||
print 'WARNING: Configuration file has been removed ' + (self._indra_config_file)
|
|
||||||
print 'Disabling reloading of configuration file.'
|
|
||||||
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
self._indra_config_file = None
|
|
||||||
self._last_check_time = 0
|
|
||||||
self._last_mod_time = 0
|
|
||||||
else:
|
|
||||||
raise # pass the exception along to the caller
|
|
||||||
|
|
||||||
def __getitem__(self, key):
|
|
||||||
self._reload_if_necessary()
|
|
||||||
|
|
||||||
return self._combined_dict[key]
|
|
||||||
|
|
||||||
def get(self, key, default = None):
|
|
||||||
try:
|
|
||||||
return self.__getitem__(key)
|
|
||||||
except KeyError:
|
|
||||||
return default
|
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
|
||||||
"""
|
|
||||||
Sets the value of the config setting of key to be newval
|
|
||||||
|
|
||||||
Once any key/value pair is changed via the set method,
|
|
||||||
that key/value pair will remain set with that value until
|
|
||||||
change via the update or set method
|
|
||||||
"""
|
|
||||||
self._config_overrides[key] = value
|
|
||||||
self._combine_dictionaries()
|
|
||||||
|
|
||||||
def set(self, key, newval):
|
|
||||||
return self.__setitem__(key, newval)
|
|
||||||
|
|
||||||
def update(self, new_conf):
|
|
||||||
"""
|
|
||||||
Load an XML file and apply its map as overrides or additions
|
|
||||||
to the existing config. Update can be a file or a dict.
|
|
||||||
|
|
||||||
Once any key/value pair is changed via the update method,
|
|
||||||
that key/value pair will remain set with that value until
|
|
||||||
change via the update or set method
|
|
||||||
"""
|
|
||||||
if isinstance(new_conf, dict):
|
|
||||||
overrides = new_conf
|
|
||||||
else:
|
|
||||||
# assuming that it is a filename
|
|
||||||
config_file = open(new_conf)
|
|
||||||
overrides = llsd.parse(config_file.read())
|
|
||||||
config_file.close()
|
|
||||||
|
|
||||||
self._config_overrides.update(overrides)
|
|
||||||
self._combine_dictionaries()
|
|
||||||
|
|
||||||
def as_dict(self):
|
|
||||||
"""
|
|
||||||
Returns immutable copy of the IndraConfig as a dictionary
|
|
||||||
"""
|
|
||||||
return copy.deepcopy(self._combined_dict)
|
|
||||||
|
|
||||||
def load(config_xml_file = None):
|
|
||||||
global _g_config
|
|
||||||
|
|
||||||
load_default_files = config_xml_file is None
|
|
||||||
if load_default_files:
|
|
||||||
## going from:
|
|
||||||
## "/opt/linden/indra/lib/python/indra/base/config.py"
|
|
||||||
## to:
|
|
||||||
## "/opt/linden/etc/indra.xml"
|
|
||||||
config_xml_file = realpath(
|
|
||||||
dirname(realpath(__file__)) + "../../../../../../etc/indra.xml")
|
|
||||||
|
|
||||||
try:
|
|
||||||
_g_config = IndraConfig(config_xml_file)
|
|
||||||
except IOError:
|
|
||||||
# Failure to load passed in file
|
|
||||||
# or indra.xml default file
|
|
||||||
if load_default_files:
|
|
||||||
try:
|
|
||||||
config_xml_file = realpath(
|
|
||||||
dirname(realpath(__file__)) + "../../../../../../etc/globals.xml")
|
|
||||||
_g_config = IndraConfig(config_xml_file)
|
|
||||||
return
|
|
||||||
except IOError:
|
|
||||||
# Failure to load globals.xml
|
|
||||||
# fall to code below
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Either failed to load passed in file
|
|
||||||
# or failed to load all default files
|
|
||||||
_g_config = IndraConfig(None)
|
|
||||||
|
|
||||||
def dump(indra_xml_file, indra_cfg = None, update_in_mem=False):
|
|
||||||
'''
|
|
||||||
Dump config contents into a file
|
|
||||||
Kindof reverse of load.
|
|
||||||
Optionally takes a new config to dump.
|
|
||||||
Does NOT update global config unless requested.
|
|
||||||
'''
|
|
||||||
global _g_config
|
|
||||||
|
|
||||||
if not indra_cfg:
|
|
||||||
if _g_config is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
indra_cfg = _g_config.as_dict()
|
|
||||||
|
|
||||||
if not indra_cfg:
|
|
||||||
return
|
|
||||||
|
|
||||||
config_file = open(indra_xml_file, 'w')
|
|
||||||
_config_xml = llsd.format_xml(indra_cfg)
|
|
||||||
config_file.write(_config_xml)
|
|
||||||
config_file.close()
|
|
||||||
|
|
||||||
if update_in_mem:
|
|
||||||
update(indra_cfg)
|
|
||||||
|
|
||||||
def update(new_conf):
|
|
||||||
global _g_config
|
|
||||||
|
|
||||||
if _g_config is None:
|
|
||||||
# To keep with how this function behaved
|
|
||||||
# previously, a call to update
|
|
||||||
# before the global is defined
|
|
||||||
# make a new global config which does not
|
|
||||||
# load data from a file.
|
|
||||||
_g_config = IndraConfig(None)
|
|
||||||
|
|
||||||
return _g_config.update(new_conf)
|
|
||||||
|
|
||||||
def get(key, default = None):
|
|
||||||
global _g_config
|
|
||||||
|
|
||||||
if _g_config is None:
|
|
||||||
load()
|
|
||||||
|
|
||||||
return _g_config.get(key, default)
|
|
||||||
|
|
||||||
def set(key, newval):
|
|
||||||
"""
|
|
||||||
Sets the value of the config setting of key to be newval
|
|
||||||
|
|
||||||
Once any key/value pair is changed via the set method,
|
|
||||||
that key/value pair will remain set with that value until
|
|
||||||
change via the update or set method or program termination
|
|
||||||
"""
|
|
||||||
global _g_config
|
|
||||||
|
|
||||||
if _g_config is None:
|
|
||||||
_g_config = IndraConfig(None)
|
|
||||||
|
|
||||||
_g_config.set(key, newval)
|
|
||||||
|
|
||||||
def get_config():
|
|
||||||
global _g_config
|
|
||||||
return _g_config
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,319 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file lluuid.py
|
|
||||||
@brief UUID parser/generator.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2004&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2004-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import random, socket, string, time, re
|
|
||||||
import uuid
|
|
||||||
try:
|
|
||||||
# Python 2.6
|
|
||||||
from hashlib import md5
|
|
||||||
except ImportError:
|
|
||||||
# Python 2.5 and earlier
|
|
||||||
from md5 import new as md5
|
|
||||||
|
|
||||||
def _int2binstr(i,l):
|
|
||||||
s=''
|
|
||||||
for a in range(l):
|
|
||||||
s=chr(i&0xFF)+s
|
|
||||||
i>>=8
|
|
||||||
return s
|
|
||||||
|
|
||||||
def _binstr2int(s):
|
|
||||||
i = long(0)
|
|
||||||
for c in s:
|
|
||||||
i = (i<<8) + ord(c)
|
|
||||||
return i
|
|
||||||
|
|
||||||
class UUID(object):
|
|
||||||
"""
|
|
||||||
A class which represents a 16 byte integer. Stored as a 16 byte 8
|
|
||||||
bit character string.
|
|
||||||
|
|
||||||
The string version is to be of the form:
|
|
||||||
AAAAAAAA-AAAA-BBBB-BBBB-BBBBBBCCCCCC (a 128-bit number in hex)
|
|
||||||
where A=network address, B=timestamp, C=random.
|
|
||||||
"""
|
|
||||||
|
|
||||||
NULL_STR = "00000000-0000-0000-0000-000000000000"
|
|
||||||
|
|
||||||
# the UUIDREGEX_STRING is helpful for parsing UUID's in text
|
|
||||||
hex_wildcard = r"[0-9a-fA-F]"
|
|
||||||
word = hex_wildcard + r"{4,4}-"
|
|
||||||
long_word = hex_wildcard + r"{8,8}-"
|
|
||||||
very_long_word = hex_wildcard + r"{12,12}"
|
|
||||||
UUID_REGEX_STRING = long_word + word + word + word + very_long_word
|
|
||||||
uuid_regex = re.compile(UUID_REGEX_STRING)
|
|
||||||
|
|
||||||
rand = random.Random()
|
|
||||||
ip = ''
|
|
||||||
try:
|
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
|
||||||
except(socket.gaierror, socket.error):
|
|
||||||
# no ip address, so just default to somewhere in 10.x.x.x
|
|
||||||
ip = '10'
|
|
||||||
for i in range(3):
|
|
||||||
ip += '.' + str(rand.randrange(1,254))
|
|
||||||
hexip = ''.join(["%04x" % long(i) for i in ip.split('.')])
|
|
||||||
lastid = ''
|
|
||||||
|
|
||||||
def __init__(self, possible_uuid=None):
|
|
||||||
"""
|
|
||||||
Initialize to first valid UUID in argument (if a string),
|
|
||||||
or to null UUID if none found or argument is not supplied.
|
|
||||||
|
|
||||||
If the argument is a UUID, the constructed object will be a copy of it.
|
|
||||||
"""
|
|
||||||
self._bits = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
||||||
if possible_uuid is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
if isinstance(possible_uuid, type(self)):
|
|
||||||
self.set(possible_uuid)
|
|
||||||
return
|
|
||||||
|
|
||||||
uuid_match = UUID.uuid_regex.search(possible_uuid)
|
|
||||||
if uuid_match:
|
|
||||||
uuid_string = uuid_match.group()
|
|
||||||
s = string.replace(uuid_string, '-', '')
|
|
||||||
self._bits = _int2binstr(string.atol(s[:8],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[8:16],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[16:24],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[24:],16),4)
|
|
||||||
|
|
||||||
def __len__(self):
|
|
||||||
"""
|
|
||||||
Used by the len() builtin.
|
|
||||||
"""
|
|
||||||
return 36
|
|
||||||
|
|
||||||
def __nonzero__(self):
|
|
||||||
return self._bits != "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
uuid_string = self.toString()
|
|
||||||
return uuid_string
|
|
||||||
|
|
||||||
__repr__ = __str__
|
|
||||||
|
|
||||||
def __getitem__(self, index):
|
|
||||||
return str(self)[index]
|
|
||||||
|
|
||||||
def __eq__(self, other):
|
|
||||||
if isinstance(other, (str, unicode)):
|
|
||||||
return other == str(self)
|
|
||||||
return self._bits == getattr(other, '_bits', '')
|
|
||||||
|
|
||||||
def __ne__(self, other):
|
|
||||||
return not self.__eq__(other)
|
|
||||||
|
|
||||||
def __le__(self, other):
|
|
||||||
return self._bits <= other._bits
|
|
||||||
|
|
||||||
def __ge__(self, other):
|
|
||||||
return self._bits >= other._bits
|
|
||||||
|
|
||||||
def __lt__(self, other):
|
|
||||||
return self._bits < other._bits
|
|
||||||
|
|
||||||
def __gt__(self, other):
|
|
||||||
return self._bits > other._bits
|
|
||||||
|
|
||||||
def __hash__(self):
|
|
||||||
return hash(self._bits)
|
|
||||||
|
|
||||||
def set(self, uuid):
|
|
||||||
self._bits = uuid._bits
|
|
||||||
|
|
||||||
def setFromString(self, uuid_string):
|
|
||||||
"""
|
|
||||||
Given a string version of a uuid, set self bits
|
|
||||||
appropriately. Returns self.
|
|
||||||
"""
|
|
||||||
s = string.replace(uuid_string, '-', '')
|
|
||||||
self._bits = _int2binstr(string.atol(s[:8],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[8:16],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[16:24],16),4) + \
|
|
||||||
_int2binstr(string.atol(s[24:],16),4)
|
|
||||||
return self
|
|
||||||
|
|
||||||
def setFromMemoryDump(self, gdb_string):
|
|
||||||
"""
|
|
||||||
We expect to get gdb_string as four hex units. eg:
|
|
||||||
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
|
|
||||||
Which will be translated to:
|
|
||||||
db547d14-1b3f4bc3-9b984f71-d22f890a
|
|
||||||
Returns self.
|
|
||||||
"""
|
|
||||||
s = string.replace(gdb_string, '0x', '')
|
|
||||||
s = string.replace(s, ' ', '')
|
|
||||||
t = ''
|
|
||||||
for i in range(8,40,8):
|
|
||||||
for j in range(0,8,2):
|
|
||||||
t = t + s[i-j-2:i-j]
|
|
||||||
self.setFromString(t)
|
|
||||||
|
|
||||||
def toString(self):
|
|
||||||
"""
|
|
||||||
Return as a string matching the LL standard
|
|
||||||
AAAAAAAA-AAAA-BBBB-BBBB-BBBBBBCCCCCC (a 128-bit number in hex)
|
|
||||||
where A=network address, B=timestamp, C=random.
|
|
||||||
"""
|
|
||||||
return uuid_bits_to_string(self._bits)
|
|
||||||
|
|
||||||
def getAsString(self):
|
|
||||||
"""
|
|
||||||
Return a different string representation of the form
|
|
||||||
AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC (a 128-bit number in hex)
|
|
||||||
where A=network address, B=timestamp, C=random.
|
|
||||||
"""
|
|
||||||
i1 = _binstr2int(self._bits[0:4])
|
|
||||||
i2 = _binstr2int(self._bits[4:8])
|
|
||||||
i3 = _binstr2int(self._bits[8:12])
|
|
||||||
i4 = _binstr2int(self._bits[12:16])
|
|
||||||
return '%08lx-%08lx-%08lx-%08lx' % (i1,i2,i3,i4)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
"""
|
|
||||||
Generate a new uuid. This algorithm is slightly different
|
|
||||||
from c++ implementation for portability reasons.
|
|
||||||
Returns self.
|
|
||||||
"""
|
|
||||||
m = md5()
|
|
||||||
m.update(uuid.uuid1().bytes)
|
|
||||||
self._bits = m.digest()
|
|
||||||
return self
|
|
||||||
|
|
||||||
def isNull(self):
|
|
||||||
"""
|
|
||||||
Returns 1 if the uuid is null - ie, equal to default uuid.
|
|
||||||
"""
|
|
||||||
return (self._bits == "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")
|
|
||||||
|
|
||||||
def xor(self, rhs):
|
|
||||||
"""
|
|
||||||
xors self with rhs.
|
|
||||||
"""
|
|
||||||
v1 = _binstr2int(self._bits[0:4]) ^ _binstr2int(rhs._bits[0:4])
|
|
||||||
v2 = _binstr2int(self._bits[4:8]) ^ _binstr2int(rhs._bits[4:8])
|
|
||||||
v3 = _binstr2int(self._bits[8:12]) ^ _binstr2int(rhs._bits[8:12])
|
|
||||||
v4 = _binstr2int(self._bits[12:16]) ^ _binstr2int(rhs._bits[12:16])
|
|
||||||
self._bits = _int2binstr(v1,4) + \
|
|
||||||
_int2binstr(v2,4) + \
|
|
||||||
_int2binstr(v3,4) + \
|
|
||||||
_int2binstr(v4,4)
|
|
||||||
|
|
||||||
|
|
||||||
# module-level null constant
|
|
||||||
NULL = UUID()
|
|
||||||
|
|
||||||
def printTranslatedMemory(four_hex_uints):
|
|
||||||
"""
|
|
||||||
We expect to get the string as four hex units. eg:
|
|
||||||
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
|
|
||||||
Which will be translated to:
|
|
||||||
db547d14-1b3f4bc3-9b984f71-d22f890a
|
|
||||||
"""
|
|
||||||
uuid = UUID()
|
|
||||||
uuid.setFromMemoryDump(four_hex_uints)
|
|
||||||
print uuid.toString()
|
|
||||||
|
|
||||||
def isUUID(id_str):
|
|
||||||
"""
|
|
||||||
This function returns:
|
|
||||||
- 1 if the string passed is a UUID
|
|
||||||
- 0 is the string passed is not a UUID
|
|
||||||
- None if it neither of the if's below is satisfied
|
|
||||||
"""
|
|
||||||
if not id_str or len(id_str) < 5 or len(id_str) > 36:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if isinstance(id_str, UUID) or UUID.uuid_regex.match(id_str):
|
|
||||||
return 1
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
def isPossiblyID(id_str):
|
|
||||||
"""
|
|
||||||
This function returns 1 if the string passed has some uuid-like
|
|
||||||
characteristics. Otherwise returns 0.
|
|
||||||
"""
|
|
||||||
|
|
||||||
is_uuid = isUUID(id_str)
|
|
||||||
if is_uuid is not None:
|
|
||||||
return is_uuid
|
|
||||||
|
|
||||||
# build a string which matches every character.
|
|
||||||
hex_wildcard = r"[0-9a-fA-F]"
|
|
||||||
chars = len(id_str)
|
|
||||||
next = min(chars, 8)
|
|
||||||
matcher = hex_wildcard+"{"+str(next)+","+str(next)+"}"
|
|
||||||
chars = chars - next
|
|
||||||
if chars > 0:
|
|
||||||
matcher = matcher + "-"
|
|
||||||
chars = chars - 1
|
|
||||||
for block in range(3):
|
|
||||||
next = max(min(chars, 4), 0)
|
|
||||||
if next:
|
|
||||||
matcher = matcher + hex_wildcard+"{"+str(next)+","+str(next)+"}"
|
|
||||||
chars = chars - next
|
|
||||||
if chars > 0:
|
|
||||||
matcher = matcher + "-"
|
|
||||||
chars = chars - 1
|
|
||||||
if chars > 0:
|
|
||||||
next = min(chars, 12)
|
|
||||||
matcher = matcher + hex_wildcard+"{"+str(next)+","+str(next)+"}"
|
|
||||||
#print matcher
|
|
||||||
uuid_matcher = re.compile(matcher)
|
|
||||||
if uuid_matcher.match(id_str):
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def uuid_bits_to_string(bits):
|
|
||||||
i1 = _binstr2int(bits[0:4])
|
|
||||||
i2 = _binstr2int(bits[4:6])
|
|
||||||
i3 = _binstr2int(bits[6:8])
|
|
||||||
i4 = _binstr2int(bits[8:10])
|
|
||||||
i5 = _binstr2int(bits[10:12])
|
|
||||||
i6 = _binstr2int(bits[12:16])
|
|
||||||
return '%08lx-%04lx-%04lx-%04lx-%04lx%08lx' % (i1,i2,i3,i4,i5,i6)
|
|
||||||
|
|
||||||
def uuid_bits_to_uuid(bits):
|
|
||||||
return UUID(uuid_bits_to_string(bits))
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
from mulib import stacked
|
|
||||||
stacked.NoProducer() # just to exercise stacked
|
|
||||||
except:
|
|
||||||
#print "Couldn't import mulib.stacked, not registering UUID converter"
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
def convertUUID(uuid, req):
|
|
||||||
req.write(str(uuid))
|
|
||||||
|
|
||||||
stacked.add_producer(UUID, convertUUID, "*/*")
|
|
||||||
stacked.add_producer(UUID, convertUUID, "text/html")
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file metrics.py
|
|
||||||
@author Phoenix
|
|
||||||
@date 2007-11-27
|
|
||||||
@brief simple interface for logging metrics
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2007&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sys
|
|
||||||
try:
|
|
||||||
import syslog
|
|
||||||
except ImportError:
|
|
||||||
# Windows
|
|
||||||
import sys
|
|
||||||
class syslog(object):
|
|
||||||
# wrap to a lame syslog for windows
|
|
||||||
_logfp = sys.stderr
|
|
||||||
def syslog(msg):
|
|
||||||
_logfp.write(msg)
|
|
||||||
if not msg.endswith('\n'):
|
|
||||||
_logfp.write('\n')
|
|
||||||
syslog = staticmethod(syslog)
|
|
||||||
|
|
||||||
from indra.base.llsd import format_notation
|
|
||||||
|
|
||||||
def record_metrics(table, stats):
|
|
||||||
"Write a standard metrics log"
|
|
||||||
_log("LLMETRICS", table, stats)
|
|
||||||
|
|
||||||
def record_event(table, data):
|
|
||||||
"Write a standard logmessage log"
|
|
||||||
_log("LLLOGMESSAGE", table, data)
|
|
||||||
|
|
||||||
def set_destination(dest):
|
|
||||||
"""Set the destination of metrics logs for this process.
|
|
||||||
|
|
||||||
If you do not call this function prior to calling a logging
|
|
||||||
method, that function will open sys.stdout as a destination.
|
|
||||||
Attempts to set dest to None will throw a RuntimeError.
|
|
||||||
@param dest a file-like object which will be the destination for logs."""
|
|
||||||
if dest is None:
|
|
||||||
raise RuntimeError("Attempt to unset metrics destination.")
|
|
||||||
global _destination
|
|
||||||
_destination = dest
|
|
||||||
|
|
||||||
def destination():
|
|
||||||
"""Get the destination of the metrics logs for this process.
|
|
||||||
Returns None if no destination is set"""
|
|
||||||
global _destination
|
|
||||||
return _destination
|
|
||||||
|
|
||||||
class SysLogger(object):
|
|
||||||
"A file-like object which writes to syslog."
|
|
||||||
def __init__(self, ident='indra', logopt = None, facility = None):
|
|
||||||
try:
|
|
||||||
if logopt is None:
|
|
||||||
logopt = syslog.LOG_CONS | syslog.LOG_PID
|
|
||||||
if facility is None:
|
|
||||||
facility = syslog.LOG_LOCAL0
|
|
||||||
syslog.openlog(ident, logopt, facility)
|
|
||||||
import atexit
|
|
||||||
atexit.register(syslog.closelog)
|
|
||||||
except AttributeError:
|
|
||||||
# No syslog module on Windows
|
|
||||||
pass
|
|
||||||
|
|
||||||
def write(str):
|
|
||||||
syslog.syslog(str)
|
|
||||||
write = staticmethod(write)
|
|
||||||
|
|
||||||
def flush():
|
|
||||||
pass
|
|
||||||
flush = staticmethod(flush)
|
|
||||||
|
|
||||||
#
|
|
||||||
# internal API
|
|
||||||
#
|
|
||||||
_sequence_id = 0
|
|
||||||
_destination = None
|
|
||||||
|
|
||||||
def _next_id():
|
|
||||||
global _sequence_id
|
|
||||||
next = _sequence_id
|
|
||||||
_sequence_id += 1
|
|
||||||
return next
|
|
||||||
|
|
||||||
def _dest():
|
|
||||||
global _destination
|
|
||||||
if _destination is None:
|
|
||||||
# this default behavior is documented in the metrics functions above.
|
|
||||||
_destination = sys.stdout
|
|
||||||
return _destination
|
|
||||||
|
|
||||||
def _log(header, table, data):
|
|
||||||
log_line = "%s (%d) %s %s" \
|
|
||||||
% (header, _next_id(), table, format_notation(data))
|
|
||||||
dest = _dest()
|
|
||||||
dest.write(log_line)
|
|
||||||
dest.flush()
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
warnings.warn("indra.ipc.httputil has been deprecated; use eventlet.httpc instead", DeprecationWarning, 2)
|
|
||||||
|
|
||||||
from eventlet.httpc import *
|
|
||||||
|
|
||||||
|
|
||||||
makeConnection = make_connection
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file llsdhttp.py
|
|
||||||
@brief Functions to ease moving llsd over http
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2006&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2006-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os.path
|
|
||||||
import os
|
|
||||||
import urlparse
|
|
||||||
|
|
||||||
from indra.base import llsd
|
|
||||||
|
|
||||||
from eventlet import httpc
|
|
||||||
|
|
||||||
suite = httpc.HttpSuite(llsd.format_xml, llsd.parse, 'application/llsd+xml')
|
|
||||||
delete = suite.delete
|
|
||||||
delete_ = suite.delete_
|
|
||||||
get = suite.get
|
|
||||||
get_ = suite.get_
|
|
||||||
head = suite.head
|
|
||||||
head_ = suite.head_
|
|
||||||
post = suite.post
|
|
||||||
post_ = suite.post_
|
|
||||||
put = suite.put
|
|
||||||
put_ = suite.put_
|
|
||||||
request = suite.request
|
|
||||||
request_ = suite.request_
|
|
||||||
|
|
||||||
# import every httpc error exception into our namespace for convenience
|
|
||||||
for x in httpc.status_to_error_map.itervalues():
|
|
||||||
globals()[x.__name__] = x
|
|
||||||
ConnectionError = httpc.ConnectionError
|
|
||||||
Retriable = httpc.Retriable
|
|
||||||
|
|
||||||
for x in (httpc.ConnectionError,):
|
|
||||||
globals()[x.__name__] = x
|
|
||||||
|
|
||||||
|
|
||||||
def postFile(url, filename):
|
|
||||||
f = open(filename)
|
|
||||||
body = f.read()
|
|
||||||
f.close()
|
|
||||||
llsd_body = llsd.parse(body)
|
|
||||||
return post_(url, llsd_body)
|
|
||||||
|
|
||||||
|
|
||||||
# deprecated in favor of get_
|
|
||||||
def getStatus(url, use_proxy=False):
|
|
||||||
status, _headers, _body = get_(url, use_proxy=use_proxy)
|
|
||||||
return status
|
|
||||||
|
|
||||||
# deprecated in favor of put_
|
|
||||||
def putStatus(url, data):
|
|
||||||
status, _headers, _body = put_(url, data)
|
|
||||||
return status
|
|
||||||
|
|
||||||
# deprecated in favor of delete_
|
|
||||||
def deleteStatus(url):
|
|
||||||
status, _headers, _body = delete_(url)
|
|
||||||
return status
|
|
||||||
|
|
||||||
# deprecated in favor of post_
|
|
||||||
def postStatus(url, data):
|
|
||||||
status, _headers, _body = post_(url, data)
|
|
||||||
return status
|
|
||||||
|
|
||||||
|
|
||||||
def postFileStatus(url, filename):
|
|
||||||
status, _headers, body = postFile(url, filename)
|
|
||||||
return status, body
|
|
||||||
|
|
||||||
|
|
||||||
def getFromSimulator(path, use_proxy=False):
|
|
||||||
return get('http://' + simulatorHostAndPort + path, use_proxy=use_proxy)
|
|
||||||
|
|
||||||
|
|
||||||
def postToSimulator(path, data=None):
|
|
||||||
return post('http://' + simulatorHostAndPort + path, data)
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file mysql_pool.py
|
|
||||||
@brief Thin wrapper around eventlet.db_pool that chooses MySQLdb and Tpool.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2007&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import MySQLdb
|
|
||||||
from eventlet import db_pool
|
|
||||||
|
|
||||||
class DatabaseConnector(db_pool.DatabaseConnector):
|
|
||||||
def __init__(self, credentials, *args, **kwargs):
|
|
||||||
super(DatabaseConnector, self).__init__(MySQLdb, credentials,
|
|
||||||
conn_pool=db_pool.ConnectionPool,
|
|
||||||
*args, **kwargs)
|
|
||||||
|
|
||||||
# get is extended relative to eventlet.db_pool to accept a port argument
|
|
||||||
def get(self, host, dbname, port=3306):
|
|
||||||
key = (host, dbname, port)
|
|
||||||
if key not in self._databases:
|
|
||||||
new_kwargs = self._kwargs.copy()
|
|
||||||
new_kwargs['db'] = dbname
|
|
||||||
new_kwargs['host'] = host
|
|
||||||
new_kwargs['port'] = port
|
|
||||||
new_kwargs.update(self.credentials_for(host))
|
|
||||||
dbpool = ConnectionPool(*self._args, **new_kwargs)
|
|
||||||
self._databases[key] = dbpool
|
|
||||||
|
|
||||||
return self._databases[key]
|
|
||||||
|
|
||||||
class ConnectionPool(db_pool.TpooledConnectionPool):
|
|
||||||
"""A pool which gives out saranwrapped MySQLdb connections from a pool
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super(ConnectionPool, self).__init__(MySQLdb, *args, **kwargs)
|
|
||||||
|
|
||||||
def get(self):
|
|
||||||
conn = super(ConnectionPool, self).get()
|
|
||||||
# annotate the connection object with the details on the
|
|
||||||
# connection; this is used elsewhere to check that you haven't
|
|
||||||
# suddenly changed databases in midstream while making a
|
|
||||||
# series of queries on a connection.
|
|
||||||
arg_names = ['host','user','passwd','db','port','unix_socket','conv','connect_timeout',
|
|
||||||
'compress', 'named_pipe', 'init_command', 'read_default_file', 'read_default_group',
|
|
||||||
'cursorclass', 'use_unicode', 'charset', 'sql_mode', 'client_flag', 'ssl',
|
|
||||||
'local_infile']
|
|
||||||
# you could have constructed this connectionpool with a mix of
|
|
||||||
# keyword and non-keyword arguments, but we want to annotate
|
|
||||||
# the connection object with a dict so it's easy to check
|
|
||||||
# against so here we are converting the list of non-keyword
|
|
||||||
# arguments (in self._args) into a dict of keyword arguments,
|
|
||||||
# and merging that with the actual keyword arguments
|
|
||||||
# (self._kwargs). The arg_names variable lists the
|
|
||||||
# constructor arguments for MySQLdb Connection objects.
|
|
||||||
converted_kwargs = dict([ (arg_names[i], arg) for i, arg in enumerate(self._args) ])
|
|
||||||
converted_kwargs.update(self._kwargs)
|
|
||||||
conn.connection_parameters = converted_kwargs
|
|
||||||
return conn
|
|
||||||
|
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file russ.py
|
|
||||||
@brief Recursive URL Substitution Syntax helpers
|
|
||||||
@author Phoenix
|
|
||||||
|
|
||||||
Many details on how this should work is available on the wiki:
|
|
||||||
https://wiki.secondlife.com/wiki/Recursive_URL_Substitution_Syntax
|
|
||||||
|
|
||||||
Adding features to this should be reflected in that page in the
|
|
||||||
implementations section.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2007&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
import urllib
|
|
||||||
from indra.ipc import llsdhttp
|
|
||||||
|
|
||||||
class UnbalancedBraces(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class UnknownDirective(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class BadDirective(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def format_value_for_path(value):
|
|
||||||
if type(value) in [list, tuple]:
|
|
||||||
# *NOTE: treat lists as unquoted path components so that the quoting
|
|
||||||
# doesn't get out-of-hand. This is a workaround for the fact that
|
|
||||||
# russ always quotes, even if the data it's given is already quoted,
|
|
||||||
# and it's not safe to simply unquote a path directly, so if we want
|
|
||||||
# russ to substitute urls parts inside other url parts we always
|
|
||||||
# have to do so via lists of unquoted path components.
|
|
||||||
return '/'.join([urllib.quote(str(item)) for item in value])
|
|
||||||
else:
|
|
||||||
return urllib.quote(str(value))
|
|
||||||
|
|
||||||
def format(format_str, context):
|
|
||||||
"""@brief Format format string according to rules for RUSS.
|
|
||||||
@see https://osiris.lindenlab.com/mediawiki/index.php/Recursive_URL_Substitution_Syntax
|
|
||||||
@param format_str The input string to format.
|
|
||||||
@param context A map used for string substitutions.
|
|
||||||
@return Returns the formatted string. If no match, the braces remain intact.
|
|
||||||
"""
|
|
||||||
while True:
|
|
||||||
#print "format_str:", format_str
|
|
||||||
all_matches = _find_sub_matches(format_str)
|
|
||||||
if not all_matches:
|
|
||||||
break
|
|
||||||
substitutions = 0
|
|
||||||
while True:
|
|
||||||
matches = all_matches.pop()
|
|
||||||
# we work from right to left to make sure we do not
|
|
||||||
# invalidate positions earlier in format_str
|
|
||||||
matches.reverse()
|
|
||||||
for pos in matches:
|
|
||||||
# Use index since _find_sub_matches should have raised
|
|
||||||
# an exception, and failure to find now is an exception.
|
|
||||||
end = format_str.index('}', pos)
|
|
||||||
#print "directive:", format_str[pos+1:pos+5]
|
|
||||||
if format_str[pos + 1] == '$':
|
|
||||||
value = context[format_str[pos + 2:end]]
|
|
||||||
if value is not None:
|
|
||||||
value = format_value_for_path(value)
|
|
||||||
elif format_str[pos + 1] == '%':
|
|
||||||
value = _build_query_string(
|
|
||||||
context.get(format_str[pos + 2:end]))
|
|
||||||
elif format_str[pos+1:pos+5] == 'http' or format_str[pos+1:pos+5] == 'file':
|
|
||||||
value = _fetch_url_directive(format_str[pos + 1:end])
|
|
||||||
else:
|
|
||||||
raise UnknownDirective, format_str[pos:end + 1]
|
|
||||||
if value is not None:
|
|
||||||
format_str = format_str[:pos]+str(value)+format_str[end+1:]
|
|
||||||
substitutions += 1
|
|
||||||
|
|
||||||
# If there were any substitutions at this depth, re-parse
|
|
||||||
# since this may have revealed new things to substitute
|
|
||||||
if substitutions:
|
|
||||||
break
|
|
||||||
if not all_matches:
|
|
||||||
break
|
|
||||||
|
|
||||||
# If there were no substitutions at all, and we have exhausted
|
|
||||||
# the possible matches, bail.
|
|
||||||
if not substitutions:
|
|
||||||
break
|
|
||||||
return format_str
|
|
||||||
|
|
||||||
def _find_sub_matches(format_str):
|
|
||||||
"""@brief Find all of the substitution matches.
|
|
||||||
@param format_str the RUSS conformant format string.
|
|
||||||
@return Returns an array of depths of arrays of positional matches in input.
|
|
||||||
"""
|
|
||||||
depth = 0
|
|
||||||
matches = []
|
|
||||||
for pos in range(len(format_str)):
|
|
||||||
if format_str[pos] == '{':
|
|
||||||
depth += 1
|
|
||||||
if not len(matches) == depth:
|
|
||||||
matches.append([])
|
|
||||||
matches[depth - 1].append(pos)
|
|
||||||
continue
|
|
||||||
if format_str[pos] == '}':
|
|
||||||
depth -= 1
|
|
||||||
continue
|
|
||||||
if not depth == 0:
|
|
||||||
raise UnbalancedBraces, format_str
|
|
||||||
return matches
|
|
||||||
|
|
||||||
def _build_query_string(query_dict):
|
|
||||||
"""\
|
|
||||||
@breif given a dict, return a query string. utility wrapper for urllib.
|
|
||||||
@param query_dict input query dict
|
|
||||||
@returns Returns an urlencoded query string including leading '?'.
|
|
||||||
"""
|
|
||||||
if query_dict:
|
|
||||||
keys = query_dict.keys()
|
|
||||||
keys.sort()
|
|
||||||
def stringize(value):
|
|
||||||
if type(value) in (str,unicode):
|
|
||||||
return value
|
|
||||||
else:
|
|
||||||
return str(value)
|
|
||||||
query_list = [urllib.quote(str(key)) + '=' + urllib.quote(stringize(query_dict[key])) for key in keys]
|
|
||||||
return '?' + '&'.join(query_list)
|
|
||||||
else:
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def _fetch_url_directive(directive):
|
|
||||||
"*FIX: This only supports GET"
|
|
||||||
commands = directive.split('|')
|
|
||||||
resource = llsdhttp.get(commands[0])
|
|
||||||
if len(commands) == 3:
|
|
||||||
resource = _walk_resource(resource, commands[2])
|
|
||||||
return resource
|
|
||||||
|
|
||||||
def _walk_resource(resource, path):
|
|
||||||
path = path.split('/')
|
|
||||||
for child in path:
|
|
||||||
if not child:
|
|
||||||
continue
|
|
||||||
resource = resource[child]
|
|
||||||
return resource
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file servicebuilder.py
|
|
||||||
@author Phoenix
|
|
||||||
@brief Class which will generate service urls.
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2007&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2007-2009, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
from indra.base import config
|
|
||||||
from indra.ipc import llsdhttp
|
|
||||||
from indra.ipc import russ
|
|
||||||
|
|
||||||
# *NOTE: agent presence relies on this variable existing and being current, it is a huge hack
|
|
||||||
services_config = {}
|
|
||||||
try:
|
|
||||||
services_config = llsdhttp.get(config.get('services-config'))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
_g_builder = None
|
|
||||||
def _builder():
|
|
||||||
global _g_builder
|
|
||||||
if _g_builder is None:
|
|
||||||
_g_builder = ServiceBuilder()
|
|
||||||
return _g_builder
|
|
||||||
|
|
||||||
def build(name, context={}, **kwargs):
|
|
||||||
""" Convenience method for using a global, singleton, service builder. Pass arguments either via a dict or via python keyword arguments, or both!
|
|
||||||
|
|
||||||
Example use:
|
|
||||||
> context = {'channel':'Second Life Release', 'version':'1.18.2.0'}
|
|
||||||
> servicebuilder.build('version-manager-version', context)
|
|
||||||
'http://int.util.vaak.lindenlab.com/channel/Second%20Life%20Release/1.18.2.0'
|
|
||||||
> servicebuilder.build('version-manager-version', channel='Second Life Release', version='1.18.2.0')
|
|
||||||
'http://int.util.vaak.lindenlab.com/channel/Second%20Life%20Release/1.18.2.0'
|
|
||||||
> servicebuilder.build('version-manager-version', context, version='1.18.1.2')
|
|
||||||
'http://int.util.vaak.lindenlab.com/channel/Second%20Life%20Release/1.18.1.2'
|
|
||||||
"""
|
|
||||||
global _g_builder
|
|
||||||
if _g_builder is None:
|
|
||||||
_g_builder = ServiceBuilder()
|
|
||||||
return _g_builder.buildServiceURL(name, context, **kwargs)
|
|
||||||
|
|
||||||
def build_path(name, context={}, **kwargs):
|
|
||||||
context = context.copy() # shouldn't modify the caller's dictionary
|
|
||||||
context.update(kwargs)
|
|
||||||
return _builder().buildPath(name, context)
|
|
||||||
|
|
||||||
class ServiceBuilder(object):
|
|
||||||
def __init__(self, services_definition = services_config):
|
|
||||||
"""\
|
|
||||||
@brief
|
|
||||||
@brief Create a ServiceBuilder.
|
|
||||||
@param services_definition Complete services definition, services.xml.
|
|
||||||
"""
|
|
||||||
# no need to keep a copy of the services section of the
|
|
||||||
# complete services definition, but it doesn't hurt much.
|
|
||||||
self.services = services_definition['services']
|
|
||||||
self.builders = {}
|
|
||||||
for service in self.services:
|
|
||||||
service_builder = service.get('service-builder')
|
|
||||||
if not service_builder:
|
|
||||||
continue
|
|
||||||
if isinstance(service_builder, dict):
|
|
||||||
# We will be constructing several builders
|
|
||||||
for name, builder in service_builder.iteritems():
|
|
||||||
full_builder_name = service['name'] + '-' + name
|
|
||||||
self.builders[full_builder_name] = builder
|
|
||||||
else:
|
|
||||||
self.builders[service['name']] = service_builder
|
|
||||||
|
|
||||||
def buildPath(self, name, context):
|
|
||||||
"""\
|
|
||||||
@brief given the environment on construction, return a service path.
|
|
||||||
@param name The name of the service.
|
|
||||||
@param context A dict of name value lookups for the service.
|
|
||||||
@returns Returns the
|
|
||||||
"""
|
|
||||||
return russ.format(self.builders[name], context)
|
|
||||||
|
|
||||||
def buildServiceURL(self, name, context={}, **kwargs):
|
|
||||||
"""\
|
|
||||||
@brief given the environment on construction, return a service URL.
|
|
||||||
@param name The name of the service.
|
|
||||||
@param context A dict of name value lookups for the service.
|
|
||||||
@param kwargs Any keyword arguments are treated as members of the
|
|
||||||
context, this allows you to be all 31337 by writing shit like:
|
|
||||||
servicebuilder.build('name', param=value)
|
|
||||||
@returns Returns the
|
|
||||||
"""
|
|
||||||
context = context.copy() # shouldn't modify the caller's dictionary
|
|
||||||
context.update(kwargs)
|
|
||||||
base_url = config.get('services-base-url')
|
|
||||||
svc_path = russ.format(self.builders[name], context)
|
|
||||||
return base_url + svc_path
|
|
||||||
|
|
||||||
|
|
||||||
def on_in(query_name, host_key, schema_key):
|
|
||||||
"""\
|
|
||||||
@brief Constructs an on/in snippet (for running named queries)
|
|
||||||
from a schema name and two keys referencing values stored in
|
|
||||||
indra.xml.
|
|
||||||
|
|
||||||
@param query_name Name of the query.
|
|
||||||
@param host_key Logical name of destination host. Will be
|
|
||||||
looked up in indra.xml.
|
|
||||||
@param schema_key Logical name of destination schema. Will
|
|
||||||
be looked up in indra.xml.
|
|
||||||
"""
|
|
||||||
return "on/config:%s/in/config:%s/%s" % (host_key.strip('/'),
|
|
||||||
schema_key.strip('/'),
|
|
||||||
query_name.lstrip('/'))
|
|
||||||
|
|
||||||
@@ -1,468 +0,0 @@
|
|||||||
"""\
|
|
||||||
@file siesta.py
|
|
||||||
@brief A tiny llsd based RESTful web services framework
|
|
||||||
|
|
||||||
$LicenseInfo:firstyear=2008&license=mit$
|
|
||||||
|
|
||||||
Copyright (c) 2008, Linden Research, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
$/LicenseInfo$
|
|
||||||
"""
|
|
||||||
|
|
||||||
from indra.base import config
|
|
||||||
from indra.base import llsd
|
|
||||||
from webob import exc
|
|
||||||
import webob
|
|
||||||
import re, socket
|
|
||||||
|
|
||||||
try:
|
|
||||||
from cStringIO import StringIO
|
|
||||||
except ImportError:
|
|
||||||
from StringIO import StringIO
|
|
||||||
|
|
||||||
try:
|
|
||||||
import cjson
|
|
||||||
json_decode = cjson.decode
|
|
||||||
json_encode = cjson.encode
|
|
||||||
JsonDecodeError = cjson.DecodeError
|
|
||||||
JsonEncodeError = cjson.EncodeError
|
|
||||||
except ImportError:
|
|
||||||
import simplejson
|
|
||||||
json_decode = simplejson.loads
|
|
||||||
json_encode = simplejson.dumps
|
|
||||||
JsonDecodeError = ValueError
|
|
||||||
JsonEncodeError = TypeError
|
|
||||||
|
|
||||||
|
|
||||||
llsd_parsers = {
|
|
||||||
'application/json': json_decode,
|
|
||||||
llsd.BINARY_MIME_TYPE: llsd.parse_binary,
|
|
||||||
'application/llsd+notation': llsd.parse_notation,
|
|
||||||
llsd.XML_MIME_TYPE: llsd.parse_xml,
|
|
||||||
'application/xml': llsd.parse_xml,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def mime_type(content_type):
|
|
||||||
'''Given a Content-Type header, return only the MIME type.'''
|
|
||||||
|
|
||||||
return content_type.split(';', 1)[0].strip().lower()
|
|
||||||
|
|
||||||
class BodyLLSD(object):
|
|
||||||
'''Give a webob Request or Response an llsd based "content" property.
|
|
||||||
|
|
||||||
Getting the content property parses the body, and caches the result.
|
|
||||||
|
|
||||||
Setting the content property formats a payload, and the body property
|
|
||||||
is set.'''
|
|
||||||
|
|
||||||
def _llsd__get(self):
|
|
||||||
'''Get, set, or delete the LLSD value stored in this object.'''
|
|
||||||
|
|
||||||
try:
|
|
||||||
return self._llsd
|
|
||||||
except AttributeError:
|
|
||||||
if not self.body:
|
|
||||||
raise AttributeError('No llsd attribute has been set')
|
|
||||||
else:
|
|
||||||
mtype = mime_type(self.content_type)
|
|
||||||
try:
|
|
||||||
parser = llsd_parsers[mtype]
|
|
||||||
except KeyError:
|
|
||||||
raise exc.HTTPUnsupportedMediaType(
|
|
||||||
'Content type %s not supported' % mtype).exception
|
|
||||||
try:
|
|
||||||
self._llsd = parser(self.body)
|
|
||||||
except (llsd.LLSDParseError, JsonDecodeError, TypeError), err:
|
|
||||||
raise exc.HTTPBadRequest(
|
|
||||||
'Could not parse body: %r' % err.args).exception
|
|
||||||
return self._llsd
|
|
||||||
|
|
||||||
def _llsd__set(self, val):
|
|
||||||
req = getattr(self, 'request', None)
|
|
||||||
if req is not None:
|
|
||||||
formatter, ctype = formatter_for_request(req)
|
|
||||||
self.content_type = ctype
|
|
||||||
else:
|
|
||||||
formatter, ctype = formatter_for_mime_type(
|
|
||||||
mime_type(self.content_type))
|
|
||||||
self.body = formatter(val)
|
|
||||||
|
|
||||||
def _llsd__del(self):
|
|
||||||
if hasattr(self, '_llsd'):
|
|
||||||
del self._llsd
|
|
||||||
|
|
||||||
content = property(_llsd__get, _llsd__set, _llsd__del)
|
|
||||||
|
|
||||||
|
|
||||||
class Response(webob.Response, BodyLLSD):
|
|
||||||
'''Response class with LLSD support.
|
|
||||||
|
|
||||||
A sensible default content type is used.
|
|
||||||
|
|
||||||
Setting the llsd property also sets the body. Getting the llsd
|
|
||||||
property parses the body if necessary.
|
|
||||||
|
|
||||||
If you set the body property directly, the llsd property will be
|
|
||||||
deleted.'''
|
|
||||||
|
|
||||||
default_content_type = 'application/llsd+xml'
|
|
||||||
|
|
||||||
def _body__set(self, body):
|
|
||||||
if hasattr(self, '_llsd'):
|
|
||||||
del self._llsd
|
|
||||||
super(Response, self)._body__set(body)
|
|
||||||
|
|
||||||
def cache_forever(self):
|
|
||||||
self.cache_expires(86400 * 365)
|
|
||||||
|
|
||||||
body = property(webob.Response._body__get, _body__set,
|
|
||||||
webob.Response._body__del,
|
|
||||||
webob.Response._body__get.__doc__)
|
|
||||||
|
|
||||||
|
|
||||||
class Request(webob.Request, BodyLLSD):
|
|
||||||
'''Request class with LLSD support.
|
|
||||||
|
|
||||||
Sensible content type and accept headers are used by default.
|
|
||||||
|
|
||||||
Setting the content property also sets the body. Getting the content
|
|
||||||
property parses the body if necessary.
|
|
||||||
|
|
||||||
If you set the body property directly, the content property will be
|
|
||||||
deleted.'''
|
|
||||||
|
|
||||||
default_content_type = 'application/llsd+xml'
|
|
||||||
default_accept = ('application/llsd+xml; q=0.5, '
|
|
||||||
'application/llsd+notation; q=0.3, '
|
|
||||||
'application/llsd+binary; q=0.2, '
|
|
||||||
'application/xml; q=0.1, '
|
|
||||||
'application/json; q=0.0')
|
|
||||||
|
|
||||||
def __init__(self, environ=None, *args, **kwargs):
|
|
||||||
if environ is None:
|
|
||||||
environ = {}
|
|
||||||
else:
|
|
||||||
environ = environ.copy()
|
|
||||||
if 'CONTENT_TYPE' not in environ:
|
|
||||||
environ['CONTENT_TYPE'] = self.default_content_type
|
|
||||||
if 'HTTP_ACCEPT' not in environ:
|
|
||||||
environ['HTTP_ACCEPT'] = self.default_accept
|
|
||||||
super(Request, self).__init__(environ, *args, **kwargs)
|
|
||||||
|
|
||||||
def _body__set(self, body):
|
|
||||||
if hasattr(self, '_llsd'):
|
|
||||||
del self._llsd
|
|
||||||
super(Request, self)._body__set(body)
|
|
||||||
|
|
||||||
def path_urljoin(self, *parts):
|
|
||||||
return '/'.join([path_url.rstrip('/')] + list(parts))
|
|
||||||
|
|
||||||
body = property(webob.Request._body__get, _body__set,
|
|
||||||
webob.Request._body__del, webob.Request._body__get.__doc__)
|
|
||||||
|
|
||||||
def create_response(self, content=None, status='200 OK',
|
|
||||||
conditional_response=webob.NoDefault):
|
|
||||||
resp = self.ResponseClass(status=status, request=self,
|
|
||||||
conditional_response=conditional_response)
|
|
||||||
resp.content = content
|
|
||||||
return resp
|
|
||||||
|
|
||||||
def curl(self):
|
|
||||||
'''Create and fill out a pycurl easy object from this request.'''
|
|
||||||
|
|
||||||
import pycurl
|
|
||||||
c = pycurl.Curl()
|
|
||||||
c.setopt(pycurl.URL, self.url())
|
|
||||||
if self.headers:
|
|
||||||
c.setopt(pycurl.HTTPHEADER,
|
|
||||||
['%s: %s' % (k, self.headers[k]) for k in self.headers])
|
|
||||||
c.setopt(pycurl.FOLLOWLOCATION, True)
|
|
||||||
c.setopt(pycurl.AUTOREFERER, True)
|
|
||||||
c.setopt(pycurl.MAXREDIRS, 16)
|
|
||||||
c.setopt(pycurl.NOSIGNAL, True)
|
|
||||||
c.setopt(pycurl.READFUNCTION, self.body_file.read)
|
|
||||||
c.setopt(pycurl.SSL_VERIFYHOST, 2)
|
|
||||||
|
|
||||||
if self.method == 'POST':
|
|
||||||
c.setopt(pycurl.POST, True)
|
|
||||||
post301 = getattr(pycurl, 'POST301', None)
|
|
||||||
if post301 is not None:
|
|
||||||
# Added in libcurl 7.17.1.
|
|
||||||
c.setopt(post301, True)
|
|
||||||
elif self.method == 'PUT':
|
|
||||||
c.setopt(pycurl.PUT, True)
|
|
||||||
elif self.method != 'GET':
|
|
||||||
c.setopt(pycurl.CUSTOMREQUEST, self.method)
|
|
||||||
return c
|
|
||||||
|
|
||||||
Request.ResponseClass = Response
|
|
||||||
Response.RequestClass = Request
|
|
||||||
|
|
||||||
|
|
||||||
llsd_formatters = {
|
|
||||||
'application/json': json_encode,
|
|
||||||
'application/llsd+binary': llsd.format_binary,
|
|
||||||
'application/llsd+notation': llsd.format_notation,
|
|
||||||
'application/llsd+xml': llsd.format_xml,
|
|
||||||
'application/xml': llsd.format_xml,
|
|
||||||
}
|
|
||||||
|
|
||||||
formatter_qualities = (
|
|
||||||
('application/llsd+xml', 1.0),
|
|
||||||
('application/llsd+notation', 0.5),
|
|
||||||
('application/llsd+binary', 0.4),
|
|
||||||
('application/xml', 0.3),
|
|
||||||
('application/json', 0.2),
|
|
||||||
)
|
|
||||||
|
|
||||||
def formatter_for_mime_type(mime_type):
|
|
||||||
'''Return a formatter that encodes to the given MIME type.
|
|
||||||
|
|
||||||
The result is a pair of function and MIME type.'''
|
|
||||||
try:
|
|
||||||
return llsd_formatters[mime_type], mime_type
|
|
||||||
except KeyError:
|
|
||||||
raise exc.HTTPInternalServerError(
|
|
||||||
'Could not use MIME type %r to format response' %
|
|
||||||
mime_type).exception
|
|
||||||
|
|
||||||
|
|
||||||
def formatter_for_request(req):
|
|
||||||
'''Return a formatter that encodes to the preferred type of the client.
|
|
||||||
|
|
||||||
The result is a pair of function and actual MIME type.'''
|
|
||||||
ctype = req.accept.best_match(formatter_qualities)
|
|
||||||
try:
|
|
||||||
return llsd_formatters[ctype], ctype
|
|
||||||
except KeyError:
|
|
||||||
raise exc.HTTPNotAcceptable().exception
|
|
||||||
|
|
||||||
|
|
||||||
def wsgi_adapter(func, environ, start_response):
|
|
||||||
'''Adapt a Siesta callable to act as a WSGI application.'''
|
|
||||||
# Process the request as appropriate.
|
|
||||||
try:
|
|
||||||
req = Request(environ)
|
|
||||||
#print req.urlvars
|
|
||||||
resp = func(req, **req.urlvars)
|
|
||||||
if not isinstance(resp, webob.Response):
|
|
||||||
try:
|
|
||||||
formatter, ctype = formatter_for_request(req)
|
|
||||||
resp = req.ResponseClass(formatter(resp), content_type=ctype)
|
|
||||||
resp._llsd = resp
|
|
||||||
except (JsonEncodeError, TypeError), err:
|
|
||||||
resp = exc.HTTPInternalServerError(
|
|
||||||
detail='Could not format response')
|
|
||||||
except exc.HTTPException, e:
|
|
||||||
resp = e
|
|
||||||
except socket.error, e:
|
|
||||||
resp = exc.HTTPInternalServerError(detail=e.args[1])
|
|
||||||
return resp(environ, start_response)
|
|
||||||
|
|
||||||
|
|
||||||
def llsd_callable(func):
|
|
||||||
'''Turn a callable into a Siesta application.'''
|
|
||||||
|
|
||||||
def replacement(environ, start_response):
|
|
||||||
return wsgi_adapter(func, environ, start_response)
|
|
||||||
|
|
||||||
return replacement
|
|
||||||
|
|
||||||
|
|
||||||
def llsd_method(http_method, func):
|
|
||||||
def replacement(environ, start_response):
|
|
||||||
if environ['REQUEST_METHOD'] == http_method:
|
|
||||||
return wsgi_adapter(func, environ, start_response)
|
|
||||||
return exc.HTTPMethodNotAllowed()(environ, start_response)
|
|
||||||
|
|
||||||
return replacement
|
|
||||||
|
|
||||||
|
|
||||||
http11_methods = 'OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT'.split()
|
|
||||||
http11_methods.sort()
|
|
||||||
|
|
||||||
def llsd_class(cls):
|
|
||||||
'''Turn a class into a Siesta application.
|
|
||||||
|
|
||||||
A new instance is created for each request. A HTTP method FOO is
|
|
||||||
turned into a call to the handle_foo method of the instance.'''
|
|
||||||
|
|
||||||
def foo(req, **kwargs):
|
|
||||||
instance = cls()
|
|
||||||
method = req.method.lower()
|
|
||||||
try:
|
|
||||||
handler = getattr(instance, 'handle_' + method)
|
|
||||||
except AttributeError:
|
|
||||||
allowed = [m for m in http11_methods
|
|
||||||
if hasattr(instance, 'handle_' + m.lower())]
|
|
||||||
raise exc.HTTPMethodNotAllowed(
|
|
||||||
headers={'Allow': ', '.join(allowed)}).exception
|
|
||||||
#print "kwargs: ", kwargs
|
|
||||||
return handler(req, **kwargs)
|
|
||||||
|
|
||||||
def replacement(environ, start_response):
|
|
||||||
return wsgi_adapter(foo, environ, start_response)
|
|
||||||
|
|
||||||
return replacement
|
|
||||||
|
|
||||||
|
|
||||||
def curl(reqs):
|
|
||||||
import pycurl
|
|
||||||
|
|
||||||
m = pycurl.CurlMulti()
|
|
||||||
curls = [r.curl() for r in reqs]
|
|
||||||
io = {}
|
|
||||||
for c in curls:
|
|
||||||
fp = StringIO()
|
|
||||||
hdr = StringIO()
|
|
||||||
c.setopt(pycurl.WRITEFUNCTION, fp.write)
|
|
||||||
c.setopt(pycurl.HEADERFUNCTION, hdr.write)
|
|
||||||
io[id(c)] = fp, hdr
|
|
||||||
m.handles = curls
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
ret, num_handles = m.perform()
|
|
||||||
if ret != pycurl.E_CALL_MULTI_PERFORM:
|
|
||||||
break
|
|
||||||
finally:
|
|
||||||
m.close()
|
|
||||||
|
|
||||||
for req, c in zip(reqs, curls):
|
|
||||||
fp, hdr = io[id(c)]
|
|
||||||
hdr.seek(0)
|
|
||||||
status = hdr.readline().rstrip()
|
|
||||||
headers = []
|
|
||||||
name, values = None, None
|
|
||||||
|
|
||||||
# XXX We don't currently handle bogus header data.
|
|
||||||
|
|
||||||
for line in hdr.readlines():
|
|
||||||
if not line[0].isspace():
|
|
||||||
if name:
|
|
||||||
headers.append((name, ' '.join(values)))
|
|
||||||
name, value = line.strip().split(':', 1)
|
|
||||||
value = [value]
|
|
||||||
else:
|
|
||||||
values.append(line.strip())
|
|
||||||
if name:
|
|
||||||
headers.append((name, ' '.join(values)))
|
|
||||||
|
|
||||||
resp = c.ResponseClass(fp.getvalue(), status, headers, request=req)
|
|
||||||
|
|
||||||
|
|
||||||
route_re = re.compile(r'''
|
|
||||||
\{ # exact character "{"
|
|
||||||
(\w*) # "config" or variable (restricted to a-z, 0-9, _)
|
|
||||||
(?:([:~])([^}]+))? # optional :type or ~regex part
|
|
||||||
\} # exact character "}"
|
|
||||||
''', re.VERBOSE)
|
|
||||||
|
|
||||||
predefined_regexps = {
|
|
||||||
'uuid': r'[a-f0-9][a-f0-9-]{31,35}',
|
|
||||||
'int': r'\d+',
|
|
||||||
'host': r'[a-z0-9][a-z0-9\-\.]*',
|
|
||||||
}
|
|
||||||
|
|
||||||
def compile_route(route):
|
|
||||||
fp = StringIO()
|
|
||||||
last_pos = 0
|
|
||||||
for match in route_re.finditer(route):
|
|
||||||
#print "matches: ", match.groups()
|
|
||||||
fp.write(re.escape(route[last_pos:match.start()]))
|
|
||||||
var_name = match.group(1)
|
|
||||||
sep = match.group(2)
|
|
||||||
expr = match.group(3)
|
|
||||||
if var_name == 'config':
|
|
||||||
expr = re.escape(str(config.get(var_name)))
|
|
||||||
else:
|
|
||||||
if expr:
|
|
||||||
if sep == ':':
|
|
||||||
expr = predefined_regexps[expr]
|
|
||||||
# otherwise, treat what follows '~' as a regexp
|
|
||||||
else:
|
|
||||||
expr = '[^/]+'
|
|
||||||
if var_name != '':
|
|
||||||
expr = '(?P<%s>%s)' % (var_name, expr)
|
|
||||||
else:
|
|
||||||
expr = '(%s)' % (expr,)
|
|
||||||
fp.write(expr)
|
|
||||||
last_pos = match.end()
|
|
||||||
fp.write(re.escape(route[last_pos:]))
|
|
||||||
compiled_route = '^%s$' % fp.getvalue()
|
|
||||||
#print route, "->", compiled_route
|
|
||||||
return compiled_route
|
|
||||||
|
|
||||||
class Router(object):
|
|
||||||
'''WSGI routing class. Parses a URL and hands off a request to
|
|
||||||
some other WSGI application. If no suitable application is found,
|
|
||||||
responds with a 404.'''
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self._new_routes = []
|
|
||||||
self._routes = []
|
|
||||||
self._paths = []
|
|
||||||
|
|
||||||
def add(self, route, app, methods=None):
|
|
||||||
self._new_routes.append((route, app, methods))
|
|
||||||
|
|
||||||
def _create_routes(self):
|
|
||||||
for route, app, methods in self._new_routes:
|
|
||||||
self._paths.append(route)
|
|
||||||
self._routes.append(
|
|
||||||
(re.compile(compile_route(route)),
|
|
||||||
app,
|
|
||||||
methods and dict.fromkeys(methods)))
|
|
||||||
self._new_routes = []
|
|
||||||
|
|
||||||
def __call__(self, environ, start_response):
|
|
||||||
# load up the config from the config file. Only needs to be
|
|
||||||
# done once per interpreter. This is the entry point of all
|
|
||||||
# siesta applications, so this is where we trap it.
|
|
||||||
_conf = config.get_config()
|
|
||||||
if _conf is None:
|
|
||||||
import os.path
|
|
||||||
fname = os.path.join(
|
|
||||||
environ.get('ll.config_dir', '/local/linden/etc'),
|
|
||||||
'indra.xml')
|
|
||||||
config.load(fname)
|
|
||||||
|
|
||||||
# proceed with handling the request
|
|
||||||
self._create_routes()
|
|
||||||
path_info = environ['PATH_INFO']
|
|
||||||
request_method = environ['REQUEST_METHOD']
|
|
||||||
allowed = []
|
|
||||||
for regex, app, methods in self._routes:
|
|
||||||
m = regex.match(path_info)
|
|
||||||
if m:
|
|
||||||
#print "groupdict:",m.groupdict()
|
|
||||||
if not methods or request_method in methods:
|
|
||||||
environ['paste.urlvars'] = m.groupdict()
|
|
||||||
return app(environ, start_response)
|
|
||||||
else:
|
|
||||||
allowed += methods
|
|
||||||
if allowed:
|
|
||||||
allowed = dict.fromkeys(allows).keys()
|
|
||||||
allowed.sort()
|
|
||||||
resp = exc.HTTPMethodNotAllowed(
|
|
||||||
headers={'Allow': ', '.join(allowed)})
|
|
||||||
else:
|
|
||||||
resp = exc.HTTPNotFound()
|
|
||||||
return resp(environ, start_response)
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user