Skip to content

Commit

Permalink
Moving all vtk extensions to a single private module, vtkextPrivate (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Mar 20, 2024
1 parent 68ce157 commit 46b54e4
Show file tree
Hide file tree
Showing 76 changed files with 95 additions and 185 deletions.
5 changes: 1 addition & 4 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ set(F3D_VTK_MODULES
VTK::CommonSystem
VTK::IOImage
VTK::InteractionWidgets
f3d::VTKExtensionsApplicative
f3d::VTKExtensionsCore
f3d::VTKExtensionsReaders
f3d::VTKExtensionsRendering
f3d::vtkext
f3d::vtkextPrivate
)

# Check modules
Expand Down
8 changes: 0 additions & 8 deletions vtkext/private/Applicative/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions vtkext/private/Applicative/Testing/CMakeLists.txt

This file was deleted.

13 changes: 0 additions & 13 deletions vtkext/private/Applicative/vtk.module

This file was deleted.

2 changes: 1 addition & 1 deletion vtkext/private/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ vtk_module_build(
INSTALL_HEADERS OFF
HEADERS_COMPONENT vtkext
TARGETS_COMPONENT vtkext
PACKAGE "f3d-VTKExtensionsPrivate")
PACKAGE "f3d_vtkext_private")

# We need non empty cmake vars for these calls for VTK <= 9.1
# See https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9084
Expand Down
26 changes: 0 additions & 26 deletions vtkext/private/Core/CMakeLists.txt

This file was deleted.

15 changes: 0 additions & 15 deletions vtkext/private/Core/Testing/CMakeLists.txt

This file was deleted.

11 changes: 0 additions & 11 deletions vtkext/private/Core/vtk.module

This file was deleted.

19 changes: 0 additions & 19 deletions vtkext/private/Readers/CMakeLists.txt

This file was deleted.

27 changes: 0 additions & 27 deletions vtkext/private/Readers/Testing/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions vtkext/private/Readers/vtk.module

This file was deleted.

18 changes: 0 additions & 18 deletions vtkext/private/Rendering/Testing/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vtkF3DConfigure.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtkF3DConfigure.h"
@ONLY)

set(F3D_DEFAULT_HDRI "${F3D_SOURCE_DIR}/resources/defaultHDRI.png" CACHE STRING "Default HDRI when no HDRI file is provided")
mark_as_advanced(F3D_DEFAULT_HDRI)
include("f3dEmbed")
Expand Down Expand Up @@ -25,15 +30,21 @@ foreach(file IN LISTS shader_files)
endforeach()

set(classes
F3DLog
vtkF3DCachedLUTTexture
vtkF3DCachedSpecularTexture
vtkF3DConsoleOutputWindow
vtkF3DDropZoneActor
vtkF3DGenericImporter
vtkF3DHexagonalBokehBlurPass
vtkF3DInteractorEventRecorder
vtkF3DInteractorStyle
vtkF3DMemoryMesh
vtkF3DNoRenderWindow
vtkF3DObjectFactory
vtkF3DOpenGLGridMapper
vtkF3DPolyDataMapper
vtkF3DPostProcessFilter
vtkF3DRenderPass
vtkF3DRenderer
vtkF3DRendererWithColoring
Expand All @@ -48,10 +59,31 @@ if(NOT VTK_VERSION VERSION_GREATER_EQUAL 9.2.20220907)
set(classes ${classes} vtkF3DOrientationMarkerWidget)
endif()

vtk_module_add_module(f3d::VTKExtensionsRendering
if(WIN32 AND F3D_WINDOWS_GUI)
list(APPEND classes vtkF3DWin32OutputWindow)
endif()

if(ANDROID)
list(APPEND classes vtkF3DAndroidLogOutputWindow)
endif()

if(F3D_MODULE_EXR)
find_package(OpenEXR 3.0 REQUIRED)
list(APPEND classes vtkF3DEXRReader)
endif()

vtk_module_add_module(f3d::vtkextPrivate
${f3d_vtk_no_install}
FORCE_STATIC
CLASSES ${classes}
SOURCES ${sources}
PRIVATE_HEADERS ${private_headers}
)

if(MSVC)
vtk_module_definitions(f3d::vtkextPrivate PRIVATE _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS _CRT_SECURE_NO_WARNINGS)
endif()

if(F3D_MODULE_EXR)
vtk_module_link(f3d::vtkextPrivate PRIVATE OpenEXR::OpenEXR)
endif()
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions vtkext/private/module/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set(test_sources
TestF3DCachedTexturesPrint.cxx
TestF3DGenericImporter.cxx
TestF3DGenericImporterMultiColoring.cxx
TestF3DInteractorEventRecorder.cxx
TestF3DLog.cxx
TestF3DObjectFactory.cxx
TestF3DOpenGLGridMapper.cxx
TestF3DRenderPass.cxx
TestF3DRendererWithColoring.cxx
)

if(WIN32 AND F3D_WINDOWS_GUI)
list(APPEND test_sources TestF3DWinGuiObjectFactory.cxx)
endif()

if(F3D_MODULE_EXR)
list(APPEND test_sources
TestF3DEXRReader.cxx
TestF3DEXRReaderInvalid.cxx)
endif()

if(VTK_VERSION VERSION_LESS_EQUAL 9.1.0)
set(CMAKE_WARN_DEPRECATED OFF)
cmake_policy(SET CMP0115 OLD)
endif()

vtk_add_test_cxx(vtkextPrivateTests tests
NO_DATA NO_VALID NO_OUTPUT
${test_sources}
${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/)
vtk_test_cxx_executable(vtkextPrivateTests tests)

if(UNIX)
# On windows, the default window output message does not redirect to cout
set_tests_properties(f3d::vtkextPrivateCxx-TestF3DLog PROPERTIES PASS_REGULAR_EXPRESSION "Test Info Test Warning Test Error\nTest Debug Test Info Test Warning Test Error\nTest Warning Test Error\nTest Error\nTest Info Coloring Test Warning Coloring Test Error Coloring\n")
endif()

if(F3D_MODULE_EXR)
set_tests_properties(f3d::vtkextPrivateCxx-TestF3DEXRReaderInvalid
PROPERTIES
FAIL_REGULAR_EXPRESSION "")
endif()
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
NAME
f3d::VTKExtensionsRendering
f3d::vtkextPrivate
DESCRIPTION
A VTK containing class related to rendering
DEPENDS
VTK::CommonCore
VTK::CommonCore
VTK::CommonDataModel
VTK::IOImage
VTK::IOImport
VTK::ImagingCore
VTK::InteractionStyle
VTK::RenderingAnnotation
VTK::RenderingCore
VTK::RenderingOpenGL2
VTK::RenderingVolumeOpenGL2
VTK::opengl
f3d::VTKExtensionsReaders
PRIVATE_DEPENDS
VTK::CommonExecutionModel
VTK::FiltersGeneral
VTK::FiltersGeometry
VTK::IOImage
VTK::IOXML
VTK::ImagingHybrid
VTK::InteractionWidgets
VTK::RenderingCore
f3d::VTKExtensionsCore
VTK::RenderingVolumeOpenGL2
f3d::vtkext
OPTIONAL_DEPENDS
VTK::RenderingExternal
VTK::RenderingRayTracing
TEST_DEPENDS
VTK::TestingCore
VTK::IOGeometry
VTK::IOPLY
VTK::IOXML
VTK::IOXML
VTK::InteractionWidgets
f3d::VTKExtensionsCore
VTK::TestingCore
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 46b54e4

Please sign in to comment.