Skip to content

Commit

Permalink
separate f3dPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal committed Mar 2, 2024
1 parent c670b3d commit 716b347
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VTKExtensions/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion cmake/f3dPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions examples/plugins/example-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
10 changes: 10 additions & 0 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 716b347

Please sign in to comment.