On Thu 25 Aug 2011 03:37:35 PM CEST, Weng Xuetian wrote:
> Hi folks,
> I have a program that have some cmake scripts to be installed in order
> to add support for find_package for this program's libs.
> But I have problem about choose the cmake path.
> Currently I use ${CMAKE_ROOT}/Modules to install my scripts. But this
> is not good if user want to install with a custom prefix under his
> home directory.
> How can I get a cmake scripts path with a custom prefix?
> 
> Regards,
> Xuetian

*NEVER* install in ${CMAKE_ROOT}! Read the "config-mode" section of the 
find_package documentation on information about where CMake searches 
for package config files. See 
http://www.cmake.org/cmake/help/cmake-2-8-docs.html and search for 
"Config mode provides an elaborate interface". There you will find the 
list of directories searched, along with an explanation of how the 
directory prefixes are constructed.

HTH

Michael
_______________________________________________
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

Reply via email to