diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index a6cae8ec1ee..00174e7da6d 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -26,6 +26,9 @@ if ( CGAL_FOUND ) if(EIGEN3_FOUND OR LAPACK_FOUND) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) + if(TARGET Boost::program_options) + set(Boost_PROGRAM_OPTIONS_LIBRARY Boost::program_options) + endif() if(Boost_PROGRAM_OPTIONS_FOUND) if( CGAL_AUTO_LINK_ENABLED ) message( STATUS "Boost.ProgramOptions library: found" ) diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index 558d8763d8c..d1e9b9c19af 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -29,6 +29,9 @@ if ( CGAL_FOUND ) # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) + if(TARGET Boost::program_options) + set(Boost_PROGRAM_OPTIONS_LIBRARY Boost::program_options) + endif() if( CGAL_AUTO_LINK_ENABLED ) message( STATUS "Boost.ProgramOptions library: found" ) else()