## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-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)
- FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
- ENDIF()
-ENDIF()
-
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
LINK_DIRECTORIES (${LIBXML2_LIBRARIES})
INCLUDE(FindCAS)
INCLUDE(FindSUIT)
+# Find LibXml2
+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)
+ FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
+ ENDIF()
+ENDIF()
# It could be called only once
FIND_PACKAGE(LibXml2 REQUIRED)