[CMake] OS X Carbon Rez...
William A. Hoffman
billlist at nycap.rr.com
Tue Aug 1 14:00:59 EDT 2006
At 01:49 PM 8/1/2006, Mike Jackson wrote:
>On Aug 1, 2006, at 1:35 PM, William A. Hoffman wrote:
>
>>At 12:49 PM 8/1/2006, Mike Jackson wrote:
>>>OK..
>>> So after the last bit of help I now have an executable that
>>>runs.. almost.. As with Carbon Apps on OS X I have to manually run:
>>>
>>> ADD_EXECUTABLE( ImageImporter ${SAMPLE_SRCS} ${SAMPLE_MOC_SRCS} $
>>>{SAMPLE_UI_HDRS} )
>>
>>Try this:
>>
>>
>>ADD_EXECUTABLE( ImageImporter
>> MACOSX_BUNDLE
>> ${SAMPLE_SRCS} ${SAMPLE_MOC_SRCS} $ {SAMPLE_UI_HDRS} )
>>
>>-Bill
>
>And there ya have it.... One OS X .app package.. now to go get some
>lunch...
>
>Of course I am assuming to make this truly cross platform I would
>need to check if I am building on OS X and then use that line
>otherwise use the line that I had before. So this is what I have now.
Actually, you can make it a variable, and do something like this:
SET(GUI_TYPE )
IF(APPLE)
SET(GUI_TYPE MACOSX_BUNDLE)
END(APPLE)
IF(WIN32)
SET(GUI_TYPE WIN32)
END(WIN32)
ADD_EXECUTABLE(ImageImporter ${GUI_TYPE} ...)
-Bill
More information about the CMake
mailing list