cmake: do not fail without libxml2
Avoid adding a LIBXML2_LIBRARIES-NOTFOUND to the libraries list when it is not found. Likewise for OpenSSL.
This commit is contained in:
parent
f34971774b
commit
3a2a943fe9
|
@ -194,7 +194,10 @@ endif()
|
||||||
# openssl (for src)
|
# openssl (for src)
|
||||||
set(HAVE_OPENSSL ${OPENSSL_FOUND})
|
set(HAVE_OPENSSL ${OPENSSL_FOUND})
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||||
|
else()
|
||||||
|
set(OPENSSL_INCLUDE_DIRS "")
|
||||||
|
set(OPENSSL_LIBRARIES "")
|
||||||
endif()
|
endif()
|
||||||
# libev (for src)
|
# libev (for src)
|
||||||
set(HAVE_LIBEV ${LIBEV_FOUND})
|
set(HAVE_LIBEV ${LIBEV_FOUND})
|
||||||
|
@ -208,6 +211,12 @@ endif()
|
||||||
set(HAVE_JANSSON ${JANSSON_FOUND})
|
set(HAVE_JANSSON ${JANSSON_FOUND})
|
||||||
# libxml2 (for src/nghttp)
|
# libxml2 (for src/nghttp)
|
||||||
set(HAVE_LIBXML2 ${LIBXML2_FOUND})
|
set(HAVE_LIBXML2 ${LIBXML2_FOUND})
|
||||||
|
if(LIBXML2_FOUND)
|
||||||
|
set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
|
||||||
|
else()
|
||||||
|
set(LIBXML2_INCLUDE_DIRS "")
|
||||||
|
set(LIBXML2_LIBRARIES "")
|
||||||
|
endif()
|
||||||
# jemalloc
|
# jemalloc
|
||||||
set(HAVE_JEMALLOC ${JEMALLOC_FOUND})
|
set(HAVE_JEMALLOC ${JEMALLOC_FOUND})
|
||||||
# spdylay (for src/nghttpx and src/h2load)
|
# spdylay (for src/nghttpx and src/h2load)
|
||||||
|
|
|
@ -16,7 +16,7 @@ include_directories(
|
||||||
|
|
||||||
${JEMALLOC_INCLUDE_DIRS}
|
${JEMALLOC_INCLUDE_DIRS}
|
||||||
${SPDYLAY_INCLUDE_DIRS}
|
${SPDYLAY_INCLUDE_DIRS}
|
||||||
${LIBXML2_INCLUDE_DIR}
|
${LIBXML2_INCLUDE_DIRS}
|
||||||
${LIBEV_INCLUDE_DIRS}
|
${LIBEV_INCLUDE_DIRS}
|
||||||
${OPENSSL_INCLUDE_DIRS}
|
${OPENSSL_INCLUDE_DIRS}
|
||||||
${JANSSON_INCLUDE_DIRS}
|
${JANSSON_INCLUDE_DIRS}
|
||||||
|
|
Loading…
Reference in New Issue