]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make XAO compilation
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 24 Nov 2015 12:15:23 +0000 (15:15 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Wed, 22 Jun 2016 11:06:00 +0000 (14:06 +0300)
CMakeCommon/XMLProcessing.cmake
CMakeLists.txt
src/XAO/CMakeLists.txt

index 36eec9b26deaa38496e03712b3f0eb8731d0a598..0cadddbe2c5556a6f79d29ff54cd5f0323028a88 100644 (file)
@@ -1,18 +1,15 @@
 ## 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)
+        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)
+        FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
     ENDIF()
 ENDIF()
 
-FIND_PACKAGE(LibXml2 REQUIRED)
-
 ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
 LINK_DIRECTORIES (${LIBXML2_LIBRARIES})
index 1047795a7de43a940768220ac3380184e29e22f4..4b2fae4d89b9ecec7c4cfbf854eef349cd1ee825 100644 (file)
@@ -13,6 +13,9 @@ INCLUDE(FindSalome)
 INCLUDE(FindCAS)
 INCLUDE(FindSUIT)
 
+# It could be called only once
+FIND_PACKAGE(LibXml2 REQUIRED)
+
 IF(UNIX)
   IF(CMAKE_COMPILER_IS_GNUCC)
     #C++11 is not supported on some platforms, disable it
@@ -70,6 +73,7 @@ ADD_SUBDIRECTORY (doc)
 ADD_SUBDIRECTORY (src/Config)
 ADD_SUBDIRECTORY (src/Events)
 ADD_SUBDIRECTORY (src/Model)
+ADD_SUBDIRECTORY (src/XAO)
 ADD_SUBDIRECTORY (src/GeomAPI)
 ADD_SUBDIRECTORY (src/ModelAPI)
 ADD_SUBDIRECTORY (src/GeomAlgoAPI)
index f1097985fabb923068fd2bad600684d506e01071..2e9700e8412423ec100781c5ec4d2da1b41161f8 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-IF(SALOME_BUILD_TESTS)
-  ADD_SUBDIRECTORY(tests)
-ENDIF(SALOME_BUILD_TESTS)
+#IF(SALOME_BUILD_TESTS)
+#  ADD_SUBDIRECTORY(tests)
+#ENDIF(SALOME_BUILD_TESTS)
 
 # --- options ---
 
+INCLUDE(Common)
+INCLUDE(XMLProcessing)
+
 # additional include directories
-INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIR}
-  ${LIBXML2_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
-  )
+INCLUDE_DIRECTORIES(${CAS_INCLUDE_DIRS})
 
 # additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${LIBXML2_DEFINITIONS} 
-  ${CAS_DEFINITIONS}
-  )
+ADD_DEFINITIONS(-DXAO_EXPORTS ${CAS_DEFINITIONS})
 
 # libraries to link to
-SET(_link_LIBRARIES
-  ${PTHREAD_LIBRARIES}
+SET(PROJECT_LIBRARIES
   ${LIBXML2_LIBRARIES}
   ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
   )
@@ -46,7 +41,7 @@ SET(_link_LIBRARIES
 # --- headers ---
 
 SET(XAO_HEADERS
-  XAO.hxx 
+  XAO.hxx
   XAO_BooleanField.hxx
   XAO_BooleanStep.hxx
   XAO_BrepGeometry.hxx
@@ -91,8 +86,6 @@ SET(XAO_SOURCES
 
 # --- rules ---
 
-ADD_LIBRARY(XAO ${XAO_SOURCES})
-TARGET_LINK_LIBRARIES(XAO ${_link_LIBRARIES})
-INSTALL(TARGETS XAO EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-INSTALL(FILES ${XAO_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+ADD_LIBRARY(XAO SHARED ${XAO_SOURCES} ${XAO_HEADERS})
+TARGET_LINK_LIBRARIES(XAO ${PROJECT_LIBRARIES})
+INSTALL(TARGETS XAO DESTINATION ${SHAPER_INSTALL_BIN})