From: akl Date: Tue, 19 Feb 2013 12:30:54 +0000 (+0000) Subject: Fix to find the correct native 'libxml2' library. X-Git-Tag: V6_main_FINAL~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30b36eea6c647284cffea39391d8a8157b79a322;p=modules%2Fkernel.git Fix to find the correct native 'libxml2' library. --- 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)