aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2016-12-18 14:41:56 +0100
committerDaniel Scheller <d.scheller@gmx.net>2016-12-18 15:14:58 +0100
commite63e688e1b1d96831eec254c5993273ba57a954d (patch)
tree14879d54f03352f483fb29a525f1c84deb06b015
parent09269437210ab373eef61d13b506bf3305a9082c (diff)
[cmake] fix build with -DENABLE_MICROHTTP=OFF and without installed libmicrohttpd
-rw-r--r--xbmc/interfaces/legacy/wsgi/CMakeLists.txt20
-rw-r--r--xbmc/network/httprequesthandler/CMakeLists.txt44
-rw-r--r--xbmc/network/httprequesthandler/python/CMakeLists.txt14
3 files changed, 42 insertions, 36 deletions
diff --git a/xbmc/interfaces/legacy/wsgi/CMakeLists.txt b/xbmc/interfaces/legacy/wsgi/CMakeLists.txt
index ccfde18ee7..cc29eb464f 100644
--- a/xbmc/interfaces/legacy/wsgi/CMakeLists.txt
+++ b/xbmc/interfaces/legacy/wsgi/CMakeLists.txt
@@ -1,11 +1,13 @@
-set(SOURCES WsgiErrorStream.cpp
- WsgiInputStream.cpp
- WsgiResponseBody.cpp
- WsgiResponse.cpp)
+if(MICROHTTPD_FOUND)
+ set(SOURCES WsgiErrorStream.cpp
+ WsgiInputStream.cpp
+ WsgiResponseBody.cpp
+ WsgiResponse.cpp)
-set(HEADERS WsgiErrorStream.h
- WsgiInputStream.h
- WsgiResponse.h
- WsgiResponseBody.h)
+ set(HEADERS WsgiErrorStream.h
+ WsgiInputStream.h
+ WsgiResponse.h
+ WsgiResponseBody.h)
-core_add_library(legacy_interface_wsgi)
+ core_add_library(legacy_interface_wsgi)
+endif()
diff --git a/xbmc/network/httprequesthandler/CMakeLists.txt b/xbmc/network/httprequesthandler/CMakeLists.txt
index 0ac98d39d9..14d863fd96 100644
--- a/xbmc/network/httprequesthandler/CMakeLists.txt
+++ b/xbmc/network/httprequesthandler/CMakeLists.txt
@@ -1,23 +1,25 @@
-set(SOURCES HTTPFileHandler.cpp
- HTTPImageHandler.cpp
- HTTPImageTransformationHandler.cpp
- HTTPJsonRpcHandler.cpp
- HTTPPythonHandler.cpp
- HTTPRequestHandlerUtils.cpp
- HTTPVfsHandler.cpp
- HTTPWebinterfaceAddonsHandler.cpp
- HTTPWebinterfaceHandler.cpp
- IHTTPRequestHandler.cpp)
+if(MICROHTTPD_FOUND)
+ set(SOURCES HTTPFileHandler.cpp
+ HTTPImageHandler.cpp
+ HTTPImageTransformationHandler.cpp
+ HTTPJsonRpcHandler.cpp
+ HTTPPythonHandler.cpp
+ HTTPRequestHandlerUtils.cpp
+ HTTPVfsHandler.cpp
+ HTTPWebinterfaceAddonsHandler.cpp
+ HTTPWebinterfaceHandler.cpp
+ IHTTPRequestHandler.cpp)
-set(HEADERS HTTPFileHandler.h
- HTTPImageHandler.h
- HTTPImageTransformationHandler.h
- HTTPJsonRpcHandler.h
- HTTPPythonHandler.h
- HTTPRequestHandlerUtils.h
- HTTPVfsHandler.h
- HTTPWebinterfaceAddonsHandler.h
- HTTPWebinterfaceHandler.h
- IHTTPRequestHandler.h)
+ set(HEADERS HTTPFileHandler.h
+ HTTPImageHandler.h
+ HTTPImageTransformationHandler.h
+ HTTPJsonRpcHandler.h
+ HTTPPythonHandler.h
+ HTTPRequestHandlerUtils.h
+ HTTPVfsHandler.h
+ HTTPWebinterfaceAddonsHandler.h
+ HTTPWebinterfaceHandler.h
+ IHTTPRequestHandler.h)
-core_add_library(network_httprequesthandlers)
+ core_add_library(network_httprequesthandlers)
+endif()
diff --git a/xbmc/network/httprequesthandler/python/CMakeLists.txt b/xbmc/network/httprequesthandler/python/CMakeLists.txt
index 2829019588..1aca60a471 100644
--- a/xbmc/network/httprequesthandler/python/CMakeLists.txt
+++ b/xbmc/network/httprequesthandler/python/CMakeLists.txt
@@ -1,8 +1,10 @@
-set(SOURCES HTTPPythonInvoker.cpp
- HTTPPythonWsgiInvoker.cpp)
+if(MICROHTTPD_FOUND)
+ set(SOURCES HTTPPythonInvoker.cpp
+ HTTPPythonWsgiInvoker.cpp)
-set(HEADERS HTTPPythonInvoker.h
- HTTPPythonRequest.h
- HTTPPythonWsgiInvoker.h)
+ set(HEADERS HTTPPythonInvoker.h
+ HTTPPythonRequest.h
+ HTTPPythonWsgiInvoker.h)
-core_add_library(network_httprequesthandlers_python)
+ core_add_library(network_httprequesthandlers_python)
+endif()