how to generate the checksums with CMake?

Joshua Root jmr at macports.org
Sat Feb 18 02:16:03 PST 2012


On 2012-2-18 19:53 , Erik Sjölund wrote:
> Yes, I agree the CMake mailing list might be better suited for this
> type of question. I was just thinking that generating the Portfile
> with CMake should be such a common scenario for MacPorts developers
> that someone here would already have done it.
> 
> As Titus suggested, I was also thinking along the lines of using
> add_custom_target() or add_custom_command().
> And maybe also configure_file().
> 
> Anyway, if there are any examples of Portfile files that are generated
> with CMake, please let me know.
> 
> (To me, the tricky thing is to incorporate the checksum calculation
> into CMake as a make target, that first would create the source tar
> ball and then the Portfile)

Nobody has even considered using cmake to generate portfiles before,
that I know of. When creating a new port from scratch I usually just run
portfile-gen[1] and edit manually from there.

- Josh

[1] <https://trac.macports.org/browser/contrib/portfile-gen>


More information about the macports-dev mailing list