I can programmatically create project environment variables for the properties Project -> C / C ++ Build -> Environment. However, when I restart the workspace, the environment variables disappear.
The code I'm using to add new project environment variables is below:
Global Variables:
private ICConfigurationDescription cfgd = null;
private final MultiCfgContributedEnvironment ce = new MultiCfgContributedEnvironment();
Internal Method:
ICConfigurationDescription[] cfgs;
cfgs = new ICConfigurationDescription[] {cfgd};
for (ICConfigurationDescription cfg : cfgs) {
ce.addVariable("PKG_CONFIG_LIBDIR", dir,
EnvironmentVariable.ENVVAR_APPEND, SEPARATOR, cfg);
}
I'm looking for a way to save environment variables on the Environment page after restarting the workspace.
source
share