CMake: Fix new FLAMEGPU source_group rules when build is not a child of FLAMEGPU_ROOT
Due to the dynamic version.cpp file, which is placed in the build directory, source_group TREE could fail when the build directory was not a child of FLAMEGPU_ROOT. I.e. when FLAMEGPU/FLAMEGPU2 is fetched via CMake FetchContent.
This applies similar filtering to examples, where source_group(TREE) is only used when appropriate.
Manually tested on windows, with FLAMEGPU/FLAMEGPU2 and FLAMEGPU/FLAMEGPU2-model-template-cpp
CMake: Fix new FLAMEGPU source_group rules when build is not a child of FLAMEGPU_ROOT
Due to the dynamic version.cpp file, which is placed in the build directory, source_group TREE could fail when the build directory was not a child of FLAMEGPU_ROOT. I.e. when FLAMEGPU/FLAMEGPU2 is fetched via CMake FetchContent.
This applies similar filtering to examples, where source_group(TREE) is only used when appropriate.
Manually tested on windows, with FLAMEGPU/FLAMEGPU2 and FLAMEGPU/FLAMEGPU2-model-template-cpp