From 65061d2c4a7bca1fef6caebab0d5e27219bf0b16 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 1 Apr 2015 14:54:24 +0200 Subject: [PATCH] Upgrade to Qt5 --- .../demo/Alpha_shapes_2/CMakeLists.txt | 23 +++++------ .../demo/Apollonius_graph_2/CMakeLists.txt | 23 +++++------ .../demo/Bounding_volumes/CMakeLists.txt | 24 +++++------- .../demo/Circular_kernel_2/CMakeLists.txt | 22 +++++------ GraphicsView/demo/Generator/CMakeLists.txt | 22 +++++------ GraphicsView/demo/Generator/Generator_2.cpp | 2 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 16 +++----- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 23 +++++------ .../demo/Largest_empty_rect_2/CMakeLists.txt | 22 +++++------ .../Periodic_2_triangulation_2/CMakeLists.txt | 21 +++++----- GraphicsView/demo/Polygon/CMakeLists.txt | 22 +++++------ .../Segment_Delaunay_graph_2/CMakeLists.txt | 17 +++++---- .../demo/Snap_rounding_2/CMakeLists.txt | 23 +++++------ .../demo/Spatial_searching_2/CMakeLists.txt | 22 +++++------ .../demo/Stream_lines_2/CMakeLists.txt | 22 +++++------ .../demo/Triangulation_2/CMakeLists.txt | 38 +++++++++---------- 16 files changed, 143 insertions(+), 199 deletions(-) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 8feda27552a..9a8c3ad1488 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -10,39 +10,34 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # The "Delaunay" demo: Alpha_shapes_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Alpha_shapes_2.ui ) +qt5_wrap_ui( DT_UI_FILES Alpha_shapes_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Alpha_shapes_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Alpha_shapes_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc ) +qt5_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc ) # The executable itself. add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 ) # Link with Qt libraries @@ -52,6 +47,6 @@ target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARI else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 914fdbb4c44..93b430237fc 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -10,37 +10,32 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL ) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Apollonius_graph_2.ui ) +qt5_wrap_ui( DT_UI_FILES Apollonius_graph_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Apollonius_graph_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Apollonius_graph_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc ) +qt5_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc ) # The executable itself. add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 ) # Link with Qt libraries @@ -50,6 +45,6 @@ target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIB else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 7f1e1c8e8ef..dd1b1deec0e 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -10,41 +10,35 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) include_directories (BEFORE ../../../Matrix_search/include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) - -include(${QT_USE_FILE}) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) #---------------------------------------------- # The "Bounding volumes" demo: Bounding_volumes #---------------------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Bounding_volumes.ui ) +qt5_wrap_ui( DT_UI_FILES Bounding_volumes.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Bounding_volumes.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Bounding_volumes.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_volumes.moc" ) +qt5_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_volumes.moc" ) # The executable itself. add_executable ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Bounding_volumes Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Bounding_volumes ) # Link with Qt libraries @@ -54,6 +48,6 @@ target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRA else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 56b239ccf39..7d72477faf4 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -10,39 +10,35 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) - - include(${QT_USE_FILE}) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) #-------------------------------- # The demo: Circular_kernel_2 #-------------------------------- # UI files (Qt Designer files) - qt4_wrap_ui( DT_UI_FILES Circular_kernel_2.ui ) + qt5_wrap_ui( DT_UI_FILES Circular_kernel_2.ui ) # qrc files (resources files, that contain icons, at least) - qt4_add_resources ( DT_RESOURCE_FILES ./Circular_kernel_2.qrc ) + qt5_add_resources ( DT_RESOURCE_FILES ./Circular_kernel_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject - qt4_generate_moc( "Circular_kernel_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Circular_kernel_2.moc" ) + qt5_generate_moc( "Circular_kernel_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Circular_kernel_2.moc" ) # The executable itself. add_executable ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) + qt5_use_modules(Circular_kernel_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_2 ) # Link with Qt libraries @@ -52,6 +48,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index 45cbeffad45..12b42319893 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -10,37 +10,33 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) - include(${QT_USE_FILE}) #-------------------------------- # Demo: Generator_2 #-------------------------------- # UI files (Qt Designer files) - qt4_wrap_ui( DT_UI_FILES Generator_2.ui ) + qt5_wrap_ui( DT_UI_FILES Generator_2.ui ) # qrc files (resources files, that contain icons, at least) - qt4_add_resources ( DT_RESOURCE_FILES ./Generator_2.qrc ) + qt5_add_resources ( DT_RESOURCE_FILES ./Generator_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject - qt4_generate_moc( "Generator_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Generator_2.moc" ) + qt5_generate_moc( "Generator_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Generator_2.moc" ) # The executable itself. add_executable ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) + qt5_use_modules(Generator_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Generator_2 ) # Link with Qt libraries @@ -50,6 +46,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Generator/Generator_2.cpp b/GraphicsView/demo/Generator/Generator_2.cpp index 71b3e02dfe9..bdd7e2707d2 100644 --- a/GraphicsView/demo/Generator/Generator_2.cpp +++ b/GraphicsView/demo/Generator/Generator_2.cpp @@ -298,7 +298,7 @@ MainWindow::on_actionGeneratePolytopeInDisc_triggered() //G pg(radius); bool ok = false; const int number_of_points = - QInputDialog::getInteger(this, + QInputDialog::getInt(this, tr("Number of random points in the disc"), tr("Enter number of random points.\nThe polytope will be the convex hull of these points."), 100, diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 07a20b1e2c3..7503856f0d7 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -9,25 +9,21 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) - - include(${QT_USE_FILE}) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) add_executable ( min min.cpp ) + qt5_use_modules(min Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS min ) # Link with Qt libraries @@ -37,6 +33,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 0b7cb87affd..74ae29c8533 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -10,40 +10,35 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES L1_voronoi_diagram_2.ui ) +qt5_wrap_ui( DT_UI_FILES L1_voronoi_diagram_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./L1_voronoi_diagram_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ) +qt5_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ) # The executable itself. add_executable ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(L1_voronoi_diagram_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS L1_voronoi_diagram_2 ) # Link with Qt libraries @@ -53,6 +48,6 @@ target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_L else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 3f184a3f492..de471c62901 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -10,37 +10,33 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) - include(${QT_USE_FILE}) #-------------------------------- # Demo: Largest_empty_rectangle_2 #-------------------------------- # UI files (Qt Designer files) - qt4_wrap_ui( DT_UI_FILES Largest_empty_rectangle_2.ui ) + qt5_wrap_ui( DT_UI_FILES Largest_empty_rectangle_2.ui ) # qrc files (resources files, that contain icons, at least) - qt4_add_resources ( DT_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc ) + qt5_add_resources ( DT_RESOURCE_FILES ./Largest_empty_rectangle_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject - qt4_generate_moc( Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ) + qt5_generate_moc( Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ) # The executable itself. add_executable ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) + qt5_use_modules(Largest_empty_rectangle_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Largest_empty_rectangle_2 ) # Link with Qt libraries @@ -50,6 +46,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 1552a30fb75..4ae4786b7f1 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -8,35 +8,30 @@ if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) endif() -find_package(CGAL COMPONENTS Qt4 REQUIRED) +find_package(CGAL REQUIRED COMPONENTS Qt5 REQUIRED) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../../include) include_directories (BEFORE ./include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # The "2D Periodic triangulation" demo: Periodic_2_triangulation_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Periodic_2_triangulation_2.ui ) +qt5_wrap_ui( DT_UI_FILES Periodic_2_triangulation_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc ) +qt5_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc ) # find header files for projects that can show them file(GLOB headers "*.h") @@ -52,6 +47,8 @@ add_executable ( Periodic_2_Delaunay_triangulation_2 ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${headers} ${QT_headers} ${P2T2_headers}) +qt5_use_modules( Periodic_2_Delaunay_triangulation_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 ) # Link with Qt libraries @@ -60,6 +57,6 @@ target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${QT_LIBRARIES} ) target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 850ae130ba4..0a04008c9ec 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -10,37 +10,31 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4 Core) +find_package(CGAL REQUIRED COMPONENTS Qt5 Core) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -#find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) if( CGAL_Core_FOUND) add_definitions(-DCGAL_USE_CORE) endif() - include(${QT_USE_FILE}) #-------------------------------- # Demo: Polygon_2 #-------------------------------- # UI files (Qt Designer files) - qt4_wrap_ui( DT_UI_FILES Polygon_2.ui ) + qt5_wrap_ui( DT_UI_FILES Polygon_2.ui ) # qrc files (resources files, that contain icons, at least) - qt4_add_resources ( DT_RESOURCE_FILES ./Polygon_2.qrc ) + qt5_add_resources ( DT_RESOURCE_FILES ./Polygon_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject - qt4_generate_moc( Polygon_2.cpp "${CMAKE_CURRENT_BINARY_DIR}/Polygon_2.moc" ) + qt5_generate_moc( Polygon_2.cpp "${CMAKE_CURRENT_BINARY_DIR}/Polygon_2.moc" ) # add_library( CGAL SHARED IMPORTED ) # SET_PROPERTY(TARGET CGAL PROPERTY IMPORTED_LOCATION ${CGAL_LIBRARY} ) @@ -48,6 +42,8 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) # The executable itself. add_executable ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) + qt5_use_modules(Polygon_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polygon_2 ) @@ -58,6 +54,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index cccbe9abe90..7a67c17637f 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -10,7 +10,7 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4 Core) +find_package(CGAL COMPONENTS Qt5 Core) include(${CGAL_USE_FILE}) @@ -20,30 +20,31 @@ set( QT_USE_QTSCRIPT TRUE ) set( QT_USE_QTOPENGL TRUE ) -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # The "Segment Voronoi" demo: Segment_voronoi_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui ) +qt5_wrap_ui( CDT_UI_FILES Segment_voronoi_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc ) +qt5_add_resources ( CDT_RESOURCE_FILES ./Segment_voronoi_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_2.moc" ) +qt5_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_voronoi_2.moc" ) # The executable itself. add_executable ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} ) +qt5_use_modules(Segment_voronoi_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_2 ) # Link with Qt libraries @@ -54,6 +55,6 @@ target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIB else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 9ed559048c6..4f7dbc960f0 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -10,38 +10,33 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ../../../Snap_rounding_2/include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Snap_rounding_2.ui ) +qt5_wrap_ui( DT_UI_FILES Snap_rounding_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Snap_rounding_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Snap_rounding_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc ) +qt5_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc ) # The executable itself. add_executable ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Snap_rounding_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Snap_rounding_2 ) # Link with Qt libraries @@ -51,6 +46,6 @@ target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRAR else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index b7f6b51abd5..45cf5b2b09a 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -10,38 +10,34 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ../../../Spatial_searching/include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) - include(${QT_USE_FILE}) #-------------------------------- # Demo: Spatial_searching_2 #-------------------------------- # UI files (Qt Designer files) - qt4_wrap_ui( DT_UI_FILES Spatial_searching_2.ui ) + qt5_wrap_ui( DT_UI_FILES Spatial_searching_2.ui ) # qrc files (resources files, that contain icons, at least) - qt4_add_resources ( DT_RESOURCE_FILES ./Spatial_searching_2.qrc ) + qt5_add_resources ( DT_RESOURCE_FILES ./Spatial_searching_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject - qt4_generate_moc( Spatial_searching_2.cpp Spatial_searching_2.moc ) + qt5_generate_moc( Spatial_searching_2.cpp Spatial_searching_2.moc ) # The executable itself. add_executable ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) + qt5_use_modules(Spatial_searching_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Spatial_searching_2 ) # Link with Qt libraries @@ -51,6 +47,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) else() - message(STATUS "NOTICE: This demo requires CGAL, and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 12b9d931dff..c1b8f6ca8ea 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -10,37 +10,33 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Stream_lines_2.ui ) +qt5_wrap_ui( DT_UI_FILES Stream_lines_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Stream_lines_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Stream_lines_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc ) +qt5_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc ) # The executable itself. add_executable ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Stream_lines_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Stream_lines_2 ) # Link with Qt libraries @@ -50,6 +46,6 @@ target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARI else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 20cb6aedac5..30c2a42f034 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -10,17 +10,12 @@ else() cmake_policy(VERSION 2.6) endif() -find_package(CGAL COMPONENTS Qt4) +find_package(CGAL REQUIRED COMPONENTS Qt5) include(${CGAL_USE_FILE}) -set( QT_USE_QTXML TRUE ) -set( QT_USE_QTMAIN TRUE ) -set( QT_USE_QTSCRIPT TRUE ) -set( QT_USE_QTOPENGL TRUE ) - -#find_package(Qt4) +find_package(Qt5 COMPONENTS Xml Script OpenGL) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) @@ -28,25 +23,26 @@ include_directories (BEFORE ../../../Number_types/include) include_directories (BEFORE ../../../Triangulation_2/include) -if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) -include(${QT_USE_FILE}) #-------------------------------- # The "constrained Delaunay" demo: Constrained_Delaunay_triangulation_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( CDT_UI_FILES Constrained_Delaunay_triangulation_2.ui ) +qt5_wrap_ui( CDT_UI_FILES Constrained_Delaunay_triangulation_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qrc ) +qt5_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" ) +qt5_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" ) # The executable itself. add_executable ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} ) +qt5_use_modules(Constrained_Delaunay_triangulation_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2 ) # Link with Qt libraries @@ -58,17 +54,19 @@ target_link_libraries( Constrained_Delaunay_triangulation_2 ${CGAL_LIBRARIES} $ # The "Delaunay" demo: Delaunay_triangulation_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Delaunay_triangulation_2.ui ) +qt5_wrap_ui( DT_UI_FILES Delaunay_triangulation_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" ) +qt5_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" ) # The executable itself. add_executable ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Delaunay_triangulation_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 ) # Link with Qt libraries @@ -80,17 +78,19 @@ target_link_libraries( Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PAR # The "Regular" demo: Regular_triangulation_2 #-------------------------------- # UI files (Qt Designer files) -qt4_wrap_ui( DT_UI_FILES Regular_triangulation_2.ui ) +qt5_wrap_ui( DT_UI_FILES Regular_triangulation_2.ui ) # qrc files (resources files, that contain icons, at least) -qt4_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc ) +qt5_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc ) # use the Qt MOC preprocessor on classes that derives from QObject -qt4_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" ) +qt5_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" ) # The executable itself. add_executable ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) +qt5_use_modules(Regular_triangulation_2 Xml Script OpenGL) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 ) # Link with Qt libraries @@ -100,6 +100,6 @@ target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PART else() - message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif()