* 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
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 b8ca51fd01.
Fixes#899, which made apparent three issues with how static libraries
are handled in raylib-config.cmake:
- XPREFIX is set before pkg_check_modules, which causes a duplicate
STATIC in variables, e.g. PC_RAYLIB_STATIC_STATIC_.*
- raylib_static is searched for, but no library exists with that name
- raylib_LDFLAGS isn't populated properly
This commit fixes these.
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.
if (${PLATFORM} MATCHES "Desktop")
target_link_libraries(${RAYLIB}_shared glfw ${GLFW_LIBRARIES})
was never true because PLATFORM STREQUAL "PLATFORM_DESKTOP"...
This fixes#551 and makes the changes suggested in #552 (commited as 965cc8ab)
unnecessary.