Skip to content

Commit a08ad5f

Browse files
committed
CMake: Fix detection of libxml2
Without the NO_SYSTEM_ENVIRONMENT_PATH option, find_package() would result on my system in a random toolchain's libxml2 library/include paths to be picked, just because it happens to be in $PATH (with a low priority). Signed-off-by: Paul Cercueil <[email protected]>
1 parent 4e577ca commit a08ad5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ if (WITH_XML_BACKEND)
402402
# So, try first to find the CMake module provided by libxml2 package, then fallback
403403
# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
404404
# in static build case).
405-
find_package(LibXml2 QUIET NO_MODULE)
405+
find_package(LibXml2 QUIET NO_MODULE NO_SYSTEM_ENVIRONMENT_PATH)
406406
if(DEFINED LIBXML2_VERSION_STRING)
407407
set(LIBXML2_FOUND ON)
408408
set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})

0 commit comments

Comments
 (0)