Skip to content

Make FindDevIL fail properly when library is not found

Vladimír Vondruš requested to merge mosra/cmake:devil-fail-notfound into master

Due to a mismatch between module name and name passed to FPHSA() the macro printed an error message but the error was not caught up by CMake, causing failure much later in the build process (during compilation / linking).

Also, on some distributions (e.g. on ArchLinux) the DevIL package doesn't contain the ILUT library (only IL and ILU). If I understand correctly, the importance of ILUT is not so high, so the find module should succeed even though that part was not found. I was not sure what is the proper way to handle this, so I just removed it from the FPHSA() macro call. That way the module will work the same way as it worked before in the happy case (it won't fail with an error when just ILUT is not found) but properly fails when none of DevIL is found.

Merge request reports