summaryrefslogtreecommitdiff
blob: 4e8360e696774e899a3c9ccaca53c778ce2d9b67 (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
commit 8ca829a832db304769ac0d107471ab23d4ce3cce
Author: Louis Sautier <sautier.louis@gmail.com>
Date:   Wed Jun 21 23:10:03 2017 +0200

    Add options to disable libnatpnp and tbb support

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8a49c7..826fce3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,10 @@ endif()
 
 
 # OPTIONS
+OPTION(ENABLE_NATPMP "Enable support for the NAT-PMP protocol via libnatpmp"
+  ON)
+OPTION(ENABLE_TBB "Enable support of the TBB library to improve performance"
+  ON)
 
 # 1.x had a different default value
 unset(INSTALL_RUNTIME_PATH CACHE)
@@ -99,12 +103,16 @@ find_package (OpenSSL REQUIRED)
 find_package (Threads REQUIRED)
 find_package (Iconv REQUIRED)
 find_package (Miniupnpc REQUIRED)
-find_package (LibNatpmp)
+if(ENABLE_NATPMP)
+  find_package (LibNatpmp)
+endif()
 find_package (Git)
 find_package (LevelDB REQUIRED)
 find_package (websocketpp REQUIRED)
 find_package (Backtrace)
-find_package (TBB)
+if(ENABLE_TBB)
+  find_package (TBB)
+endif()
 
 if (NOT BUILD_SHARED_LIBS)
   # Shared LevelDB libraries are linked against Snappy already