Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CGAL: Qt5 -> Qt6 #7397

Merged
merged 96 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
ef46506
Add cmake/modules files
afabri Apr 18, 2023
c6ce5fb
Switch to QT6 for the GraphicsView demos
afabri Apr 19, 2023
47683f2
The Truiangulation_2/examples which use draw() compile and visualize …
afabri Apr 19, 2023
b1040de
Surface_mesh example works as well
afabri Apr 19, 2023
42a9757
Fix to have a weak order
afabri Apr 19, 2023
370e81e
AABB Tree demo works
afabri Apr 19, 2023
5601e03
Change all CMakeLists.txt
afabri Apr 19, 2023
5030d67
Target Polyhedron_3 builds and executes, but with all scripting and R…
afabri Apr 19, 2023
b80fbc8
Fixes for target Mesh_3
afabri Apr 20, 2023
bd78a33
PMP compiles [skip ci]
afabri Apr 20, 2023
ab1d799
various fixes [skip ci]
afabri Apr 20, 2023
c77f144
various fixes [skip ci]
afabri Apr 20, 2023
b15e0a1
Fix 'Save As' [skip ci]
afabri Apr 20, 2023
0574c6b
Change the remaining CMakeLists.txt [skip ci]
afabri Apr 20, 2023
7e160aa
Hello QJSEngine [skip ci]
afabri Apr 21, 2023
b4a259c
Hello QJSEngine [skip ci]
afabri Apr 21, 2023
67441a3
Convert all CMakeLists.txt to Qt6
lrineau Apr 25, 2023
134b464
Allocate the QJSEngine on the heap
afabri Apr 26, 2023
f645170
fix memory leak
lrineau Apr 27, 2023
0576e88
Merge branch 'CGAL-fix-Qt5-CMake-GF' into CGAL-Qt6-GF
lrineau Apr 28, 2023
a10460d
Remove trailing whitespaces
lrineau Apr 28, 2023
db652ac
add Qt6 to the CI tests
lrineau Apr 28, 2023
b2a330b
WIP re-adding scripting
afabri Apr 30, 2023
573de7f
Merge branch 'master'
sloriot Jun 22, 2023
aa0d50b
Fix Arrangement_on_surface_2 examples
afabri Jun 26, 2023
1066af1
Add #include
afabri Jun 26, 2023
a015b1d
Fix Straight_skeleton_extrusion test
afabri Jun 26, 2023
63bf2a8
Fix for deprecated warning
afabri Jun 29, 2023
41e8a11
Fix warnings in Arrangement_on_surface
afabri Jun 29, 2023
a633029
Fix for deprecated warning
afabri Jun 30, 2023
125542e
Merge remote-tracking branch 'cgal/master'
sloriot Jul 11, 2023
98fa0c0
Fix for crash on Quit
afabri Jul 18, 2023
c6fd1d0
Merge branch 'master' into CGAL-Qt6-GF
MaelRL Jul 18, 2023
c3b7214
Fix the fix. The floats were already in the range [0,256]
afabri Jul 26, 2023
a025556
Update changes.md
afabri Aug 21, 2023
48bd7cc
fix deprecation warnings from Qt6
lrineau Aug 24, 2023
68bc244
Merge remote-tracking branch 'cgal/master' into HEAD
sloriot Aug 24, 2023
740b570
Merge remote-tracking branch 'refs/remotes/afabri/CGAL-Qt6-GF' into C…
lrineau Aug 24, 2023
79a563b
fix more deprecation warnings
lrineau Aug 24, 2023
da0b65d
fix QSJ/C++ exceptions handling
lrineau Aug 24, 2023
a12a0fa
TBB is a SYSTEM library
lrineau Aug 24, 2023
9f68b1a
TBB is a SYSTEM library, and CGAL::CGAL is not
lrineau Aug 24, 2023
d8583c9
replace deprecated QMatrix4x4*QVector3D by map
lrineau Aug 24, 2023
dc7f6af
check that we have an exact match (whole string)
lrineau Aug 24, 2023
f9c2137
last deprecation warning in a full build of demo/Polyhedron
lrineau Aug 24, 2023
abb9080
cleanup demo/AABB_tree
lrineau Aug 24, 2023
3869a4a
cleanup Alpha_sphare_3 demo
lrineau Aug 24, 2023
df06d29
fix/cleanup AABB_tree and Alpha_shape_3 demos
lrineau Aug 25, 2023
4fbcb93
a few cleanups
lrineau Aug 28, 2023
3a52549
more cleanup of CMake scripts for Qt6
lrineau Aug 29, 2023
7af862e
fix trailing space
lrineau Aug 29, 2023
1f13a62
restore the OpenGL format in DemosMainWindow
lrineau Aug 30, 2023
4740f81
add a target to compile all CGALlab
lrineau Aug 31, 2023
0303b8d
Update CMakeLists for QT6
SaillantNicolas Sep 5, 2023
b286df4
fix warnings (and ASAN errors)
lrineau Sep 8, 2023
a413670
More CMakeLists Updates for QT6
SaillantNicolas Sep 11, 2023
fed2af5
Merge remote-tracking branch 'SaillantNicolas/pr/afabri/7397' into CG…
lrineau Sep 11, 2023
0d7280e
CMakeLists updates for Qt6
SaillantNicolas Sep 11, 2023
1997bd0
Merge remote-tracking branch 'refs/remotes/afabri/CGAL-Qt6-GF' into p…
SaillantNicolas Sep 11, 2023
303282a
fix "Save as..." in CGAL Lab
lrineau Sep 11, 2023
c276b54
Remove one occurence of "qt5"
lrineau Sep 11, 2023
873c3b2
remove a few occurrences of "qt5"
lrineau Sep 11, 2023
cf1b5fd
Update CMakeLists for QT6
SaillantNicolas Sep 13, 2023
4b3279e
Remove the "Use OpenGL" option from 2D demos
lrineau Sep 13, 2023
0d9037b
add the ui file
lrineau Sep 13, 2023
67baec2
Fix Optimal_transportation_reconstruction_2_Demo
lrineau Sep 13, 2023
b01da56
remove occurrences of OpenGLWidgets in demos' CMake scripts
lrineau Sep 13, 2023
03e89cc
fix periodic_3_triangulation_3_demo
lrineau Sep 13, 2023
09a4ac1
cosmetic changes
lrineau Sep 14, 2023
e93a099
finish review of polyhedron demo
lrineau Sep 14, 2023
2f6d51b
Remove a few occurrences of CGAL_Qt5
lrineau Sep 14, 2023
48f37a1
remove occurrences of Qt5
lrineau Sep 14, 2023
68f7646
remove stray CMake debug messages
lrineau Sep 14, 2023
9bba3bd
fix the list of used Qt6 components
lrineau Sep 14, 2023
b05e1e9
Remove UseCGAL.cmake
lrineau Sep 14, 2023
28632f2
Merge branch 'master' into CGAL-Qt6-GF
lrineau Sep 14, 2023
40a7f32
fix a compilation error
lrineau Sep 15, 2023
fe68498
CGALConfig.cmake remove the early return()
lrineau Sep 19, 2023
0ffb256
fix the workflow demo.yml
lrineau Sep 19, 2023
029d7a8
fix test/Installation tests on Windows
lrineau Sep 20, 2023
a72ccf2
Fix CMake error on Windows
lrineau Sep 28, 2023
dda4bf8
fix regression about MOC compilations
lrineau Nov 1, 2023
51627e3
Merge remote-tracking branch 'cgal/master' into CGAL-Qt6-GF
lrineau Nov 1, 2023
980b04e
fix the Arrangement demo
lrineau Nov 1, 2023
dea756e
fix test/Installation on Windows
lrineau Nov 1, 2023
dc0cd7f
make ~Show_point_dialog() virtual
afabri Nov 15, 2023
652f7b2
Replace Q_FOREACH
afabri Nov 15, 2023
3c07d9a
Add virtual
afabri Nov 15, 2023
9ead7b5
Address unused variable warnings
afabri Nov 16, 2023
1dee4f8
Fix conversion warning in T3 demo
afabri Nov 16, 2023
2a223e6
Fix ipelet demo CMakeLists.txt
afabri Nov 16, 2023
bb6222d
Fix ipelet demo CMakeLists.txt
afabri Nov 16, 2023
cfac63f
Merge remote-tracking branch 'cgal/master' into HEAD
sloriot Nov 16, 2023
1f8d66b
add macro in new resource dir
sloriot Nov 16, 2023
15af760
Q_DECL_OVERRIDE -> override
sloriot Nov 22, 2023
f0f1d6a
fix warning
sloriot Nov 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
sudo apt-get update
sudo apt-get install -y libmpfr-dev \
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh \
qt6-base-dev qt6-declarative-dev
#update cmake to 3.18.4
sudo apt purge --auto-remove cmake
cd /tmp
Expand Down
40 changes: 20 additions & 20 deletions AABB_tree/demo/AABB_tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,59 +20,59 @@ endif()
# Include this package's headers first
include_directories(BEFORE ./ ./include)

# Find CGAL and CGAL Qt5
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
# Find CGAL and CGAL Qt6
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)

# Find Qt5 itself
find_package(Qt5 QUIET COMPONENTS Widgets OpenGL)
# Find Qt6 itself
find_package(Qt6 QUIET COMPONENTS OpenGLWidgets Widgets OpenGL Qml)

if(CGAL_Qt5_FOUND AND Qt5_FOUND)
if(CGAL_Qt6_FOUND AND Qt6_FOUND)

qt5_wrap_ui(UI_FILES MainWindow.ui)
qt6_wrap_ui(UI_FILES MainWindow.ui)

include(AddFileDependencies)

qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
qt6_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")

qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
qt6_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")

qt5_generate_moc("Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp")
qt6_generate_moc("Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp")
add_file_dependencies(Scene_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Scene.h")

qt5_add_resources(CGAL_Qt5_RESOURCE_FILES AABB_demo.qrc)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES AABB_demo.qrc)

add_file_dependencies(
AABB_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp")

add_executable(
AABB_demo AABB_demo.cpp ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES}
#${CGAL_Qt5_MOC_FILES}
AABB_demo AABB_demo.cpp ${UI_FILES} ${CGAL_Qt6_RESOURCE_FILES}
#${CGAL_Qt6_MOC_FILES}
)
# Link with Qt libraries
target_link_libraries(AABB_demo PRIVATE Qt5::Widgets Qt5::OpenGL
CGAL::CGAL CGAL::CGAL_Qt5)
target_link_libraries(AABB_demo PRIVATE Qt6::OpenGLWidgets Qt6::Widgets Qt6::OpenGL Qt6::Qml
CGAL::CGAL CGAL::CGAL_Qt6)

