On Fri, Apr 3, 2009 at 11:05 AM, Michael Jackson <
[email protected]> wrote:
> • CMAKE_MODULE_PATH: Path to look for cmake modules to load.
> Specifies a path to override the default seach path for CMake modules. For
> example include commands will look in this path first for modules to
> include.
>
> Example follows
>
> # Prepend my own path to look for modules.
>
> set (CMAKE_MODULE_PATH MyOwnPath ${CMAKE_MODULE_PATH})
Actually, you have to use ${CMAKE_CURRENT_SOURCE_DIR} or
${PROJECT_SOURCE_DIR} or some other CMake variable that resolves to an
absolute path. CMAKE_MODULE_PATH can't be used with relative paths.
CMAKE_MODULE_PATH tell CMake to search first in directories listed in
CMAKE_MODULE_PATH when you use FIND_PACKAGE() or INCLUDE()
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/MyCMakeScripts)
FIND_PACKAGE(HelloWorld) http://www.cmake.org/Wiki/CMake_Useful_Variables
--
Philip Lowman
_______________________________________________
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