Hi Roger,

Attached is a patch that resolves my issues and makes PortMidi install
on OS X. It also sets the INSTALL_NAME_DIR flag, which is required for
OS X dylibs to behave nicely in some situations [1]. However, cmake
doesn't appear to be stitching that path into the dylib correct, it
instead just makes the library's id "libportaudio.dylib". This looks
like a bug in cmake to me, but in any event, it seems like it's still
enough to fix my problems with Mixxx even though it's not 100%
correct.

I changed that Linux install stuff to apply to OS X as well, I'm not
quite sure why it wasn't that way before. Unless you want to build
PortMidi as an OS X "framework", I would recommend keeping the install
procedure the same as for Linux because that seems to be the de facto
standard.

I also had to change the paths to portmidi.h and porttime.h, which
hopefully doesn't break the install target on other platforms. When
building on OS X, cmake treats those paths as relative to the pm_dylib
directory.

Please let me know if you have any comments or if you commit it
because I need to pass along build instructions for PortMidi to
Mixxx's OS X packager soon. We're in the final phases of unifying
Mixxx's MIDI code into a single PortMidi-based backend for all
platforms which we plan on including in our next release. If you're
not familiar with our project, Mixxx is open source cross-platform DJ
software and gets quite a few downloads, so hopefully we'll be able to
increase the amount of testing PortMidi receives.

Thanks,
Albert

[1] http://qin.laya.com/tech_coding_help/dylib_linking.html



On Tue, Nov 17, 2009 at 3:57 PM, Roger Dannenberg <r...@cs.cmu.edu> wrote:
> Yes, I think the install target (which I thought Cmake automated) is broken.
> Previously, the install path was $(PF) which was set to /usr/local. I think
> you can set that in the makefile or from the command line (or just look at
> the simple commands in Makefile.osx to see how install was working before).
> I'm still trying to iron out problems with Cmake and the build system, so I
> appreciate your input (esp. README_MAC.txt -- I thought I made a pass
> through that, but I'll look again.) -Roger
>
> Albert Santoni wrote:
>>
>> Hello,
>>
>> After running cmake . and make, "make install" complains there is no
>> install target on OS X 10.5. Am I missing something or did the switch
>> to cmake break the install target?
>>
>> I didn't realize PortMidi switched build systems and I had just made a
>> patch that solved a problem in your Makefile with the install_name
>> being incorrect on OS X, then I upgraded and found out you totally
>> switched to cmake. I take it the documentation in
>> pm_mac/README_MAC.txt is out of date?
>>
>> make -f pm_mac/Makefile.osx install   doesn't work anymore... the
>> $(PG) variable isn't defined anywhere so it assumes we have a blank
>> path prefix....
>>
>> Help?
>>
>> Thanks,
>> Albert
>>
>> Mixxx Developer
>> http://www.mixxx.org
>> _______________________________________________
>> media_api mailing list
>> media_api@create.ucsb.edu
>> http://lists.create.ucsb.edu/mailman/listinfo/media_api
>>
>>
>
>

Attachment: osx_cmake_install_albert.diff
Description: Binary data

_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to