How to add prebuilt static library in project using CMake?

后端 未结 4 472
粉色の甜心
粉色の甜心 2020-12-11 15:59

Clion: how add or (use) prebuilt static library in my Project?

4条回答
  •  隐瞒了意图╮
    2020-12-11 16:10

    You're probably asking about how to link your project to the pre-built static library. If so, you can do like this by calling target_link_libraries.

    Assume your project called myProj and the pre-built library myLib.lib, you can do like this:

    target_link_libraries(myProj myLib)
    

提交回复
热议问题