I'm working on a project with Xcode, and I'm rearranging all the source files. I see that Xcode, in the "Compile Sources" section in the target configuration, looks for all the source codes using a pathname relative to the project directory (PROJECT_DIR).
I have created a new folder where all the sources, libraries, and headers will go.
Is there a way to tell Xcode to look for sources from a user-defined directory so when I change the directory I won't have to re-add all the source files?
You can use Xcode file inspector to modify the path. Here you can change the path of groups and file in your project structure.
Make sure all your files & groups are set
Relative to group.
This way when you move files in group to a different location keeping their relative positions same, you can just change the group path from Xcode.