summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2024-06-07fix: infer CMAKE_MODULE_PATH in super-build (#4042)fruzitent
2024-04-19Revert "Build specific example using -DBUILD_EXAMPLE cmake flag (#3921)" (#3922)Benji
This reverts commit c1fd98591d7996dd45a5ce9ecbb4b571607d417b.
2024-04-17Build specific example using -DBUILD_EXAMPLE cmake flag (#3921)Benji
2024-03-04CMake: Remove USE_WAYLAND option (#3851)Alexandre Almeida
* CMake: Remove USE_WAYLAND option * Consistency fix * Fix oversight
2023-12-15Bump CMake version required to avoid deprecated #3639Ray
2023-11-28Hide unneeded internal symbols when building raylib as an so or dylib (#3573)Peter0x44
2023-11-06[build]: add uninstall cmake target (#3511)Aniket Teredesai
2022-10-02removed glfwSetWindowPos on InitWindow (#2732)Random
* removed glfwSetWindowPos on InitWindow * removed execute permission from CMakeLists
2022-08-09Fix #2621: Set CMP0054 policy to NEW and appropriately quote ${PLATFORM} (#2622)archie2x
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-14Building examples by default only if raylib is standalone. (#1460)hristo
This change only modifies the default value. In cmake you can have raylib as a subdirectory (dependency) and when you have it as dependency you wouldn't probably want to use the example by default. You can still use the option to enable them though.
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-13Remove games from buildingraysan5
2020-04-08Revert "CMake: Don't create symlinks on unsupporting file systems (#539)"Ahmad Fatoum
As noted in #539, the symlink check was to support compiling raylib on VirtualBox vboxfs as no symlinks are supported there. With me using Linux as daily driver outside VirtualBox now, this 'feature' is most likely unused by anyone, but still annoys other users (#791). Just revert it and be done with it. If there are really others building raylib on vboxfs or a similarly crippled file system under Linux, they should now step forward when their build breaks. This reverts commit b8ca51fd01a68b9b6040f8c3c631eedefd7d7735.
2019-05-04Revert "CMake: make unsequenced modifications an error"Ahmad Fatoum
This reverts commit 23c1c0bdb270181c9e176cc67d64d0d03cced356. Because add_if_flag_compiles apparently allows unsequenced even if the compiler doesn't support it..
2019-05-04CMake: make unsequenced modifications an errorAhmad Fatoum
They not only result in discrepancies between different compiler, but trigger undefined behavior. Avoid them by having them break the CMake build and CI.
2019-04-09Fix CMake support on Win32myd7349
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-03Travis CI: Add test case for pkg-configAhmad Fatoum
2018-05-21CMake: Move reusable code to new cmake/ directoryAhmad Fatoum
2018-05-10CMake: Use same message for symlink check and resultAhmad Fatoum
2018-05-10CMake: Don't create symlinks on unsupporting file systems (#539)Ahmad Fatoum
Panders to the idiosyncrasies of my work flow: I have my raylib build directory mounted as a VirtualBox vboxfs for use with my Linux VM, but vboxfs doesn't support symlinks, while raylib shared library versioning on Unix expects symlinks to work. If this happens, library versioning is now disabled on Unix with an error message instead of just failing the build.
2018-03-14Add message warning for msan[email protected]
2018-03-14Add memory sanitizer for better debug[email protected]
2018-02-24jar_xm: Workaround for unaligned pointer accessesAhmad Fatoum
jar_xm.h does some shady pointer casts leading to unaligned accesses and breaking strict aliasing. x86 has special circuitry for doing unaligned accesses, but on other architectures, it may trap and require kernel fix-up or crash outright. With this patch, one obstacle in porting raylib to the GameBoy Advance has been removed. Go for it ;-) To avoid having to rewrite that `mempool' code, insert padding before structs and instruct the compiler (GCC, most importantly), to be gentle when optimizing. This fixes #490 (Unless we got ourselves 256-bit pointers, if so, hello future!)
2018-02-24CMake: Add options to use -fsanitize={address,undefined}Ahmad Fatoum
To make bugs like #485, #486, #487 and #488 easier to find in future.
2018-01-25Make function calls without prior declaration an errorAhmad Fatoum
which is the default behavior on C99 and up.
2018-01-18GCC/Clang: Treat void pointer arithmetic as errorAhmad Fatoum
As an extension, GNU C treats sizeof(void) as 1. MSVC doesn't. Make it an error on GCC/Clang to avoid accidental MSVC breakage.
2017-11-27CMake: Explicitly ask for C99 supportAhmad Fatoum
Otherwise using a compiler that defaults to -std=c89 or -std=gnu89 will fail. Example: http://www.cpantesters.org/cpan/report/abb85066-d283-11e7-9926-b2f4efb9c382 Apparently, -m32 Travis CI build was broken: -m32 was overridden by -std=gnu99. This fixes that.
2017-08-27CMake based build system.ASDF
Some people might find this handly
2016-06-06Move and update CMakeListRay
2016-05-30update to openalJoshua Reisenauer
2016-05-23better build systemJoshua Reisenauer