[CMake] Is it possible to patch a make project with CMakeLists.txt, through external_project_add?

Micha Hergarden micha.hergarden at gmail.com
Mon Mar 20 16:19:05 EDT 2017


Hello Mike,

The externalproject_add command has an option that might do what you want:
https://cmake.org/cmake/help/v3.8/module/ExternalProject.html

See:

|PATCH_COMMAND <cmd>...|
    Command to patch downloaded source

Regards,
Micha



On 15-03-17 07:51, mike lojkovic wrote:
> So, I'm trying to get my project to work on Windows, as well as Linux.
> Currently, everything compiles fine on Linux. I've gotten it to
> compile in the past on Windows, but since then have reinstalled
> Windows, and forgotten the precise steps needed to manually setup Lua,
> so CMake can find it. So, I assume just add Lua to my project with
> ExternalProject_Add, but they use make and the makefil is configured
> for Linux.
>
> The two options I have are either patch their makefile to build
> correctly through cygwin, (I'm just worried this might lead to issues
> with producing a binary requiring cygwin) or add a CMakeLists.txt file
> and patch it in after the download ends. How would I go about adding
> custom CMakeLists.txt file to their project after the download
> finishes?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170320/5871b30c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170320/5871b30c/attachment.sig>


More information about the CMake mailing list