diff --git a/doc/basics/commandline.md b/doc/basics/commandline.md index 9672e16da38..36084a428f3 100644 --- a/doc/basics/commandline.md +++ b/doc/basics/commandline.md @@ -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). diff --git a/doc/basics/details.md b/doc/basics/details.md index db8deaa5dde..f27cab362f6 100644 --- a/doc/basics/details.md +++ b/doc/basics/details.md @@ -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 ). +Qt, which needs to be installed and passed to cmake through the variables `CMAKE_PREFIX_PATH` or `Qt6_DIR` +(see documentation at ). We offer two different systems to handle external dependencies (see details and how-to in the following sections): diff --git a/doc/basics/troubleshooting.md b/doc/basics/troubleshooting.md index b6fcbd9f8aa..bfda08ad343 100644 --- a/doc/basics/troubleshooting.md +++ b/doc/basics/troubleshooting.md @@ -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. diff --git a/doc/developer/cmakeutilities.md b/doc/developer/cmakeutilities.md index 96a9452f705..ab3f10331db 100644 --- a/doc/developer/cmakeutilities.md +++ b/doc/developer/cmakeutilities.md @@ -802,15 +802,15 @@ endif() # component if (_FOUND) - # manage component dependencies (e.g. must be requested and depends also on Qt5) + # manage component dependencies (e.g. must be requested and depends also on Qt) if (NOT _FOUND) set(_FOUND False) set(_FOUND False) set(_NOT_FOUND_MESSAGE "Component requires the component ") # 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}/Targets.cmake" ) endif() diff --git a/doc/developer/plugin.md b/doc/developer/plugin.md index f0a40a36a23..75177b20498 100644 --- a/doc/developer/plugin.md +++ b/doc/developer/plugin.md @@ -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) diff --git a/examples/PluginsWithLib/Downstream/README.md b/examples/PluginsWithLib/Downstream/README.md index f52b1fa3562..43c4e90bdea 100644 --- a/examples/PluginsWithLib/Downstream/README.md +++ b/examples/PluginsWithLib/Downstream/README.md @@ -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 diff --git a/examples/PluginsWithLib/Upstream/README.md b/examples/PluginsWithLib/Upstream/README.md index 39dc2cf19fc..3584cf2cd18 100644 --- a/examples/PluginsWithLib/Upstream/README.md +++ b/examples/PluginsWithLib/Upstream/README.md @@ -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