packages feed

GLFW-0.4.1: GLFW.cabal

name:          GLFW
version:       0.4.1
homepage:      http://haskell.org/haskellwiki/GLFW
maintainer:    Paul H. Liu <paul@thev.net>
cabal-version: >= 1.6
build-type:    Simple
category:      Graphics
synopsis:      A Haskell binding for GLFW
description:   A Haskell binding for GLFW, a window system independent toolkit
               for writing OpenGL programs. For more information about the C
               library on which this binding is based, please see
               <http://glfw.sourceforge.net>.
license:       BSD3
license-file:  LICENSE

extra-source-files:
  Changelog.txt
  README.txt
  glfw/license.txt
  glfw/include/GL/glfw.h
  glfw/lib/internal.h
  glfw/lib/x11/platform.h
  glfw/lib/win32/platform.h
  glfw/lib/macosx/platform.h

flag dynamic
  description: Dynamically link with GLFW C libray if your system provides it.
  default:     False

library
  build-depends:
    base   >= 3   && < 5,
    OpenGL >= 2.1 && < 3

  exposed-modules:
    Graphics.UI.GLFW

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

  include-dirs:
    glfw/include
    glfw/lib

  if flag(dynamic)
    extra-libraries: glfw
  else
    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
      extra-libraries: Xrandr 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
    else
      if os(darwin)
        include-dirs: glfw/lib/macosx
        frameworks:   AGL Carbon OpenGL
        cc-options:   -march=apple
        c-sources:
          glfw/lib/macosx/macosx_enable.c
          glfw/lib/macosx/macosx_fullscreen.c
          glfw/lib/macosx/macosx_glext.c
          glfw/lib/macosx/macosx_init.c
          glfw/lib/macosx/macosx_joystick.c
          glfw/lib/macosx/macosx_thread.c
          glfw/lib/macosx/macosx_time.c
          glfw/lib/macosx/macosx_window.c
      else
        if os(mingw32)
          include-dirs:    glfw/lib/win32
          extra-libraries: opengl32
          c-sources:
            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

source-repository head
  type:     darcs
  location: http://code.haskell.org/GLFW/