As you can see, flat_hash_map is a header-only library and doesn’t support any build system, so there is unneeded to build. I think add the source directory to target_include_directories just fine.
Additionally, emhash is a strange project which doesn’t provides target like emhash5::HashMap. CMakeLists.txt in emhash seems just use it to build benchmark programs.
For the flat_hash_map, I’d probably create an INTERFACE library right after calling FetchContent_MakeAvailable. That will be much nicer to use.
For the emhash I’d probably do the same (it’s also header-only, right?), but also add SOURCE_SUBDIR disable_cmake to the FetchContent_Declare, which should avoid bringing the unwanted targets into your build.