Setting the architecture CMakeLists.txt is a rather crude solution in
itself since then you'd have to manually change the architecture in
that file. Sure you can make a small script that does this by
executing dpkg --print-architecture, but it seems like a lot of fuzz
for something that has to be done in every file using the feature.
As mentioned earlier I changed my CPackDeb.cmake file to do this by
itself instead.

Regarding the generator specific options, perhaps the base class for
the generators could have something like registerPrefix("DEBIAN") ?

I'm new to cmake and this mailing list, where would I send suggestions
and patches?

On 9/28/07, Eric Noulard <[EMAIL PROTECTED]> wrote:
> 2007/9/26, Fredrik Hultin <[EMAIL PROTECTED]>:
> > You're describing my problem all over again, if I'm not overlooking
> > something important.
> > If I write:
> >
> > SET(DEBIAN_PACKAGE_ARCHITECTURE "whatever")
> > INCLUDE(CPack)
>
> OK right.
> Sorry for the delayed answer I was too busy to give this a try.
>
> >
> > in my CMakeList.txt, it will be completly ignored since INCLUDE(CPack)
> > only transfers variables with the CPACK_-prefix to the
> > CPackList.cmake. So CPack will never see the
> > DEBIAN_PACKAGE_ARCHITECTURE-variable. That's why I proposed of naming
> > it CPACK_DEBIAN_PACKAGE_ARCHITECTURE, since then I can actually use it
> > at all.
> >
> > What CPackDeb.cmake says doesn't matter since it will never see
> > anything but the variables INCLUDE(CPack) has copied to
> > CPackList.cmake (ie. the ones starting with CPACK_).
> >
> > Or perhaps I've got it all wrong?
>
> No you get it damn right.
> I have just the same behavior.
> The only way set a var value that can be seen by CPack
> (besides patching CMake code)
> is to provide it on a command line like this:
>
> cpack -G DEB -D DEBIAN_PACKAGE_ARCHITECTURE="your_arch" CPackConfig.cmake
>
> then
> dpkg-deb -I  <generated-package>.deb
> should show you
>
>    Architecture: your_arch
>
> It works for me on a Debian/Etch+SID with CMake 2.5-20070927 (current CVS)
>
> This will work, but not as useful as the way  I thought it was working,
> in the first place.
>
> I think the work on CPack Generator is not fully satisfactory,
> I pointed out some deisgn issue while writing the RPM generator.
> http://www.cmake.org/Wiki/CMakeUserUseRPMTools#CPack_Built-in_RPM_support_design_issues
>
> I think you may add your remark concerning CPack design issue,
>
> The first CMake volunteer who have time to propose patches for those
> issue would certainly be welcomed :=)
>
> --
> Erk
>
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to