add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo)

include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(AABB_demo)

else(CGAL_Qt5_FOUND AND Qt5_FOUND)
else(CGAL_Qt6_FOUND AND Qt6_FOUND)

set(AABB_MISSING_DEPS "")

if(NOT CGAL_Qt5_FOUND)
set(AABB_MISSING_DEPS "CGAL_Qt5, ${AABB_MISSING_DEPS}")
if(NOT CGAL_Qt6_FOUND)
set(AABB_MISSING_DEPS "CGAL_Qt6, ${AABB_MISSING_DEPS}")
endif()

if(NOT Qt5_FOUND)
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
if(NOT Qt6_FOUND)
set(AABB_MISSING_DEPS "Qt6, ${AABB_MISSING_DEPS}")
endif()

message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")

endif(CGAL_Qt5_FOUND AND Qt5_FOUND)
endif(CGAL_Qt6_FOUND AND Qt6_FOUND)
28 changes: 23 additions & 5 deletions AABB_tree/demo/AABB_tree/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

#include "ui_MainWindow.h"



MainWindow::MainWindow(QWidget* parent)
: CGAL::Qt::DemosMainWindow(parent)
: CGAL::Qt::DemosMainWindow(parent), myEngine(new QJSEngine(this))
{
ui = new Ui::MainWindow;
ui->setupUi(this);
Expand All @@ -38,12 +40,25 @@ MainWindow::MainWindow(QWidget* parent)
connect(this, SIGNAL(openRecentFile(QString)),
this, SLOT(open(QString)));

QJSValue mainWindow = myEngine->newQObject(this);
myEngine->globalObject().setProperty("main_window", mainWindow);
readSettings();
std::ifstream script("init.js");
if(script.good()){
std::string line;
while(getline(script, line)){
myEngine->evaluate(line.c_str());
}
}
}

