Thanks for your answer. Actually, I was trying this on RHEL, not ubuntu. rpmbuild and rpmdevtools are correctly installed in my machine, I've tested that to generate RPM with my spec file based on rpmbuild and rpmdevtools, it works, libraries information is generated in the 'PROVIDES' fields of the RPM package. But with cpack, it doesn't.
Wang Peng (Rex) Seat: 21F HZ SE Team +86018605811125 -----Original Message----- From: EXT Domen Vrankar [mailto:domen.vran...@gmail.com] Sent: Friday, March 25, 2016 5:52 PM To: Wang, Peng 1. (Nokia - CN/Hangzhou) <peng.1.w...@nokia.com> Cc: cmake@cmake.org Subject: Re: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack > Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take > effect? how can I make it auto generates these 'PROVIDES' information in the > RPM? thanks for your time and it will be very appreciated if you can > provide some hints. CPackRPM relies on rpmbuild and other rpm tools to correctly create the package and rpm is not the most automation friendly beast because of its macro system. In cmake tests: Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake there is a comment # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755 I'm guessing that this is environment related (missing packages, failing/missing rpm macros, ...) as for the same version of rpmbuild installed on different Linux distros (each through their own package repository that came with the distro) it either worked or not and never told that it failed (you could see that only after inspecting the content of rpm package after it has already been created). I haven't looked deeper into it but perhaps you've stumbled across this as well. You could try to make the package on a different distro and see if it works there. Regards, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake