diff --git a/src/meshlabplugins/filter_plymc/CMakeLists.txt b/src/meshlabplugins/filter_plymc/CMakeLists.txt index 9d0d613af..f83df011b 100644 --- a/src/meshlabplugins/filter_plymc/CMakeLists.txt +++ b/src/meshlabplugins/filter_plymc/CMakeLists.txt @@ -6,6 +6,6 @@ set(SOURCES filter_plymc.cpp ${VCGDIR}/wrap/ply/plylib.cpp) set(HEADERS filter_plymc.h) -add_meshlab_plugin(filter_plymc MODULE ${SOURCES} ${HEADERS}) +add_meshlab_plugin(filter_plymc ${SOURCES} ${HEADERS}) target_link_libraries(filter_plymc PRIVATE OpenGL::GLU) diff --git a/src/meshlabplugins/io_3ds/CMakeLists.txt b/src/meshlabplugins/io_3ds/CMakeLists.txt index cf772c86c..3423a4692 100644 --- a/src/meshlabplugins/io_3ds/CMakeLists.txt +++ b/src/meshlabplugins/io_3ds/CMakeLists.txt @@ -9,26 +9,10 @@ if(TARGET external-lib3ds) set(HEADERS import_3ds.h io_3ds.h meshio.h) - add_library(io_3ds MODULE ${SOURCES} ${HEADERS}) - - target_include_directories(io_3ds PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(io_3ds PUBLIC meshlab-common) + add_meshlab_plugin(io_3ds ${SOURCES} ${HEADERS}) target_link_libraries(io_3ds PRIVATE external-lib3ds) - set_property(TARGET io_3ds PROPERTY FOLDER Plugins) - - set_property(TARGET io_3ds PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - set_property(TARGET io_3ds PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - install( - TARGETS io_3ds - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) - else() message( STATUS diff --git a/src/meshlabplugins/io_base/CMakeLists.txt b/src/meshlabplugins/io_base/CMakeLists.txt index 4f508e4c1..8e7622f58 100644 --- a/src/meshlabplugins/io_base/CMakeLists.txt +++ b/src/meshlabplugins/io_base/CMakeLists.txt @@ -19,22 +19,6 @@ set(HEADERS ${VCGDIR}/wrap/io_trimesh/io_material.h ${VCGDIR}/wrap/ply/plylib.h) -add_library(io_base MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_base PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_base PUBLIC meshlab-common) +add_meshlab_plugin(io_base ${SOURCES} ${HEADERS}) target_link_libraries(io_base PRIVATE OpenGL::GLU) - -set_property(TARGET io_base PROPERTY FOLDER Plugins) - -set_property(TARGET io_base PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_base PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_base - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) diff --git a/src/meshlabplugins/io_bre/CMakeLists.txt b/src/meshlabplugins/io_bre/CMakeLists.txt index ed6c91334..de77b158b 100644 --- a/src/meshlabplugins/io_bre/CMakeLists.txt +++ b/src/meshlabplugins/io_bre/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_bre.cpp) set(HEADERS io_bre.h) -add_library(io_bre MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_bre PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_bre PUBLIC meshlab-common) - -set_property(TARGET io_bre PROPERTY FOLDER Plugins) - -set_property(TARGET io_bre PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_bre PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_bre - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_bre ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_collada/CMakeLists.txt b/src/meshlabplugins/io_collada/CMakeLists.txt index d8494b9a0..90dad1f0b 100644 --- a/src/meshlabplugins/io_collada/CMakeLists.txt +++ b/src/meshlabplugins/io_collada/CMakeLists.txt @@ -12,20 +12,4 @@ set(HEADERS ${VCGDIR}/wrap/io_trimesh/export_dae.h ${VCGDIR}/wrap/io_trimesh/import_dae.h) -add_library(io_collada MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_collada PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_collada PUBLIC meshlab-common) - -set_property(TARGET io_collada PROPERTY FOLDER Plugins) - -set_property(TARGET io_collada PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_collada PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_collada - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_collada ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_ctm/CMakeLists.txt b/src/meshlabplugins/io_ctm/CMakeLists.txt index 8d958bf24..764a98f8b 100644 --- a/src/meshlabplugins/io_ctm/CMakeLists.txt +++ b/src/meshlabplugins/io_ctm/CMakeLists.txt @@ -9,26 +9,9 @@ if(TARGET external-openctm) set(HEADERS io_ctm.h) - add_library(io_ctm MODULE ${SOURCES} ${HEADERS}) - - target_include_directories(io_ctm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(io_ctm PUBLIC meshlab-common) + add_meshlab_plugin(io_ctm ${SOURCES} ${HEADERS}) target_link_libraries(io_ctm PRIVATE external-openctm) - - set_property(TARGET io_ctm PROPERTY FOLDER Plugins) - - set_property(TARGET io_ctm PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - set_property(TARGET io_ctm PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - install( - TARGETS io_ctm - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) - else() message(STATUS "Skipping io_ctm - missing OpenCTM.") endif() diff --git a/src/meshlabplugins/io_expe/CMakeLists.txt b/src/meshlabplugins/io_expe/CMakeLists.txt index dede6cfbf..dfc2bd1c7 100644 --- a/src/meshlabplugins/io_expe/CMakeLists.txt +++ b/src/meshlabplugins/io_expe/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_expe.cpp) set(HEADERS export_xyz.h import_expe.h import_xyz.h io_expe.h) -add_library(io_expe MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_expe PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_expe PUBLIC meshlab-common) - -set_property(TARGET io_expe PROPERTY FOLDER Plugins) - -set_property(TARGET io_expe PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_expe PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_expe - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_expe ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_json/CMakeLists.txt b/src/meshlabplugins/io_json/CMakeLists.txt index cdaaf1783..96a803e16 100644 --- a/src/meshlabplugins/io_json/CMakeLists.txt +++ b/src/meshlabplugins/io_json/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_json.cpp) set(HEADERS io_json.h) -add_library(io_json MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_json PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_json PUBLIC meshlab-common) - -set_property(TARGET io_json PROPERTY FOLDER Plugins) - -set_property(TARGET io_json PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_json PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_json - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_json ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_pdb/CMakeLists.txt b/src/meshlabplugins/io_pdb/CMakeLists.txt index c8e8e3f1c..45f1c8c40 100644 --- a/src/meshlabplugins/io_pdb/CMakeLists.txt +++ b/src/meshlabplugins/io_pdb/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_pdb.cpp) set(HEADERS io_pdb.h) -add_library(io_pdb MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_pdb PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_pdb PUBLIC meshlab-common) - -set_property(TARGET io_pdb PROPERTY FOLDER Plugins) - -set_property(TARGET io_pdb PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_pdb PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_pdb - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_pdb ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_tri/CMakeLists.txt b/src/meshlabplugins/io_tri/CMakeLists.txt index 3b0855899..acb6d7831 100644 --- a/src/meshlabplugins/io_tri/CMakeLists.txt +++ b/src/meshlabplugins/io_tri/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_tri.cpp) set(HEADERS io_tri.h) -add_library(io_tri MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_tri PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_tri PUBLIC meshlab-common) - -set_property(TARGET io_tri PROPERTY FOLDER Plugins) - -set_property(TARGET io_tri PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_tri PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_tri - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_tri ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_txt/CMakeLists.txt b/src/meshlabplugins/io_txt/CMakeLists.txt index 37425acf0..a7dc5df12 100644 --- a/src/meshlabplugins/io_txt/CMakeLists.txt +++ b/src/meshlabplugins/io_txt/CMakeLists.txt @@ -6,20 +6,4 @@ set(SOURCES io_txt.cpp) set(HEADERS io_txt.h) -add_library(io_txt MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_txt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_txt PUBLIC meshlab-common) - -set_property(TARGET io_txt PROPERTY FOLDER Plugins) - -set_property(TARGET io_txt PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_txt PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_txt - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(io_txt ${SOURCES} ${HEADERS}) diff --git a/src/meshlabplugins/io_u3d/CMakeLists.txt b/src/meshlabplugins/io_u3d/CMakeLists.txt index e6091e150..15a113fe6 100644 --- a/src/meshlabplugins/io_u3d/CMakeLists.txt +++ b/src/meshlabplugins/io_u3d/CMakeLists.txt @@ -10,27 +10,10 @@ if(TARGET external-IDTFConverter) set(HEADERS io_u3d.h) include_directories("${EXTERNAL_DIR}/u3d/src/IDTF") - add_library(io_u3d MODULE ${SOURCES} ${HEADERS}) - - target_include_directories(io_u3d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - - target_link_libraries(io_u3d PUBLIC meshlab-common) + add_meshlab_plugin(io_u3d ${SOURCES} ${HEADERS}) target_link_libraries(io_u3d PUBLIC external-IDTFConverter IFXCoreStatic ${CMAKE_DL_LIBS}) - set_property(TARGET io_u3d PROPERTY FOLDER Plugins) - - set_property(TARGET io_u3d PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - set_property(TARGET io_u3d PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - - install( - TARGETS io_u3d - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) - else() message(STATUS "Skipping io_u3d - missing u3d in external directory.") endif() diff --git a/src/meshlabplugins/io_x3d/CMakeLists.txt b/src/meshlabplugins/io_x3d/CMakeLists.txt index 7a68863aa..f5676f173 100644 --- a/src/meshlabplugins/io_x3d/CMakeLists.txt +++ b/src/meshlabplugins/io_x3d/CMakeLists.txt @@ -7,22 +7,6 @@ set(SOURCES io_x3d.cpp vrml/Parser.cpp vrml/Scanner.cpp) set(HEADERS export_x3d.h import_x3d.h io_x3d.h util_x3d.h vrml/Parser.h vrml/Scanner.h) -add_library(io_x3d MODULE ${SOURCES} ${HEADERS}) - -target_include_directories(io_x3d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(io_x3d PUBLIC meshlab-common) +add_meshlab_plugin(io_x3d ${SOURCES} ${HEADERS}) target_link_libraries(io_x3d PRIVATE OpenGL::GLU) - -set_property(TARGET io_x3d PROPERTY FOLDER Plugins) - -set_property(TARGET io_x3d PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET io_x3d PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS io_x3d - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) diff --git a/src/meshlabplugins/ioraster_base/CMakeLists.txt b/src/meshlabplugins/ioraster_base/CMakeLists.txt index 34351e39a..f4dc1f0e5 100644 --- a/src/meshlabplugins/ioraster_base/CMakeLists.txt +++ b/src/meshlabplugins/ioraster_base/CMakeLists.txt @@ -5,23 +5,8 @@ set(SOURCES set(HEADERS ioraster_base.h) -add_library(ioraster_base MODULE ${SOURCES} ${HEADERS}) +add_meshlab_plugin(ioraster_base ${SOURCES} ${HEADERS}) -target_include_directories(ioraster_base PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${EXTERNAL_DIR}/easyexif/) - -target_link_libraries(ioraster_base PUBLIC meshlab-common) +target_include_directories(ioraster_base PRIVATE ${EXTERNAL_DIR}/easyexif/) target_link_libraries(ioraster_base PRIVATE OpenGL::GLU) - -set_property(TARGET ioraster_base PROPERTY FOLDER Plugins) - -set_property(TARGET ioraster_base PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET ioraster_base PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS ioraster_base - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) diff --git a/src/meshlabplugins/render_gdp/CMakeLists.txt b/src/meshlabplugins/render_gdp/CMakeLists.txt index cc6a91898..33093a83b 100644 --- a/src/meshlabplugins/render_gdp/CMakeLists.txt +++ b/src/meshlabplugins/render_gdp/CMakeLists.txt @@ -8,20 +8,4 @@ set(HEADERS meshrender.h shaderDialog.h shaderStructs.h textfile.h) set(UI shaderDialog.ui) -add_library(render_gdp MODULE ${SOURCES} ${HEADERS} ${UI}) - -target_include_directories(render_gdp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(render_gdp PUBLIC meshlab-common) - -set_property(TARGET render_gdp PROPERTY FOLDER Plugins) - -set_property(TARGET render_gdp PROPERTY RUNTIME_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET render_gdp PROPERTY LIBRARY_OUTPUT_DIRECTORY - ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS render_gdp - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins) +add_meshlab_plugin(render_gdp ${SOURCES} ${HEADERS} ${UI}) diff --git a/src/meshlabplugins/render_radiance_scaling/CMakeLists.txt b/src/meshlabplugins/render_radiance_scaling/CMakeLists.txt index e02d8af4a..abe960be4 100644 --- a/src/meshlabplugins/render_radiance_scaling/CMakeLists.txt +++ b/src/meshlabplugins/render_radiance_scaling/CMakeLists.txt @@ -25,24 +25,7 @@ set(RESOURCES radianceScalingRenderer.qrc) set(UI shaderDialog.ui) -add_library(render_radiance_scaling MODULE ${SOURCES} ${HEADERS} ${RESOURCES} +add_meshlab_plugin(render_radiance_scaling ${SOURCES} ${HEADERS} ${RESOURCES} ${UI}) -target_include_directories(render_radiance_scaling - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(render_radiance_scaling PUBLIC meshlab-common) - target_link_libraries(render_radiance_scaling PRIVATE OpenGL::GLU) - -set_property(TARGET render_radiance_scaling PROPERTY FOLDER Plugins) - -set_property(TARGET render_radiance_scaling - PROPERTY RUNTIME_OUTPUT_DIRECTORY ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -set_property(TARGET render_radiance_scaling - PROPERTY LIBRARY_OUTPUT_DIRECTORY ${MESHLAB_PLUGIN_OUTPUT_DIR}) - -install( - TARGETS render_radiance_scaling - DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR} - COMPONENT Plugins)