Can I use different generator in same project?

I want compile a project, use VS 2022. And it contain a library, I want use VS 2017 ,toolset v141 compile it, Can I do this in CMAKE?

1 Like

Like

Only way I can think of is to use exec_command to invoke cmake for library with another generator

1 Like

Good and like

You may use ExternalProject