Remove find_package(Qt6) in root to avoid needing Qt6 in Python plugin.

This commit is contained in:
Mikaël Capelle
2024-07-10 21:12:14 +02:00
parent 44457dc6dd
commit 8b2c068e73
2 changed files with 12 additions and 12 deletions
+8 -2
View File
@@ -47,12 +47,18 @@ configuration files.
Be aware that using these utilities will automatically some (not too intrusive) global
variable on your project.
You will need to have `Qt` in your CMake module path otherwise the import will fail
due to a broken `find_package(Qt6)`.
For some functions to work properly, you should set `CMAKE_INSTALL_PREFIX` to a
directory where `${CMAKE_INSTALL_PREFIX}/bin/ModOrganizer.exe` can be found.
Importing the utilities will make the following variables available:
- `MO2_QT_VERSION` - The Qt version used by MO2, as `major.minor.patch`.
- `MO2_QT_MAJOR_VERSION`, `MO2_QT_MINOR_VERSION` and `MO2_QT_PATCH_VERSION` -
Respectively the major, minor and patch version of Qt used by MO2.
- `MO2_PYTHON_VERSION` - The Python version used by MO2 as `major.minor` (patch version
should not be relevant).
All functions are prefixed by `mo2_` and should not conflict with other existing
functions.
+4 -10
View File
@@ -4,19 +4,13 @@ if (DEFINED MO2_INCLUDED)
return()
endif()
set(MO2_QT_MAJOR_VERSION 6)
set(MO2_QT_MINOR_VERSION 7)
set(MO2_QT_PATCH_VERSION 0)
set(MO2_QT_VERSION "${MO2_QT_MAJOR_VERSION}.${MO2_QT_MINOR_VERSION}.${MO2_QT_PATCH_VERSION}")
set(MO2_QT_VERSION_MAJOR 6)
set(MO2_QT_VERSION_MINOR 7)
set(MO2_QT_VERSION_PATCH 0)
set(MO2_QT_VERSION "${MO2_QT_VERSION_MAJOR}.${MO2_QT_VERSION_MINOR}.${MO2_QT_VERSION_PATCH}")
set(MO2_PYTHON_VERSION "3.12")
find_package(Qt6 ${MO2_QT_VERSION} REQUIRED COMPONENTS Core)
# version-major independent variables
set(Qt_VERSION ${Qt6_VERSION})
set(Qt_VERSION_MAJOR ${Qt6_VERSION_MAJOR})
include(${CMAKE_CURRENT_LIST_DIR}/mo2_utils.cmake)
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)