X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFiltersPlugin%2FCMakeLists.txt;h=20f79f16522a5523484337119efb89f0b0640356;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=4ff7f61f2a009ce5ced1ea38061920d03db55bad;hpb=6158b5983040f4a4cf2056a28f29bc7916af1d67;p=modules%2Fshaper.git diff --git a/src/FiltersPlugin/CMakeLists.txt b/src/FiltersPlugin/CMakeLists.txt index 4ff7f61f2..20f79f165 100644 --- a/src/FiltersPlugin/CMakeLists.txt +++ b/src/FiltersPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -## Copyright (C) 2014-2019 CEA/DEN, EDF R&D +## Copyright (C) 2014-2024 CEA, EDF ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,19 @@ SET(PROJECT_HEADERS FiltersPlugin_VerticalFace.h FiltersPlugin_BelongsTo.h FiltersPlugin_OnPlane.h + FiltersPlugin_OnLine.h + FiltersPlugin_OnGeometry.h + FiltersPlugin_OnPlaneSide.h + FiltersPlugin_OppositeToEdge.h + FiltersPlugin_RelativeToSolid.h + FiltersPlugin_ExternalFaces.h + FiltersPlugin_Validators.h + FiltersPlugin_EdgeSize.h + FiltersPlugin_FaceSize.h + FiltersPlugin_VolumeSize.h + FiltersPlugin_FeatureEdges.h + FiltersPlugin_ContinuousFaces.h + FiltersPlugin_OnShapeName.h ) SET(PROJECT_SOURCES @@ -37,6 +50,19 @@ SET(PROJECT_SOURCES FiltersPlugin_VerticalFace.cpp FiltersPlugin_BelongsTo.cpp FiltersPlugin_OnPlane.cpp + FiltersPlugin_OnLine.cpp + FiltersPlugin_OnGeometry.cpp + FiltersPlugin_OnPlaneSide.cpp + FiltersPlugin_OppositeToEdge.cpp + FiltersPlugin_RelativeToSolid.cpp + FiltersPlugin_ExternalFaces.cpp + FiltersPlugin_Validators.cpp + FiltersPlugin_EdgeSize.cpp + FiltersPlugin_FaceSize.cpp + FiltersPlugin_VolumeSize.cpp + FiltersPlugin_FeatureEdges.cpp + FiltersPlugin_ContinuousFaces.cpp + FiltersPlugin_OnShapeName.cpp ) SET(PROJECT_LIBRARIES @@ -44,15 +70,43 @@ SET(PROJECT_LIBRARIES Events Config GeomAPI + GeomAlgoAPI + GeomValidators +) + +SET(PROJECT_PYFILES + FiltersPlugin_TopoConnectedFaces.py ) SET(XML_RESOURCES plugin-Filters.xml + filter-BelongsTo.xml + filter-OnGeometry.xml + filter-OnLine.xml + filter-OnPlane.xml + filter-OnPlaneSide.xml + filter-OppositeToEdge.xml + filter-RelativeToSolid.xml + filter-TopoConnectedFaces.xml + filter-EdgeSize.xml + filter-FaceSize.xml + filter-VolumeSize.xml + filter-FeatureEdges.xml + filter-ContinuousFaces.xml + filter-OnShapeName.xml +) + +SET(TEXT_RESOURCES + FiltersPlugin_msg_en.ts + FiltersPlugin_msg_fr.ts ) +SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES}) +SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES}) + ADD_DEFINITIONS(-DFILTERS_EXPORTS ${OpenCASCADE_DEFINITIONS}) -ADD_LIBRARY(Filters SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) -TARGET_LINK_LIBRARIES(Filters ${PROJECT_LIBRARIES}) +ADD_LIBRARY(FiltersPlugin SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES}) +TARGET_LINK_LIBRARIES(FiltersPlugin ${PROJECT_LIBRARIES}) INCLUDE_DIRECTORIES( ${OpenCASCADE_INCLUDE_DIR} @@ -60,16 +114,35 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/GeomAPI + ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI ${PROJECT_SOURCE_DIR}/src/GeomDataAPI + ${PROJECT_SOURCE_DIR}/src/GeomValidators + ${PROJECT_SOURCE_DIR}/src/CollectionPlugin + ${PROJECT_SOURCE_DIR}/src/Locale ) -INSTALL(TARGETS Filters DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) +INSTALL(TARGETS FiltersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) +INSTALL(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS}) +INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS( - TestFilters.py - TestFilter_BelongsTo.py - TestFilter_OnPlane.py - TestFilter_HorizontalFaces.py - TestFilter_VerticalFaces.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FiltersPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME})