2010/8/7 Jashank Jeremy <[email protected]>:
> 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}")
usually works for me.
>
> 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?
appending CMAKE_MODULE_PATH works for me on several project.
Do not forget to modify CMAKE_MODULE_PATH in the CMakeLists.txt
BEFORE requiring your macro with any
include
find_package
etc...
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake