## 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})
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
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)
# 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}
)
# --- headers ---
SET(XAO_HEADERS
- XAO.hxx
+ XAO.hxx
XAO_BooleanField.hxx
XAO_BooleanStep.hxx
XAO_BrepGeometry.hxx
# --- 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})