including headers copied before compiling
including headers copied before compiling
- Subject: including headers copied before compiling
- From: "Jason Addison" <email@hidden>
- Date: Tue, 21 Aug 2007 23:16:55 -1000
I'm trying to include headers that are not originally in their proper
location relative to their implementation files. In my implementation
files I have preprocessor lines like:
#include <acme/partA01.hh>
and the files are organized like:
applic/
libA/
partA01.cc
partA01.hh
libB/
partB01.cc
partB01.hh // uses libA, also has #include <acme/partA01.hh>
...
This is because
1) the headers got installed in a place like /usr/local/include/acme/
2) wanted headers in the same directory as their associacted c files
3) wanted lib files to include the headers in the same style as
external lib users would
I want to build libA as an embeded framework for the applic
application. I also want libB as an embeded framework that is
dependent on libA and includes some of libA's headers the same way
external files would do.
I was successful by adding a script to the libA framework target that
copies the needed header files to an acme directory located in the
same directory as the project file _before_ compiling. But this does
not seem like the right thing to do; also, I worry that the build will
always think the headers have changed and rebuild everything (this
might not be true, I haven't really looked into it).
I had first tried making symbolic links in the new acme directory
instead of actually copying the headers, but that did not work ...
does anyone know why it should not work?
Next, after removing the script (and the headers it had copied in my
acme directory), I tried making the headers public and having the
build copy the headers to $(CONTENTS_FOLDER_PATH)/Headers/acme/. The
headers got copied, but the build did not find them. So then I added
that directory to the include search path and still no luck. This
seems like the best solution so far except that the build may think
all the headers change for each build ... and it does not work.
What is the right way to make this work?
If the right way is to conditionally use include statements that do
not use the acme directory for __APPLE__, what is the next best right
way?
Thanks,
Jason
_______________________________________________
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