[CMake] CMAKE_TOOLCHAIN_FILE / testing with 'wine'

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Aug 19 18:15:46 EDT 2008


On Wed, Aug 20, 2008 at 12:02 AM, Hendrik Sattler
<post at hendrik-sattler.de> wrote:
> Am Dienstag, 19. August 2008 23:08:56 schrieb Mathieu Malaterre:
>> On Tue, Aug 19, 2008 at 10:57 PM, Hendrik Sattler
>> <post at hendrik-sattler.de> wrote:
>> > Am Dienstag, 19. August 2008 22:24:12 schrieb Mathieu Malaterre:
>> >>   Did you figure out a way to install 32bits debian package in the
>> >> /emul/ia32 subdirectory ? How did you install your target system
>> >> environment. On my debian box, the ia32-libs package works somewhat
>> >> ok, but it only provide the runtime 32bits libs (not the include file
>> >> for instance).
>> >
>> > The include files do not differ (they are architecture-independent) for
>> > normal projects. Why would you want to install a second set?
>>
>> uh ? I see two issues:
>> 1. Related to how cmake internally works:
>> The way cmake toolchain work is you simply set some kind of root, for
>> instance /emul/ia32-linux and within this root, will search for
>> /usr/lib/libz.so and /usr/include/zlib.h. I'll have to double check
>> but hopefully order is is respected so that I can say search first in
>> '/emul/ia32-linux' and then in '/'
>
> Or /emul/ia32-linux, /include and /usr/include. You don't need to take 'root'
> literally.
>
>> anyway that's not really a problem.
>> 2. The real problem that I am seeing is that include file are not arch
>> independant AFAIK. What if a project would store the result of
>> sizeof(long) within one of its header.
>
> You mean something like glibconfig.h. But that's why they put that
> under ..../lib/glib-2.0/include and not under ..../include. That's also why
> pkgconfig file go under ..../lib/pkgconfig for libraries and not
> under ..../share/pkgconfig .
>
>> I naively assumed that for doing cross compilation I would simply have
>> to install the 32bits version of a particular package (zlib, uuid,
>> expat) within a specific root (/emul/ia32-linux for instance).
>
> Sure, you can always do that. That doesn't mean you always have to if you want
> to save some disk space and inodes :)

Ok, that's very good to know, thanks. However in my case I still need
to have access to the dev package of expat and uuid. Using apt-cross
was extremely fast and very convenient for me, I prefer saving time &
hair, than disk space/inode :-P

-- 
Mathieu


More information about the CMake mailing list