Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen_cmake.sh doesn't find Qt5Config.cmake on Fedora #150

Open
ntonnaett opened this issue May 9, 2023 · 3 comments
Open

gen_cmake.sh doesn't find Qt5Config.cmake on Fedora #150

ntonnaett opened this issue May 9, 2023 · 3 comments
Labels
compilation Any issue compiling Hive

Comments

@ntonnaett
Copy link

ntonnaett commented May 9, 2023

The gen_cmake.sh script searches for Qt5Config.cmake in the wrong folder:
Invalid Qt folder (/usr/lib64/cmake/Qt5): Qt5Config.cmake not found in the folder.

It's actually located in /usr/lib64/cmake/Qt5/Qt5Config.cmake.

Changing to that folder with -qtdir doesn't work either:

/gen_cmake.sh -release -qtvers 5.15.2 -qtdir /usr/lib64/cmake/Qt5
CMake Generator version 7.0

Invalid Qt folder (/usr/lib64/cmake/Qt5): Qt5Config.cmake not found in the folder.
Maybe try the -qtdir option, see help (-h)
@christophe-calmejane christophe-calmejane added the compilation Any issue compiling Hive label May 10, 2023
@christophe-calmejane
Copy link
Owner

Hi,

the script doesn't really "searches in the wrong folder", as there is no real common place for Qt on all the available linux distros. You were right by using the -qtdir option to specify the folder for your distro, but I don't know why it is not working for you. I don't have any issue using debian or ubuntu.

Which branch/commitID are you using?

@Florob
Copy link
Contributor

Florob commented Aug 21, 2023

The issues is that the Qt<major> directory is automatically appended. So the correct call would be ./gen_cmake.sh -release -qtvers 5.15.2 -qtdir /usr/lib64/cmake.
My impression is that qtdir is actually more of a cmake dir. It's honestly a bit odd having to specify the default cmake directory to get this working. Unless one has manually build Qt, there isn't any reason to set CMAKE_PREFIX_PATH or QT_MAJOR_VERSION on Linux. cmake still runs successfully when removing all of extend_gc_fnc_precmake() except for the last two lines.

@christophe-calmejane
Copy link
Owner

The thing is, the script was made to work on systems where Qt is either recompiled, or using the maintenance tool, which are the most common use on Windows and macOS (primary targets of Hive). The linux part of the script tries to handle those cases, but on some systems it's not working right away. It's ok on the Ubuntu/debian systems I'm using though.

I'll try to take a look some day and try to improve it, but it's hard to support all possible systems. So many more important improvements to add first. Thanks for letting me now anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation Any issue compiling Hive
Projects
None yet
Development

No branches or pull requests

3 participants