packages feed

GLFW-0.5.2.4: GLFW.cabal

name:          GLFW
version:       0.5.2.4
homepage:      http://haskell.org/haskellwiki/GLFW
maintainer:    Paul H. Liu <paul@thev.net>
cabal-version: >= 1.12
build-type:    Custom
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://www.glfw.org>. Note that this binding comes with an 
               older GLFW C version 2.7.9 due to incompatible API changes in
               GLFW since 3.0 (for example, the removal of texture functions).
               If you want to use newer GLFW C versions, install Haskell package
               GLFW-b instead.
license:       BSD3
license-file:  LICENSE

extra-source-files:
  Changelog.txt
  README.txt
  example/example.lhs
  glfw/COPYING.txt
  glfw/include/GL/glfw.h
  glfw/lib/internal.h
  glfw/lib/x11/platform.h
  glfw/lib/win32/platform.h
  glfw/lib/cocoa/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
    
  default-language: Haskell98

  exposed-modules:
    Graphics.UI.GLFW

  ghc-options:   -Wall -fspec-constr-count=6 
  if impl(ghc >= 6.8)
    ghc-options: -fwarn-tabs

  include-dirs:
    glfw/include
    glfw/lib

  if flag(dynamic)
    extra-libraries: glfw
  else
    cc-options: 
    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(darwin)
      x-cc-name: gcc
      include-dirs: glfw/lib/cocoa
      frameworks:   Cocoa OpenGL IOKit
      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
    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
      else
        include-dirs:    glfw/lib/x11
        extra-libraries: X11 GL
        cc-options:      -D_GLFW_USE_LINUX_JOYSTICKS
        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    

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