Commit 6e79476
authored
Fixed the build for web using CMake. (raysan5#1452)
* Fixed the build for web using CMake.
I found that the build for me was failing and I added some if defined checks in the core.c file where the glfwSetWindowAttrib was used. (error: implicit declaration of function 'glfwSetWindowAttrib' is invalid in C99 [-Werror,-Wimplicit-function-declaration])
I also changed some values in the toolchain file so that it correctly uses the .bat files when on windows.
* Cleaned up the additional variables (they are not important)
* Added more improvements to cmakelists
Added the option to use the system provided Emscripten toolchain to be more uniform with other libraries.
Fixed and issue which prevented example being built from cmake and also building with html extensions properly.
* Fixed ENUM to STRING because of a missed warning1 parent 11ebb54 commit 6e79476
File tree
4 files changed
+39
-9
lines changed- cmake
- examples
- src
4 files changed
+39
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
2 | 12 | | |
3 | | - | |
4 | | - | |
5 | 13 | | |
6 | | - | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | | - | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
| 87 | + | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | | - | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
| 127 | + | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
| 1139 | + | |
1138 | 1140 | | |
1139 | 1141 | | |
1140 | 1142 | | |
1141 | 1143 | | |
1142 | 1144 | | |
| 1145 | + | |
1143 | 1146 | | |
1144 | 1147 | | |
| 1148 | + | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
| |||
1168 | 1172 | | |
1169 | 1173 | | |
1170 | 1174 | | |
| 1175 | + | |
1171 | 1176 | | |
1172 | 1177 | | |
| 1178 | + | |
1173 | 1179 | | |
1174 | 1180 | | |
1175 | 1181 | | |
1176 | 1182 | | |
1177 | 1183 | | |
| 1184 | + | |
1178 | 1185 | | |
1179 | 1186 | | |
| 1187 | + | |
1180 | 1188 | | |
1181 | 1189 | | |
1182 | 1190 | | |
| |||
1234 | 1242 | | |
1235 | 1243 | | |
1236 | 1244 | | |
| 1245 | + | |
1237 | 1246 | | |
1238 | 1247 | | |
| 1248 | + | |
1239 | 1249 | | |
1240 | 1250 | | |
1241 | 1251 | | |
1242 | 1252 | | |
1243 | 1253 | | |
| 1254 | + | |
1244 | 1255 | | |
1245 | 1256 | | |
| 1257 | + | |
1246 | 1258 | | |
1247 | 1259 | | |
1248 | 1260 | | |
| |||
1267 | 1279 | | |
1268 | 1280 | | |
1269 | 1281 | | |
| 1282 | + | |
1270 | 1283 | | |
1271 | 1284 | | |
| 1285 | + | |
1272 | 1286 | | |
1273 | 1287 | | |
1274 | 1288 | | |
1275 | 1289 | | |
1276 | 1290 | | |
| 1291 | + | |
1277 | 1292 | | |
1278 | 1293 | | |
| 1294 | + | |
1279 | 1295 | | |
1280 | 1296 | | |
1281 | 1297 | | |
| |||
0 commit comments