diff options
author | Uli Heilmeier <uh@heilmeier.eu> | 2019-02-05 13:21:51 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-02-05 15:35:48 +0000 |
commit | af3c6115f2f57eba177fc33d2df7c00621cbd4c4 (patch) | |
tree | cf0980ba323e9675fa39d0578a5b12997d4e85aa | |
parent | bf820d14eb329ce7af13cd02f7e17ae8033afc8f (diff) |
CMake: Fix build without LibXml2
This is still needed when LibXml2 is missing, otherwise the build fails with:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Fixes: v2.9.1rc0-625-gd17e218918 ("CMake: Update FindLibXml2.cmake")
Change-Id: I06fc2c18aa82dd553d5a10604c1a874c9a2e88a8
Reviewed-on: https://code.wireshark.org/review/31896
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 52e497a802..bda9c6c789 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1097,6 +1097,14 @@ ws_find_package(SPANDSP ENABLE_SPANDSP HAVE_SPANDSP) ws_find_package(BCG729 ENABLE_BCG729 HAVE_BCG729) ws_find_package(LibXml2 ENABLE_LIBXML2 HAVE_LIBXML2) +if(NOT LIBXML2_FOUND) + # CMake 3.9 and below used LIBXML2_LIBRARIES as the name of + # the cache entry storing the find_library result. + # Current CMake (3.13) and below sets LIBXML2_LIBRARIES and LIBXML2_INCLUDE_DIRS + # to a non-empty value, be sure to clear it when not found. + set(LIBXML2_LIBRARIES "") + set(LIBXML2_INCLUDE_DIRS "") +endif() # Capabilities ws_find_package(CAP ENABLE_CAP HAVE_LIBCAP) |