Skip to content

Commit

Permalink
More tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Dec 11, 2024
1 parent e92e5d7 commit b200beb
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 31 deletions.
4 changes: 2 additions & 2 deletions cmake/yup_audio_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function (yup_audio_plugin)
include (FetchContent)

if (NOT "${yup_platform}" MATCHES "^(emscripten)$")
_yup_fetch_glfw3()
list (APPEND additional_libraries glfw)
_yup_fetch_sdl2()
list (APPEND additional_libraries SDL2-static)

# ==== Fetch plugins SDKS
if (YUP_ARG_PLUGIN_CREATE_CLAP)
Expand Down
20 changes: 0 additions & 20 deletions cmake/yup_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@

#==============================================================================

function (_yup_fetch_glfw3)
FetchContent_Declare (glfw
GIT_REPOSITORY https://github.com/kunitoki/glfw.git
GIT_TAG dev/android_support
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE)

set (GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set (GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set (GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set (GLFW_BUILD_WAYLAND OFF CACHE BOOL "" FORCE)
set (GLFW_INSTALL OFF CACHE STRING "" FORCE)

FetchContent_MakeAvailable (glfw)

set_target_properties (glfw PROPERTIES FOLDER "Thirdparty")
endfunction()

#==============================================================================

function (_yup_fetch_sdl2)
FetchContent_Declare (sdl
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
Expand Down
4 changes: 0 additions & 4 deletions modules/juce_events/juce_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
#include <deque>
#include <mutex>

#elif JUCE_ANDROID
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>

#endif

//==============================================================================
Expand Down
5 changes: 2 additions & 3 deletions modules/yup_graphics/native/yup_GraphicsContext_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
#include "rive/renderer/gl/render_target_gl.hpp"

#if RIVE_DESKTOP_GL || JUCE_ANDROID
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <SDL2/sdl.h>
#endif

namespace yup
Expand Down Expand Up @@ -78,7 +77,7 @@ class LowLevelRenderContextGL : public GraphicsContext
{
#if RIVE_DESKTOP_GL
// Load the OpenGL API using glad.
if (! gladLoadCustomLoader ((GLADloadproc) glfwGetProcAddress))
if (! gladLoadCustomLoader ((GLADloadproc) SDL_GL_GetProcAddress))
{
fprintf (stderr, "Failed to initialize glad.\n");
exit (-1);
Expand Down
2 changes: 1 addition & 1 deletion modules/yup_gui/native/yup_Windowing_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ void Desktop::updateDisplays()

void initialiseYup_Windowing()
{
// Initialise glfw
// Initialise SDL2
if (SDL_Init (SDL_INIT_VIDEO) != 0)
{
DBG ("Error initialising SDL");
Expand Down
1 change: 0 additions & 1 deletion modules/yup_gui/yup_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@
#endif

//==============================================================================
//#include "native/yup_Windowing_glfw.cpp"
#include "native/yup_Windowing_sdl2.cpp"

0 comments on commit b200beb

Please sign in to comment.