I'm building an executable which should link dynamically with its dependency libraries, but - not all of them. In the case of one library, I want to link against its static version.
Now, the library I am after might be available both as a static and as a dynamic object. The find_package()
command doesn't seem to let me say which of them I want ti find (or whether I want both to be found); and the documentation of target_link_libraries()
, contains no text regarding how to choose between a static and dynamic variant of the same library.
Can I effect such a selection somehow? Or - is the only recourse a manual exposure of two targets, for the static and the dynamic targets pr
Note: In my specific case, the library is libtiff, but I doubt the answer is library-specific.