How does cmake configure Header Files folder to configure subfolder Item?

The red line has been identified in the screenshot below

You can achieve results like that using the source_group() command. Note that for headers, you will likely need to use the FILES option to that command, not REGULAR_EXPRESSION (see this issue for background)

Thank you for your q&A, I’m a green hand.Can you provide a sample code?

Something like the following:

source_group("Header Files\\Item" FILES ...)

where ... is where you should list the files you want to appear in that folder. Experiment with it a bit and see the effect so you get what you want. Note the double back-slashes to get the right path separator. There are other ways to specify separators depending on CMake version, but the above will always work.

thank you.