Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
6.8.1
-
None
Description
qt-cmake -G "Visual Studio 17 2022" D:/Qt/6.8.1/Src/qtbase/src/plugins/sqldrivers -DCMAKE_INSTALL_PREFIX=D:/6.8.1/msvc2022_64
qt-cmake -G Ninja D:/Qt/6.8.1/Src/qtbase/src/plugins/sqldrivers -DCMAKE_INSTALL_PREFIX=D:/6.8.1/msvc2022_64
qt-cmake -G Ninja D:/Qt/6.8.1/Src/qtbase/src/plugins/sqldrivers -DCMAKE_INSTALL_PREFIX=D:/6.8.1/mingw_64
I've tried all possible solutions (
According to the documentation, it seems that this documentation is still for version 6.0.0 and hasn't been updated. Moreover, SBOM was introduced starting from version 6.8.0.
), but I keep encountering the same error, which prevents me from successfully building the MySQL plugin:
CMake Error at D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2552 (message): No SBOM project name was set. Call Stack (most recent call first): D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2542 (_qt_internal_sbom_get_root_project_name_lower_case) D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2636 (_qt_internal_sbom_get_root_project_name_for_spdx_id) D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2603 (_qt_internal_sbom_generate_target_package_spdx_id) D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:1926 (_qt_internal_sbom_record_target_spdx_id) D:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPluginHelpers.cmake:446 (_qt_internal_extend_sbom) mysql/CMakeLists.txt:15 (qt_internal_add_plugin)
For the CMakeLists.txt file of MySQL, I added the following code:
if (MSVC) # Remove RTC1 option if it's set string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "/O2" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") endif()
For the .cmake.conf file of sqldriver, I added the following code:
set(QT_REPO_MODULE_VERSION "6.8.1") // add new: SET(FEATURE_sql_mysql ON) SET(MySQL_INCLUDE_DIR "D:/mysql-8.0.37-winx64/include") SET(MySQL_LIBRARY "D:/mysql-8.0.37-winx64/lib/libmysql.lib")
Attachments
Issue Links
- duplicates
-
QTBUG-131799 SQL drivers cannot be configured due to an SBOM error.
- Closed