cmake_minimum_required(VERSION 3.1...3.20) project(polygon_triangulation) #CGAL_Qt5 is needed for the drawing. find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) if(CGAL_Qt5_FOUND) #required to use basic_viewer add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) else() message(FATAL_ERROR "qt not found") endif() #create the executable of the application create_single_source_cgal_program("polygon_triangulation.cpp") if(CGAL_Qt5_FOUND) #link it with the required CGAL libraries target_link_libraries(polygon_triangulation PUBLIC CGAL::CGAL_Qt5) else() message(FATAL_ERROR "qt not found") endif() #end of the file