test requires Core or Leda

This commit is contained in:
Sébastien Loriot 2024-01-03 18:47:23 +01:00
parent a10f794831
commit 8c17676886
1 changed files with 8 additions and 11 deletions

View File

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