Skip to content

Commit

Permalink
remove occurrences of Qt5
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Sep 14, 2023
1 parent 2f6d51b commit 48f37a1
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 87 deletions.
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ GraphicsView/demo/Triangulation_2/Makefile
GraphicsView/demo/Triangulation_2/Regular_triangulation_2
GraphicsView/demo/Triangulation_2/qrc_*.cxx
GraphicsView/demo/Triangulation_2/ui_*.h
GraphicsView/src/CGAL_Qt5/*.dll
GraphicsView/src/CGAL_Qt5/*.lib
GraphicsView/src/CGAL_Qt5/*.so
GraphicsView/src/CGAL_Qt5/Makefile
GraphicsView/src/CGAL_Qt5/moc_*.cxx
GraphicsView/src/CGAL_Qt5/qrc_*.cxx
HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake
HalfedgeDS/test/HalfedgeDS/test_hds
HalfedgeDS/test/HalfedgeDS/test_hds_decorator
Expand Down Expand Up @@ -879,7 +873,6 @@ Surface_mesher/demo/Surface_mesher/.*.deps
Surface_mesher/demo/Surface_mesher/.qglviewer.xml
Surface_mesher/demo/Surface_mesher/Makefile
Surface_mesher/demo/Surface_mesher/Surface_mesher
Surface_mesher/demo/Surface_mesher/Surface_mesher_Qt5_Demo
Surface_mesher/demo/Surface_mesher/VTK/Makefile
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_3D_image
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_VTK_3D_image
Expand All @@ -894,7 +887,6 @@ Surface_mesher/demo/Surface_mesher/out*.off
Surface_mesher/demo/Surface_mesher/polyhedron_remesher
Surface_mesher/demo/Surface_mesher/polyhedron_remesher_with_edges
Surface_mesher/demo/Surface_mesher/qrc_*.c*
Surface_mesher/demo/Surface_mesher/qt5-demo
Surface_mesher/demo/Surface_mesher/ui_*.h
Surface_mesher/doxygen
Surface_mesher/examples/Surface_mesher/.*.deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If the parameter is not given, the script creates <B>one executable for each giv
source file</B>.
<DT><B>`-c com1:com2:...`</B><DD> Lists components ("com1",
"com2") of \cgal to which the executable(s) should be linked. Valid components are \cgal's
libraries (i.e.\ "Core", "ImageIO", and "Qt5"). An example is `-c Core`.
libraries (i.e.\ "Core", "ImageIO", and "Qt6"). An example is `-c Core`.

<DT><B>`-b boost1:boost2:...`</B><DD> Lists components ("boost1",
"boost2") of \boost to which the executable(s) should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ the section \subpage thirdparty.
- `-frounding-math` with gcc
- `/fp:strict /fp:except-` with MSVC

\section secexample Minimal Example Using Qt5
This section describes a minimal example of a program that uses \cgal and Qt5 for some GUI features.
\section secexample Minimal Example Using Qt6
This section describes a minimal example of a program that uses \cgal and Qt6 for some GUI features.

\subsection subcmake CMakeLists.txt
\dontinclude Surface_mesh/CMakeLists.txt
Expand Down
4 changes: 2 additions & 2 deletions Documentation/doc/Documentation/Third_party.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ version shipped with \cgal.
The page \ref configurationvariables lists CMake and environment variables which can be used to specify
the location of third-party software during configuration.

\subsection thirdpartyQt Qt5
<b>Version 5.9.0 or later</b>
\subsection thirdpartyQt Qt6
<b>Version 6.4 or later</b>

Qt is a cross-platform application and UI framework.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/doc/Documentation/Usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ if no debugging is intended. Users should thus run:
cd CGAL-\cgalReleaseNumber/examples/Triangulation_2
cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball

The package Qt5 on brew is "keg-only", which means it is not "linked" with brew.
In order to link against Qt5, you need to run:
The package Qt6 on brew is "keg-only", which means it is not "linked" with brew.
In order to link against Qt6, you need to run:

brew link qt@5
brew link qt@6

After that, you will have to specify the Qt6_DIR by hand to cmake, using something like

-DQt6_DIR=/usr/local/opt/qt6/lib/cmake/Qt6

where `/usr/local/` is actually your current brew installation directory. Check this directory
to be sure where the Qt5 is placed on your machine.
to be sure where the Qt6 is placed on your machine.

\subsection usage_configuring_cmake_gui Specifying Missing Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ and will serverly limit performances.
| Variable | Description | Type | %Default Value |
| :- | :- | :- | :- |
| `CGAL_DIR` | Full-path to the binary directory where \cgal was configured |Either CMake or Environment | none |
| `Qt5_DIR` | Full-path to the Qt cmake directory |CMake| platform-dependent|
| `Qt6_DIR` | Full-path to the Qt cmake directory |CMake| platform-dependent|


\subsection installation_variables_third_party Variables Providing Information About 3rd-Party Libraries
Expand Down Expand Up @@ -178,11 +178,11 @@ Under Linux, the \gmpxx is also searched for, and you may specify the following



\subsection installation_qt5 Qt5 Library
\subsection installation_qt6 Qt6 Library

You must set the cmake or environment variable `Qt5_DIR` to point to the path
You must set the cmake or environment variable `Qt6_DIR` to point to the path
to the directory containing the file `Qt6Config.cmake` created by your \qt6 installation. If you are
using the open source edition it should be `<path>/qt-everywhere-opensource-src-<version>/qtbase/lib/cmake/Qt5`.
using the open source edition it should be `<path>/qt-everywhere-opensource-src-<version>/qtbase/lib/cmake/Qt6`.

\subsection installation_leda LEDA Library

Expand Down
9 changes: 4 additions & 5 deletions Documentation/doc/Documentation/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ CMake variables and paths. Otherwise, you can also install it using `vcpkg`:

Remember to specify `--triplet` or the related environment variable in case you target 64-bit applications.

As Qt5 is modular and as the \cgal examples and demos use only some of these modules
As Qt6 is modular and as the \cgal examples and demos use only some of these modules
you can save download and compilation time by specifying an *installation option*:

C:\dev\vcpkg> .\vcpkg.exe install cgal[qt]
Expand Down Expand Up @@ -234,11 +234,10 @@ A typical `Qt` installation would consist of the following steps:
<ul>
<li>
Download and install the Qt library for open source development package for your Visual Studio version at
<a href="https://www.qt.io/download">https://www.qt.io/download</a>
(here is the direct link to the <a href="https://www.qt.io/offline-installers">offline installers</a>).</li>
<li>Add the environment variable `QTDIR` pointing to the place you installed Qt, e.g., `C:\dev\Qt\Qt5.13.1`,
<a href="https://www.qt.io/download-open-source#source">https://www.qt.io/download-open-source#source</a>.</li>
<li>Add the environment variable `QTDIR` pointing to the place you installed Qt, e.g., `C:\dev\Qt\Qt6.13.1`,
as this will help `cmake` to find Qt.</li>
<li>Add the bin directory of Qt, e.g. add `C:\dev\Qt\Qt5.13.1\msvcXXXX_YY\bin` to `PATH`, where `XXXX_YY` is something like `vc2017_64`.
<li>Add the bin directory of Qt, e.g. add `C:\dev\Qt\Qt6.13.1\msvcXXXX_YY\bin` to `PATH`, where `XXXX_YY` is something like `vc2017_64`.
To avoid any conflict with another dll with the same name from another folder, add this path as the first in the list.</li>
</ul>

Expand Down
11 changes: 0 additions & 11 deletions GraphicsView/TODO

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ int main(int argc, char **argv)
app.setOrganizationName("GeometryFactory");
app.setApplicationName("Segment Voronoi 2 demo");

// Import resources from libCGAL (Qt5)
// Import resources from libCGAL (Qt6)
CGAL_QT_INIT_RESOURCES;

if (argc == 2) {
Expand Down
4 changes: 2 additions & 2 deletions GraphicsView/include/CGAL/export/Qt.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <CGAL/export/helpers.h>

#if ( defined(CGAL_BUILD_SHARED_LIBS) && ( ! defined(CGAL_HEADER_ONLY) ) ) \
|| defined(CGAL_USE_Qt5_RESOURCES)
|| defined(CGAL_USE_Qt6_RESOURCES)

# if defined(CGAL_Qt6_EXPORTS) || defined(CGAL_USE_Qt5_RESOURCES)
# if defined(CGAL_Qt6_EXPORTS) || defined(CGAL_USE_Qt6_RESOURCES)
// defined by CMake or in cpp files of the dll

# define CGAL_QT_EXPORT CGAL_DLL_EXPORT
Expand Down
11 changes: 5 additions & 6 deletions Installation/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ The CGAL software consists of several parts, each of which is licensed under
an open source license. It is also possible to obtain commercial licenses
from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL.

The source code of the CGAL library can be found in the directories
"src/CGAL", "src/CGALQt", "src/CGALQt5" and "include/CGAL" (with the
exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
The source code of the CGAL library can be found in the directory
"include/CGAL" (with the exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
It is specified in each file of the CGAL library which
license applies to it. This is either the GNU General Public License
or the GNU Lesser General Public License (as published by the Free Software
Expand All @@ -26,9 +25,9 @@ Distributed along with CGAL (for the users' convenience), but not part of
CGAL, are the following third-party libraries, available under their own
licenses:

- CORE, in the directories "include/CGAL/CORE" and "src/CGAL_Core", is
licensed under the LGPL (see LICENSE.LGPL).
- ImageIO, in the directory "src/CGAL_ImageIO", is licensed under the LGPL
- CORE, in the directory "include/CGAL/CORE" is licensed under the LGPL
(see LICENSE.LGPL).
- ImageIO, in the directory "include/CGAL/ImageIO", is licensed under the LGPL
(see LICENSE.LGPL).
- OpenNL, in the directory "include/CGAL/OpenNL", is licensed under the LGPL
(see LICENSE.LGPL).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ disable this ${type}.\n\
endif()
endfunction()

function(CGAL_hook_fix_ctest_depending_on_Qt5)
function(CGAL_hook_fix_ctest_depending_on_Qt6)
get_property(_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS)
foreach(_target ${_targets})
if(NOT TEST "compilation of ${_target}")
Expand All @@ -120,7 +120,7 @@ function(CGAL_hooks_at_end_of_all_directories)
CGAL_hook_check_targets()
CGAL_hook_check_unused_cpp_files()
if(BUILD_TESTING)
CGAL_hook_fix_ctest_depending_on_Qt5()
CGAL_hook_fix_ctest_depending_on_Qt6()
endif()
endfunction()

Expand Down
19 changes: 0 additions & 19 deletions Installation/cmake/modules/config/support/print_QT4_version.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion Installation/include/CGAL/export/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef CGAL_EXPORT_HELPERS_H
#define CGAL_EXPORT_HELPERS_H

#if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt5_RESOURCES)
#if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt6_RESOURCES)
# define CGAL_DLL_IMPORT
# define CGAL_DLL_EXPORT
# define CGAL_DLL_LOCAL
Expand Down
2 changes: 1 addition & 1 deletion Installation/test/Installation/test_configuration_qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(int argc, char**) {
std::istream_iterator<Point> end;
Triangulation t;
t.insert(begin, end);
if(argc == 3) // do not test Qt5 at runtime
if(argc == 3) // do not test Qt6 at runtime
CGAL::draw(t);
std::cout<<"OK."<<std::endl;
return EXIT_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(int argc, char** argv)
application.setOrganizationName("CNRS and LIRIS' Establishments");
application.setApplicationName("3D Linear Cell Complex");

// Import resources from libCGALQt5
// Import resources from libCGALQt6
// See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
CGAL_Qt_init_resources();// that function is in a DLL
Q_INIT_RESOURCE(Linear_cell_complex_3);
Expand Down
2 changes: 1 addition & 1 deletion Mesh_2/demo/Mesh_2/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This directory contains non-graphical demos of the 2D Mesh Generator
package.
The Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that
The Constrained Delaunay triangulation Qt demos has a 2D meshing feature that
demonstrates the 2D Mesh Generator package. See in the directory
demo/Triangulation_2/ of the CGAL tarball.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ int main(int argc, char **argv)
app.setOrganizationName("GeometryFactory");
app.setApplicationName("Polyline_simplification_2 demo");

// Import resources from libCGALQt5.
// Import resources from libCGALQt6.
CGAL_QT_INIT_RESOURCES;

MainWindow mainWindow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int main()
/*
#ifdef CGAL_USE_BASIC_VIEWER
std::vector<Path_on_surface<SM> > paths={pij, pkl};
CGAL::draw(sm, paths); // Enable only if CGAL was compiled with Qt5
CGAL::draw(sm, paths); // Enable only if CGAL was compiled with Qt6
#endif // CGAL_USE_BASIC_VIEWER
*/
for (int i=-4; i<=4; ++i)
Expand Down
2 changes: 1 addition & 1 deletion Testsuite/test/post_process_ctest_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
elif name == "libCGAL_ImageIO":
name="libCGALimageIO_shared"
elif name == "libCGAL_Qt6":
name="libCGALQt5_shared"
name="libCGALQt6_shared"
if name=="incomplete":
is_writing=False
is_ignored=False
Expand Down
25 changes: 12 additions & 13 deletions Three/doc/Three/Three.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ To create an external plugin, you must make a new Cmake project.\n

