CMAKE - getting a path using get_filename_component
<p>I have a path and i would like to get the path starting from a specific path
This is my current path     </p>

<pre><code>   macro(MY_MACRO base)

    foreach(ITEM ${ARGN})
       get_filename_component(ITEM_PATH ${ITEM} DIRECTORY)
       get_filename_component(ITEM_EXT ${ITEM} EXT)
       source_group("${ITEM_PATH}" FILES ${ITEM})
       MESSAGE ("${ITEM_PATH}")
    endforeach()

    endmacro()
</code></pre>

<p>The above outputs this</p>

<pre><code>/Users/admin/main/project/module/pilot/pilot/src/proA
/Users/admin/main/project/module/pilot/guide/src/proB
</code></pre>

<p>I would like it to just display the path starting from the last level
it should only show the path after the folder pilot
so it should show something like this</p>

<pre><code>pilot/src/proA
guide/src/proB
</code></pre>

<p>Not the full path</p>