Re: [CMake] Static libraries depending on libraries: only on headers/options/defines

2019-02-16 Thread Paul Smith
I wrote this function. At first attempt it seems to do what I want but I've definitely not completed my work so I may well still find issues with it. Basically it does everything that target_link_libraries() does (at least, it tries to as best as I understand it other than a bunch of properties

Re: [CMake] Static libraries depending on libraries: only on headers/options/defines

2019-02-16 Thread Andreas Naumann
Hi Paul, I understand the relationship between libraries as strict, such that you always build all dependent libraries before. In your use case I thought about splitting the libraries in the actual target and the interface one. For example, you could create an interface library foo_interface

[CMake] Static libraries depending on libraries: only on headers/options/defines

2019-02-16 Thread Paul Smith
Hi all; I'm working on modernizing our large complex CMake environment. It builds a number of different binaries from an even larger number of static libraries, and these libraries depend on each other as well, in that they need to include headers and, sometimes, -D options etc. I've used