[CMake] CMAKE_ROOT issue in scratchbox, N9(50)

Laszlo Papp lpapp at kde.org
Tue Aug 9 10:04:59 EDT 2011


Hi Alex,

> Which version of cmake is this ?
> Is this 2.8.5rcX or trunk ?
> Then it might be the new multiarch support feature maybe.

2.8.4 and it will probably not even change on Harmattan

> Uh.
> The part where you install *.cmake files into ${CMAKE_ROOT}/Modules/ is really
> bad. Remove it. You should never ever do that.
> The user may simply use another version of cmake, then they won't be found, so
> you can't rely on them at all in any way.

Not sure what you mean by this, but the proposed alternative way seems
to also be a cmake version dependent deal. From the documentation:
"...CMake 2.6 introduced support for exporting targets from one
project and importing them into another...". However I think it is
achievable...Not sure about the version difference aforementioned.

> FindGluon.cmake is supposed to be there, so you can rely on it and it will
> tell you where Gluon is installed or if it's not installed.
> It's like putting a treasure map just next to the treasure.
> Once you find the map (or FindGluon.cmake), you already found the treaure
> (Gluon) itself, no need to search for it anymore.
>
> Instead Gluon should install a GluonConfig.cmake file.

Mmm, so it seems a bit controversial to me. You mentioned that above
it is bad if the map is nearby the treasure. However, it seems to
still be the situation since Gluon will install it. I thought that the
only way is that if it is independently installed from Gluon since
that way, it exists anytime. This is still a bit confusing to me.
Could you please clarify ? Thank you!

Best Regards,
Laszlo Papp


More information about the CMake mailing list