From bdda1a3ccdde8c09a8513c5d1d1aaf270c1bbe0a Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 27 May 2021 16:03:27 -0400 Subject: [PATCH] Remove SDL from DEPS (and SDL example that used it) Change-Id: Ia18badfdd174015b67ce09ae3ec3180df0481710 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413378 Commit-Queue: Brian Osman Reviewed-by: Jim Van Verth --- BUILD.gn | 12 - DEPS | 1 - example/SkiaSDLExample.cpp | 294 ------------------------ infra/bots/tasks.json | 3 +- third_party/libsdl/BUILD.gn | 237 ------------------- third_party/libsdl/SDL_config_premake.h | 16 -- 6 files changed, 2 insertions(+), 561 deletions(-) delete mode 100644 example/SkiaSDLExample.cpp delete mode 100644 third_party/libsdl/BUILD.gn delete mode 100644 third_party/libsdl/SDL_config_premake.h diff --git a/BUILD.gn b/BUILD.gn index a95d37f264..e7ee824b20 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2817,18 +2817,6 @@ if (skia_enable_tools) { } } - if (skia_use_gl && (is_linux || is_mac || is_ios)) { - test_app("SkiaSDLExample") { - sources = [ "example/SkiaSDLExample.cpp" ] - libs = [] - deps = [ - ":gpu_tool_utils", - ":skia", - "//third_party/libsdl", - ] - } - } - if (skia_qt_path != "" && (is_win || is_linux || is_mac)) { action_foreach("generate_mocs") { script = "gn/call.py" diff --git a/DEPS b/DEPS index 56fb54666d..0e4c031cbd 100644 --- a/DEPS +++ b/DEPS @@ -36,7 +36,6 @@ deps = { "third_party/externals/oboe" : "https://chromium.googlesource.com/external/github.com/google/oboe.git@b02a12d1dd821118763debec6b83d00a8a0ee419", "third_party/externals/opengl-registry" : "https://skia.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry@14b80ebeab022b2c78f84a573f01028c96075553", "third_party/externals/piex" : "https://android.googlesource.com/platform/external/piex.git@bb217acdca1cc0c16b704669dd6f91a1b509c406", - "third_party/externals/sdl" : "https://skia.googlesource.com/third_party/sdl@5d7cfcca344034aff9327f77fc181ae3754e7a90", "third_party/externals/sfntly" : "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git@b55ff303ea2f9e26702b514cf6a3196a2e3e2974", "third_party/externals/spirv-cross" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross@bdbef7b1f3982fe99a62d076043036abe6dd6d80", "third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@bcf55210f13a4fa3c3d0963b509ff1070e434c79", diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp deleted file mode 100644 index 793416fa53..0000000000 --- a/example/SkiaSDLExample.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - */ - -#include "include/gpu/GrBackendSurface.h" -#include "include/gpu/GrDirectContext.h" -#include "SDL.h" -#include "include/core/SkCanvas.h" -#include "include/core/SkFont.h" -#include "include/core/SkSurface.h" -#include "include/utils/SkRandom.h" - -#include "include/gpu/gl/GrGLInterface.h" -#include "src/gpu/gl/GrGLUtil.h" - -#if defined(SK_BUILD_FOR_ANDROID) -#include -#elif defined(SK_BUILD_FOR_UNIX) -#include -#elif defined(SK_BUILD_FOR_MAC) -#include -#elif defined(SK_BUILD_FOR_IOS) -#include -#endif - -/* - * This application is a simple example of how to combine SDL and Skia it demonstrates: - * how to setup gpu rendering to the main window - * how to perform cpu-side rendering and draw the result to the gpu-backed screen - * draw simple primitives (rectangles) - * draw more complex primitives (star) - */ - -struct ApplicationState { - ApplicationState() : fQuit(false) {} - // Storage for the user created rectangles. The last one may still be being edited. - SkTArray fRects; - bool fQuit; -}; - -static void handle_error() { - const char* error = SDL_GetError(); - SkDebugf("SDL Error: %s\n", error); - SDL_ClearError(); -} - -static void handle_events(ApplicationState* state, SkCanvas* canvas) { - SDL_Event event; - while(SDL_PollEvent(&event)) { - switch (event.type) { - case SDL_MOUSEMOTION: - if (event.motion.state == SDL_PRESSED) { - SkRect& rect = state->fRects.back(); - rect.fRight = event.motion.x; - rect.fBottom = event.motion.y; - } - break; - case SDL_MOUSEBUTTONDOWN: - if (event.button.state == SDL_PRESSED) { - state->fRects.push_back() = SkRect::MakeLTRB(SkIntToScalar(event.button.x), - SkIntToScalar(event.button.y), - SkIntToScalar(event.button.x), - SkIntToScalar(event.button.y)); - } - break; - case SDL_KEYDOWN: { - SDL_Keycode key = event.key.keysym.sym; - if (key == SDLK_ESCAPE) { - state->fQuit = true; - } - break; - } - case SDL_QUIT: - state->fQuit = true; - break; - default: - break; - } - } -} - -// Creates a star type shape using a SkPath -static SkPath create_star() { - static const int kNumPoints = 5; - SkPath concavePath; - SkPoint points[kNumPoints] = {{0, SkIntToScalar(-50)} }; - SkMatrix rot; - rot.setRotate(SkIntToScalar(360) / kNumPoints); - for (int i = 1; i < kNumPoints; ++i) { - rot.mapPoints(points + i, points + i - 1, 1); - } - concavePath.moveTo(points[0]); - for (int i = 0; i < kNumPoints; ++i) { - concavePath.lineTo(points[(2 * i) % kNumPoints]); - } - concavePath.setFillType(SkPathFillType::kEvenOdd); - SkASSERT(!concavePath.isConvex()); - concavePath.close(); - return concavePath; -} - -#if defined(SK_BUILD_FOR_ANDROID) -int SDL_main(int argc, char** argv) { -#else -int main(int argc, char** argv) { -#endif - uint32_t windowFlags = 0; - - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); - - SDL_GLContext glContext = nullptr; -#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS) - // For Android/iOS we need to set up for OpenGL ES and we make the window hi res & full screen - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | - SDL_WINDOW_BORDERLESS | SDL_WINDOW_FULLSCREEN_DESKTOP | - SDL_WINDOW_ALLOW_HIGHDPI; -#else - // For all other clients we use the core profile and operate in a window - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); - - windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE; -#endif - static const int kStencilBits = 8; // Skia needs 8 stencil bits - SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); - SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); - SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); - SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); - SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, kStencilBits); - - SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); - - // If you want multisampling, uncomment the below lines and set a sample count - static const int kMsaaSampleCount = 0; //4; - // SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); - // SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, kMsaaSampleCount); - - /* - * In a real application you might want to initialize more subsystems - */ - if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) != 0) { - handle_error(); - return 1; - } - - // Setup window - // This code will create a window with the same resolution as the user's desktop. - SDL_DisplayMode dm; - if (SDL_GetDesktopDisplayMode(0, &dm) != 0) { - handle_error(); - return 1; - } - - SDL_Window* window = SDL_CreateWindow("SDL Window", SDL_WINDOWPOS_CENTERED, - SDL_WINDOWPOS_CENTERED, dm.w, dm.h, windowFlags); - - if (!window) { - handle_error(); - return 1; - } - - // To go fullscreen - // SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); - - // try and setup a GL context - glContext = SDL_GL_CreateContext(window); - if (!glContext) { - handle_error(); - return 1; - } - - int success = SDL_GL_MakeCurrent(window, glContext); - if (success != 0) { - handle_error(); - return success; - } - - uint32_t windowFormat = SDL_GetWindowPixelFormat(window); - int contextType; - SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &contextType); - - - int dw, dh; - SDL_GL_GetDrawableSize(window, &dw, &dh); - - glViewport(0, 0, dw, dh); - glClearColor(1, 1, 1, 1); - glClearStencil(0); - glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - - // setup GrContext - auto interface = GrGLMakeNativeInterface(); - - // setup contexts - sk_sp grContext(GrDirectContext::MakeGL(interface)); - SkASSERT(grContext); - - // Wrap the frame buffer object attached to the screen in a Skia render target so Skia can - // render to it - GrGLint buffer; - GR_GL_GetIntegerv(interface.get(), GR_GL_FRAMEBUFFER_BINDING, &buffer); - GrGLFramebufferInfo info; - info.fFBOID = (GrGLuint) buffer; - SkColorType colorType; - - //SkDebugf("%s", SDL_GetPixelFormatName(windowFormat)); - // TODO: the windowFormat is never any of these? - if (SDL_PIXELFORMAT_RGBA8888 == windowFormat) { - info.fFormat = GR_GL_RGBA8; - colorType = kRGBA_8888_SkColorType; - } else { - colorType = kBGRA_8888_SkColorType; - if (SDL_GL_CONTEXT_PROFILE_ES == contextType) { - info.fFormat = GR_GL_BGRA8; - } else { - // We assume the internal format is RGBA8 on desktop GL - info.fFormat = GR_GL_RGBA8; - } - } - - GrBackendRenderTarget target(dw, dh, kMsaaSampleCount, kStencilBits, info); - - // setup SkSurface - // To use distance field text, use commented out SkSurfaceProps instead - // SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag, - // SkSurfaceProps::kUnknown_SkPixelGeometry); - SkSurfaceProps props; - - sk_sp surface(SkSurface::MakeFromBackendRenderTarget(grContext.get(), target, - kBottomLeft_GrSurfaceOrigin, - colorType, nullptr, &props)); - - SkCanvas* canvas = surface->getCanvas(); - canvas->scale((float)dw/dm.w, (float)dh/dm.h); - - ApplicationState state; - - const char* helpMessage = "Click and drag to create rects. Press esc to quit."; - - SkPaint paint; - - // create a surface for CPU rasterization - sk_sp cpuSurface(SkSurface::MakeRaster(canvas->imageInfo())); - - SkCanvas* offscreen = cpuSurface->getCanvas(); - offscreen->save(); - offscreen->translate(50.0f, 50.0f); - offscreen->drawPath(create_star(), paint); - offscreen->restore(); - - sk_sp image = cpuSurface->makeImageSnapshot(); - - int rotation = 0; - SkFont font; - while (!state.fQuit) { // Our application loop - SkRandom rand; - canvas->clear(SK_ColorWHITE); - handle_events(&state, canvas); - - paint.setColor(SK_ColorBLACK); - canvas->drawString(helpMessage, 100.0f, 100.0f, font, paint); - for (int i = 0; i < state.fRects.count(); i++) { - paint.setColor(rand.nextU() | 0x44808080); - canvas->drawRect(state.fRects[i], paint); - } - - // draw offscreen canvas - canvas->save(); - canvas->translate(dm.w / 2.0, dm.h / 2.0); - canvas->rotate(rotation++); - canvas->drawImage(image, -50.0f, -50.0f); - canvas->restore(); - - canvas->flush(); - SDL_GL_SwapWindow(window); - } - - if (glContext) { - SDL_GL_DeleteContext(glContext); - } - - //Destroy window - SDL_DestroyWindow(window); - - //Quit SDL subsystems - SDL_Quit(); - return 0; -} diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 25717bc0b4..92dda0aca8 100755 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -66926,7 +66926,8 @@ "skia/client_utils/android", "skia/dm", "skia/docs/examples", - "skia/example", + "skia/example/HelloWorld.cpp", + "skia/example/HelloWorld.h", "skia/experimental", "skia/fuzz", "skia/gm", diff --git a/third_party/libsdl/BUILD.gn b/third_party/libsdl/BUILD.gn deleted file mode 100644 index 731e4ec87c..0000000000 --- a/third_party/libsdl/BUILD.gn +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -declare_args() { -} - -import("../third_party.gni") - -third_party("libsdl") { - public_include_dirs = [ "../externals/sdl/include" ] - - include_dirs = [ "." ] - sources = [ - "../externals/sdl/src/SDL.c", - "../externals/sdl/src/SDL_assert.c", - "../externals/sdl/src/SDL_error.c", - "../externals/sdl/src/SDL_hints.c", - "../externals/sdl/src/SDL_log.c", - "../externals/sdl/src/atomic/SDL_atomic.c", - "../externals/sdl/src/atomic/SDL_spinlock.c", - "../externals/sdl/src/audio/SDL_audio.c", - "../externals/sdl/src/audio/SDL_audiocvt.c", - "../externals/sdl/src/audio/SDL_audiodev.c", - "../externals/sdl/src/audio/SDL_audiotypecvt.c", - "../externals/sdl/src/audio/SDL_mixer.c", - "../externals/sdl/src/audio/SDL_wave.c", - "../externals/sdl/src/cpuinfo/SDL_cpuinfo.c", - "../externals/sdl/src/dynapi/SDL_dynapi.c", - "../externals/sdl/src/events/SDL_clipboardevents.c", - "../externals/sdl/src/events/SDL_dropevents.c", - "../externals/sdl/src/events/SDL_events.c", - "../externals/sdl/src/events/SDL_gesture.c", - "../externals/sdl/src/events/SDL_keyboard.c", - "../externals/sdl/src/events/SDL_mouse.c", - "../externals/sdl/src/events/SDL_quit.c", - "../externals/sdl/src/events/SDL_touch.c", - "../externals/sdl/src/events/SDL_windowevents.c", - "../externals/sdl/src/file/SDL_rwops.c", - "../externals/sdl/src/haptic/SDL_haptic.c", - "../externals/sdl/src/haptic/dummy/SDL_syshaptic.c", - "../externals/sdl/src/joystick/SDL_gamecontroller.c", - "../externals/sdl/src/joystick/SDL_joystick.c", - "../externals/sdl/src/joystick/dummy/SDL_sysjoystick.c", - "../externals/sdl/src/power/SDL_power.c", - "../externals/sdl/src/render/SDL_render.c", - "../externals/sdl/src/render/SDL_yuv_sw.c", - "../externals/sdl/src/render/software/SDL_blendfillrect.c", - "../externals/sdl/src/render/software/SDL_blendline.c", - "../externals/sdl/src/render/software/SDL_blendpoint.c", - "../externals/sdl/src/render/software/SDL_drawline.c", - "../externals/sdl/src/render/software/SDL_drawpoint.c", - "../externals/sdl/src/render/software/SDL_render_sw.c", - "../externals/sdl/src/render/software/SDL_rotate.c", - "../externals/sdl/src/stdlib/SDL_getenv.c", - "../externals/sdl/src/stdlib/SDL_iconv.c", - "../externals/sdl/src/stdlib/SDL_malloc.c", - "../externals/sdl/src/stdlib/SDL_qsort.c", - "../externals/sdl/src/stdlib/SDL_stdlib.c", - "../externals/sdl/src/stdlib/SDL_string.c", - "../externals/sdl/src/thread/SDL_thread.c", - "../externals/sdl/src/timer/SDL_timer.c", - "../externals/sdl/src/video/SDL_RLEaccel.c", - "../externals/sdl/src/video/SDL_blit.c", - "../externals/sdl/src/video/SDL_blit_0.c", - "../externals/sdl/src/video/SDL_blit_1.c", - "../externals/sdl/src/video/SDL_blit_A.c", - "../externals/sdl/src/video/SDL_blit_N.c", - "../externals/sdl/src/video/SDL_blit_auto.c", - "../externals/sdl/src/video/SDL_blit_copy.c", - "../externals/sdl/src/video/SDL_blit_slow.c", - "../externals/sdl/src/video/SDL_bmp.c", - "../externals/sdl/src/video/SDL_clipboard.c", - "../externals/sdl/src/video/SDL_egl.c", - "../externals/sdl/src/video/SDL_fillrect.c", - "../externals/sdl/src/video/SDL_pixels.c", - "../externals/sdl/src/video/SDL_rect.c", - "../externals/sdl/src/video/SDL_shape.c", - "../externals/sdl/src/video/SDL_stretch.c", - "../externals/sdl/src/video/SDL_surface.c", - "../externals/sdl/src/video/SDL_video.c", - ] - defines = [ - "HAVE_ACOS", - "HAVE_ASIN", - "HAVE_ATAN", - "HAVE_ATAN2", - "HAVE_CEIL", - "HAVE_COPYSIGN", - "HAVE_COS", - "HAVE_COSF", - "HAVE_FABS", - "HAVE_FLOOR", - "HAVE_LOG", - "HAVE_POW", - "HAVE_SCALBN", - "HAVE_SIN", - "HAVE_SINF", - "HAVE_SQRT", - "HAVE_SQRTF", - "HAVE_TAN", - "HAVE_TANF", - "SDL_HAPTIC_DISABLED=1", - "SDL_JOYSTICK_DISABLED=1", - "USING_PREMAKE_CONFIG_H", - ] - libs = [] - - if (!is_win) { - defines += [ - "SDL_LOADSO_DLOPEN=1", - "SDL_THREAD_PTHREAD=1", - "SDL_THREAD_PTHREAD_RECURSIVE_MUTEX=1", - "SDL_TIMER_UNIX=1", - ] - sources += [ - "../externals/sdl/src/loadso/dlopen/SDL_sysloadso.c", - "../externals/sdl/src/thread/pthread/SDL_syscond.c", - "../externals/sdl/src/thread/pthread/SDL_sysmutex.c", - "../externals/sdl/src/thread/pthread/SDL_syssem.c", - "../externals/sdl/src/thread/pthread/SDL_systhread.c", - "../externals/sdl/src/thread/pthread/SDL_systls.c", - "../externals/sdl/src/timer/unix/SDL_systimer.c", - ] - } - - if (is_linux) { - sources += [ - "../externals/sdl/src/filesystem/unix/SDL_sysfilesystem.c", - "../externals/sdl/src/render/opengl/SDL_render_gl.c", - "../externals/sdl/src/render/opengl/SDL_shaders_gl.c", - "../externals/sdl/src/video/x11/SDL_x11clipboard.c", - "../externals/sdl/src/video/x11/SDL_x11dyn.c", - "../externals/sdl/src/video/x11/SDL_x11events.c", - "../externals/sdl/src/video/x11/SDL_x11framebuffer.c", - "../externals/sdl/src/video/x11/SDL_x11keyboard.c", - "../externals/sdl/src/video/x11/SDL_x11messagebox.c", - "../externals/sdl/src/video/x11/SDL_x11modes.c", - "../externals/sdl/src/video/x11/SDL_x11mouse.c", - "../externals/sdl/src/video/x11/SDL_x11opengl.c", - "../externals/sdl/src/video/x11/SDL_x11opengles.c", - "../externals/sdl/src/video/x11/SDL_x11shape.c", - "../externals/sdl/src/video/x11/SDL_x11touch.c", - "../externals/sdl/src/video/x11/SDL_x11video.c", - "../externals/sdl/src/video/x11/SDL_x11window.c", - "../externals/sdl/src/video/x11/SDL_x11xinput2.c", - "../externals/sdl/src/video/x11/imKStoUCS.c", - ] - defines += [ - "SDL_FILESYSTEM_UNIX=1", - "SDL_VIDEO_DRIVER_X11=1", - "SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS=1", - "SDL_VIDEO_OPENGL=1", - "SDL_VIDEO_RENDER_OGL=1", - "SDL_VIDEO_OPENGL_GLX=1", - ] - libs += [ - "GL", - "X11", - "Xext", - ] - } - - if (is_mac) { - sources += [ - "../externals/sdl/src/file/cocoa/SDL_rwopsbundlesupport.m", - "../externals/sdl/src/filesystem/cocoa/SDL_sysfilesystem.m", - "../externals/sdl/src/render/opengl/SDL_render_gl.c", - "../externals/sdl/src/render/opengl/SDL_shaders_gl.c", - "../externals/sdl/src/video/cocoa/SDL_cocoaclipboard.m", - "../externals/sdl/src/video/cocoa/SDL_cocoaevents.m", - "../externals/sdl/src/video/cocoa/SDL_cocoakeyboard.m", - "../externals/sdl/src/video/cocoa/SDL_cocoamessagebox.m", - "../externals/sdl/src/video/cocoa/SDL_cocoamodes.m", - "../externals/sdl/src/video/cocoa/SDL_cocoamouse.m", - "../externals/sdl/src/video/cocoa/SDL_cocoamousetap.m", - "../externals/sdl/src/video/cocoa/SDL_cocoaopengl.m", - "../externals/sdl/src/video/cocoa/SDL_cocoashape.m", - "../externals/sdl/src/video/cocoa/SDL_cocoavideo.m", - "../externals/sdl/src/video/cocoa/SDL_cocoawindow.m", - ] - defines += [ - "SDL_FILESYSTEM_COCOA=1", - "SDL_VIDEO_DRIVER_COCOA=1", - "SDL_VIDEO_OPENGL=1", - "SDL_VIDEO_RENDER_OGL=1", - "SDL_VIDEO_OPENGL_CGL=1", - ] - frameworks = [ - "Carbon.framework", - "Cocoa.framework", - "Foundation.framework", - "IOKit.framework", - "QuartzCore.framework", - ] - } - - if (is_ios) { - sources += [ - "../externals/sdl/src/file/cocoa/SDL_rwopsbundlesupport.m", - "../externals/sdl/src/filesystem/cocoa/SDL_sysfilesystem.m", - "../externals/sdl/src/render/opengles/SDL_render_gles.c", - "../externals/sdl/src/render/opengles2/SDL_render_gles2.c", - "../externals/sdl/src/render/opengles2/SDL_shaders_gles2.c", - "../externals/sdl/src/video/uikit/SDL_uikitappdelegate.m", - "../externals/sdl/src/video/uikit/SDL_uikitclipboard.m", - "../externals/sdl/src/video/uikit/SDL_uikitevents.m", - "../externals/sdl/src/video/uikit/SDL_uikitmessagebox.m", - "../externals/sdl/src/video/uikit/SDL_uikitmodes.m", - "../externals/sdl/src/video/uikit/SDL_uikitopengles.m", - "../externals/sdl/src/video/uikit/SDL_uikitopenglview.m", - "../externals/sdl/src/video/uikit/SDL_uikitvideo.m", - "../externals/sdl/src/video/uikit/SDL_uikitview.m", - "../externals/sdl/src/video/uikit/SDL_uikitviewcontroller.m", - "../externals/sdl/src/video/uikit/SDL_uikitwindow.m", - ] - cflags_objc = [ "-fobjc-arc" ] - defines += [ - "TARGET_OS_IPHONE=1", - "__IPHONE_OS__=1", - "HAVE_MATH_H=1", - "HAVE_GCC_ATOMICS=1", - "SDL_FILESYSTEM_COCOA=1", - "SDL_VIDEO_DRIVER_UIKIT=1", - "SDL_VIDEO_RENDER_OGL_ES=1", - "SDL_VIDEO_RENDER_OGL_ES2=1", - "SDL_VIDEO_OPENGL_ES=1", - "SDL_VIDEO_OPENGL_ES2=1", - ] - frameworks = [ - "Foundation.framework", - "QuartzCore.framework", - "UIKit.framework", - ] - } -} diff --git a/third_party/libsdl/SDL_config_premake.h b/third_party/libsdl/SDL_config_premake.h deleted file mode 100644 index 28c4bc691a..0000000000 --- a/third_party/libsdl/SDL_config_premake.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* - * We don't want any of SDL's prebaked SDL_config.h files. - * Instead we set all the defines we need in GN (third_party/libsdl/BUILD.gn). - * This header is just the barest basics of an SDL_config.h we can get away with. - */ - -#include -#include -#include