1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 04:06:03 +00:00

Fix platform checks for libxml2. (#687)

Use the CMake module for finding libxml2, instead of relying on
pkg-config which may break on some platforms like macOS.
This commit is contained in:
Brenden Matthews 2018-12-02 13:26:02 -05:00 committed by GitHub
parent 71a60672a8
commit c1059030cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,9 +449,12 @@ if(WANT_CURL)
endif(WANT_CURL)
if(WANT_LIBXML2)
pkg_check_modules(LIBXML2 REQUIRED libxml-2.0)
include(FindLibXml2)
if(NOT LIBXML2_FOUND)
message(FATAL_ERROR "Unable to find libxml2 library")
endif(NOT LIBXML2_FOUND)
set(conky_libs ${conky_libs} ${LIBXML2_LIBRARIES})
set(conky_includes ${conky_includes} ${LIBXML2_INCLUDE_DIRS})
set(conky_includes ${conky_includes} ${LIBXML2_INCLUDE_DIR})
endif(WANT_LIBXML2)
if(WANT_TOLUA)