• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom Build Rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom Build Rules


  • Subject: Custom Build Rules
  • From: Mike Jackson <email@hidden>
  • Date: Wed, 11 Oct 2006 18:07:44 -0400
  • Thread-topic: Custom Build Rules

Hello,
   I am trying to integrate building of Qt Applications into Xcode some what
better than is available now. I am trying to create a set of Build rules for
running "uic" and "moc" from Qt.
  The UIC build rule seems to be straightforward and easy. That works.

 The moc build rule is where I am getting stuck. The problem is that I have
is operating on C++ files, then running a custom script:
--------------
#! /bin/bash
/usr/local/Trolltech/Qt-4.2.0-intel/bin/moc ${INPUT_FILE_PATH} >
${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cpp

if [ ! -s ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cpp ]
then
  echo "Removing Zero Length File
${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cpp"
  rm -f ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cpp
  set INPUT_FILE_PATH=""
Fi
--------------
This generally works right until I get a file that moc doesn't have to do
anything to, like a plain C++ class that does not extend Qobject. If that
happens a Zero Length file is created and I delete it.
  This deletion causes problems as Xcode then tries to compile a file that
does not exist.

Is there a way to get around this? Can I set an env variable that will
effectively tell the next step that there isn't a file to process?

There are several wikis on how to setup a project in Xcode to use moc and
uic but these all depend on creating Makefiles which I do not think we
should have to do.. I am so close.. Alternatively.. Is there a problem with
compiling a zero length file? I could just leave them and clean them up
later?

Thanks for any Help.
--
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Memory watchpoints
  • Next by Date: Re: Reducing memory consumption
  • Previous by thread: Re: Authentication of SCM with Remote Repository (BUG #4774505)
  • Next by thread: Using HFS paths in the standard C libraries
  • Index(es):
    • Date
    • Thread