From 08d66aa343010b7bea42a8c496e881338f6b7b46 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 18 Apr 2016 14:49:27 +0300 Subject: [PATCH] Issue #1309 Management of icons - INSTALL correction to use DIRECTORY instead of FILES --- src/ConnectorPlugin/CMakeLists.txt | 6 +-- src/ConstructionPlugin/CMakeLists.txt | 11 +----- src/ExchangePlugin/CMakeLists.txt | 7 +--- src/FeaturesPlugin/CMakeLists.txt | 54 +-------------------------- src/PartSetPlugin/CMakeLists.txt | 7 +--- src/PythonAddons/CMakeLists.txt | 7 +--- src/SketchPlugin/CMakeLists.txt | 43 +-------------------- 7 files changed, 7 insertions(+), 128 deletions(-) diff --git a/src/ConnectorPlugin/CMakeLists.txt b/src/ConnectorPlugin/CMakeLists.txt index 66d39800c..20012fb1e 100644 --- a/src/ConnectorPlugin/CMakeLists.txt +++ b/src/ConnectorPlugin/CMakeLists.txt @@ -9,12 +9,8 @@ SET(XML_RESOURCES plugin-Connector.xml ) -SET(ICON_RESOURCES - icons/geom_export.png -) - ADD_CUSTOM_TARGET(ConnectorPlugin SOURCES ${PYTHON_FILES} ${XML_RESOURCES}) INSTALL(FILES ${PYTHON_FILES} DESTINATION ${SHAPER_INSTALL_PYTHON_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Connector) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Connector) diff --git a/src/ConstructionPlugin/CMakeLists.txt b/src/ConstructionPlugin/CMakeLists.txt index 2d926b9d5..3b149668a 100644 --- a/src/ConstructionPlugin/CMakeLists.txt +++ b/src/ConstructionPlugin/CMakeLists.txt @@ -32,22 +32,13 @@ SET(PROJECT_LIBRARIES GeomAlgoAPI ) -SET(ICON_RESOURCES - icons/axis.png - icons/by_two_points_32x32.png - icons/circle.png - icons/cylindrical_face_32x32.png - icons/plane.png - icons/point.png -) - ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS) ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES}) INSTALL(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction) INCLUDE_DIRECTORIES( ../Config diff --git a/src/ExchangePlugin/CMakeLists.txt b/src/ExchangePlugin/CMakeLists.txt index d170f309f..e92e026cb 100644 --- a/src/ExchangePlugin/CMakeLists.txt +++ b/src/ExchangePlugin/CMakeLists.txt @@ -39,11 +39,6 @@ SET(PROJECT_LIBRARIES GeomAlgoAPI ) -SET(ICON_RESOURCES - icons/export.png - icons/import.png -) - ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS) ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) @@ -51,7 +46,7 @@ TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES}) INSTALL(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange) ADD_UNIT_TESTS(TestImport.py TestExport.py) diff --git a/src/FeaturesPlugin/CMakeLists.txt b/src/FeaturesPlugin/CMakeLists.txt index 228e7e13d..0c8d1dfef 100644 --- a/src/FeaturesPlugin/CMakeLists.txt +++ b/src/FeaturesPlugin/CMakeLists.txt @@ -89,65 +89,13 @@ SET(PROJECT_LIBRARIES GeomValidators ) -SET(ICON_RESOURCES - icons/angle.png - icons/angle_down.png - icons/angle_up.png - icons/angle_up_down.png - icons/angle_up_down_32x32.png - icons/axis.png - icons/bool_common.png - icons/bool_cut.png - icons/bool_fuse.png - icons/bool_smash.png - icons/common.png - icons/cut.png - icons/cut_shape.png - icons/cut_tool.png - icons/dimension_down.png - icons/dimension_down_32x32.png - icons/dimension_up.png - icons/dimension_up_32x32.png - icons/dimension_up_down.png - icons/dimension_up_down_32x32.png - icons/dimension_v.png - icons/dimension_v_32x32.png - icons/dimension_vert_32x32.png - icons/extrusion.png - icons/extrusion_cut.png - icons/extrusion_fuse.png - icons/extrusionsketch.png - icons/feature_wire.png - icons/fusion.png - icons/intersection.png - icons/movement.png - icons/partition.png - icons/pipe.png - icons/pipe_binormal_32x32.png - icons/pipe_locations_32x32.png - icons/pipe_simple_32x32.png - icons/placement.png - icons/placement_from.png - icons/placement_to.png - icons/plane.png - icons/plane_inverted.png - icons/plane_inverted_32x32.png - icons/revol.png - icons/revol_cut.png - icons/revol_fuse.png - icons/revolsketch.png - icons/rotation.png - icons/shape_group.png - icons/sketch.png -) - ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS) ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES}) TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES}) INSTALL(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features) ADD_UNIT_TESTS(TestExtrusion.py TestExtrusionCut.py diff --git a/src/PartSetPlugin/CMakeLists.txt b/src/PartSetPlugin/CMakeLists.txt index 5204a076c..612679d97 100644 --- a/src/PartSetPlugin/CMakeLists.txt +++ b/src/PartSetPlugin/CMakeLists.txt @@ -31,11 +31,6 @@ INCLUDE_DIRECTORIES( ../GeomAPI ) -SET(ICON_RESOURCES - icons/duplicate.png - icons/remove.png -) - INSTALL(TARGETS PartSetPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/PartSet) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/PartSet) diff --git a/src/PythonAddons/CMakeLists.txt b/src/PythonAddons/CMakeLists.txt index 4de9d6bcb..c50337a90 100644 --- a/src/PythonAddons/CMakeLists.txt +++ b/src/PythonAddons/CMakeLists.txt @@ -15,14 +15,9 @@ CONFIGURE_FILE( "${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml" ) -SET(ICON_RESOURCES - macros/box/icons/box.png - macros/rectangle/icons/rectangle.png -) - INSTALL(FILES addons_Features.py DESTINATION ${SHAPER_INSTALL_ADDONS}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(FILES __init__.py DESTINATION ${SHAPER_INSTALL_ADDONS}) INSTALL(DIRECTORY macros DESTINATION ${SHAPER_INSTALL_ADDONS}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons) +INSTALL(DIRECTORY macros/box/icons/ macros/rectangle/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons) diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index 8740502f4..ce8173d6c 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -101,50 +101,9 @@ INCLUDE_DIRECTORIES( ../SketcherPrs ) -SET(ICON_RESOURCES - icons/angle.png - icons/angle_backward.png - icons/angle_complementary.png - icons/angle_constr.png - icons/angle_direct.png - icons/angle_up_32x32.png - icons/angle_up_full_32x32.png - icons/arc.png - icons/arc_3pt_32x32.png - icons/arc_base_32x32.png - icons/arc_tang_32x32.png - icons/circle.png - icons/circle_3pt_32x32.png - icons/circle_pt_rad_32x32.png - icons/coincedence.png - icons/collinear.png - icons/distance.png - icons/equal.png - icons/fillet.png - icons/fixed.png - icons/horisontal.png - icons/intersection_point.png - icons/length.png - icons/line.png - icons/middlepoint.png - icons/mirror.png - icons/parallel.png - icons/perpendicular.png - icons/point.png - icons/radius.png - icons/radius_constr.png - icons/rotate.png - icons/sketch.png - icons/tangent.png - icons/translate.png - icons/translate_32x32.png - icons/translate_full_32x32.png - icons/vertical.png -) - INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -INSTALL(FILES ${ICON_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch) +INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch) ADD_UNIT_TESTS(TestSketchPointLine.py TestSketchArcCircle.py -- 2.39.2