A Divendres 09 Gener 2009, Hendrik Sattler va escriure: > Philip Lowman schrieb: > > On Fri, Jan 9, 2009 at 7:32 AM, Philip Lowman <[email protected]> wrote: > >> On Thu, Jan 8, 2009 at 5:22 PM, Albert Astals Cid <[email protected]> wrote: > >>> if (LibOpenJPEG_OPENJPEG_LIBRARY) > >>> set (LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY}) > >>> endif (LibOpenJPEG_OPENJPEG_LIBRARY) > >> > >> If you spot any find modules with this syntax this is wrong. The reason > >> why is if LibOpenJPEG_OPENJPEG_LIBRARY is NOTFOUND then > >> LibOpenJPEG_LIBRARIES will not be set to NOTFOUND and if the user is > >> linking a target against the LIBRARIES variable they will get no error > >> because the variable will expand to nothing. > > I oppose. You can check LibOpenJPEG_FOUND if you want to test this or use > the REQUIRED keyword. > Using the *_LIBRARIES variables unconditionally should not lead to > errors for optional libraries.
I'm goving up, after 15 mails i still don't know which is the best way to do that simple cmake check so i'm obviously not good enough to maintain them. Sorry, about all the noise. Albert P.S: i'm unsubscribing from the list too > HS > _______________________________________________ > CMake mailing list > [email protected] > http://www.cmake.org/mailman/listinfo/cmake _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
