Yes, that's a tricky one! JeVois modules are compiled as shared libraries (.so) files so that they can be loaded/unloaded at runtime. So the compilation directives are a bit different than a regular executable.
creates a CMake target for each sub-directory under "dir", with target name equal to the module directory name. In the SampleModule skeleton, when "dir" is "src/Modules" there is only one subdir, "SampleModule", so you get only one target, also named SampleModule.
then for this target, we do an add_library() as part as the jevois_setup_module() macro, with the SampleModule.C file as source for it
from there, if you want to let CMake know about your include files, you would use
where dirname is where your .h files are. I believe "." is already included by default so you should not have to do it explicitly. In any case, letting CMake know about includes is only useful if you are going to do partial recompilation (type "make" from inside hbuild/ or pbuild/) and you want the Makefile generated by CMake to know which cpp files to recompile when some of your .h files have changed. If you just use our scripts rebuild-host.sh and rebuild-platform.sh you would usually not care about correct source/include dependencies.
Now to add more cpp files, you would typically do
target_sources(SampleModule PRIVATE otherfile.cpp)
You can specify more than one cpp files, just list them all separated by spaces.
Note that I have not tested this right now and I am no CMake expert. If I remember well, the PRIVATE flag is needed to that the generated .o for each of your extra sources gets linked into the .so of your module.
You may want to check out these extra resources:
https://github.com/jevois/jevois/blob/master/CMakeModules/JeVois.cmake - defines jevois_setup_modules()
https://github.com/jevois/jevoisbase/blob/master/CMakeLists.txt - in jevoisbase, we build libjevoisbase.so and add all sorts of contributed files, includes, compiler flags, link dependencies, etc. The CMake target name in that file is jevoisbase, and you would replace that by your module name.