Re: [CMake] Interface source paths evaluated relative to dependent library

2018-06-25 Thread Rich T
using '$' and '$'. > '$' accepts absolute paths and > '$ expects paths relative to the install prefix > (CMAKE_INSTALL_PREFIX variable). > . > > > Le lun. 25 juin 2018 à 16:23, Rich T a écrit : >> >> Hi everyone, I've a question about interface sources. >> >

[CMake] Interface source paths evaluated relative to dependent library

2018-06-25 Thread Rich T
Hi everyone, I've a question about interface sources. If you create an interface target A, add some sources via add_library(A INTERFACE) target_sources(A INTERFACE some/relative/path) then link to another library B: add_library(B) target_link_libraries(B PRIVATE A) B will search for those

[CMake] Building and exporting static and shared libs - best practice?

2018-02-22 Thread Rich T
It's often useful to be able to make both static and shared varients of a library available to users of a package. My goal is to make the project cmake files as clean as possible, while supporting usage of either or both types of library by users. It should work from both build and installed