2

I was trying to make QMYSQL driver using official site: https://doc.qt.io/qt-6/sql-driver.html#qmysql. I enter this to the command line:

qt-cmake -G Ninja "C:\Qt1\6.8.1\Src\qtbase\src\plugins\sqldrivers" -DCMAKE_INSTALL_PREFIX="C:\Qt1\6.8.1\msvc2022_64" -DMySQL_ROOT="C:\Program Files\MySQL\MySQL Server 8.0"

and I get this:

CMake Error at C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2552 (message):
  No SBOM project name was set.
Call Stack (most recent call first):
  C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2542 (_qt_internal_sbom_get_root_project_name_lower_case)
  C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2636 (_qt_internal_sbom_get_root_project_name_for_spdx_id)
  C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2603 (_qt_internal_sbom_generate_target_package_spdx_id)
  C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:1926 (_qt_internal_sbom_record_target_spdx_id)
  C:/Qt1/6.8.1/mingw_64/lib/cmake/Qt6/QtPluginHelpers.cmake:446 (_qt_internal_extend_sbom)
  mysql/CMakeLists.txt:8 (qt_internal_add_plugin)

I tried to add this command to the end of my request:

-DQT_NO_CREATE_SBOM=ON

Also I tried to add this:

set(QT_SBOM_PROJECT_NAME "mysql_driver")

in the CMakeList.txt from:

C:\Qt1\6.8.1\Src\qtbase\src\plugins\sqldrivers\mysql

I don't know what to do.

4
  • You can not mix MSVC and MinGW c++ libraries. Commented Dec 11, 2024 at 19:15
  • @chehrlic, thanks, I got it. What am I need to do next? Because I tried to find how do not mix these drivers and use only MSVC but I did not find the answer Commented Dec 12, 2024 at 12:59
  • 1
    What do you want to hear? Simply don't mix msvc and mingw c++ libs. Don't know what else to say. Commented Dec 12, 2024 at 17:27
  • @chehrlic, I just don't know how to make QMYSQL driver using only MSVC. I have already deleted the environment variables leading to mingw and it didn't help. My MSVC compiler is configured correctly. Commented Dec 13, 2024 at 11:07

1 Answer 1

2

As metioned in https://bugreports.qt.io/browse/QTBUG-131799, you should use -DQT_GENERATE_SBOM=OFF in the cmake command line

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.