Upgrade to Qt5

This commit is contained in:
Maxime Gimeno 2015-04-01 14:54:24 +02:00
parent fdf425b21e
commit 65061d2c4a
16 changed files with 143 additions and 199 deletions

View File

@ -10,39 +10,34 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
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 # The "Delaunay" demo: Alpha_shapes_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 )
# Link with Qt libraries # Link with Qt libraries
@ -52,6 +47,6 @@ target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARI
else() 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() endif()

View File

@ -10,37 +10,32 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL )
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
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})
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 )
# Link with Qt libraries # Link with Qt libraries
@ -50,6 +45,6 @@ target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIB
else() 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() endif()

View File

@ -10,41 +10,35 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
include_directories (BEFORE ./include) include_directories (BEFORE ./include)
include_directories (BEFORE ../../../Matrix_search/include) include_directories (BEFORE ../../../Matrix_search/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 "Bounding volumes" demo: Bounding_volumes # The "Bounding volumes" demo: Bounding_volumes
#---------------------------------------------- #----------------------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Bounding_volumes )
# Link with Qt libraries # Link with Qt libraries
@ -54,6 +48,6 @@ target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRA
else() 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() endif()

View File

@ -10,39 +10,35 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) 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 demo: Circular_kernel_2 # The demo: Circular_kernel_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_2 )
# Link with Qt libraries # Link with Qt libraries
@ -52,6 +48,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -10,37 +10,33 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
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})
#-------------------------------- #--------------------------------
# Demo: Generator_2 # Demo: Generator_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Generator_2 )
# Link with Qt libraries # Link with Qt libraries
@ -50,6 +46,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -298,7 +298,7 @@ MainWindow::on_actionGeneratePolytopeInDisc_triggered()
//G pg(radius); //G pg(radius);
bool ok = false; bool ok = false;
const int number_of_points = const int number_of_points =
QInputDialog::getInteger(this, QInputDialog::getInt(this,
tr("Number of random points in the disc"), tr("Number of random points in the disc"),
tr("Enter number of random points.\nThe polytope will be the convex hull of these points."), tr("Enter number of random points.\nThe polytope will be the convex hull of these points."),
100, 100,

View File

@ -9,25 +9,21 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) 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 ) if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND )
include(${QT_USE_FILE})
add_executable ( min min.cpp ) add_executable ( min min.cpp )
qt5_use_modules(min Xml Script OpenGL)
add_to_cached_list( CGAL_EXECUTABLE_TARGETS min ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS min )
# Link with Qt libraries # Link with Qt libraries
@ -37,6 +33,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -10,40 +10,35 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
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 # The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # 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} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS L1_voronoi_diagram_2 )
# Link with Qt libraries # Link with Qt libraries
@ -53,6 +48,6 @@ target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_L
else() 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() endif()

View File

@ -10,37 +10,33 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
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})
#-------------------------------- #--------------------------------
# Demo: Largest_empty_rectangle_2 # Demo: Largest_empty_rectangle_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # 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} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Largest_empty_rectangle_2 )
# Link with Qt libraries # Link with Qt libraries
@ -50,6 +46,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -8,35 +8,30 @@ if ( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW ) cmake_policy( SET CMP0003 NEW )
endif() endif()
find_package(CGAL COMPONENTS Qt4 REQUIRED) find_package(CGAL REQUIRED COMPONENTS Qt5 REQUIRED)
include(${CGAL_USE_FILE}) 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 ./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 # The "2D Periodic triangulation" demo: Periodic_2_triangulation_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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 # find header files for projects that can show them
file(GLOB headers "*.h") file(GLOB headers "*.h")
@ -52,6 +47,8 @@ add_executable ( Periodic_2_Delaunay_triangulation_2
${DT_UI_FILES} ${DT_RESOURCE_FILES} ${DT_UI_FILES} ${DT_RESOURCE_FILES}
${headers} ${QT_headers} ${P2T2_headers}) ${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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 )
# Link with Qt libraries # 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}) target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
else() 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() endif()

