summaryrefslogtreecommitdiffhomepage
path: root/examples/CMakeLists.txt
AgeCommit message (Collapse)Author
2022-09-02Removed raylib_opengl_interop.c from PLATFORM=Web build (#2682)Stan
2022-08-09Fix #2621: Set CMP0054 policy to NEW and appropriately quote ${PLATFORM} (#2622)archie2x
2022-06-24Fix CMake build on Raspberry Pi OS Bullseye (#2548)Richard Smith
2021-10-12REMOVED: EXAMPLE: models_material_pbrraysan5
2021-09-04new models_magicavoxel_loading example (#1940)procfxgen
* new models_magicavoxel_loading example * Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example. * models_magicavoxel_loading example added to CMakeLists.txt and Makefile * fix models_magicavoxel_loading example for linux. * * vox_loader into "src/external/vox_loader.h" * vox file support for "models.c" * updated example "models/models_magicavoxel_loading.c" * * Fix Vox_FreeArrays (removed memory leak) * * removed magicavoxel_loader.h * * Revert vs2019 solution
2021-01-26Documentation cmake (#1549)hristo
* Documenting the compiler flags * Moved some android compiler flags and added documentation on them too. * Some more restructuring. Removed unnecessary comments that were self described by the code. Added some more explanations around certain parts of CMake and especially around compiler flags.
2021-01-13Big cmake changes (#1514)hristo
* Delete emscripten.cmake This file is not needed at this point. EMSDK provides a toolchain file that has a lot more things in it and is better supported. Project currently works fine with the documentation provided in Emscripten SDK on how to build projects. * First pass file separation. The main two files are cleaner now. Only important things can be seen. Major changes include: - raylib_static is now the alias instead of raylib - Repeating segments are removed and pulled into separate files into <root>/cmake - File is reordered to make more sense - Installs are better structured - Library is build into an output directory "raylib" instead of "src" - All public header files are now set as a public header file - Source files need to be listed (it is a bad practice to capture them using wildcards and file globs) - CMakeLists are better commented * Second pass on the example dirs. They are quite complex so I'm more hesitant to do major changes. Also it works pretty well. Noticed that I forgot one of the seperated files and added it into src/CMakeLists.txt. * Returned the header copy as it was convenient to have the public headers copied. * A better description to the variable RAYLIB_IS_MAIN Co-authored-by: Rob Loach <[email protected]> * Remove debug message Co-authored-by: Rob Loach <[email protected]> * Improvements based on review. * Simplify the install condition to not be platform specific as it was before. Co-authored-by: Alexander Neumann <[email protected]> * Remove some CMAKE variables as they don't affect the build in any way Co-authored-by: Alexander Neumann <[email protected]> Co-authored-by: Rob Loach <[email protected]> Co-authored-by: Alexander Neumann <[email protected]>
2020-12-13Fixed the build for web using CMake. (#1452)hristo
* 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 warning
2020-04-23Fix for building examples with latest emsk (LLVM): remove EMTERPRETIFY, add ↵ivn
ASYNCIFY (#1215)
2020-03-09Revert "Always use latest raylib version for cmake (#1123)" (#1126)Ahmad Fatoum
We didn't use the latest version, but a compatible version, which is established by raylib-config-version.cmake. It's ok to have a minimal version, so revert b7c0d5b6ddfb8fd958803db837e1839ea54f6d37.
2020-03-08Always use latest raylib version for cmake (#1123)G3bE
* Always use latest raylib version * Always use latest raylib version * Always use latest raylib version
2019-11-01Fix generation of web examples (#1007)Pablo Marcos Oltra
At least on Linux, CMake seems to add automatically the '-rdynamic' flag. As a result, Emscripten generates a fat HTML file that does not work. Removing it allows HTML+JS+WASM generation.
2019-07-15Adding solar system examples. (#900)Aldrin Martoq
2019-06-14Remove example from Android buildingRay
2019-05-22Move emscripten web shell to srcRay
2019-05-15examples: CMake: restrict OpenGL deprecation warnings to macOSAhmad Fatoum
2019-05-04examples: CMake: warn once only about macOS OpenGL deprecationAhmad Fatoum
Otherwise compiling rlgl is too spammy. While at it remove the now unneeded CheckIncludeFiles.
2019-05-04examples: CMake: don't build core_loading_thread if no pthreadsAhmad Fatoum
The example requires pthreads and now C11 <stdatomic.h>, thus skip it if either isn't available. This also fixes the current Travis CI build failure for the Windows configuration.
2019-04-28Remove example on Androidraysan5
2019-04-08Avoid example on AndroidRay
2019-01-20cmake: preload resources into web examplesPiotr Balcer
No examples built for the Web platform functioned properly due to lack of resources in the virtual file system provided by emscripten. This patch addresses this problem by adding '--preload-file local_path/resources@resources' emcc option to link flags whenever necessary.
2019-01-20cmake: use ALLOW_MEMORY_GROWTH=1 for web examplesPiotr Balcer
The default memory limit for emscripten applications is 16 mergabytes, which might be to little for some examples, especially given that the resources are also included in that limit. Normally, using this option disables some asm.js optimizations, but there's no such cost for WebAssembly.
2019-01-09Adding basic palette-switching example using uniform arrays.Marco Lizza
2018-12-20Some tweaksRay
2018-12-18Avoid example on Android compilationRay
2018-07-29CMake: include rlgl_standalone in -DBUILD_EXAMPLESAhmad Fatoum
With the recent CMake cleanup, getting raylib's dependencies for use when building rlgl_standalone is quite straight forward, so lets enable it again. Fixes #508, just properly this time. :)
2018-07-29CMake: Major cleanup to support find_package(raylib)Ahmad Fatoum
Remove that link_libraries_to_executable() hack and defines a proper raylib target that can be used with target_link_libraries. The same target is also available for external (user) code by using find_package(raylib). This results in: - Remove hardcoded build directories from examples and games CMakeLists.txt - Allow rlgl_standalone and other special examples to be built easily - Allow CMake projects to find_package(raylib instead of fiddling with pkg-config - Makes code a little more maintainable - Fixes #471, #606. - Makes code less confusing by removing the double use of PLATFORM (#584). Note that this is still not _The Right Way_(TM), because normally raylib-config.cmake (or its includes) would be automatically generated. I didn't manage to get that to work though, so I went the easier route of just wrapping pkg_check_modules for consumption by find_package.
2018-07-25CMake: Don't build rlgl_standalone as part of the examplesAhmad Fatoum
Closes #588.
2018-07-25Fix HTML5 examples and games using CMake (#589)Pablo Marcos Oltra
Mimic the Makefile by outputting html + js instead of LLVM IR.
2018-07-16Reviewed compilation optionsRay
2018-05-21CMake+Android: Skip tests with SetCameraModeAhmad Fatoum
src/core.c does explicitly skip including <camera.h> on Android and tests fail. Therefore skip these failing tests. Closes #507.
2018-05-21Move utils.cmake to separate cmake/ directoryAhmad Fatoum
2018-01-17CMake: build shape and texture examples (#432)kai
2017-11-25Build examples and games on Travis CIAhmad Fatoum
They were disabled because they failed to build, but this patch set fixes the build on Linux and macOS. This doesn't apply to the AppVeyor build on Windows yet; it currently fails at linking with OpenAL.
2017-08-27CMake based build system.ASDF
Some people might find this handly