[CMake] rpmbuild architecture

clinton at elemtech.com clinton at elemtech.com
Fri Apr 5 11:41:08 EDT 2013


I'm trying to build an i686 RPM package on a x86_64 Linux machine. 

I have a set(CPACK_RPM_PACKAGE_ARCHITECTURE i686) 
but I get an error at CPack time: 
error: No compatible architectures found for build 

I can get it to work if I also use setarch when calling rpmbuild giving it the CPack generated RPM spec file, like so: 
setarch i686 rpmbuild --bb --define "_topdir $PWD" --buildroot $PWD/<mypath> SPECS/myspec.spec 


Doing the equivalent for a Debian package seemed to work by simply setting 
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) 

Is there some way to make this work automatically within cpack? 

Thanks, 
Clint 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130405/4e5e265d/attachment.htm>


More information about the CMake mailing list