Merge pull request #7382 from afabri/CGAL-NOMINMAX-GF

Define NOMINMAX to work around problem in vtk
This commit is contained in:
Laurent Rineau 2023-04-17 10:13:30 +02:00
commit 21dbe7c5ab
3 changed files with 4 additions and 4 deletions

View File

@ -79,9 +79,9 @@ if (VTK_FOUND)
if(VTK_LIBRARIES)
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK)
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK)
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "Tests that use VTK will not be compiled.")
endif()

View File

@ -66,7 +66,7 @@ if(VTK_FOUND)
polyhedron_demo_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item
${VTK_LIBRARIES})
target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK)
target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK libraries and will not be compiled.")
endif()

View File

@ -64,7 +64,7 @@ if(Boost_FILESYSTEM_FOUND)
KEYWORDS Viewer Mesh_3)
target_link_libraries(io_image_plugin PUBLIC scene_image_item ${VTK_LIBRARIES} CGAL::CGAL_ImageIO)
if(VTK_LIBRARIES)
target_compile_definitions(io_image_plugin PRIVATE CGAL_USE_VTK)
target_compile_definitions(io_image_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
endif()
if(TARGET Boost::filesystem)
target_link_libraries(io_image_plugin PUBLIC Boost::filesystem