Altered target library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Altered target library

Rob Boehne



We have a shared library we deliver to clients in two different ways – one has a license manager linked in, and it’s installed into a different directory.  Everything else has been moved from VS & Makefiels to CMake except support for this.


Is there a CMake way to create a second target, with the same name but different options or source file properties & link options, but to a different directory?

Ideally we would not have to duplicate the rather large CMakeLists.txt – but I could break all the things that are the same out into a dependency.  I had the thought that perhaps I could inherit from the first target to create the second, but I’m not aware of that feature in CMake.


Any ideas?






Rob Boehne

Senior Software Architect | Datalogics, Inc.

<a href="tel:(312)%20853-8351">+1.312.853.8351 | [hidden email] |

Connect with us: Facebook | Twitter | LinkedIn | YouTube




Powered by

Kitware offers various services to support the CMake community. For more information on each offering, please visit

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe:

This mailing list is deprecated in favor of