[TxMt] Re: Problem creating a new XCode project using the XCode plug in
Allan Odgaard
mailinglist at textmate.org
Wed Jun 24 16:21:14 UTC 2009
On 24 Jun 2009, at 17:37, Gerd Knops wrote:
> On Jun 24, 2009, at 5:14 AM, Allan Odgaard wrote:
>
>> On 17 Jun 2009, at 21:40, Joe Jones wrote:
>>
>>> So, is this a dead project now (Xcode bundle)?
>>
>> Well, I did the bundle and I have moved away from Xcode project files
>> (using CMake now).
>
> Even for Cocoa-based projects? How is that working?
Yes, and it works very well, but I had to write a lot of CMake support
code to get to where I am now.
I have 3 essential “commands” which are CREATE_FRAMEWORK,
CREATE_TOOL, and CREATE_APPLICATION. They create a framework, a CLI
tool, and a bundled application. These take arguments for what to
include in the build, e.g. my buffer.framework has the following
definition:
CREATE_FRAMEWORK(buffer
SOURCE_FILES src/*.cc
PUBLIC_HEADERS src/buffer.h
RESOURCES resources/*
LINK_WITH scope
LINK_WITH parse
)
This is in a CMakeLists.txt file inside the ‘buffer’ folder
containing the stuff for this framework (not sure if you are already
familiar with CMake). Scope and parse are two other frameworks that
the buffer framework is linked with.
As you can probably imagine, I feel that it is vastly superior working
this way than having to maintain Xcode project files :) Also my
commands pickup special extensions like ‘xib’ and do proper
preprocessing — being in full control of this is nice (for example
ANTLR generate two sources and a header for one grammar file, I don’t
think I managed to get that working properly (with dependencies) in
Xcode).
I have the TOOL/APP commands also crate a “Run«target name»”
makefile target and I have setup this to be the default target and
hence just use Make → Build (folder-specific variables are pretty
useful for this, especially as they can reference TM_DIRECTORY).
I do feel my CMake files can be generalized more, but I attached them
below incase you want to check it out. And while I much prefer this
environment over Xcode files, CMake syntax is ghastly! Fortunately
majority of the actual target-specific files are as simple as what’s
shown above.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMake.zip
Type: application/zip
Size: 8252 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20090624/a3ebc859/attachment.zip>
-------------- next part --------------
More information about the textmate
mailing list