File: CMakeLists.txt

package info (click to toggle)
cgal 6.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,952 kB
  • sloc: cpp: 811,597; ansic: 208,576; sh: 493; python: 411; makefile: 286; javascript: 174
file content (40 lines) | stat: -rw-r--r-- 1,700 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.

#/!\ /!\
#/!\ /!\
# Used in /CGAL/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt.
# Careful when modifying

cmake_minimum_required(VERSION 3.12...3.31)
project(Basic_viewer_Examples)

#CGAL_Qt6 is needed for the drawing.
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)

create_single_source_cgal_program("draw_lcc.cpp")
create_single_source_cgal_program("draw_surface_mesh_height.cpp")
create_single_source_cgal_program("draw_surface_mesh_small_faces.cpp")
create_single_source_cgal_program("draw_surface_mesh_vcolor.cpp")

if(CGAL_Qt6_FOUND)
  #link it with the required CGAL libraries
  target_link_libraries(draw_lcc PRIVATE CGAL::CGAL_Basic_viewer)
  target_link_libraries(draw_surface_mesh_height PRIVATE CGAL::CGAL_Basic_viewer)
  target_link_libraries(draw_surface_mesh_small_faces PRIVATE CGAL::CGAL_Basic_viewer)
  target_link_libraries(draw_surface_mesh_vcolor PRIVATE CGAL::CGAL_Basic_viewer)
  if(TARGET CGAL::Eigen3_support)
    create_single_source_cgal_program("draw_mesh_and_points.cpp")
    create_single_source_cgal_program("draw_several_windows.cpp")
    target_link_libraries(draw_mesh_and_points PRIVATE CGAL::Eigen3_support CGAL::CGAL_Basic_viewer)
    target_link_libraries(draw_several_windows PRIVATE CGAL::Eigen3_support CGAL::CGAL_Basic_viewer)
  else()
    message("Eigen3 is not found, examples that require Eigen3 will not be compiled.")
  endif()
else()
  message("CGAL_Qt6 not configured: examples that require Qt will not be compiled.")
endif()

#end of the file