diff --git a/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt b/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt index 8dd920fdf64..bfc26d7ea20 100644 --- a/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt +++ b/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt @@ -5,18 +5,15 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Straight_skeleton_extrusion_2_Tests) find_package(CGAL REQUIRED COMPONENTS Qt6 Core) +find_package(LEDA QUIET) include_directories(BEFORE "include") -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") -endforeach() - -if(CGAL_Qt6_FOUND) - target_link_libraries(test_sls_extrude PUBLIC CGAL::CGAL_Basic_viewer) +if (CGAL_Core_FOUND OR LEDA_FOUND) + create_single_source_cgal_program("test_sls_extrude.cpp") + if(CGAL_Qt6_FOUND) + target_link_libraries(test_sls_extrude PUBLIC CGAL::CGAL_Basic_viewer) + endif() +else() + message("NOTICE: Tests require CGAL_Core (or LEDA), and will not be compiled.") endif()