project( Example_plugin )

Configure CMake as you desire and fetch the right Qt5 packages :
Configure CMake as you desire and fetch the right Qt6 packages :

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand All @@ -331,13 +331,13 @@ Configure CMake as you desire and fetch the right Qt5 packages :
cmake_minimum_required(VERSION 3.1...3.23)

#Find CGAL
find_package(CGAL COMPONENTS Qt5)
find_package(CGAL COMPONENTS Qt6)
include( ${CGAL_USE_FILE} )
# Find Qt5 itself
find_package(Qt5
# Find Qt6 itself
find_package(Qt6
QUIET
COMPONENTS OpenGL Script Svg Xml
OPTIONAL_COMPONENTS ScriptTools)
COMPONENTS OpenGLWidgets Svg
OPTIONAL_COMPONENTS WebSockets)

You will probably have to fetch the libraries exported by the Polyhedron_demo, like the Scene_items.

Expand Down Expand Up @@ -370,15 +370,14 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro
cmake_minimum_required(VERSION 3.1...3.23)

#Find CGAL
find_package(CGAL COMPONENTS Qt5)
find_package(CGAL COMPONENTS Qt6)
include( ${CGAL_USE_FILE} )
# Find Qt5 itself
find_package(Qt5
QUIET
COMPONENTS OpenGL Script Svg Xml
OPTIONAL_COMPONENTS ScriptTools)
# Find Qt6 itself
find_package(Qt6 QUIET
COMPONENTS OpenGLWidgets Svg
OPTIONAL_COMPONENTS WebSockets)

if(Qt5_FOUND AND CGAL_FOUND)
if(Qt6_FOUND AND CGAL_FOUND)
find_package(CGAL_polyhedron_demo)

include( ${CGAL_POLYHEDRON_DEMO_USE_FILE} )
Expand Down

0 comments on commit 48f37a1

Please sign in to comment.