On Thursday 26 January 2012, Raphael Kubo da Costa wrote: > Alexander Neundorf <[email protected]> writes: > > On Thursday 26 January 2012, Raphael Kubo da Costa wrote: > >> Alexander Neundorf <[email protected]> writes: > >> > Another idea would be to try_compile() a small binary and turn the > >> > version numbers into a string by doing this, and the parsing that > >> > string out of the executable. > >> > This is what cmake does e.g. for determining the type sizes. > >> > >> I'm fine with either option. Do you prefer the try_compile() version or > >> can I commit this version? > > > > I'm fine with committing this one. > > If you have time, you can give the try_compile version a try. > > OK, I'll commit this one for now (looking at CheckTypeSize.cmake, the > try_compile() version does look a bit overkill -- we'd need to ship a > FindXine.c, call try_compile() with a lot of arguments, parse the binary > with a regex and extract the information from it, while the other > find-modules we ship just look at the header files).
Yeah, you found it :-) Maybe this can be generalized in some form so it doesn't need an extra file for each package. E.g. a .c.in file where you configure the version numbers in. It would still be in time for cmake 2.8.8 :-) Alex _______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
