[CMake] Setting CMAKE_MODULE_PATH in CMakeLists.txt

Dennis Schridde devurandom at gmx.net
Sat Aug 7 04:01:39 EDT 2010


On Saturday 07 August 2010 02:38:41 Eric Noulard wrote:
> 2010/8/7 Jashank
Jeremy <jashank.jeremy at optusnet.com.au>:
> > 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}")
> 
> LIST(APPEND
CMAKE_MODULE_PATH "${CMAKE_SOURCE_PREFIX}")
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

This works,
too.

--Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100807/23ffa48e/attachment.pgp>


More information about the CMake mailing list