Plain and keyword signature

Hello everyone,

by now I thought to get along with CMake pretty good but there are still some things I am doing wrong. When using it in my current project it gives the error message:

CMake Error at CMakeLists.txt:63 (target_link_libraries):
The plain signature for target_link_libraries has already been used with
the target “target_name”. All uses of target_link_libraries with a
target must be either all-keyword or all-plain.

Can anyone help me with that?

I am grateful for any kinds of help.


all-plain means using target_link_libraries() command without keywords (i.e. PUBLIC, PRIVATE, etc…). all-keyword is the reverse: target_link_libraries() is used with keywords.

You cannot, for the same target, mix the two signatures. As soon as target_link_libraries() command is called on a target with a signature, all other next calls, on the same target, must use the same signature.