Change CPPPATH only for library build

I want to change CPPPATH for library in order to override the header file included in the framework. But I do not want to change the CPPPATH for whole build. The header file is internal to the library not its not even used outside.

Currently I modified the env CPPPATH via extra script. like this:

from os.path import join, realpath

I am not sure if doing this is modifying CPPPATH for the whole build or just library only. Is there any other way to do this? or a better way?