MainWindow::~MainWindow()
{
m_pViewer->makeCurrent();
// AF I thought this helps to avoid the exception when the program
// terminates, but it does not
myEngine->globalObject().setProperty("main_window", QJSValue());
myEngine->collectGarbage();
delete ui;
}

Expand All @@ -65,6 +80,13 @@ void MainWindow::dropEvent(QDropEvent *event)
event->acceptProposedAction();
}


void MainWindow::hello() const
{
std::cout << "Hhello world" << std::endl;
}


void MainWindow::updateViewerBBox()
{
m_pScene->update_bbox();
Expand Down Expand Up @@ -418,7 +440,3 @@ void MainWindow::on_actionCopy_snapshot_triggered()
qb->setImage(snapshot);
QApplication::restoreOverrideCursor();
}




37 changes: 36 additions & 1 deletion AABB_tree/demo/AABB_tree/MainWindow.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtOpenGL/qgl.h>
#include <QOpenGLWidget>
#include <QJSEngine>
#include <CGAL/Qt/DemosMainWindow.h>

class QDragEnterEvent;
Expand All @@ -12,6 +13,37 @@ namespace Ui {
class MainWindow;
}

#if 0

struct Foo : public QObject
{

Q_OBJECT
public:
QJSEngine* myEngine;

Foo()
: myEngine(new QJSEngine(this))
{
QJSValue baz = myEngine->newQObject(this);
myEngine->.globalObject().setProperty("baz", baz);
}

void bar()
{
std::cout << "bar()" << std::endl;
myEngine->evaluate("baz.hello()");
}

public slots:
void hello() const // if not a slot it must be
{
std::cout << "called hello()" << std::endl;
}

};
#endif


class MainWindow :
public CGAL::Qt::DemosMainWindow
Expand All @@ -22,6 +54,8 @@ class MainWindow :
~MainWindow();

public slots:

void hello() const;
void updateViewerBBox();
void open(QString filename);
void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
Expand Down Expand Up @@ -79,6 +113,7 @@ class MainWindow :
void on_actionView_cutting_plane_triggered();

private:
QJSEngine* myEngine;
Scene* m_pScene;
Viewer* m_pViewer;
Ui::MainWindow* ui;
Expand Down
4 changes: 2 additions & 2 deletions AABB_tree/demo/AABB_tree/Scene.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SCENE_H
#define SCENE_H

#include <QtOpenGL/qgl.h>
#include <QOpenGLWidget>
#include <iostream>
#include <cmath>

Expand Down Expand Up @@ -77,7 +77,7 @@ class Scene : public QObject
};

public:
QGLContext* context;
QOpenGLContext* context;
void draw(CGAL::QGLViewer*);
void update_bbox();
Bbox bbox() { return m_bbox; }
Expand Down
2 changes: 1 addition & 1 deletion AABB_tree/demo/AABB_tree/Viewer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Viewer.h"
#include "Scene.h"
#include <QMouseEvent>
#include <QGLFunctions>
#include <QOpenGLFunctions>
#include <CGAL/Qt/CreateOpenGLContext.h>

Viewer::Viewer(QWidget* parent)
Expand Down
2 changes: 2 additions & 0 deletions AABB_tree/demo/AABB_tree/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
main_window.hello();
main_window.hello();
18 changes: 9 additions & 9 deletions Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()

find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)

find_package(Qt5 QUIET COMPONENTS Widgets OpenGL)
find_package(Qt6 QUIET COMPONENTS Widgets OpenGL OpenGLWidgets)

if(CGAL_Qt5_FOUND AND Qt5_FOUND)
if(CGAL_Qt6_FOUND AND Qt6_FOUND)

add_definitions(-DQT_NO_KEYWORDS)

# include(${QT_USE_FILE})
include_directories(BEFORE ./)

# ui file, created with Qt Designer
qt5_wrap_ui(uis MainWindow.ui)
qt6_wrap_ui(uis MainWindow.ui)

