On Mon, Jan 30, 2012 at 05:24, Kevin Kofler <kevin.kofler(a)chello.at> wrote:
> NAMES grub2.cfg burg.cfg grub.cfg
> PATHS "/boot/grub2" "/boot/burg" "/boot/grub"
> DOC "Path to grub2 or burg configuration file"
Ugh, find_file is a very bad way to handle this! We normally build packages
in a chroot (and I guess several other distros do the same). There is not
necessarily any bootloader installed at all in the chroot.
This needs to be a CMake variable settable from the command line (i.e. from
our specfile), with find_file only as a fallback.
Actually that situation is already covered. Anybody building
themselves (no packaging) the file will likely be present and all is
automatic. For us packagers we can "BuildRequire: grub2" and we would
pick up /etc/grub2.cfg automatically or if we want more control the
find_file command automatically creates a cache variable with the DOC
string so if we want better control it command line configuration is
provided for free. This is one of the few things i actually properly
like about CMake.
There are 10 kinds of people in the world: Those who understand binary
and those who don't...