]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix cmake error with LibXml2
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 23 Jun 2016 08:12:58 +0000 (11:12 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 23 Jun 2016 08:12:58 +0000 (11:12 +0300)
CMakeCommon/XMLProcessing.cmake
CMakeLists.txt

index 0cadddbe2c5556a6f79d29ff54cd5f0323028a88..c47a308953137b418ed297b6070ac9bbbc6e90f8 100644 (file)
@@ -1,15 +1,5 @@
 ## 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})
index 4b2fae4d89b9ecec7c4cfbf854eef349cd1ee825..df940b604dd815b6e44cde39169bd7ca6651c10a 100644 (file)
@@ -13,6 +13,16 @@ INCLUDE(FindSalome)
 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)