diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 0fffe791b9b..44baf0d84aa 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -30,11 +30,16 @@ This section describes a minimal example of a program that uses \cgal and Qt5 fo \subsection subcmake CMakeLists.txt \dontinclude Surface_mesh/CMakeLists.txt -\skip cmake -\until if ( CGAL_FOUND ) +\skip cmake_minimum_required +\until project + +\skip #CGAL_Qt5 is needed for the drawing. +\until endif() + \skip #create the executable of the application \until "draw_surface_mesh.cpp" -\skip if(CGAL_Qt5_FOUND ) + +\skip if(CGAL_Qt5_FOUND) \until target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Qt5) \skip endif \until #end of the file diff --git a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt index cbad83f22db..351342fb9ec 100644 --- a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt @@ -1,6 +1,11 @@ # 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.1...3.15) project(Surface_mesh_Examples) @@ -35,17 +40,16 @@ create_single_source_cgal_program("sm_iterators.cpp") create_single_source_cgal_program("sm_kruskal.cpp") create_single_source_cgal_program("sm_memory.cpp") create_single_source_cgal_program("sm_properties.cpp") - -#create the executable of the application - -create_single_source_cgal_program("draw_surface_mesh.cpp") create_single_source_cgal_program("sm_draw_small_faces.cpp") create_single_source_cgal_program("check_orientation.cpp") + +#create the executable of the application +create_single_source_cgal_program("draw_surface_mesh.cpp") if(CGAL_Qt5_FOUND) #link it with the required CGAL libraries - target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Qt5) + target_link_libraries(sm_draw_small_faces PUBLIC CGAL::CGAL_Qt5) endif()