function tf_invokePjtGenHookpoint(action, varargin)
%TF_INVOKEPJTGENHOOKPOINT Find if Project Generator hookpoint exists.

%   Copyright 2008-2017 The MathWorks, Inc.


switch action      
    case 'SetEnvironment'
        % Set target foundation environment variables
        procPath = fullfile(matlabroot, 'toolbox', 'target', 'extensions', 'processor');
        tf_tic6000Dir = fullfile(procPath, 'tic6000');
        tf_tic2000Dir = fullfile(procPath, 'tic2000');
        tf_tic5000Dir = fullfile(procPath, 'tic5000');
        envVarDef = {...
            'TI_C6000_DIR',             tf_tic6000Dir; ...
            'TI_C6000BLKS_SRC_DIR',     fullfile(tf_tic6000Dir, 'blks', 'src'); ...
            'TI_C6000BLKS_INC_DIR',     fullfile(tf_tic6000Dir, 'blks', 'include'); ...
            'TI_C6000SRC_DIR',          fullfile(tf_tic6000Dir, 'src'); ...
            'TI_C6000INC_DIR',          fullfile(tf_tic6000Dir, 'include'); ...
            'TI_C6000BLKS_LCT_SRC_DIR', fullfile(tf_tic6000Dir, 'blks', 'lct', 'src'); ...
            'TI_C6000BLKS_LCT_INC_DIR', fullfile(tf_tic6000Dir, 'blks', 'lct', 'include'); ...
            'TI_C6000LIB_DIR',          fullfile(tf_tic6000Dir, 'lib'); ...
            'TI_C6000DEMOS_DIR',        fullfile(tf_tic6000Dir, 'tic6000demos'); ...
            'TI_C2000_DIR',             tf_tic2000Dir; ...
            'TI_C2000BLKS_SRC_DIR',     fullfile(tf_tic2000Dir, 'blks', 'src'); ...
            'TI_C2000BLKS_INC_DIR',     fullfile(tf_tic2000Dir, 'blks', 'include'); ...
            'TI_C2000SRC_DIR',          fullfile(tf_tic2000Dir, 'src'); ...
            'TI_C2000INC_DIR',          fullfile(tf_tic2000Dir, 'include'); ...
            'TI_C2000BLKS_LCT_SRC_DIR', fullfile(tf_tic2000Dir, 'blks', 'lct', 'src'); ...
            'TI_C2000BLKS_LCT_INC_DIR', fullfile(tf_tic2000Dir, 'blks', 'lct', 'include'); ...
            'TI_C2000LIB_DIR',          fullfile(tf_tic2000Dir, 'lib'); ...
            'TI_C2000DEMOS_DIR',        fullfile(tf_tic2000Dir, 'tic2000demos'); ...
            'TI_C5000_DIR',             tf_tic5000Dir; ...
            'TI_C5000BLKS_SRC_DIR',     fullfile(tf_tic5000Dir, 'blks', 'src'); ...
            'TI_C5000BLKS_INC_DIR',     fullfile(tf_tic5000Dir, 'blks', 'include'); ...
            'TI_C5000SRC_DIR',          fullfile(tf_tic5000Dir, 'src'); ...
            'TI_C5000INC_DIR',          fullfile(tf_tic5000Dir, 'include'); ...
            'TI_C5000BLKS_LCT_SRC_DIR', fullfile(tf_tic5000Dir, 'blks', 'lct', 'src'); ...
            'TI_C5000BLKS_LCT_INC_DIR', fullfile(tf_tic5000Dir, 'blks', 'lct', 'include'); ...
            'TI_C5000LIB_DIR',          fullfile(tf_tic5000Dir, 'lib'); ...
            'TI_C5000DEMOS_DIR',        fullfile(tf_tic5000Dir, 'tic5000demos'); ...
            };
        for i = 1:size(envVarDef, 1)
            setenv(envVarDef{i, 1}, envVarDef{i, 2});
        end
        
    otherwise
        % nothing to do
end

end
