If xwin_add_executable() is called from another folder than the one doing the inclusion of CrossWindow through add_subdirectory then the file provided by XMAIN_SOURCES is not found.
This comes from the fact that the file is defined relatively (https://github.com/alaingalvan/CrossWindow/blob/master/CMakeLists.txt#L116)
It makes sense to use relative for building CrossWindow lib but I think it is quite fragile to include a source into any existing project which might be placed anywhere.
In my situation, removing RELATIVE works.