From 716b347e845d8249940e1e5caff36252126e6687 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 2 Mar 2024 18:02:19 +0100 Subject: [PATCH] separate f3dPlugin --- VTKExtensions/public/CMakeLists.txt | 2 +- cmake/f3dPlugin.cmake | 2 +- examples/plugins/example-plugin/CMakeLists.txt | 8 ++++---- library/CMakeLists.txt | 10 ++++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/VTKExtensions/public/CMakeLists.txt b/VTKExtensions/public/CMakeLists.txt index 9ea1061ef7..c3dd633179 100644 --- a/VTKExtensions/public/CMakeLists.txt +++ b/VTKExtensions/public/CMakeLists.txt @@ -15,6 +15,6 @@ vtk_module_build( INSTALL_EXPORT "f3dVTKExtensionsTargets" INSTALL_HEADERS ON HEADERS_COMPONENT plugin_sdk -# HEADERS_EXCLUDE_FROM_ALL ON https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10889 + HEADERS_EXCLUDE_FROM_ALL ON TARGETS_COMPONENT vtkext PACKAGE "f3dPlugin") diff --git a/cmake/f3dPlugin.cmake b/cmake/f3dPlugin.cmake index 5b7ab62f04..eb54693c1e 100644 --- a/cmake/f3dPlugin.cmake +++ b/cmake/f3dPlugin.cmake @@ -270,7 +270,7 @@ macro(f3d_plugin_build) if(DEFINED f3d_INCLUDE_DIR) # External plugin path set(_f3d_has_application "${f3d_BUILD_APPLICATION}") - set(_f3d_include_path "${f3d_INCLUDE_DIR}/f3d") + set(_f3d_include_path "${f3d_INCLUDE_DIR}/f3dPlugin") set(_f3d_config_dir ${f3d_CONFIG_DIR}) set(_f3d_plugins_install_dir ${f3d_PLUGINS_INSTALL_DIR}) else() diff --git a/examples/plugins/example-plugin/CMakeLists.txt b/examples/plugins/example-plugin/CMakeLists.txt index 92a9efb04e..f3e99b0a22 100644 --- a/examples/plugins/example-plugin/CMakeLists.txt +++ b/examples/plugins/example-plugin/CMakeLists.txt @@ -4,10 +4,10 @@ project(example-plugin) include(GNUInstallDirs) -find_package(f3d REQUIRED) -if(NOT f3d_PLUGIN_SDK) - message(FATAL_ERROR "F3D found but plugin SDK is not installed") -endif() +find_package(f3dPlugin REQUIRED) +#if(NOT f3d_PLUGIN_SDK) +# message(FATAL_ERROR "F3D found but plugin SDK is not installed") +#endif() f3d_plugin_init() diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index e48cd0df52..fd327eb21f 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -74,6 +74,11 @@ set(F3D_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/public/window.h ) +set(F3D_PLUGIN_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/plugin/reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/plugin/plugin.h + ) + add_library(libf3d ${F3D_SOURCE_FILES} ) @@ -244,6 +249,11 @@ if(BUILD_SHARED_LIBS) "${F3D_SOURCE_DIR}/cmake/f3dPluginConfig.cmake.in" "${CMAKE_BINARY_DIR}/cmake/f3dPluginConfig.cmake" INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/f3dPlugin") + install(FILES ${F3D_PLUGIN_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/f3dPlugin" + COMPONENT plugin_sdk + EXCLUDE_FROM_ALL) + install( FILES "${CMAKE_BINARY_DIR}/cmake/f3dPluginConfig.cmake"