cmake中link_directories无效 Posted on 2016-10-14 1234add_executable(debug ${SOURCE_FILES})link_directories(libxxx/lib)target_link_libraries(debug xxxx) 一直提示找不到xxx库, 解决方法很简单, 就是把add_executable放到link_directories后面就可以了-_-! 1234link_directories(libxxx/lib)add_executable(debug ${SOURCE_FILES})target_link_libraries(debug xxxx)