Skip to content

Commit

Permalink
[doc][examples] remove reference to Qt5.
Browse files Browse the repository at this point in the history
Maybe needs improvement and simplification.
  • Loading branch information
dlyr committed Oct 4, 2024
1 parent 1049596 commit 1d2e7a6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 35 deletions.
8 changes: 4 additions & 4 deletions doc/basics/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Follow the usual sequence, assuming you have build dependencies as explained [he

~~~{.bash}
cmake -S Radium-Engine -B builds/radium-build-r -DCMAKE_BUILD_TYPE=Release -C installs/radium-external-r/radium-options.cmake
cmake --build builds/radium-build-r --config Release --parallel -DQt5_DIR=path/to/qt5
cmake --build builds/radium-build-r --config Release --parallel -DQt6_DIR=path/to/qt6
cmake --install builds/radium-build-r
~~~

If Qt is installed system wide (likely on linux), `-DQt5_DIR` is not needed.
### Qt configuration {#commandline_qt_configuration}

\note Qt6 is also supported. To enable it, replace `-DQt5_DIR=path/to/qt5` by `-DQt6_DIR=path/to/qt6`. To ease maintenance accross Qt versions, you should also configure the path to Qt cmake package using `-DCMAKE_PREFIX_PATH=path/to/qtX` where `X` is the Qt version you want to use.
If Qt is installed system wide (likely on linux), `-DQt6_DIR` is not needed.

If both Qt5 and Qt6 are installed system wide, Qt6 is the default, `-DQT_DEFAULT_MAJOR_VERSION=5` allow select Qt5. During client application cmake setup `find_package(Radium COMPONENTS ... Gui ...)` will check Qt version consistency.
To ease maintenance accross Qt versions, you should also configure the path to Qt cmake package using `-DCMAKE_PREFIX_PATH=path/to/qt6`.

\note Running `cmake --install` is recommended as it will copy all the radium related library in the same place,
generate the cmake packages and bundle applications with their dependencies (on macos and windows).
4 changes: 2 additions & 2 deletions doc/basics/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Dependencies management systems

We developed a series of tools to fetch and compile these dependencies easily, except for
Qt, which needs to be installed and passed to cmake through the variables `CMAKE_PREFIX_PATH` or `Qt5_DIR` `Qt6_DIR`
(see documentation at <https://doc.qt.io/qt-5.15/cmake-manual.html#getting-started>).
Qt, which needs to be installed and passed to cmake through the variables `CMAKE_PREFIX_PATH` or `Qt6_DIR`
(see documentation at <https://doc.qt.io/qt-6.5/cmake-manual.html#getting-started>).

We offer two different systems to handle external dependencies (see details and how-to in the following sections):

Expand Down
21 changes: 0 additions & 21 deletions doc/basics/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
\page basicsTroubleshooting Troubleshooting
[TOC]

# Qt cmake errors

In case you run into an error like

~~~{.bash}
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
~~~

you need to set `CMAKE_PREFIX_PATH`, pointing to the Qt root dir of your commpiler.
For example on linux with gcc :

~~~{.bash}
cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.x/gcc_64
~~~

On windows, using cmake-gui you can use the "add entry" button, adding `CMAKE_PREFIX_PATH`
as a string to point to the Qt directory (for example in the default installation :
`C:/Qt/5.15/msvc2019_64` )

# Crash when starting main application on windows

This is usually caused by missing dlls.
Expand Down
6 changes: 3 additions & 3 deletions doc/developer/cmakeutilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,15 +802,15 @@ endif()
# component <secondLib>
if (<secondLib>_FOUND)
# manage component dependencies (e.g. <firstLib> must be requested and <secondLib> depends also on Qt5)
# manage component dependencies (e.g. <firstLib> must be requested and <secondLib> depends also on Qt)
if (NOT <firstLib>_FOUND)
set(<secondLib>_FOUND False)
set(<packageName>_FOUND False)
set(<packageName>_NOT_FOUND_MESSAGE "Component <secondLib> requires the component <firstLib>")
# Note that you can also explicitely configure first lib instead of raising an error
else()
if (NOT Qt5_FOUND)
find_dependency(Qt5 COMPONENTS Core Widgets REQUIRED)
if (NOT Qt6_FOUND)
find_qt_dependency(COMPONENTS Core Widgets REQUIRED)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/<secondLib>Targets.cmake" )
endif()
Expand Down
4 changes: 1 addition & 3 deletions doc/developer/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ Example CMakeLists.txt setup to compile a Radium plugin:
# Use installed Radium environment
find_package(Radium REQUIRED Core Engine PluginBase)
# Find and configure Qt environment using versionless targets (Radium requires Qt >= 5.15)
# https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html
# find_qt_package is provided by Radium
# Find and configure Qt environment using find_qt_package is provided by Radium
find_qt_package(COMPONENTS Core REQUIRED)
set(Qt_LIBRARIES Qt::Core)
set(CMAKE_AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion examples/PluginsWithLib/Downstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This example illustrates how to use a library shipped from another plugin (shoul

`cmake -DRadium_DIR=/pathToInstalledRadium/lib/cmake/Radium/ -DExampleLibraryUpstream_DIR=/pathToInstalledUpstreamLibrary ..`

If Qt package is not found, add the option `-DQt5_DIR=/pathToInstalledQt5/lib/cmake/Qt5` to the cmake command.
If Qt6 package is not found, add the option `-DQt6_DIR=/pathToInstalledQt6/lib/cmake/Qt6` to the cmake command.

## Compile

Expand Down
2 changes: 1 addition & 1 deletion examples/PluginsWithLib/Upstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd build
cmake -DRadium_DIR=/pathToInstalledRadium/lib/cmake/Radium/ ..`
```

If Qt5 package is not found, add the option `-DQt5_DIR=/pathToInstalledQt5/lib/cmake/Qt5` to the cmake command.
If Qt6 package is not found, add the option `-DQt6_DIR=/pathToInstalledQt6/lib/cmake/Qt6` to the cmake command.

## Compile

Expand Down

0 comments on commit 1d2e7a6

Please sign in to comment.