binding.gyp 2.4 KB
Newer Older
Tim Branyen's avatar
Tim Branyen committed
1 2 3 4 5 6
{
  "targets": [
    {
      "target_name": "nodegit",

      "dependencies": [
7
        "vendor/libgit2.gyp:libgit2"
Tim Branyen's avatar
Tim Branyen committed
8 9
      ],

10 11 12
      "variables": {
        "coverage%": 0
      },
Tim Branyen's avatar
Tim Branyen committed
13
      "sources": [
14
        "src/async_baton.cc",
15
        "src/lock_master.cc",
Tim Branyen's avatar
Tim Branyen committed
16
        "src/nodegit.cc",
17
        "src/init_ssh2.cc",
18
        "src/promise_completion.cc",
Tim Branyen's avatar
Tim Branyen committed
19 20
        "src/wrapper.cc",
        "src/functions/copy.cc",
21
        "src/functions/free.cc",
22 23
        "src/convenient_patch.cc",
        "src/convenient_hunk.cc",
24
        "src/filter_registry.cc",
John Haley's avatar
John Haley committed
25
        "src/str_array_converter.cc",
26
        "src/thread_pool.cc",
27
        {% each %}
28
          {% if type != "enum" %}
29
            "src/{{ name }}.cc",
30
          {% endif %}
31
        {% endeach %}
32
      ],
Tim Branyen's avatar
Tim Branyen committed
33 34 35

      "include_dirs": [
        "vendor/libv8-convert",
36
        "vendor/libssh2/include",
Stjepan Rajko's avatar
Stjepan Rajko committed
37
        "vendor/openssl/openssl/include",
Tim Branyen's avatar
Tim Branyen committed
38 39 40 41
        "<!(node -e \"require('nan')\")"
      ],

      "cflags": [
John Haley's avatar
John Haley committed
42
        "-Wall"
Tim Branyen's avatar
Tim Branyen committed
43 44 45
      ],

      "conditions": [
46 47 48 49 50 51 52 53 54 55 56 57 58
        [
          "coverage==1", {
            "cflags": [
              "-ftest-coverage",
              "-fprofile-arcs"
            ],
            "link_settings": {
              "libraries": [
                "-lgcov"
              ]
            },
          }
        ],
Tim Branyen's avatar
Tim Branyen committed
59 60 61 62
        [
          "OS=='mac'", {
            "xcode_settings": {
              "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
John Haley's avatar
John Haley committed
63
              "MACOSX_DEPLOYMENT_TARGET": "10.7",
Tim Branyen's avatar
Tim Branyen committed
64 65 66

              "WARNING_CFLAGS": [
                "-Wno-unused-variable",
67
                "-Wint-conversions",
Stjepan Rajko's avatar
Stjepan Rajko committed
68 69
                "-Wmissing-field-initializers",
                "-Wno-c++11-extensions"
John Haley's avatar
John Haley committed
70
              ]
Tim Branyen's avatar
Tim Branyen committed
71 72
            }
          }
73 74
        ],
        [
John Haley's avatar
John Haley committed
75 76
          "OS=='win'", {
            "defines": [
77
              "_HAS_EXCEPTIONS=1"
78
            ],
79 80 81 82 83
            "msvs_settings": {
              "VCCLCompilerTool": {
                "AdditionalOptions": [
                  "/EHsc"
                ]
84
              },
85 86 87 88
              "VCLinkerTool": {
                "AdditionalOptions": [
                  "/FORCE:MULTIPLE"
                ]
89 90
              }
            }
John Haley's avatar
John Haley committed
91
          }
92 93 94 95 96 97 98 99 100
        ],
        [
          "OS=='linux' or OS=='mac'", {
            "libraries": [
              "-lcurl"
            ]
          }
        ],
        [
101
          "OS=='linux' or OS.endswith('bsd')", {
Stjepan Rajko's avatar
Stjepan Rajko committed
102
            "cflags": [
103
              "-std=c++11"
Stjepan Rajko's avatar
Stjepan Rajko committed
104 105
            ]
          }
Tim Branyen's avatar
Tim Branyen committed
106 107
        ]
      ]
Tim Branyen's avatar
Tim Branyen committed
108
    }
Tim Branyen's avatar
Tim Branyen committed
109 110
  ]
}