icecc / icemon

Icecream GUI Monitor
http://kfunk.org/tag/icemon/
GNU General Public License v2.0
88 stars 34 forks source link

Improve how docbook2man is searched for #21

Closed randomguy3 closed 9 years ago

randomguy3 commented 9 years ago

On ArchLinux, the docbook2X package installs docbook2man. The only way to force this was to set -D_docbook_to_man_executable on the command line, which is setting an internal variable.

The new approach is to only pass DOCBOOK_TO_MAN_EXECUTABLE to find_program (which allows it to be overridden with -DDOCBOOK_TO_MAN_EXECUTABLE), or to check for each executable name in turn, using the first one that comes from Docbook2X.

This also makes FindDocbook2X use find_package_handle_standard_args, for consistent messages etc.

A second commit checks for the version string in the --version output, for ease of later adding a version requirement.

Arguably, the executable variable should really be named something like Docbook2X_MAN_EXECUTABLE (ie: prefix with the package name), but that isn't addressed here.

randomguy3 commented 9 years ago

I just realised that the FOUND_VAR argument for fphsa only appeared in CMake 2.8.11, while icemon only requires CMake 2.8.9. If you don't want to bump the version, it's pretty trivial to call

set(Docbook2X_FOUND DOCBOOK2X_FOUND)

after the fphsa call.

krf commented 9 years ago

Thanks!

Also fixed the FOUND_VAR issue: https://github.com/icecc/icemon/commit/756d59080c6d15673893cf6d5c36ee5d13e3f61b