Setting CMAKE_MODULES_PATH

Akarsh Simha akarshsimha at gmail.com
Thu Jan 6 08:25:15 CET 2011


I have a question regarding CMAKE_MODULES_PATH. 

I frequently have to deal with building a branch of my project
(kdeedu/kstars), but wish to use the dependency modules (kdelibs etc)
from my trunk install.

However, my build fails with an error that says approximately:

"Could not find FindKDE4Internal.cmake in <blank>".

So I tried exporting CMAKE_MODULE_PATH, appropriately, but it didn't
work, and I attribute that to a line in kdeedu/CMakeLists.txt that
says:

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )

Shouldn't it instead read as follows?

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})

I made this change, and things built fine for me (because I'd already
exported the right CMAKE_MODULE_PATH in the environment)

So can I make this change permanent in KDE Edu's CMakeLists.txt?

It seems that there are similar statements in the CMakeLists.txt files
of other KDE modules as well.

Regards
Akarsh




More information about the Kde-buildsystem mailing list