From: spo Date: Tue, 24 Nov 2015 12:15:23 +0000 (+0300) Subject: Make XAO compilation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eaa89d94d3f675884b9bc7166312858528948741;p=modules%2Fshaper.git Make XAO compilation --- diff --git a/CMakeCommon/XMLProcessing.cmake b/CMakeCommon/XMLProcessing.cmake index 36eec9b26..3c3248b77 100644 --- a/CMakeCommon/XMLProcessing.cmake +++ b/CMakeCommon/XMLProcessing.cmake @@ -4,15 +4,11 @@ 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}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f7f7a8f6..0df192070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ INCLUDE(FindPython) INCLUDE(FindSalome) INCLUDE(FindCAS) INCLUDE(FindSUIT) +INCLUDE(XMLProcessing) IF(UNIX) IF(CMAKE_COMPILER_IS_GNUCC) @@ -66,6 +67,7 @@ IF(NOT ${HAVE_SALOME}) ENDIF(NOT ${HAVE_SALOME}) ADD_SUBDIRECTORY (src/XGUI) +ADD_SUBDIRECTORY (src/XAO) ADD_SUBDIRECTORY (src/ExchangePlugin) ADD_SUBDIRECTORY (src/GeomValidators) ADD_SUBDIRECTORY (src/InitializationPlugin) diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index e43622f80..b1921849f 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -1,10 +1,10 @@ ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D -INCLUDE(Common) -INCLUDE(XMLProcessing) - -INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events - ${PYTHON_INCLUDE_DIR}) +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR}/src/Events + ${PYTHON_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ) SET(PROJECT_HEADERS Config_def.h @@ -24,7 +24,7 @@ SET(PROJECT_HEADERS Config_SelectionFilterMessage.h Config_ValidatorReader.h Config_DataModelReader.h - ) + ) SET(PROJECT_SOURCES Config_FeatureMessage.cpp @@ -42,23 +42,26 @@ SET(PROJECT_SOURCES Config_SelectionFilterMessage.cpp Config_ValidatorReader.cpp Config_DataModelReader.cpp -) + ) SET(XML_RESOURCES plugins.xml dataModel.xml -) + ) SET(PROJECT_LIBRARIES - Events - ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -) + Events + ${LIBXML2_LIBRARIES} + ${PYTHON_LIBRARIES} + ) -SOURCE_GROUP ("Resource Files" FILES ${XML_RESOURCES}) +SOURCE_GROUP("Resource Files" FILES ${XML_RESOURCES}) -ADD_DEFINITIONS(-DCONFIG_EXPORTS -D_SCL_SECURE_NO_WARNINGS) -# -D_SCL_SECURE_NO_WARNINGS - to disable warnings 4996 +ADD_DEFINITIONS( + -DCONFIG_EXPORTS + -D_SCL_SECURE_NO_WARNINGS # to disable warnings 4996 + ${LIBXML2_DEFINITIONS} + ) ADD_LIBRARY(Config SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) diff --git a/src/XAO/CMakeLists.txt b/src/XAO/CMakeLists.txt index f1097985f..008c0c238 100644 --- a/src/XAO/CMakeLists.txt +++ b/src/XAO/CMakeLists.txt @@ -17,9 +17,9 @@ # 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 --- @@ -46,7 +46,7 @@ SET(_link_LIBRARIES # --- headers --- SET(XAO_HEADERS - XAO.hxx + XAO.hxx XAO_BooleanField.hxx XAO_BooleanStep.hxx XAO_BrepGeometry.hxx @@ -91,8 +91,9 @@ SET(XAO_SOURCES # --- rules --- -ADD_LIBRARY(XAO ${XAO_SOURCES}) +ADD_LIBRARY(XAO SHARED ${XAO_SOURCES}) TARGET_LINK_LIBRARIES(XAO ${_link_LIBRARIES}) -INSTALL(TARGETS XAO EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +#INSTALL(TARGETS XAO EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +INSTALL(TARGETS XAO DESTINATION bin) -INSTALL(FILES ${XAO_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +#INSTALL(FILES ${XAO_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})