diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index eb4f6a96fca..cec72a6421c 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -14,7 +14,7 @@ endif() # Include this package's headers first include_directories( BEFORE ./ ./include ../../include ) # Find CGAL and CGAL Qt5 -find_package(CGAL REQUIRED COMPONENTS Qt5 ) +find_package(CGAL COMPONENTS Qt5 ) include( ${CGAL_USE_FILE} ) # Find Qt5 itself diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index c9efc60a573..08665e5f5ba 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -1311,6 +1311,7 @@ void Scene::deactivate_cutting_plane() } void Scene::initGL() { + qDebug()<<"context from scene is valid :"<isValid(); initializeOpenGLFunctions(); glGenTextures(1, &textureId); compile_shaders(); diff --git a/AABB_tree/demo/AABB_tree/Viewer.cpp b/AABB_tree/demo/AABB_tree/Viewer.cpp index 7a72edb85df..34c9cffe106 100644 --- a/AABB_tree/demo/AABB_tree/Viewer.cpp +++ b/AABB_tree/demo/AABB_tree/Viewer.cpp @@ -31,6 +31,7 @@ void Viewer::initializeGL() QGLViewer::initializeGL(); setBackgroundColor(::Qt::white); m_pScene->context = this->context(); + qDebug()<<"context from viewer is valid :"<context()->isValid(); m_pScene->initGL(); } diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 7349cd12e46..a548cd61e69 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -26,7 +26,7 @@ include( ${CGAL_USE_FILE} ) include( CGAL_CreateSingleSourceCGALProgram ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 668afba7b39..6161c34ca8f 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -11,7 +11,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) find_package(Qt5 COMPONENTS Xml Script OpenGL) diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 7ac8cf18194..9b420b7a3af 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -36,7 +36,7 @@ include( ${CGAL_USE_FILE} ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) message(STATUS "This project requires the Boost library, and will not be compiled.") diff --git a/CGAL_Core/examples/Core/CMakeLists.txt b/CGAL_Core/examples/Core/CMakeLists.txt index e3fbde5cdfd..3a56a0ac573 100644 --- a/CGAL_Core/examples/Core/CMakeLists.txt +++ b/CGAL_Core/examples/Core/CMakeLists.txt @@ -33,7 +33,7 @@ include( ${CGAL_USE_FILE} ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 904cdf884d5..5cd80fabca5 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -5,7 +5,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) find_package(Qt5 COMPONENTS Xml Script OpenGL) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 19cedbca651..40e1b7aaa50 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 49030e5c161..e814d5f1df5 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 6fa65edc26a..658bb01c7f8 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index c66f47ee65a..ea06203df7d 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 99cdba4a4aa..84e4dbbf4df 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -7,7 +7,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index fe8c0ce03ac..1d321d45047 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 797a9ff5c41..371082b344e 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 5c626904950..6644b70d530 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -8,7 +8,7 @@ if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5 REQUIRED) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 4480b885075..20fc3dc2fd0 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5 Core) +find_package(CGAL COMPONENTS Qt5 Core) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 93b316d290c..ba03c2f1e0b 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index e7a8a0099e0..e541182aa5e 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index f5c81caacd6..bf778783aa0 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 7f83e32453d..30a921133ae 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -8,7 +8,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 13825656b9e..17f59cfcea4 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -30,7 +30,7 @@ endif() add_definitions(-DCGAL_PROFILE_LCC_DEMO) ################## -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) find_package(Qt5 COMPONENTS Xml Script OpenGL) diff --git a/Mesh_3/demo/Mesh_3/implicit_functions/CMakeLists.txt b/Mesh_3/demo/Mesh_3/implicit_functions/CMakeLists.txt index 8e8f42de751..2e1ab09d1eb 100644 --- a/Mesh_3/demo/Mesh_3/implicit_functions/CMakeLists.txt +++ b/Mesh_3/demo/Mesh_3/implicit_functions/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") include_directories( BEFORE ${Mesh_3_implicit_functions_BINARY_DIR} ../include ) # Find CGAL and CGAL Qt5 -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) # Find Qt5 itself diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index 603bbde8ba5..aa45255751d 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -10,7 +10,7 @@ if(POLICY CMP0043) endif() # Find CGAL -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) # Find Qt5 itself diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index 77ad080102d..a1cc8f4e53d 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -12,7 +12,7 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 971ff57d8bc..1bab8434753 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -53,7 +53,7 @@ set( QT_USE_QTOPENGL TRUE ) if( POLYHEDRON_QTSCRIPT_DEBUGGER) set( QT_USE_QTSCRIPTTOOLS TRUE ) endif() -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) find_package(Qt5 COMPONENTS OpenGL Script Svg Xml ScriptTools) diff --git a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt index 9d65a2d3099..e451a6ac4d2 100644 --- a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt @@ -36,7 +36,7 @@ include( ${CGAL_USE_FILE} ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index 60d65657f80..dc03be3282f 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -16,7 +16,7 @@ endforeach() include_directories( ./ ) # Find CGAL and CGAL Qt5 -find_package(CGAL REQUIRED COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) # Find Qt5 itself diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 66401c6d404..e81f3810419 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -36,7 +36,7 @@ include( ${CGAL_USE_FILE} ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index bb408d278f5..7848346c654 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -36,7 +36,7 @@ include( ${CGAL_USE_FILE} ) # Boost and its components -find_package( Boost REQUIRED ) +find_package( Boost ) if ( NOT Boost_FOUND ) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 864e06fb1a6..a7b4cdfb8bf 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -36,7 +36,7 @@ set( QT_USE_QTXML TRUE ) set( QT_USE_QTMAIN TRUE ) find_package(CGAL COMPONENTS ImageIO Qt5) -if ( CGAL_FOUND AND CGAL_Qt5_FOUND) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) add_definitions(-DQT_NO_KEYWORDS) include( ${CGAL_USE_FILE} ) @@ -45,7 +45,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND) find_package(QGLViewer ) find_package(OpenGL ) - if ( QGLVIEWER_FOUND ) + if ( QGLVIEWER_FOUND AND Qt5_FOUND) include_directories( ${QGLVIEWER_INCLUDE_DIR} )