On Tue, Feb 15, 2022 at 10:50:55PM +0100, Rafael Sadowski wrote: > On Tue Feb 15, 2022 at 09:58:00PM +0100, Caspar Schutijser wrote: > > Hi, > > > > Qt5's cmake files are installed in /usr/local/lib/qt5/cmake/. Many other > > software packages install their cmake in /usr/local/lib/cmake/. Is > > there a reason Qt5's cmake files are not installed in > > /usr/local/lib/cmake/? > > No, I don't know the reason. I think it certainly has something to do > with Q3 vs Qt4 vs Q5 in the early days.
What do you think of (trying to) change this? One possible downside I see is that cmake ports that previously didn't pick up Qt will pick it up automatically but that can be fixed. Looking at the names of the cmake files, I don't think they will collide with either Qt 4 or Qt 6. I checked some other OSes (Arch Linux, Ubuntu, FreeBSD) and they install the cmake files in lib/cmake. > The Qt5 module handles all the mgaic for the ports. > > > > > The reason I'm asking is that if I'm building a Qt5/cmake project > > outside the ports tree, I have to manually add something like > > set(CMAKE_PREFIX_PATH /usr/local/lib/qt5/cmake) > > to the project's CMakeLists.txt file because otherwise cmake won't find > > Qt5's cmake files. Sometimes that's a bit annoying. > > > > If you're OK with changing this, I can have a look at creating a diff. > > > > Caspar > > > > You can it do it easily with Qt5_DIR, checkout: > https://www.sizeofvoid.org/posts/2020-03-29-how-to-build-qt5-applications-with-cake-on-openbsd/ Thanks, that makes it a little bit easier indeed. Caspar