CMake link to external library

后端 未结 4 2113
梦谈多话
梦谈多话 2020-11-21 04:53

How to get CMake to link an executable to an external shared library that is not build within the same CMake project?

Just doing target_link_libraries(GLBall $

4条回答
  •  旧时难觅i
    2020-11-21 05:23

    Set libraries search path first:

    LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/res)
    

    And then just do

    TARGET_LINK_LIBRARIES(GLBall mylib)
    

提交回复
热议问题