diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 6f9004655aa..4011e19f64d 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -131,6 +131,8 @@ macro(check_cgal_component COMPONENT) else( "${CGAL_LIB}" STREQUAL "CGAL" ) if ( WITH_${CGAL_LIB} ) if(TARGET CGAL::${CGAL_LIB}) + # In header-only, if CGAL_Qt5 is requested, we need to add the + # dependencies here since there is no CGAL_Qt5 lib if (CGAL_HEADER_ONLY AND "${CGAL_LIB}" STREQUAL "CGAL_Qt5") include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake") diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index fc6f5280c3c..cedbaef3ab3 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -92,6 +92,8 @@ macro(check_cgal_component COMPONENT) if ( WITH_${CGAL_LIB} ) if(TARGET CGAL::${CGAL_LIB}) + # In header-only, if CGAL_Qt5 is requested, we need to add the + # dependencies here since there is no CGAL_Qt5 lib if (CGAL_HEADER_ONLY AND "${CGAL_LIB}" STREQUAL "CGAL_Qt5") include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake")