cmake 强制链接静态库
add_executable(main main.cpp) target_link_libraries(main ${CMAKE_SOURCE_DIR}/libbingitup.a)
静态库和动态库共存时,cmake会默认先链接静态库,如果要强制使用静态库,在CMakeLists.txt中如此直接指明
或者这样做也可以
So, if you want to link to a static library, you need to search for that static library: find_library(SOMELIB libsomelib.a) instead of: find_library(SOMELIB somelib)