# qrc files (resources files, that contain icons, at least)
qt5_add_resources(CGAL_Qt5_RESOURCE_FILES ./Alpha_shape_3.qrc)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES ./Alpha_shape_3.qrc)

add_executable(
Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis}
${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES})
${CGAL_Qt6_RESOURCE_FILES} ${CGAL_Qt6_MOC_FILES})
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Alpha_shape_3)

target_link_libraries(Alpha_shape_3 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5
Qt5::Widgets Qt5::OpenGL)
target_link_libraries(Alpha_shape_3 PRIVATE CGAL::CGAL CGAL::CGAL_Qt6
Qt6::Widgets Qt6::OpenGL Qt6::OpenGLWidgets)

include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Alpha_shape_3)

else()

message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt6, and will not be compiled.")

endif()
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()

find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5)
find_package(Qt5 QUIET COMPONENTS Widgets)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt6)
find_package(Qt6 QUIET COMPONENTS Widgets)

if (CGAL_Qt5_FOUND AND Qt5_FOUND)
if (CGAL_Qt6_FOUND AND Qt6_FOUND)
include(${CGAL_USE_FILE})
add_compile_definitions(QT_NO_KEYWORDS)
include_directories( BEFORE ./ )
Expand Down Expand Up @@ -50,15 +50,15 @@ if (CGAL_Qt5_FOUND AND Qt5_FOUND)
endif()


qt5_wrap_ui(arrangement_2_uis
qt6_wrap_ui(arrangement_2_uis
ArrangementDemoWindow.ui
NewTabDialog.ui
OverlayDialog.ui
ArrangementDemoPropertiesDialog.ui
AlgebraicCurveInputDialog.ui
RationalCurveInputDialog.ui)

qt5_wrap_cpp(CGAL_Qt5_MOC_FILES
qt6_wrap_cpp(CGAL_Qt6_MOC_FILES
ArrangementDemoWindow.h
ArrangementDemoTab.h
GraphicsViewCurveInput.h
Expand All @@ -70,7 +70,7 @@ if (CGAL_Qt5_FOUND AND Qt5_FOUND)
ColorItemEditor.h
PropertyValueDelegate.h)

qt5_add_resources(CGAL_Qt5_RESOURCE_FILES Arrangement_on_surface_2.qrc)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES Arrangement_on_surface_2.qrc)

add_executable(arrangement_2
arrangement_2.cpp
Expand Down Expand Up @@ -107,11 +107,11 @@ if (CGAL_Qt5_FOUND AND Qt5_FOUND)
ArrangementIO.cpp
${UTILS_COMPILE_FILES}
${arrangement_2_uis}
${CGAL_Qt5_RESOURCE_FILES}
${CGAL_Qt5_MOC_FILES})
${CGAL_Qt6_RESOURCE_FILES}
${CGAL_Qt6_MOC_FILES})

target_link_libraries(arrangement_2 PRIVATE Qt5::Widgets)
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5)
target_link_libraries(arrangement_2 PRIVATE Qt6::Widgets)
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt6)
if(CGAL_Core_FOUND)
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core)
endif()
Expand All @@ -124,11 +124,11 @@ if (CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
set(MISSING_DEPS "")

if(NOT CGAL_Qt5_FOUND)
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
if(NOT CGAL_Qt6_FOUND)
set(MISSING_DEPS "the CGAL Qt6 library, ${MISSING_DEPS}")
endif()
if(NOT Qt5_FOUND)
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
if(NOT Qt6_FOUND)
set(MISSING_DEPS "Qt6, ${MISSING_DEPS}")
endif()
message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.1...3.23)
project(Arrangement_on_surface_2_Examples)

find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt5)
find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6)

# create a target per cppfile
file(
Expand All @@ -15,7 +15,7 @@ foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()

if(CGAL_Qt5_FOUND)
if(CGAL_Qt6_FOUND)
target_link_libraries(draw_arr PUBLIC CGAL::CGAL_Basic_viewer)
target_link_libraries(linear_conics PUBLIC CGAL::CGAL_Basic_viewer)
target_link_libraries(parabolas PUBLIC CGAL::CGAL_Basic_viewer)
Expand Down
Loading