<div dir="ltr">Hi!<div><br></div><div>I have a library which I want to distribute in both shared object and static library forms.</div><div>Is there a modern way to do it without creating two completely separate library targets?</div><div>Since I want to be a good CMake citizen I use `target_*` and `set_target_properties` as much as possible, and creating two different libraries will force me to duplicate that information about each one of them.</div><div><br></div><div>I also tries not specifying STATIC/SHARED, and then running cmake twice - once with BUILD_SHARED_LIBS=ON and once OFF and then installing to the same directory. I got my both .a and .so libraries installed, but I couldn't get the Config file correctly for this arrangement.</div><div><br></div><div>So - what is the community-recommended pattern to do this?</div><div><br></div><div>Thanks,</div><div>Avi.</div></div>