X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FExchangePlugin%2FCMakeLists.txt;h=27b3961f0452db63fe110ca55cc72239242b9dba;hb=f8d8e2ad28954a28f22d37c63f4d02399d65a5fe;hp=569caed332c3b806a1df5135afcf6cafa1c611e6;hpb=2452f6e679a2c0a4f261dac25e4b6592f0a540c1;p=modules%2Fshaper.git diff --git a/src/ExchangePlugin/CMakeLists.txt b/src/ExchangePlugin/CMakeLists.txt index 569caed33..27b3961f0 100644 --- a/src/ExchangePlugin/CMakeLists.txt +++ b/src/ExchangePlugin/CMakeLists.txt @@ -1,4 +1,21 @@ -## Copyright (C) 2014-20xx CEA/DEN, EDF R&D +# Copyright (C) 2014-2019 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# INCLUDE(Common) INCLUDE(UnitTest) @@ -6,9 +23,13 @@ INCLUDE(UnitTest) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/ModelAPI + ${PROJECT_SOURCE_DIR}/src/ModelHighAPI ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI - ${CAS_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/GeomValidators + ${PROJECT_SOURCE_DIR}/src/XAO + ${PROJECT_SOURCE_DIR}/src/ConstructionPlugin + ${PROJECT_SOURCE_DIR}/src/PartSetPlugin ) SET(PROJECT_HEADERS @@ -18,6 +39,9 @@ SET(PROJECT_HEADERS ExchangePlugin_ExportFeature.h ExchangePlugin_Validators.h ExchangePlugin_Tools.h + ExchangePlugin_Dump.h + ExchangePlugin_ImportPart.h + ExchangePlugin_ExportPart.h ) SET(PROJECT_SOURCES @@ -26,31 +50,94 @@ SET(PROJECT_SOURCES ExchangePlugin_ExportFeature.cpp ExchangePlugin_Validators.cpp ExchangePlugin_Tools.cpp + ExchangePlugin_Dump.cpp + ExchangePlugin_ImportPart.cpp + ExchangePlugin_ExportPart.cpp ) SET(XML_RESOURCES + export_widget.xml plugin-Exchange.xml ) +SET(TEXT_RESOURCES + ExchangePlugin_msg_en.ts + ExchangePlugin_msg_fr.ts +) + SET(PROJECT_LIBRARIES Events Config ModelAPI + ModelHighAPI GeomAPI GeomAlgoAPI + GeomValidators + XAOShaper ) +SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES}) -ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS ${CAS_DEFINITIONS}) -ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) +# default dump approaches (will be set if not initialized) +SET(PYTHONDUMP_NAMING ON CACHE BOOL "Dump named references to shapes") +SET(PYTHONDUMP_GEO ON CACHE BOOL "Dump references to shapes by the geometric properties") +SET(PYTHONDUMP_WEAK OFF CACHE BOOL "Dump weak named references to shapes") -TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES}) +ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS) +IF(${PYTHONDUMP_NAMING}) + ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_NAMING) +ENDIF() +IF(${PYTHONDUMP_GEO}) + ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_GEO) +ENDIF() +IF(${PYTHONDUMP_WEAK}) + ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_WEAK) +ENDIF() +ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES}) -INSTALL(TARGETS ExchangePlugin DESTINATION plugins) -INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins) +TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES}) -ADD_UNIT_TESTS(TestImport.py TestExport.py) +INSTALL(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) +INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange) +INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -CONFIGURE_FILE(Test/Data/solid.brep Data/solid.brep COPYONLY) -CONFIGURE_FILE(Test/Data/screw.step Data/screw.step COPYONLY) -CONFIGURE_FILE(Test/Data/screw.stp Data/screw.stp COPYONLY) -CONFIGURE_FILE(Test/Data/bearing.iges Data/bearing.iges COPYONLY) +ADD_UNIT_TESTS( + TestImport.py + TestExport.py + Test2290.py + Test2459.py + Test18710.py + TestExportToXAOWithFields.py + TestExportToXAOWithGroupNotUpdated.py + TestExport_FiniteValidator.py + TestExportPart_Failure_1.py + TestExportPart_Failure_2.py + TestExportPart_Failure_3.py + TestExportPart_FullPartSet.py + TestExportPart_FullPart_1.py + TestExportPart_FullPart_2.py + TestExportPart_PartSet.py + TestExportPart_Results_1.py + TestExportPart_Results_2.py + TestExportPart_Results_3.py + TestExportPart_Results_4.py + TestExportPart_Results_5.py + TestExportPart_Results_6.py + TestExportPart_Results_7.py + TestExportPart_Results_8.py + TestImportPart_AfterCurrent_1.py + TestImportPart_AfterCurrent_2.py + TestImportPart_AfterLast_1.py + TestImportPart_AfterLast_2.py + TestImportPart_AfterLast_3.py + TestImportPart_AfterLast_4.py + TestImportPart_AfterLast_5.py + TestImportPart_AfterLast_6.py + TestImportPart_Construction_1.py + TestImportPart_Construction_2.py + TestImportPart_Construction_3.py + TestImportPart_Construction_4.py + TestImportPart_Multiple.py + TestImportPart_ToEmptyPart.py + TestImportPart_ToEmptyPartSet.py +)