View File

@ -10,37 +10,31 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4 Core) find_package(CGAL REQUIRED COMPONENTS Qt5 Core)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
#find_package(Qt4)
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 )
if( CGAL_Core_FOUND) if( CGAL_Core_FOUND)
add_definitions(-DCGAL_USE_CORE) add_definitions(-DCGAL_USE_CORE)
endif() endif()
include(${QT_USE_FILE})
#-------------------------------- #--------------------------------
# Demo: Polygon_2 # Demo: Polygon_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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 ) # add_library( CGAL SHARED IMPORTED )
# SET_PROPERTY(TARGET CGAL PROPERTY IMPORTED_LOCATION ${CGAL_LIBRARY} ) # 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. # The executable itself.
add_executable ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polygon_2 )
@ -58,6 +54,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -10,7 +10,7 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4 Core) find_package(CGAL COMPONENTS Qt5 Core)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
@ -20,30 +20,31 @@ set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL 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 ./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 # The "Segment Voronoi" demo: Segment_voronoi_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_2 )
# Link with Qt libraries # Link with Qt libraries
@ -54,6 +55,6 @@ target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIB
else() 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() endif()

View File

@ -10,38 +10,33 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
include_directories (BEFORE ../../../Snap_rounding_2/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) # 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) # 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 # 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. # The executable itself.
add_executable ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Snap_rounding_2 )
# Link with Qt libraries # Link with Qt libraries
@ -51,6 +46,6 @@ target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRAR
else() 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() endif()

View File

@ -10,38 +10,34 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
set( QT_USE_QTXML TRUE ) find_package(Qt5 COMPONENTS Xml Script OpenGL)
set( QT_USE_QTMAIN TRUE )
set( QT_USE_QTSCRIPT TRUE )
set( QT_USE_QTOPENGL TRUE )
find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
include_directories (BEFORE ../../../Spatial_searching/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 # Demo: Spatial_searching_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Spatial_searching_2 )
# Link with Qt libraries # Link with Qt libraries
@ -51,6 +47,6 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
else() 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() endif()

View File

@ -10,37 +10,33 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) 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(Qt5 COMPONENTS Xml Script OpenGL)
find_package(Qt4)
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})
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Stream_lines_2 )
# Link with Qt libraries # Link with Qt libraries
@ -50,6 +46,6 @@ target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARI
else() 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() endif()

View File

@ -10,17 +10,12 @@ else()
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif() endif()
find_package(CGAL COMPONENTS Qt4) find_package(CGAL REQUIRED COMPONENTS Qt5)
include(${CGAL_USE_FILE}) 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(Qt5 COMPONENTS Xml Script OpenGL)
#find_package(Qt4)
include_directories (BEFORE ../../include) include_directories (BEFORE ../../include)
include_directories (BEFORE ./include) include_directories (BEFORE ./include)
@ -28,25 +23,26 @@ include_directories (BEFORE ../../../Number_types/include)
include_directories (BEFORE ../../../Triangulation_2/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 # The "constrained Delaunay" demo: Constrained_Delaunay_triangulation_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # 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} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2 )
# Link with Qt libraries # Link with Qt libraries
@ -58,17 +54,19 @@ target_link_libraries( Constrained_Delaunay_triangulation_2 ${CGAL_LIBRARIES} $
# The "Delaunay" demo: Delaunay_triangulation_2 # The "Delaunay" demo: Delaunay_triangulation_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
# Link with Qt libraries # 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 # The "Regular" demo: Regular_triangulation_2
#-------------------------------- #--------------------------------
# UI files (Qt Designer files) # 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) # 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 # 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. # The executable itself.
add_executable ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ) 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 ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 )
# Link with Qt libraries # Link with Qt libraries
@ -100,6 +100,6 @@ target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PART
else() 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() endif()