From ad98db3f8114735906084a785dbe7941485564e2 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 13 Nov 2015 11:13:58 +0300 Subject: [PATCH] Fix pb of compilation with native libxml2 (Mandriva 2010) --- CMakeCommon/XMLProcessing.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeCommon/XMLProcessing.cmake b/CMakeCommon/XMLProcessing.cmake index 16a3f11ba..36eec9b26 100644 --- a/CMakeCommon/XMLProcessing.cmake +++ b/CMakeCommon/XMLProcessing.cmake @@ -1,12 +1,14 @@ ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D -IF(WIN32) - FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES) +IF(DEFINED ENV{LIBXML2_ROOT_DIR}) + IF(WIN32) + FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES) FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include LIBXML2_INCLUDE_DIR) -ELSE() - FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES) + ELSE() + FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES) FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR) + ENDIF() ENDIF() FIND_PACKAGE(LibXml2 REQUIRED) -- 2.39.2