cmake - support of Visual Studio filters

Viewed 1697

I have a cmake file that generate a solution with several sub projects, but I wish a "filter" (VS specific feature) to group all my thirdparty libraries together.

An example, for now I use the ZLIB library, it appear as a project, I use the following:

add_subdirectory(zlib)

To add such filter, I have try the following :

add_subdirectory(zlib)
FILE(GLOB_RECURSE ZLIB_SOURCE "zlib/*")
SOURCE_GROUP("THIRDPARTY" FILES ${ZLIB_SOURCE})

In this example I wish to put the "zlib" project into a "THIRDPARTY" filter.

But nothing is changed in my solution ! I use VS2017 and cmake 3.8

Any idea ?

1 Answers
Related