diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-02-17 11:30:54 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-02-17 11:30:54 +0100 |
commit | d5b42ba6f344e96210c24c4507b459b118f37410 (patch) | |
tree | e6ba695bf65348aa3790f9d98a266a9e87ec1a17 /erebos.cabal | |
parent | 0ed3f76533cde17322cf04018713d70c2f78d490 (diff) |
Flag to disable pjproject dependency
Changelog: Added flag to enable/disable ICE support with pjproject
Diffstat (limited to 'erebos.cabal')
-rw-r--r-- | erebos.cabal | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/erebos.cabal b/erebos.cabal index 3734f1f..d732385 100644 --- a/erebos.cabal +++ b/erebos.cabal @@ -30,6 +30,9 @@ Extra-Doc-Files: Extra-Source-Files: src/Erebos/ICE/pjproject.h +Flag ice + Description: Enable peer discovery with ICE support using pjproject + source-repository head type: git location: git://erebosprotocol.net/erebos @@ -61,12 +64,16 @@ common common TypeFamilyDependencies other-extensions: + CPP ForeignFunctionInterface OverloadedStrings RecursiveDo TemplateHaskell UndecidableInstances + if flag(ice) + cpp-options: -DENABLE_ICE_SUPPORT + library import: common default-language: Haskell2010 @@ -76,8 +83,6 @@ library Erebos.Attach Erebos.Channel Erebos.Contact - Erebos.Discovery - Erebos.ICE Erebos.Identity Erebos.Message Erebos.Network @@ -100,15 +105,22 @@ library Erebos.Util c-sources: - src/Erebos/ICE/pjproject.c src/Erebos/Network/ifaddrs.c include-dirs: - src/Erebos/ICE src - includes: - src/Erebos/ICE/pjproject.h - build-tool-depends: c2hs:c2hs - pkgconfig-depends: libpjproject >= 2.9 + + if flag(ice) + exposed-modules: + Erebos.Discovery + Erebos.ICE + c-sources: + src/Erebos/ICE/pjproject.c + include-dirs: + src/Erebos/ICE + includes: + src/Erebos/ICE/pjproject.h + build-tool-depends: c2hs:c2hs + pkgconfig-depends: libpjproject >= 2.9 build-depends: async >=2.2 && <2.3, |