Eric, Thank you for the guidance on this. I'll give it a try.
-- Shane -----Original Message----- From: Eric Noulard [mailto:[email protected]] Sent: Thursday, March 17, 2011 12:24 PM To: Dixon, Shane Cc: [email protected] Subject: Re: [CMake] Deb Package messages only if deb is available 2011/3/17 Dixon, Shane <[email protected]>: > I want to add some messages at the end of cmake that display all the > DEB-related variables and what they're set to. I'd prefer to now shows > these when building on windows where DEB isn't available. Is there > something like > > > > If(DEBIAN_FOUND) This is not currently possible because [un]fortunately CMake is not aware of CPack generator existence :-] > that I can use to determine if the deb package builder will be used? Should > I scan CPACK_GENERATORS for 'DEB"? You cannot scan that either, because this var is set to a default value by CMake and it may be overwritten by the user. > What's the best way to do this? You can try the attached cmake script which launch "cpack --help" and collect available generators from CPack itself, if it is found then CPACK_<GEN>_FOUND is set to true. try include(AvailableCPackGenerators.cmake) then if (CPACK_DEB_FOUND) or if (CPACK_TGZ_FOUND) etc... should. If you find the feature is worth to be included in CMake mainstream file a feature request and attach the file (or a modified version if you can do it in a better way). -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
