[CMake] Re: call a configure command
Rodolfo Schulz de Lima
rodolfo at rodsoft.org
Sat Dec 22 14:16:08 EST 2007
> Write a CMake script containing the configure command. Invoke it at
> build time using ADD_CUSTOM_COMMAND COMMAND ${CMAKE_COMMAND} -P
> myscript . Of course, this isn't going to configure anything. :-)
> Are you just trying to perform text substitutions or something?
If he's trying to compile an external package from within cmake, I usually
do this by adding add_custom_command(OUTPUT ${srcdir}/Makefile COMMAND
${srcdir}/configure ...) to the CMakeFile.txt, create another one to invoke
'make' dependent of the ${srcdir}/Makefile of the last add_custom_command,
and finally use add_custom_target to create a target that initiates the
whole shebang, having as depedency the output of the last
add_custom_command.
Regards,
rod
More information about the CMake
mailing list