diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 259fb97b451..b678fff4b0a 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -45,7 +45,9 @@ if(NOT USE_CGAL_FILE_INCLUDED) include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) - if(TARGET CGAL) + if(TARGET CGAL::CGAL) + add_to_list( CGAL_LIBRARIES CGAL::CGAL ) + elseif(TARGET CGAL) add_to_list( CGAL_LIBRARIES CGAL ) else() add_to_list( CGAL_LIBRARIES ${CGAL_LIBRARY} )