How to refer to files with environment variables?

I was wondering if anyone will be able to remove links to files (except headers or lib) from the environment variable in Xcode (my: v3.2.1)?

There are settings that define search paths for headers (HEADER_SEARCH_PATHS), libs (LIBRARY_SEARCH_PATHS), and even Carbon Resource (REZ_SEARCH_PATH). But how can I refer to other file types for resources in order to have more flexibility for setting up the development environment?

Ideally, I would like to include $ (MY_RESOURCE) /myResourceFile.foo.

The solution would be to get each developer to add env var to Xcode Preferences-> Source Trees. I would like to have exactly the same behavior, but embedded in .pbxproj.

Another solution, more flexible, but less supported, would be to create a group, add files. Close Xcode, edit the pbxproj file and change the path using env var.

Does anyone else have a simpler solution?

+1
source share
1 answer

I found a trick:

  • Create a source tree with the same name as the environment variable that you want to use.
  • Link to data using the source tree.
  • Delete the source tree.
0
source

Source: https://habr.com/ru/post/1395119/


All Articles