10110111 / CalcMySky

Simulator of light scattering by planetary atmospheres
GNU General Public License v3.0
30 stars 8 forks source link

cmake config files not in the right path #11

Closed david-geiger closed 1 year ago

david-geiger commented 1 year ago

Hi,

I see on Mageia Linux that the cmake config files are not in a standard path:

"/usr/lib(64)/ShowMySky-Qt6/cmake/ShowMySky-Qt5Config.cmake"

Shouldn't they be more in the following path?

"/usr/lib(64)/cmake/ShowMySky-Qt6/ShowMySky-Qt5Config.cmake"

-install(EXPORT ShowMySky-Qt${QT_VERSION}Config NAMESPACE ShowMySky:: DESTINATION "${installConfDir}/ShowMySky-Qt${QT_VERSION}/cmake") +install(EXPORT ShowMySky-Qt${QT_VERSION}Config NAMESPACE ShowMySky:: DESTINATION "${installConfDir}/cmake/ShowMySky-Qt${QT_VERSION}")

Cheers, David

10110111 commented 1 year ago

You appear to be right. I wonder though why CMake still does find it via find_package().

david-geiger commented 1 year ago

Thanks!

DarthGandalf commented 1 year ago

Both of them are standard, and both of them work. The full list of directories it looks at is here: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure

DarthGandalf commented 1 year ago

cmake/<name> is probably more popular though than <name>/cmake, looking at what's installed on my computer

10110111 commented 1 year ago

My Ubuntu 20.04 has the opposite ratio:

$ ls /usr/lib/*/cmake | wc -l
131
$ ls /usr/lib/cmake | wc -l
3

On a much older LFS with lots of legacy software installed the ratio is 97/76, which is closer to unity but still on the same side.

DarthGandalf commented 1 year ago

Try /usr/lib64 instead of lib

DarthGandalf commented 1 year ago

and also in share/

10110111 commented 1 year ago

Well on Ubuntu the arch-specific path is a bit different, but anyway, there's still fewer items there:

$ ls /usr/lib/x86_64-linux-gnu/cmake/ | wc -l
99
10110111 commented 1 year ago

and also in share/

These ones don't contain anything interesting on Ubuntu.