From 30b36eea6c647284cffea39391d8a8157b79a322 Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 19 Feb 2013 12:30:54 +0000 Subject: [PATCH] Fix to find the correct native 'libxml2' library. --- salome_adm/cmake_files/deprecated/FindLIBXML2.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake b/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake index 5eafb937d..8ff923e07 100644 --- a/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake +++ b/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake @@ -112,7 +112,14 @@ IF(LIBXML2_STATUS) IF(WINDOWS) FIND_LIBRARY(LIBXML2_LIB libxml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) ELSE(WINDOWS) - FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + IF(LIBXML2_LIB_PATHS) + FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + ELSE(LIBXML2_LIB_PATHS) + # use pkg-config to get the directories and then use these values in FIND_LIBRARY() + FIND_PACKAGE(PkgConfig QUIET) + PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0) + FIND_LIBRARY(LIBXML2_LIB xml2 HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS}) + ENDIF(LIBXML2_LIB_PATHS) ENDIF(WINDOWS) SET(LIBXML2_LIBS) IF(LIBXML2_LIB) -- 2.39.2