fix regression about MOC compilations

The commit b05e1e9e46 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
This commit is contained in:
Laurent Rineau 2023-11-01 20:52:10 +01:00
parent a72ccf2089
commit dda4bf8449
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
set(moc_file_name "") set(moc_file_name "")
else() else()
set(moc_file_name ${plugin_implementation_base_name}.moc ) 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" ) add_file_dependencies( ${moc_file_name} "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" )
endif() endif()