summaryrefslogtreecommitdiff
path: root/yoga.cabal
blob: cf94ce28bf744204b32c311e16ec8dbac1ad522e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
-- Initial yoga.cabal generated by cabal init.  For further documentation, 
-- see http://haskell.org/cabal/users-guide/

name:                yoga
version:             0.0.0.4
synopsis:            Bindings to Facebook's Yoga layout library
description:         The <https://facebook.github.com/yoga Yoga> library from
                     <https://facebook.github.com/ Facebook> is a fast layout engine
                     written in C that implements flexbox. There are two
                     main ways to interface with these bindings. The high-level
                     bindings are stored in the Yoga module and provide a more
                     Haskell-like interface to the library. The other option is to
                     directly use the C-level bindings in "Bindings.Yoga". If you do
                     so you do so at your own risk (i.e. you must manage your own
                     memory).

                     The examples are not built nor included by default. Please
                     refer to the source tarball for examples on how to use this
                     library.

                     These bindings are not affiliated with Facebook in any way,
                     and have been developed separately for the sole purpose of
                     interfacing with their open source library.
license:             BSD3
license-file:        LICENSE
author:              Pavel Krajcevski
maintainer:          Krajcevski@gmail.com
copyright:           2017-present
category:            Graphics
build-type:          Simple
cabal-version:       >=1.10

source-repository head
  type:           git
  location:       https://www.github.com/Mokosha/yoga-hs.git

library
  default-language: Haskell2010
  hs-source-dirs:      lib

  ghc-options: -Wall
  if impl(ghc >= 8.0)
    ghc-options: -Wno-redundant-constraints
  if impl(ghc >= 6.8)
    ghc-options: -fwarn-tabs
  build-tools:      hsc2hs
  include-dirs:     yoga/
  install-includes: YGEnums.h
                    YGMacros.h
                    YGNodePrint.h
                    YGConfig.h
                    YGFloatOptional.h
                    YGLayout.h
                    YGNode.h
                    YGStyle.h
                    Yoga.h
                    Yoga-internal.h
                    Utils.h

  c-sources:        yoga/YGNodePrint.cpp
                    yoga/Yoga.cpp
                    yoga/YGEnums.cpp
                    yoga/YGConfig.cpp
                    yoga/YGFloatOptional.cpp
                    yoga/YGLayout.cpp
                    yoga/YGNode.cpp
                    yoga/YGStyle.cpp
                    yoga/Utils.cpp

  cc-options:       -Dnullptr=0
  extra-libraries:  stdc++

  exposed-modules:
    Bindings.Yoga
    Yoga

  other-modules:
    Bindings.Yoga.Enums

  build-depends:
    base            >= 4     && < 6,
    ieee754         >= 0.7,
    bindings-DSL

flag                 examples
  description:       Build examples
  default:           False

executable yoga-example
  default-language: Haskell2010
  main-is:        Main.hs
  hs-source-dirs: examples
  ghc-options:    -Wall -rtsopts -O3
  build-depends:  base          >  4,
                  yoga

  if flag(examples)
    buildable:    True
  else
    buildable:    False