When using target_link_libraries
with a not too old version of CMake, I am encouraged to use one of the key words PRIVATE
, PUBLIC
, or INTERFACE
. Let's assume I just want to get the linking done and I don't want to understand the implications of my choice. I just want my executable getting linked to the library.
- What would be a sane default choice?
- How do I know, that I should start to understand the meaning of the key words? With other words, what kinds of errors do occur, if I chose (by sane default or by plain mistake) the wrong one?