packages feed

GLFW-b-0.0.2: GLFW-b.cabal

name:         GLFW-b
version:      0.0.2

category:     Graphics

synopsis:     GLFW bindings
description:  Bindings to GLFW, a free, open source, multi-platform library for
              creating OpenGL contexts and managing input, including keyboard,
              mouse, joystick and time.
              .
              /GLFW-b does not currently work on Mac OS X./ Sorry.
              .
              Please see README.md
              (<http://github.com/bsl/GLFW-b/blob/master/README.md>) for
              information about how these bindings differ from the ones in the
              GLFW package (<http://hackage.haskell.org/package/GLFW>).
              .
              For more information about the library on which these bindings
              are based, please see <http://glfw.sourceforge.net>.

author:       Brian Lewis <brian@lorf.org>
maintainer:   Brian Lewis <brian@lorf.org>

license:      BSD3
license-file: LICENSE

-- -- -- -- -- -- -- -- -- --

cabal-version: >= 1.6
build-type:    Simple

-- -- -- -- -- -- -- -- -- --

extra-source-files:
  README.md
  glfw/include/GL/glfw.h
  glfw/lib/internal.h
  glfw/lib/cocoa/platform.h
  glfw/lib/win32/platform.h
  glfw/lib/x11/platform.h

-- -- -- -- -- -- -- -- -- --

library
  exposed-modules:
    Graphics.UI.GLFW

  build-depends:
    base == 4.*

  hs-source-dirs:
    src

  include-dirs:
    glfw/include
    glfw/lib
  c-sources:
    glfw/lib/enable.c
    glfw/lib/fullscreen.c
    glfw/lib/glext.c
    glfw/lib/image.c
    glfw/lib/init.c
    glfw/lib/input.c
    glfw/lib/joystick.c
    glfw/lib/stream.c
    glfw/lib/tga.c
    glfw/lib/thread.c
    glfw/lib/time.c
    glfw/lib/window.c

  if os(linux)
    include-dirs:
      glfw/lib/x11
    c-sources:
      glfw/lib/x11/x11_enable.c
      glfw/lib/x11/x11_fullscreen.c
      glfw/lib/x11/x11_glext.c
      glfw/lib/x11/x11_init.c
      glfw/lib/x11/x11_joystick.c
      glfw/lib/x11/x11_keysym2unicode.c
      glfw/lib/x11/x11_thread.c
      glfw/lib/x11/x11_time.c
      glfw/lib/x11/x11_window.c
    cc-options:
      -D_GLFW_USE_LINUX_JOYSTICKS
      -D_GLFW_HAS_XRANDR
--    -D_GLFW_HAS_PTHREAD
--    -D_GLFW_HAS_SCHED_YIELD
      -D_GLFW_HAS_GLXGETPROCADDRESS
--    -D_GLFW_HAS_DLOPEN
--    -D_GLFW_HAS_SYSCONF
--    -pthread
      -O2
    extra-libraries:
      GL
      GLU
      X11
      Xrandr
  else
    if os(darwin)
      include-dirs:
        glfw/lib/cocoa
      c-sources:
        glfw/lib/cocoa/cocoa_enable.m
        glfw/lib/cocoa/cocoa_fullscreen.m
        glfw/lib/cocoa/cocoa_glext.m
        glfw/lib/cocoa/cocoa_init.m
        glfw/lib/cocoa/cocoa_joystick.m
        glfw/lib/cocoa/cocoa_thread.c
        glfw/lib/cocoa/cocoa_time.m
        glfw/lib/cocoa/cocoa_window.m
      cc-options:
        -O2
      frameworks:
        AGL
        Cocoa
        OpenGL
    else
      if os(mingw32)
        include-dirs:
          glfw/lib/win32
        c-sources:
          glfw/lib/win32/win32_dllmain.c
          glfw/lib/win32/win32_enable.c
          glfw/lib/win32/win32_fullscreen.c
          glfw/lib/win32/win32_glext.c
          glfw/lib/win32/win32_init.c
          glfw/lib/win32/win32_joystick.c
          glfw/lib/win32/win32_thread.c
          glfw/lib/win32/win32_time.c
          glfw/lib/win32/win32_window.c
        cc-options:
          -O2
        extra-libraries:
          opengl32

  ghc-options: -Wall -O2
  if impl(ghc >= 6.8)
    ghc-options: -fwarn-tabs

-- -- -- -- -- -- -- -- -- --

source-repository head
  type:     git
  location: git://github.com/bsl/GLFW-b.git