I misunderstood your problem -- I don't know about doing cross-compilation with CMake. I would suggest that if you can cross-compile ANY application for the targets you want, you could just add the PortMidi source files to the other sources in the application. PortMidi is not large, so (in my opinion) there are at best minor advantages to dynamic linking or separate compilation.

-Roger

On 10/8/2010 2:06 AM, RJ Ryan wrote:
Hi Roger,

Unfortunately I've tried for an hour or two to get cmake to spit out a cross-compile Makefile and I failed miserably. First of all, I had to remove every reference to the Java parts of the CMake configuration. Then, when I tried the following:

ccmake -G "Unix Makefiles" -D CMAKE_C_COMPILER=i586-mingw32msvc-gcc -D CMAKE_CXX_COMPILER=i586-mingw32msvc-g++ CMAKE_AR=i586-mingw32msvc-ar CMAKE_OBJDUMP=i586-mingw32msvc-objdump CMAKE_OBJCOPY=i586-mingw32msvc-objcopy CMAKE_NM=i586-mingw32msvc-nm .

It produced a Makefile which was for building on Linux (included files from pm_linux), not Windows. After reading through the various CMake files, I'm worried that cross-compilation isn't possible. Has anyone done it? For what I'm working on I'm going to need to cross-compile from x86_64 Linux to: Windows x86/x86_64 and OSX 10.4 powerpc/powerpc64/x86/x86_64. With an autotools/autoconf setup this is pretty straightforward, but I'm very inexperienced with cmake -- any advice would be much appreciated.

Best regards,
RJ

On Thu, Oct 7, 2010 at 10:56 PM, Roger Dannenberg <[email protected] <mailto:[email protected]>> wrote:


    Now that PortMidi uses CMake, I believe you can create a fresh new
    Makefile with CMake. That should work. -Roger

    On 10/7/2010 10:06 PM, RJ Ryan wrote:
    Hi all,

    I'm trying to produce a cross-compiled build of portmidi for
    win32 using the mingw32msvc toolchain availble in Debian/Ubuntu.
    Could anyone who has done this successfully give me some
    pointers? I'm using this Makefile I found here:
    http://lists.create.ucsb.edu/pipermail/media_api/2005-June/000386.html  but
    I don't believe that is correctly prepared for the latest SVN or
    for cross-compiling. It references a non-existent C file:
    pmdll.c. After removing that reference it built fine, but after
    linking with my binary (Mixxx http://mixxx.org
    <http://mixxx.org/>) Windows (7) fails to recognize the DLL as valid.

    Thanks,
    RJ Ryan


    _______________________________________________
    media_api mailing list
    [email protected]  <mailto:[email protected]>
    http://lists.create.ucsb.edu/mailman/listinfo/media_api


    _______________________________________________
    media_api mailing list
    [email protected] <mailto:[email protected]>
    http://lists.create.ucsb.edu/mailman/listinfo/media_api



_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to