From dda4bf84490757fb6fa9525e8588de0ac9e08942 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 1 Nov 2023 20:52:10 +0100 Subject: [PATCH] fix regression about MOC compilations The commit b05e1e9e4604aa8663366f6f6aed416c215cce7e was indeed the cause of the regression. But the root cause was an incorrect usage of `qt6_generate_moc`. The addition of `TARGET ${plugin_name}` triggered the use of the property `INCLUDE_DIRECTORIES` of the target. See https://doc.qt.io/qt-6/qt-generate-moc.html#arguments --- Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake index 6bdda967ab8b..2fd16a15c200 100644 --- a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake +++ b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake @@ -19,7 +19,7 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) set(moc_file_name "") else() set(moc_file_name ${plugin_implementation_base_name}.moc ) - qt6_generate_moc( ${plugin_implementation_base_name}.cpp "${CMAKE_CURRENT_BINARY_DIR}/${moc_file_name}" ) + qt6_generate_moc( ${plugin_implementation_base_name}.cpp "${CMAKE_CURRENT_BINARY_DIR}/${moc_file_name}" TARGET ${plugin_name}) add_file_dependencies( ${moc_file_name} "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ) endif()