Using Xcode1. Configure EnvironmentSince Xcode invokes shell scripts with a reduced path, Quilt requires a source tree called Qt that points to the root of your Qt installation. 2. Create TargetCreate a new "Quilt" target in your project, and add this as a dependency of your main target. The Quilt target should contain a Run Script build phase which performs: quilt.rb --moc --in="${PROJECT_DIR}/../Source"
--out="${PROJECT_DIR}/../Source/QtGlue.moc"
For example: The --in parameter controls the directory to scan for files that contain Q_OBJECT definitions, and the --out parameter indicates where to save the list of files that require moccing (this file must have a .moc extension). A --exclude parameter can also be supplied, which defines a regexp to filter the scanned files (e.g., "--exclude=Win*" will exclude any files starting with "Win"). 3. Create RuleCreate a new Build Rule in the main target. This rule should match files with: *.[mqu][ori]*
Unfortunately Xcode does not support alternation within globbing, however this will match .moc/.qrc/.ui extensions. This rule should process files with: quilt.rb --build --in="${INPUT_FILE_PATH}"
--out="${DERIVED_FILES_DIR}/
${INPUT_FILE_BASE}_${CURRENT_ARCH}.cpp"
and output to: ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}_${CURRENT_ARCH}.cpp
For example: 4. Add SourceCreate an empty text file as your QtGlue.moc file, and add it to the main target. After adding this file, drag it from the "Copy Bundle Resources" phase of the main target into the "Compile Sources" phase. If you have any .qrc or .ui files, these should also be added to the project. How It Works
|


