diff options
| author | manuel5975p <[email protected]> | 2024-06-21 09:07:01 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-21 09:07:01 +0200 |
| commit | e7acdd12d8b02617728f11720725ca989fe2390b (patch) | |
| tree | 2274b6c1311afe0077fd05c6a28ac8d9839d18ba | |
| parent | 52f2a10db610d0e9f619fd7c521db08a876547d0 (diff) | |
| download | raylib-e7acdd12d8b02617728f11720725ca989fe2390b.tar.gz raylib-e7acdd12d8b02617728f11720725ca989fe2390b.zip | |
[build] CMake: support OpenGL ES3 in `LibraryConfigurations.cmake` (#4079)
* Allow ES3 in LibraryConfigurations.cmake
* Put FULL_ES3 as linker option
| -rw-r--r-- | cmake/LibraryConfigurations.cmake | 4 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cmake/LibraryConfigurations.cmake b/cmake/LibraryConfigurations.cmake index f6dd4f31..6d2250c7 100644 --- a/cmake/LibraryConfigurations.cmake +++ b/cmake/LibraryConfigurations.cmake @@ -58,7 +58,9 @@ if (${PLATFORM} MATCHES "Desktop") elseif (${PLATFORM} MATCHES "Web") set(PLATFORM_CPP "PLATFORM_WEB") - set(GRAPHICS "GRAPHICS_API_OPENGL_ES2") + if(NOT GRAPHICS) + set(GRAPHICS "GRAPHICS_API_OPENGL_ES2") + endif() set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") elseif (${PLATFORM} MATCHES "Android") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bfb4b05b..4ba1c700 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,9 @@ endif() if (${PLATFORM} MATCHES "Web") target_link_options(raylib PUBLIC "-sUSE_GLFW=3") + if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3") + target_link_options(raylib PUBLIC "-sFULL_ES3=1") + endif() endif() set_target_properties(raylib PROPERTIES |
