Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a public vtkext module that can be used by both libf3d and plugins #1280

Merged
merged 52 commits into from
Mar 15, 2024

Conversation

mwestphal
Copy link
Contributor

@mwestphal mwestphal commented Feb 10, 2024

This add a new vtkext module that can be used by both libf3d and plugins.
For now it contains only two classes but may be improved in the future.
It must depend only on itself and VTK, but the internal private VTK modules can depend on it.

This also split the sdk and the plugin_sdk in two cmake installation components as well as split the find_package results in multiple parts,

  • application (f3d::f3d),
  • library (f3d::libf3d and include_dir) and
  • pluginsdk (f3d::vtkext and plugin macros)

This also fix a potential segfault when loading an invalid plugin.

Fix: #1115

Installation result:

[100%] Built target f3d
Install the project...
-- Install configuration: "Release"
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/libvtkext.so
-- Set non-toolchain portion of runtime path of "../install/lib/libvtkext.so" to "$ORIGIN"
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/applications/f3d-plugin-native.desktop
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/thumbnailers/f3d-plugin-native.thumbnailer
-- Installing: /home/glow/dev/f3d/f3d/build/../install/share/f3d/plugins/native.json
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/applications/f3d-plugin-assimp.desktop
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/thumbnailers/f3d-plugin-assimp.thumbnailer
-- Installing: /home/glow/dev/f3d/f3d/build/../install/share/f3d/plugins/assimp.json
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/applications/f3d-plugin-exodus.desktop
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/thumbnailers/f3d-plugin-exodus.thumbnailer
-- Installing: /home/glow/dev/f3d/f3d/build/../install/share/f3d/plugins/exodus.json
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/libf3d.so.2.3
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/libf3d.so.2
-- Set non-toolchain portion of runtime path of "../install/lib/libf3d.so.2.3" to "$ORIGIN"
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/libf3d.so
-- Installing: /home/glow/dev/f3d/f3d/build/../install/bin/f3d
-- Set non-toolchain portion of runtime path of "../install/bin/f3d" to "$ORIGIN/../lib"
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/applications/f3d.desktop
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/icons/hicolor/32x32/apps/f3d.png
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/icons/hicolor/48x48/apps/f3d.png
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/icons/hicolor/64x64/apps/f3d.png
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/icons/hicolor/scalable/apps/f3d.svg
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/bash-completion/completions/f3d
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/zsh/site-functions/_f3d
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/fish/vendor_completions.d/f3d.fish
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/metainfo/app.f3d.F3D.metainfo.xml
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/doc/F3D/LICENSE.md
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/share/doc/F3D/THIRD_PARTY_LICENSES.md
[glow@arch ~/dev/f3d/f3d/build]$ cmake --install . --component sdk
-- Install configuration: "Release"
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/reader.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/plugin.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/camera.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/engine.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/exception.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/export.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/image.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/interactor.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/loader.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/log.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/options.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/types.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/utils.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/window.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dLibraryTargets.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dLibraryTargets-release.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dConfig.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dConfigVersion.cmake
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/library-config.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dEmbed.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dTargets.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dTargets-release.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/application-config.cmake
[glow@arch ~/dev/f3d/f3d/build]$ cmake --install . --component plugin_sdk
-- Install configuration: "Release"
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/vtkF3DFaceVaryingPointDispatcher.h
-- Installing: /home/glow/dev/f3d/f3d/build/../install/include/f3d/vtkF3DBitonicSort.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/vtkextModule.h
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/vtk/hierarchy/f3d_vtkext/vtkext-hierarchy.txt
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d_vtkext/f3d_vtkext-targets.cmake
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d_vtkext/f3d_vtkext-targets-release.cmake
-- Installing: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d_vtkext/f3d_vtkext-vtk-module-properties.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/reader.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/include/f3d/plugin.h
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/plugin-config.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/f3dPlugin.cmake
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/plugin.cxx.in
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/plugin.desktop.in
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/plugin.thumbnailer.in
-- Up-to-date: /home/glow/dev/f3d/f3d/build/../install/lib/cmake/f3d/readerBoilerPlate.h.in

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.43%. Comparing base (f0ecafb) to head (4a86e88).

Files Patch % Lines
library/src/engine.cxx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1280      +/-   ##
==========================================
- Coverage   96.44%   96.43%   -0.02%     
==========================================
  Files         146      146              
  Lines        8715     8716       +1     
==========================================
  Hits         8405     8405              
- Misses        310      311       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mwestphal mwestphal force-pushed the vtk_shared_module branch from 47d3e56 to 2c3f5f1 Compare March 2, 2024 17:09
cmake/f3dConfig.cmake.in Outdated Show resolved Hide resolved
cmake/f3dPlugin.cmake Outdated Show resolved Hide resolved
cmake/f3dPlugin.cmake Outdated Show resolved Hide resolved
Copy link
Member

@Meakk Meakk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments. Overall it looks very good :)

.github/actions/generic-ci/action.yml Outdated Show resolved Hide resolved
cmake/f3dConfig.cmake.in Outdated Show resolved Hide resolved
cmake/f3dConfig.cmake.in Outdated Show resolved Hide resolved
cmake/f3dConfig.cmake.in Outdated Show resolved Hide resolved
cmake/library-config.cmake Outdated Show resolved Hide resolved
plugins/exodus/CMakeLists.txt Outdated Show resolved Hide resolved
plugins/occt/CMakeLists.txt Outdated Show resolved Hide resolved
plugins/usd/CMakeLists.txt Outdated Show resolved Hide resolved
plugins/vdb/CMakeLists.txt Outdated Show resolved Hide resolved
vtkext/public/module/Testing/CMakeLists.txt Outdated Show resolved Hide resolved
cmake/f3dConfig.cmake.in Outdated Show resolved Hide resolved
@mwestphal mwestphal changed the title Vtk shared module Create a public vtkext module that can be used by both libf3d and plugins Mar 15, 2024
@mwestphal mwestphal merged commit e554e26 into f3d-app:master Mar 15, 2024
36 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework VTK extensions
2 participants