From 46b54e4bb628de2e99e2817e0904b7c320705f14 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Wed, 20 Mar 2024 11:37:34 +0100 Subject: [PATCH] Moving all vtk extensions to a single private module, vtkextPrivate (#1314) --- library/CMakeLists.txt | 5 +-- vtkext/private/Applicative/CMakeLists.txt | 8 ---- .../Applicative/Testing/CMakeLists.txt | 18 -------- vtkext/private/Applicative/vtk.module | 13 ------ vtkext/private/CMakeLists.txt | 2 +- vtkext/private/Core/CMakeLists.txt | 26 ----------- vtkext/private/Core/Testing/CMakeLists.txt | 15 ------- vtkext/private/Core/vtk.module | 11 ----- vtkext/private/Readers/CMakeLists.txt | 19 -------- vtkext/private/Readers/Testing/CMakeLists.txt | 27 ------------ vtkext/private/Readers/vtk.module | 19 -------- .../private/Rendering/Testing/CMakeLists.txt | 18 -------- .../{Rendering => module}/CMakeLists.txt | 34 ++++++++++++++- vtkext/private/{Core => module}/F3DLog.cxx | 0 vtkext/private/{Core => module}/F3DLog.h | 0 vtkext/private/module/Testing/CMakeLists.txt | 43 +++++++++++++++++++ .../Testing/TestF3DBitonicSort.cxx | 0 .../Testing/TestF3DCachedTexturesPrint.cxx | 0 .../Testing/TestF3DEXRReader.cxx | 0 .../Testing/TestF3DEXRReaderInvalid.cxx | 0 .../Testing/TestF3DGenericImporter.cxx | 0 .../TestF3DGenericImporterMultiColoring.cxx | 0 .../TestF3DInteractorEventRecorder.cxx | 0 .../{Core => module}/Testing/TestF3DLog.cxx | 0 .../Testing/TestF3DObjectFactory.cxx | 0 .../Testing/TestF3DOpenGLGridMapper.cxx | 0 .../Testing/TestF3DRenderPass.cxx | 0 .../Testing/TestF3DRendererWithColoring.cxx | 0 .../Testing/TestF3DWinGuiObjectFactory.cxx | 0 .../glsl/vtkF3DComputeDepthCS.glsl | 0 .../private/{Rendering => module}/vtk.module | 22 +++++++--- .../vtkF3DAndroidLogOutputWindow.cxx | 0 .../vtkF3DAndroidLogOutputWindow.h | 0 .../vtkF3DCachedLUTTexture.cxx | 0 .../vtkF3DCachedLUTTexture.h | 0 .../vtkF3DCachedSpecularTexture.cxx | 0 .../vtkF3DCachedSpecularTexture.h | 0 .../{Core => module}/vtkF3DConfigure.h.in | 0 .../vtkF3DConsoleOutputWindow.cxx | 0 .../vtkF3DConsoleOutputWindow.h | 0 .../vtkF3DDropZoneActor.cxx | 0 .../vtkF3DDropZoneActor.h | 0 .../{Readers => module}/vtkF3DEXRReader.cxx | 0 .../{Readers => module}/vtkF3DEXRReader.h | 0 .../vtkF3DGenericImporter.cxx | 0 .../vtkF3DGenericImporter.h | 0 .../vtkF3DHexagonalBokehBlurPass.cxx | 0 .../vtkF3DHexagonalBokehBlurPass.h | 0 .../vtkF3DInteractorEventRecorder.cxx | 0 .../vtkF3DInteractorEventRecorder.h | 0 .../vtkF3DInteractorStyle.cxx | 0 .../vtkF3DInteractorStyle.h | 0 .../{Readers => module}/vtkF3DMemoryMesh.cxx | 0 .../{Readers => module}/vtkF3DMemoryMesh.h | 0 .../vtkF3DNoRenderWindow.cxx | 0 .../vtkF3DNoRenderWindow.h | 0 .../vtkF3DObjectFactory.cxx | 0 .../vtkF3DObjectFactory.h | 0 .../vtkF3DOpenGLGridMapper.cxx | 0 .../vtkF3DOpenGLGridMapper.h | 0 .../vtkF3DOrientationMarkerWidget.cxx | 0 .../vtkF3DOrientationMarkerWidget.h | 0 .../vtkF3DPointSplatMapper.cxx | 0 .../vtkF3DPointSplatMapper.h | 0 .../vtkF3DPolyDataMapper.cxx | 0 .../vtkF3DPolyDataMapper.h | 0 .../vtkF3DPostProcessFilter.cxx | 0 .../vtkF3DPostProcessFilter.h | 0 .../vtkF3DRenderPass.cxx | 0 .../{Rendering => module}/vtkF3DRenderPass.h | 0 .../{Rendering => module}/vtkF3DRenderer.cxx | 0 .../{Rendering => module}/vtkF3DRenderer.h | 0 .../vtkF3DRendererWithColoring.cxx | 0 .../vtkF3DRendererWithColoring.h | 0 .../vtkF3DWin32OutputWindow.cxx | 0 .../vtkF3DWin32OutputWindow.h | 0 76 files changed, 95 insertions(+), 185 deletions(-) delete mode 100644 vtkext/private/Applicative/CMakeLists.txt delete mode 100644 vtkext/private/Applicative/Testing/CMakeLists.txt delete mode 100644 vtkext/private/Applicative/vtk.module delete mode 100644 vtkext/private/Core/CMakeLists.txt delete mode 100644 vtkext/private/Core/Testing/CMakeLists.txt delete mode 100644 vtkext/private/Core/vtk.module delete mode 100644 vtkext/private/Readers/CMakeLists.txt delete mode 100644 vtkext/private/Readers/Testing/CMakeLists.txt delete mode 100644 vtkext/private/Readers/vtk.module delete mode 100644 vtkext/private/Rendering/Testing/CMakeLists.txt rename vtkext/private/{Rendering => module}/CMakeLists.txt (64%) rename vtkext/private/{Core => module}/F3DLog.cxx (100%) rename vtkext/private/{Core => module}/F3DLog.h (100%) create mode 100644 vtkext/private/module/Testing/CMakeLists.txt rename vtkext/private/{Rendering => module}/Testing/TestF3DBitonicSort.cxx (100%) rename vtkext/private/{Rendering => module}/Testing/TestF3DCachedTexturesPrint.cxx (100%) rename vtkext/private/{Readers => module}/Testing/TestF3DEXRReader.cxx (100%) rename vtkext/private/{Readers => module}/Testing/TestF3DEXRReaderInvalid.cxx (100%) rename vtkext/private/{Readers => module}/Testing/TestF3DGenericImporter.cxx (100%) rename vtkext/private/{Readers => module}/Testing/TestF3DGenericImporterMultiColoring.cxx (100%) rename vtkext/private/{Rendering => module}/Testing/TestF3DInteractorEventRecorder.cxx (100%) rename vtkext/private/{Core => module}/Testing/TestF3DLog.cxx (100%) rename vtkext/private/{Applicative => module}/Testing/TestF3DObjectFactory.cxx (100%) rename vtkext/private/{Rendering => module}/Testing/TestF3DOpenGLGridMapper.cxx (100%) rename vtkext/private/{Rendering => module}/Testing/TestF3DRenderPass.cxx (100%) rename vtkext/private/{Rendering => module}/Testing/TestF3DRendererWithColoring.cxx (100%) rename vtkext/private/{Applicative => module}/Testing/TestF3DWinGuiObjectFactory.cxx (100%) rename vtkext/private/{Rendering => module}/glsl/vtkF3DComputeDepthCS.glsl (100%) rename vtkext/private/{Rendering => module}/vtk.module (57%) rename vtkext/private/{Core => module}/vtkF3DAndroidLogOutputWindow.cxx (100%) rename vtkext/private/{Core => module}/vtkF3DAndroidLogOutputWindow.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DCachedLUTTexture.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DCachedLUTTexture.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DCachedSpecularTexture.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DCachedSpecularTexture.h (100%) rename vtkext/private/{Core => module}/vtkF3DConfigure.h.in (100%) rename vtkext/private/{Core => module}/vtkF3DConsoleOutputWindow.cxx (100%) rename vtkext/private/{Core => module}/vtkF3DConsoleOutputWindow.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DDropZoneActor.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DDropZoneActor.h (100%) rename vtkext/private/{Readers => module}/vtkF3DEXRReader.cxx (100%) rename vtkext/private/{Readers => module}/vtkF3DEXRReader.h (100%) rename vtkext/private/{Readers => module}/vtkF3DGenericImporter.cxx (100%) rename vtkext/private/{Readers => module}/vtkF3DGenericImporter.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DHexagonalBokehBlurPass.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DHexagonalBokehBlurPass.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DInteractorEventRecorder.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DInteractorEventRecorder.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DInteractorStyle.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DInteractorStyle.h (100%) rename vtkext/private/{Readers => module}/vtkF3DMemoryMesh.cxx (100%) rename vtkext/private/{Readers => module}/vtkF3DMemoryMesh.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DNoRenderWindow.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DNoRenderWindow.h (100%) rename vtkext/private/{Applicative => module}/vtkF3DObjectFactory.cxx (100%) rename vtkext/private/{Applicative => module}/vtkF3DObjectFactory.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DOpenGLGridMapper.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DOpenGLGridMapper.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DOrientationMarkerWidget.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DOrientationMarkerWidget.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DPointSplatMapper.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DPointSplatMapper.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DPolyDataMapper.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DPolyDataMapper.h (100%) rename vtkext/private/{Readers => module}/vtkF3DPostProcessFilter.cxx (100%) rename vtkext/private/{Readers => module}/vtkF3DPostProcessFilter.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DRenderPass.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DRenderPass.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DRenderer.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DRenderer.h (100%) rename vtkext/private/{Rendering => module}/vtkF3DRendererWithColoring.cxx (100%) rename vtkext/private/{Rendering => module}/vtkF3DRendererWithColoring.h (100%) rename vtkext/private/{Core => module}/vtkF3DWin32OutputWindow.cxx (100%) rename vtkext/private/{Core => module}/vtkF3DWin32OutputWindow.h (100%) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 209b4e4272..14252d2a64 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -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 diff --git a/vtkext/private/Applicative/CMakeLists.txt b/vtkext/private/Applicative/CMakeLists.txt deleted file mode 100644 index 9c46a71994..0000000000 --- a/vtkext/private/Applicative/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(classes - vtkF3DObjectFactory - ) - -vtk_module_add_module(f3d::VTKExtensionsApplicative - ${f3d_vtk_no_install} - FORCE_STATIC - CLASSES ${classes}) diff --git a/vtkext/private/Applicative/Testing/CMakeLists.txt b/vtkext/private/Applicative/Testing/CMakeLists.txt deleted file mode 100644 index 6a67ab0292..0000000000 --- a/vtkext/private/Applicative/Testing/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -set(test_sources - TestF3DObjectFactory.cxx - ) - -if(WIN32 AND F3D_WINDOWS_GUI) - list(APPEND test_sources TestF3DWinGuiObjectFactory.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(VTKExtensionsApplicativeTests tests - NO_DATA NO_VALID NO_OUTPUT - ${test_sources} - ${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) -vtk_test_cxx_executable(VTKExtensionsApplicativeTests tests) diff --git a/vtkext/private/Applicative/vtk.module b/vtkext/private/Applicative/vtk.module deleted file mode 100644 index 51fb5d519b..0000000000 --- a/vtkext/private/Applicative/vtk.module +++ /dev/null @@ -1,13 +0,0 @@ -NAME - f3d::VTKExtensionsApplicative -DESCRIPTION - A VTK modules using all other VTK modules from F3D -PRIVATE_DEPENDS - VTK::CommonCore - VTK::RenderingOpenGL2 - f3d::VTKExtensionsCore - f3d::VTKExtensionsRendering -TEST_DEPENDS - VTK::TestingCore - f3d::VTKExtensionsCore - f3d::VTKExtensionsRendering diff --git a/vtkext/private/CMakeLists.txt b/vtkext/private/CMakeLists.txt index 5ae19d957c..3806985c1e 100644 --- a/vtkext/private/CMakeLists.txt +++ b/vtkext/private/CMakeLists.txt @@ -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 diff --git a/vtkext/private/Core/CMakeLists.txt b/vtkext/private/Core/CMakeLists.txt deleted file mode 100644 index bc58d053e9..0000000000 --- a/vtkext/private/Core/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/vtkF3DConfigure.h.in" - "${CMAKE_CURRENT_BINARY_DIR}/vtkF3DConfigure.h" - @ONLY) - -set(classes - F3DLog - vtkF3DConsoleOutputWindow - ) - -if(WIN32 AND F3D_WINDOWS_GUI) - list(APPEND classes vtkF3DWin32OutputWindow) -endif() - -if(ANDROID) - list(APPEND classes vtkF3DAndroidLogOutputWindow) -endif() - -vtk_module_add_module(f3d::VTKExtensionsCore - ${f3d_vtk_no_install} - FORCE_STATIC - CLASSES ${classes}) - -if(MSVC) - vtk_module_definitions(f3d::VTKExtensionsCore PRIVATE _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS _CRT_SECURE_NO_WARNINGS) -endif() diff --git a/vtkext/private/Core/Testing/CMakeLists.txt b/vtkext/private/Core/Testing/CMakeLists.txt deleted file mode 100644 index 596d86d916..0000000000 --- a/vtkext/private/Core/Testing/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -if(VTK_VERSION VERSION_LESS_EQUAL 9.1.0) - set(CMAKE_WARN_DEPRECATED OFF) - cmake_policy(SET CMP0115 OLD) -endif() - -vtk_add_test_cxx(VTKExtensionsCoreTests tests - NO_DATA NO_VALID NO_OUTPUT - TestF3DLog.cxx - ${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) -vtk_test_cxx_executable(VTKExtensionsCoreTests tests) - -if(UNIX) - # On windows, the default window output message does not redirect to cout - set_tests_properties(f3d::VTKExtensionsCoreCxx-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() diff --git a/vtkext/private/Core/vtk.module b/vtkext/private/Core/vtk.module deleted file mode 100644 index 6e7a744db5..0000000000 --- a/vtkext/private/Core/vtk.module +++ /dev/null @@ -1,11 +0,0 @@ -NAME - f3d::VTKExtensionsCore -DESCRIPTION - A VTK module not depending on any F3D provided VTK modules -PRIVATE_DEPENDS - VTK::CommonCore - VTK::CommonDataModel - VTK::ImagingCore - VTK::RenderingCore -TEST_DEPENDS - VTK::TestingCore diff --git a/vtkext/private/Readers/CMakeLists.txt b/vtkext/private/Readers/CMakeLists.txt deleted file mode 100644 index 461fd8479d..0000000000 --- a/vtkext/private/Readers/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set(classes - vtkF3DGenericImporter - vtkF3DMemoryMesh - vtkF3DPostProcessFilter - ) - -if(F3D_MODULE_EXR) - find_package(OpenEXR 3.0 REQUIRED) - list(APPEND classes vtkF3DEXRReader) -endif() - -vtk_module_add_module(f3d::VTKExtensionsReaders - ${f3d_vtk_no_install} - FORCE_STATIC - CLASSES ${classes}) - -if(F3D_MODULE_EXR) - vtk_module_link(f3d::VTKExtensionsReaders PRIVATE OpenEXR::OpenEXR) -endif() diff --git a/vtkext/private/Readers/Testing/CMakeLists.txt b/vtkext/private/Readers/Testing/CMakeLists.txt deleted file mode 100644 index fef0d97d2b..0000000000 --- a/vtkext/private/Readers/Testing/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -list(APPEND VTKExtensionsReaderTests_list - TestF3DGenericImporter.cxx - TestF3DGenericImporterMultiColoring.cxx - ) - -if(F3D_MODULE_EXR) - list(APPEND VTKExtensionsReaderTests_list - 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(VTKExtensionsReaderTests tests - NO_DATA NO_VALID NO_OUTPUT - ${VTKExtensionsReaderTests_list} - ${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) -vtk_test_cxx_executable(VTKExtensionsReaderTests tests) - -if(F3D_MODULE_EXR) -set_tests_properties(f3d::VTKExtensionsReadersCxx-TestF3DEXRReaderInvalid - PROPERTIES - FAIL_REGULAR_EXPRESSION "") -endif() diff --git a/vtkext/private/Readers/vtk.module b/vtkext/private/Readers/vtk.module deleted file mode 100644 index c949d653f8..0000000000 --- a/vtkext/private/Readers/vtk.module +++ /dev/null @@ -1,19 +0,0 @@ -NAME - f3d::VTKExtensionsReaders -DESCRIPTION - A VTK module containing all F3D provided readers and reader factory logic -DEPENDS - VTK::IOImage - VTK::IOImport -PRIVATE_DEPENDS - VTK::CommonExecutionModel - VTK::FiltersGeneral - VTK::FiltersGeometry - VTK::ImagingHybrid - VTK::RenderingVolumeOpenGL2 - f3d::VTKExtensionsCore -TEST_DEPENDS - VTK::TestingCore - VTK::IOGeometry - VTK::IOPLY - VTK::IOXML diff --git a/vtkext/private/Rendering/Testing/CMakeLists.txt b/vtkext/private/Rendering/Testing/CMakeLists.txt deleted file mode 100644 index 54ae787858..0000000000 --- a/vtkext/private/Rendering/Testing/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -if(VTK_VERSION VERSION_LESS_EQUAL 9.1.0) - set(CMAKE_WARN_DEPRECATED OFF) - cmake_policy(SET CMP0115 OLD) -endif() - -list(APPEND VTKExtensionsRenderingTests_list - TestF3DInteractorEventRecorder.cxx - TestF3DOpenGLGridMapper.cxx - TestF3DRenderPass.cxx - TestF3DRendererWithColoring.cxx - TestF3DCachedTexturesPrint.cxx - ) - -vtk_add_test_cxx(VTKExtensionsRenderingTests tests - NO_DATA NO_VALID NO_OUTPUT - ${VTKExtensionsRenderingTests_list} - ${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) -vtk_test_cxx_executable(VTKExtensionsRenderingTests tests) diff --git a/vtkext/private/Rendering/CMakeLists.txt b/vtkext/private/module/CMakeLists.txt similarity index 64% rename from vtkext/private/Rendering/CMakeLists.txt rename to vtkext/private/module/CMakeLists.txt index 8f5df67a34..f939a672c0 100644 --- a/vtkext/private/Rendering/CMakeLists.txt +++ b/vtkext/private/module/CMakeLists.txt @@ -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") @@ -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 @@ -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() diff --git a/vtkext/private/Core/F3DLog.cxx b/vtkext/private/module/F3DLog.cxx similarity index 100% rename from vtkext/private/Core/F3DLog.cxx rename to vtkext/private/module/F3DLog.cxx diff --git a/vtkext/private/Core/F3DLog.h b/vtkext/private/module/F3DLog.h similarity index 100% rename from vtkext/private/Core/F3DLog.h rename to vtkext/private/module/F3DLog.h diff --git a/vtkext/private/module/Testing/CMakeLists.txt b/vtkext/private/module/Testing/CMakeLists.txt new file mode 100644 index 0000000000..f98d493b38 --- /dev/null +++ b/vtkext/private/module/Testing/CMakeLists.txt @@ -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() diff --git a/vtkext/private/Rendering/Testing/TestF3DBitonicSort.cxx b/vtkext/private/module/Testing/TestF3DBitonicSort.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DBitonicSort.cxx rename to vtkext/private/module/Testing/TestF3DBitonicSort.cxx diff --git a/vtkext/private/Rendering/Testing/TestF3DCachedTexturesPrint.cxx b/vtkext/private/module/Testing/TestF3DCachedTexturesPrint.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DCachedTexturesPrint.cxx rename to vtkext/private/module/Testing/TestF3DCachedTexturesPrint.cxx diff --git a/vtkext/private/Readers/Testing/TestF3DEXRReader.cxx b/vtkext/private/module/Testing/TestF3DEXRReader.cxx similarity index 100% rename from vtkext/private/Readers/Testing/TestF3DEXRReader.cxx rename to vtkext/private/module/Testing/TestF3DEXRReader.cxx diff --git a/vtkext/private/Readers/Testing/TestF3DEXRReaderInvalid.cxx b/vtkext/private/module/Testing/TestF3DEXRReaderInvalid.cxx similarity index 100% rename from vtkext/private/Readers/Testing/TestF3DEXRReaderInvalid.cxx rename to vtkext/private/module/Testing/TestF3DEXRReaderInvalid.cxx diff --git a/vtkext/private/Readers/Testing/TestF3DGenericImporter.cxx b/vtkext/private/module/Testing/TestF3DGenericImporter.cxx similarity index 100% rename from vtkext/private/Readers/Testing/TestF3DGenericImporter.cxx rename to vtkext/private/module/Testing/TestF3DGenericImporter.cxx diff --git a/vtkext/private/Readers/Testing/TestF3DGenericImporterMultiColoring.cxx b/vtkext/private/module/Testing/TestF3DGenericImporterMultiColoring.cxx similarity index 100% rename from vtkext/private/Readers/Testing/TestF3DGenericImporterMultiColoring.cxx rename to vtkext/private/module/Testing/TestF3DGenericImporterMultiColoring.cxx diff --git a/vtkext/private/Rendering/Testing/TestF3DInteractorEventRecorder.cxx b/vtkext/private/module/Testing/TestF3DInteractorEventRecorder.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DInteractorEventRecorder.cxx rename to vtkext/private/module/Testing/TestF3DInteractorEventRecorder.cxx diff --git a/vtkext/private/Core/Testing/TestF3DLog.cxx b/vtkext/private/module/Testing/TestF3DLog.cxx similarity index 100% rename from vtkext/private/Core/Testing/TestF3DLog.cxx rename to vtkext/private/module/Testing/TestF3DLog.cxx diff --git a/vtkext/private/Applicative/Testing/TestF3DObjectFactory.cxx b/vtkext/private/module/Testing/TestF3DObjectFactory.cxx similarity index 100% rename from vtkext/private/Applicative/Testing/TestF3DObjectFactory.cxx rename to vtkext/private/module/Testing/TestF3DObjectFactory.cxx diff --git a/vtkext/private/Rendering/Testing/TestF3DOpenGLGridMapper.cxx b/vtkext/private/module/Testing/TestF3DOpenGLGridMapper.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DOpenGLGridMapper.cxx rename to vtkext/private/module/Testing/TestF3DOpenGLGridMapper.cxx diff --git a/vtkext/private/Rendering/Testing/TestF3DRenderPass.cxx b/vtkext/private/module/Testing/TestF3DRenderPass.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DRenderPass.cxx rename to vtkext/private/module/Testing/TestF3DRenderPass.cxx diff --git a/vtkext/private/Rendering/Testing/TestF3DRendererWithColoring.cxx b/vtkext/private/module/Testing/TestF3DRendererWithColoring.cxx similarity index 100% rename from vtkext/private/Rendering/Testing/TestF3DRendererWithColoring.cxx rename to vtkext/private/module/Testing/TestF3DRendererWithColoring.cxx diff --git a/vtkext/private/Applicative/Testing/TestF3DWinGuiObjectFactory.cxx b/vtkext/private/module/Testing/TestF3DWinGuiObjectFactory.cxx similarity index 100% rename from vtkext/private/Applicative/Testing/TestF3DWinGuiObjectFactory.cxx rename to vtkext/private/module/Testing/TestF3DWinGuiObjectFactory.cxx diff --git a/vtkext/private/Rendering/glsl/vtkF3DComputeDepthCS.glsl b/vtkext/private/module/glsl/vtkF3DComputeDepthCS.glsl similarity index 100% rename from vtkext/private/Rendering/glsl/vtkF3DComputeDepthCS.glsl rename to vtkext/private/module/glsl/vtkF3DComputeDepthCS.glsl diff --git a/vtkext/private/Rendering/vtk.module b/vtkext/private/module/vtk.module similarity index 57% rename from vtkext/private/Rendering/vtk.module rename to vtkext/private/module/vtk.module index df3fdd710e..c3a00c6625 100644 --- a/vtkext/private/Rendering/vtk.module +++ b/vtkext/private/module/vtk.module @@ -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 diff --git a/vtkext/private/Core/vtkF3DAndroidLogOutputWindow.cxx b/vtkext/private/module/vtkF3DAndroidLogOutputWindow.cxx similarity index 100% rename from vtkext/private/Core/vtkF3DAndroidLogOutputWindow.cxx rename to vtkext/private/module/vtkF3DAndroidLogOutputWindow.cxx diff --git a/vtkext/private/Core/vtkF3DAndroidLogOutputWindow.h b/vtkext/private/module/vtkF3DAndroidLogOutputWindow.h similarity index 100% rename from vtkext/private/Core/vtkF3DAndroidLogOutputWindow.h rename to vtkext/private/module/vtkF3DAndroidLogOutputWindow.h diff --git a/vtkext/private/Rendering/vtkF3DCachedLUTTexture.cxx b/vtkext/private/module/vtkF3DCachedLUTTexture.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DCachedLUTTexture.cxx rename to vtkext/private/module/vtkF3DCachedLUTTexture.cxx diff --git a/vtkext/private/Rendering/vtkF3DCachedLUTTexture.h b/vtkext/private/module/vtkF3DCachedLUTTexture.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DCachedLUTTexture.h rename to vtkext/private/module/vtkF3DCachedLUTTexture.h diff --git a/vtkext/private/Rendering/vtkF3DCachedSpecularTexture.cxx b/vtkext/private/module/vtkF3DCachedSpecularTexture.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DCachedSpecularTexture.cxx rename to vtkext/private/module/vtkF3DCachedSpecularTexture.cxx diff --git a/vtkext/private/Rendering/vtkF3DCachedSpecularTexture.h b/vtkext/private/module/vtkF3DCachedSpecularTexture.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DCachedSpecularTexture.h rename to vtkext/private/module/vtkF3DCachedSpecularTexture.h diff --git a/vtkext/private/Core/vtkF3DConfigure.h.in b/vtkext/private/module/vtkF3DConfigure.h.in similarity index 100% rename from vtkext/private/Core/vtkF3DConfigure.h.in rename to vtkext/private/module/vtkF3DConfigure.h.in diff --git a/vtkext/private/Core/vtkF3DConsoleOutputWindow.cxx b/vtkext/private/module/vtkF3DConsoleOutputWindow.cxx similarity index 100% rename from vtkext/private/Core/vtkF3DConsoleOutputWindow.cxx rename to vtkext/private/module/vtkF3DConsoleOutputWindow.cxx diff --git a/vtkext/private/Core/vtkF3DConsoleOutputWindow.h b/vtkext/private/module/vtkF3DConsoleOutputWindow.h similarity index 100% rename from vtkext/private/Core/vtkF3DConsoleOutputWindow.h rename to vtkext/private/module/vtkF3DConsoleOutputWindow.h diff --git a/vtkext/private/Rendering/vtkF3DDropZoneActor.cxx b/vtkext/private/module/vtkF3DDropZoneActor.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DDropZoneActor.cxx rename to vtkext/private/module/vtkF3DDropZoneActor.cxx diff --git a/vtkext/private/Rendering/vtkF3DDropZoneActor.h b/vtkext/private/module/vtkF3DDropZoneActor.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DDropZoneActor.h rename to vtkext/private/module/vtkF3DDropZoneActor.h diff --git a/vtkext/private/Readers/vtkF3DEXRReader.cxx b/vtkext/private/module/vtkF3DEXRReader.cxx similarity index 100% rename from vtkext/private/Readers/vtkF3DEXRReader.cxx rename to vtkext/private/module/vtkF3DEXRReader.cxx diff --git a/vtkext/private/Readers/vtkF3DEXRReader.h b/vtkext/private/module/vtkF3DEXRReader.h similarity index 100% rename from vtkext/private/Readers/vtkF3DEXRReader.h rename to vtkext/private/module/vtkF3DEXRReader.h diff --git a/vtkext/private/Readers/vtkF3DGenericImporter.cxx b/vtkext/private/module/vtkF3DGenericImporter.cxx similarity index 100% rename from vtkext/private/Readers/vtkF3DGenericImporter.cxx rename to vtkext/private/module/vtkF3DGenericImporter.cxx diff --git a/vtkext/private/Readers/vtkF3DGenericImporter.h b/vtkext/private/module/vtkF3DGenericImporter.h similarity index 100% rename from vtkext/private/Readers/vtkF3DGenericImporter.h rename to vtkext/private/module/vtkF3DGenericImporter.h diff --git a/vtkext/private/Rendering/vtkF3DHexagonalBokehBlurPass.cxx b/vtkext/private/module/vtkF3DHexagonalBokehBlurPass.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DHexagonalBokehBlurPass.cxx rename to vtkext/private/module/vtkF3DHexagonalBokehBlurPass.cxx diff --git a/vtkext/private/Rendering/vtkF3DHexagonalBokehBlurPass.h b/vtkext/private/module/vtkF3DHexagonalBokehBlurPass.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DHexagonalBokehBlurPass.h rename to vtkext/private/module/vtkF3DHexagonalBokehBlurPass.h diff --git a/vtkext/private/Rendering/vtkF3DInteractorEventRecorder.cxx b/vtkext/private/module/vtkF3DInteractorEventRecorder.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DInteractorEventRecorder.cxx rename to vtkext/private/module/vtkF3DInteractorEventRecorder.cxx diff --git a/vtkext/private/Rendering/vtkF3DInteractorEventRecorder.h b/vtkext/private/module/vtkF3DInteractorEventRecorder.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DInteractorEventRecorder.h rename to vtkext/private/module/vtkF3DInteractorEventRecorder.h diff --git a/vtkext/private/Rendering/vtkF3DInteractorStyle.cxx b/vtkext/private/module/vtkF3DInteractorStyle.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DInteractorStyle.cxx rename to vtkext/private/module/vtkF3DInteractorStyle.cxx diff --git a/vtkext/private/Rendering/vtkF3DInteractorStyle.h b/vtkext/private/module/vtkF3DInteractorStyle.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DInteractorStyle.h rename to vtkext/private/module/vtkF3DInteractorStyle.h diff --git a/vtkext/private/Readers/vtkF3DMemoryMesh.cxx b/vtkext/private/module/vtkF3DMemoryMesh.cxx similarity index 100% rename from vtkext/private/Readers/vtkF3DMemoryMesh.cxx rename to vtkext/private/module/vtkF3DMemoryMesh.cxx diff --git a/vtkext/private/Readers/vtkF3DMemoryMesh.h b/vtkext/private/module/vtkF3DMemoryMesh.h similarity index 100% rename from vtkext/private/Readers/vtkF3DMemoryMesh.h rename to vtkext/private/module/vtkF3DMemoryMesh.h diff --git a/vtkext/private/Rendering/vtkF3DNoRenderWindow.cxx b/vtkext/private/module/vtkF3DNoRenderWindow.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DNoRenderWindow.cxx rename to vtkext/private/module/vtkF3DNoRenderWindow.cxx diff --git a/vtkext/private/Rendering/vtkF3DNoRenderWindow.h b/vtkext/private/module/vtkF3DNoRenderWindow.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DNoRenderWindow.h rename to vtkext/private/module/vtkF3DNoRenderWindow.h diff --git a/vtkext/private/Applicative/vtkF3DObjectFactory.cxx b/vtkext/private/module/vtkF3DObjectFactory.cxx similarity index 100% rename from vtkext/private/Applicative/vtkF3DObjectFactory.cxx rename to vtkext/private/module/vtkF3DObjectFactory.cxx diff --git a/vtkext/private/Applicative/vtkF3DObjectFactory.h b/vtkext/private/module/vtkF3DObjectFactory.h similarity index 100% rename from vtkext/private/Applicative/vtkF3DObjectFactory.h rename to vtkext/private/module/vtkF3DObjectFactory.h diff --git a/vtkext/private/Rendering/vtkF3DOpenGLGridMapper.cxx b/vtkext/private/module/vtkF3DOpenGLGridMapper.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DOpenGLGridMapper.cxx rename to vtkext/private/module/vtkF3DOpenGLGridMapper.cxx diff --git a/vtkext/private/Rendering/vtkF3DOpenGLGridMapper.h b/vtkext/private/module/vtkF3DOpenGLGridMapper.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DOpenGLGridMapper.h rename to vtkext/private/module/vtkF3DOpenGLGridMapper.h diff --git a/vtkext/private/Rendering/vtkF3DOrientationMarkerWidget.cxx b/vtkext/private/module/vtkF3DOrientationMarkerWidget.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DOrientationMarkerWidget.cxx rename to vtkext/private/module/vtkF3DOrientationMarkerWidget.cxx diff --git a/vtkext/private/Rendering/vtkF3DOrientationMarkerWidget.h b/vtkext/private/module/vtkF3DOrientationMarkerWidget.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DOrientationMarkerWidget.h rename to vtkext/private/module/vtkF3DOrientationMarkerWidget.h diff --git a/vtkext/private/Rendering/vtkF3DPointSplatMapper.cxx b/vtkext/private/module/vtkF3DPointSplatMapper.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DPointSplatMapper.cxx rename to vtkext/private/module/vtkF3DPointSplatMapper.cxx diff --git a/vtkext/private/Rendering/vtkF3DPointSplatMapper.h b/vtkext/private/module/vtkF3DPointSplatMapper.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DPointSplatMapper.h rename to vtkext/private/module/vtkF3DPointSplatMapper.h diff --git a/vtkext/private/Rendering/vtkF3DPolyDataMapper.cxx b/vtkext/private/module/vtkF3DPolyDataMapper.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DPolyDataMapper.cxx rename to vtkext/private/module/vtkF3DPolyDataMapper.cxx diff --git a/vtkext/private/Rendering/vtkF3DPolyDataMapper.h b/vtkext/private/module/vtkF3DPolyDataMapper.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DPolyDataMapper.h rename to vtkext/private/module/vtkF3DPolyDataMapper.h diff --git a/vtkext/private/Readers/vtkF3DPostProcessFilter.cxx b/vtkext/private/module/vtkF3DPostProcessFilter.cxx similarity index 100% rename from vtkext/private/Readers/vtkF3DPostProcessFilter.cxx rename to vtkext/private/module/vtkF3DPostProcessFilter.cxx diff --git a/vtkext/private/Readers/vtkF3DPostProcessFilter.h b/vtkext/private/module/vtkF3DPostProcessFilter.h similarity index 100% rename from vtkext/private/Readers/vtkF3DPostProcessFilter.h rename to vtkext/private/module/vtkF3DPostProcessFilter.h diff --git a/vtkext/private/Rendering/vtkF3DRenderPass.cxx b/vtkext/private/module/vtkF3DRenderPass.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DRenderPass.cxx rename to vtkext/private/module/vtkF3DRenderPass.cxx diff --git a/vtkext/private/Rendering/vtkF3DRenderPass.h b/vtkext/private/module/vtkF3DRenderPass.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DRenderPass.h rename to vtkext/private/module/vtkF3DRenderPass.h diff --git a/vtkext/private/Rendering/vtkF3DRenderer.cxx b/vtkext/private/module/vtkF3DRenderer.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DRenderer.cxx rename to vtkext/private/module/vtkF3DRenderer.cxx diff --git a/vtkext/private/Rendering/vtkF3DRenderer.h b/vtkext/private/module/vtkF3DRenderer.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DRenderer.h rename to vtkext/private/module/vtkF3DRenderer.h diff --git a/vtkext/private/Rendering/vtkF3DRendererWithColoring.cxx b/vtkext/private/module/vtkF3DRendererWithColoring.cxx similarity index 100% rename from vtkext/private/Rendering/vtkF3DRendererWithColoring.cxx rename to vtkext/private/module/vtkF3DRendererWithColoring.cxx diff --git a/vtkext/private/Rendering/vtkF3DRendererWithColoring.h b/vtkext/private/module/vtkF3DRendererWithColoring.h similarity index 100% rename from vtkext/private/Rendering/vtkF3DRendererWithColoring.h rename to vtkext/private/module/vtkF3DRendererWithColoring.h diff --git a/vtkext/private/Core/vtkF3DWin32OutputWindow.cxx b/vtkext/private/module/vtkF3DWin32OutputWindow.cxx similarity index 100% rename from vtkext/private/Core/vtkF3DWin32OutputWindow.cxx rename to vtkext/private/module/vtkF3DWin32OutputWindow.cxx diff --git a/vtkext/private/Core/vtkF3DWin32OutputWindow.h b/vtkext/private/module/vtkF3DWin32OutputWindow.h similarity index 100% rename from vtkext/private/Core/vtkF3DWin32OutputWindow.h rename to vtkext/private/module/vtkF3DWin32OutputWindow.h