* Add draw examples in the 5 concerned packages (Polyhedron, Surface_mesh, T2, T3, LCC)
* Update FindQGLViewel to add a target.
This commit is contained in:
committed by
Maxime Gimeno
parent
202781aa93
commit
53769e98a7
@@ -11,6 +11,13 @@ endif()
|
||||
|
||||
find_package(CGAL COMPONENTS Qt5)
|
||||
|
||||
if(CGAL_Qt5_FOUND)
|
||||
find_package(QGLViewer)
|
||||
if (TARGET QGLViewer::QGLViewer)
|
||||
add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For Gprof.
|
||||
# ADD_DEFINITIONS("-pg")
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
||||
@@ -18,44 +25,31 @@ find_package(CGAL COMPONENTS Qt5)
|
||||
# To use valgrind, we must disable rounding math ckeck.
|
||||
# add_definition(-DCGAL_DISABLE_ROUNDING_MATH_CHECK)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
include(${CGAL_USE_FILE})
|
||||
if (CGAL_FOUND)
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
include_directories(BEFORE ../../include)
|
||||
|
||||
create_single_source_cgal_program("gmap_linear_cell_complex_3.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_4.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_attributes_management.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_operations.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_with_colored_vertices.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_4.cpp")
|
||||
create_single_source_cgal_program("plane_graph_to_lcc_2.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_attributes_management.cpp")
|
||||
create_single_source_cgal_program("voronoi_2.cpp")
|
||||
create_single_source_cgal_program("voronoi_3.cpp")
|
||||
create_single_source_cgal_program("gmap_linear_cell_complex_3.cpp")
|
||||
create_single_source_cgal_program("linear_cell_complex_3_operations.cpp")
|
||||
|
||||
create_single_source_cgal_program("draw_linear_cell_complex.cpp")
|
||||
if(TARGET CGAL::CGAL_Qt5)
|
||||
find_package(Qt5 REQUIRED COMPONENTS OpenGL Xml)
|
||||
find_package(QGLViewer REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_NO_KEYWORDS)
|
||||
include_directories( ${QGLVIEWER_INCLUDE_DIR} )
|
||||
add_definitions(${QGLVIEWER_DEFINITIONS})
|
||||
|
||||
target_link_libraries(draw_linear_cell_complex CGAL::CGAL_Qt5 Qt5::Xml
|
||||
${QT_LIBRARIES}
|
||||
${QGLVIEWER_LIBRARIES}
|
||||
${OPENGL_gl_LIBRARY})
|
||||
target_compile_definitions(draw_linear_cell_complex PRIVATE CGAL_USE_BASIC_VIEWER)
|
||||
create_single_source_cgal_program("draw_linear_cell_complex.cpp")
|
||||
if(CGAL_Qt5_FOUND AND TARGET QGLViewer::QGLViewer)
|
||||
target_link_libraries(draw_linear_cell_complex CGAL::CGAL_Qt5 QGLViewer::QGLViewer)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
message(STATUS "This program requires the CGAL library, "
|
||||
"and will not be compiled.")
|
||||
message(STATUS "This program requires the CGAL library, and will not be compiled.")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user