From cff4f670e75d7390fe4781014d9559d8a091a9ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Fri, 28 Jun 2019 13:32:24 -0400
Subject: [PATCH] build: only build http with proxy

---
 CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b83c9c11..b1a37568 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,7 +159,6 @@ list (APPEND opendht_SOURCES
     src/peer_discovery.cpp
     src/network_utils.cpp
     src/thread_pool.cpp
-    src/http.cpp
 )
 
 list (APPEND opendht_HEADERS
@@ -186,7 +185,6 @@ list (APPEND opendht_HEADERS
     include/opendht/peer_discovery.h
     include/opendht/thread_pool.h
     include/opendht/network_utils.h
-    include/opendht/http.h
     include/opendht.h
 )
 
@@ -230,6 +228,10 @@ if (OPENDHT_PROXY_SERVER OR OPENDHT_PROXY_CLIENT)
   endif ()
   list (APPEND opendht_HEADERS
     include/opendht/proxy.h
+    include/opendht/http.h
+  )
+  list (APPEND opendht_SOURCES
+    src/http.cpp
   )
 endif ()
 
-- 
GitLab