link library to all targets in cmake project

后端 未结 2 1072
夕颜
夕颜 2021-01-19 21:51

Let me describe what I think is a sufficiently common use case, that it should be supported. Consider a project which consists of a library and a set of executable that use

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 22:51

    This answer might be obsolete:
    Check the new set of variables CMAKE__STANDARD_LIBRARIES

    Original Answer: It appears that now a CMAKE_STANDARD_LIBRARIES variable exists, where you can append the libraries according to your need. However, this variable seemingly expect full path to the libraries.

    See here.

提交回复
热议问题