I'm working in an Xcode project created using CMake. I would like to be able to automatically create an environment variable in Xcode using CMake commands, but it doesn't appear to work.
In my .profile I have
export WORKDIR=$HOME/temp/working
and I would like to have it appear in Xcode as an environment variable such as the follow picture (or equivalent)
so that I can load it in C++ using the following:
auto workdir = std::getenv("WORKDIR");
I tried using the following command:
set($ENV{WORKDIR} ${WORKDIR})
but it didn't seem to help. Any ideas?
