You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I am unable to run the generator after updating to a newer version (7.2.0) and using Qt5. I didn't change anything about my Qt installation, just the openapi-generator version, and ran into failures. (I also upgraded CMake just to be sure).
I set CMAKE_PREFIX_PATH before running like this (to set my Qt version):
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.38.33134.0
-- The CXX compiler identification is MSVC 19.38.33134.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:5 (find_package):
Policy CMP0084 is not set: The FindQt module does not exist for
find_package(). Run "cmake --help-policy CMP0084" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at C:/Program Files/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR
QT_MOC_EXECUTABLE)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.28/Modules/FindQt3.cmake:213 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
C:/Program Files/CMake/share/cmake-3.28/Modules/FindQt.cmake:160 (include)
CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
If I add find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Gui) back in, all works fine and generates
This is indeed an error that passed review without anyone noticing it! Would you be able to submit a PR to fix it ? You'll need to update both the CMakeLists.txt.mustache and CMakeLists.txt files.
This allowed me to build the client but I ran into linker errors when I went to use it, is there more to that file/changeset that looks like an error to you? or just the 1 line missing?
I probably wont be able to make a PR as I am phasing away from using this client but I will see if I have my dev environment setup still later in case I find some time
MartinDelille
added a commit
to MartinDelille/openapi-generator
that referenced
this issue
Jan 27, 2024
Bug Report Checklist
Description
I am unable to run the generator after updating to a newer version (7.2.0) and using Qt5. I didn't change anything about my Qt installation, just the openapi-generator version, and ran into failures. (I also upgraded CMake just to be sure).
I set CMAKE_PREFIX_PATH before running like this (to set my Qt version):
I get this:
If I add
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Gui)
back in, all works fine and generates@MartinDelille do you remember why in #14968 this line was removed?
The text was updated successfully, but these errors were encountered: