Dependency on generated .h files in Xcode
Dependency on generated .h files in Xcode
- Subject: Dependency on generated .h files in Xcode
- From: Jakub Bednar <email@hidden>
- Date: Tue, 08 Jan 2013 11:53:24 +0100
Hello everyone,
I have an issue with Xcode and I can't find a feasible solution.
Some of my project headers are generated by an internal tool from an xml files. Those headers are later used to build libraries and so on. I tried to make Xcode generate these files automatically when they are needed, so I created a custom build rule, that knows how to create a .h file from the .xml file. The problem is, that my source code includes the .h files, but the system does not think of the .h files as a dependency for building the particular source code file. It simply tells me, that the .h is missing and does not try to create it following the custom rule.
I ended up creating a target that builds the internal tool and than run a custom shell script to generate the header files. But with this solution, I need to set this target as a dependency to all other targets and thats really painful as I have a lot of them.
I was looking for a way to tell Xcode, that included .h files from a source file should be considered as a dependency, but I did not find anything. I also did not find a way to tell Xcode that it should build one target before any other target without setting it manually as a dependency to every single target.
I am sure this is a pretty common situation, what is the correct way to solve this?
Thanks a lot for any ideas,
Jakub
_______________________________________________
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