[CMake] How to find GetPrerequisites.cmake ?
Nicolas Desprès
nicolas.despres at gmail.com
Mon Nov 3 15:01:06 EST 2008
On Mon, Nov 3, 2008 at 8:47 PM, Stephen Collyer
<scollyer at netspinner.co.uk> wrote:
> I'm trying to call this script at install time with
> something like:
>
> INSTALL(SCRIPT "${CMAKE_MODULE_PATH}/GetPrerequisites.cmake")
>
> I've tried a variety of variables in place of CMAKE_MODULE_PATH,
> but none of them seem to point to the right location for the
> default Cmake modules. Could someone tell me what I should be
> using in place of CMAKE_MODULE_PATH here ? I'm running with
> cmake 2.6.1.
>
CMAKE_MODULE_PATH is probably set to your module path instead of the
cmake's module path. That's why the path given to install(SCRIPT)
point to the wrong place.
Try something like that:
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/install-script.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/install-script.cmake
)
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/install-script.cmake)
where install-script.cmake.in contains:
include(GetPrerequisites)
Hope this helps,
Cheers,
--
Nicolas Desprès
More information about the CMake
mailing list