[CMake] Setting CMAKE_MODULE_PATH in CMakeLists.txt

Jashank Jeremy jashank.jeremy at optusnet.com.au
Fri Aug 6 19:15:44 EDT 2010


Hi,

I'm working on a project that requires an additional module, which is
shipped with the project, but I'd like CMake to add CMAKE_SOURCE_PATH
to CMAKE_MODULE_PATH to pick up the additional module. 

I've tried adding

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_PATH}:${CMAKE_MODULE_PATH}")

to my CMakeLists.txt; this, however, doesn't work. I don't especially
want developers to have to move the file to a directory on their
CMAKE_MODULE_PATH, nor do I want to have to get them to set an
environment variable every time they want to build.

Is there a way around this?

Jashank

-- 
Jashank Jeremy
PGP: 0x25A5C309
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100807/643de299/attachment-0001.pgp>


More information about the CMake mailing list