~ubuntu-branches/ubuntu/vivid/libsdl2/vivid

« back to all changes in this revision

Viewing changes to cmake/sdlchecks.cmake

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo, Felix Geyer
  • Date: 2013-12-28 12:31:19 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20131228123119-e0k27gckmnzskfgb
Tags: 2.0.1+dfsg1-1
* New upstream release (Closes: #728974)
  - Remove patch applied upstream:
    bug-723797-false_positives_in_mouse_wheel_code.patch
* Bump Standards-Version to 3.9.5, no changes needed.

[ Felix Geyer ]
* Import upstream gpg key for uscan to verify the orig tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
      endif()
305
305
    endforeach()
306
306
 
 
307
    find_path(X_INCLUDEDIR X11/Xlib.h)
 
308
    if(X_INCLUDEDIR)
 
309
      set(X_CFLAGS "-I${X_INCLUDEDIR}")
 
310
    endif()
 
311
 
307
312
    check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
308
313
    check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
309
314
    check_include_file(X11/extensions/XInput2.h HAVE_XINPUT_H)
345
350
        endif(HAVE_SHMAT)
346
351
        if(NOT HAVE_SHMAT)
347
352
          add_definitions(-DNO_SHARED_MEMORY)
 
353
          set(X_CFLAGS "${X_CFLAGS} -DNO_SHARED_MEMORY")
348
354
        endif(NOT HAVE_SHMAT)
349
355
      endif(NOT HAVE_SHMAT)
350
356
 
367
373
        endif(HAVE_X11_SHARED)
368
374
      endif(X11_SHARED)
369
375
 
 
376
      set(SDL_CFLAGS "${SDL_CFLAGS} ${X_CFLAGS}")
 
377
 
370
378
      set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
371
379
      check_c_source_compiles("
372
380
          #include <X11/Xlib.h>
563
571
  if(VIDEO_OPENGLES)
564
572
    check_c_source_compiles("
565
573
        #include <EGL/egl.h>
566
 
        int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES)
567
 
    if(HAVE_VIDEO_OPENGLES)
568
 
      check_c_source_compiles("
569
 
          #include <GLES/gl.h>
570
 
          #include <GLES/glext.h>
571
 
          int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
572
 
      if(HAVE_VIDEO_OPENGLES_V1)
 
574
        int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGL_EGL)
 
575
    if(HAVE_VIDEO_OPENGL_EGL)
 
576
        set(SDL_VIDEO_OPENGL_EGL 1)
 
577
    endif(HAVE_VIDEO_OPENGL_EGL) 
 
578
    check_c_source_compiles("
 
579
      #include <GLES/gl.h>
 
580
      #include <GLES/glext.h>
 
581
      int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
 
582
    if(HAVE_VIDEO_OPENGLES_V1)
 
583
        set(HAVE_VIDEO_OPENGLES TRUE)
573
584
        set(SDL_VIDEO_OPENGL_ES 1)
574
585
        set(SDL_VIDEO_RENDER_OGL_ES 1)
575
 
      endif(HAVE_VIDEO_OPENGLES_V1)
576
 
      check_c_source_compiles("
577
 
          #include <GLES2/gl2.h>
578
 
          #include <GLES2/gl2ext.h>
579
 
          int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
580
 
      if(HAVE_VIDEO_OPENGLES_V2)
 
586
    endif(HAVE_VIDEO_OPENGLES_V1)
 
587
    check_c_source_compiles("
 
588
      #include <GLES2/gl2.h>
 
589
      #include <GLES2/gl2ext.h>
 
590
      int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
 
591
    if(HAVE_VIDEO_OPENGLES_V2)
 
592
        set(HAVE_VIDEO_OPENGLES TRUE)
581
593
        set(SDL_VIDEO_OPENGL_ES2 1)
582
594
        set(SDL_VIDEO_RENDER_OGL_ES2 1)
583
 
      endif(HAVE_VIDEO_OPENGLES_V2)
584
 
    endif(HAVE_VIDEO_OPENGLES)
 
595
    endif(HAVE_VIDEO_OPENGLES_V2)
 
596
 
585
597
  endif(VIDEO_OPENGLES)
586
598
endmacro(CheckOpenGLESX11)
587
599