BUILD.gn
libs = [
"pthread_static.lib",
]
deps = [
":pthread_static",
]
这里面的libs和deps里的pthread_static有什么区别,用cmake的话该怎么写?
gn中的libs和deps有以下区别:
add_executable(myapp main.c)
target_link_libraries(myapp pthread_static)
add_dependencies(myapp pthread_static)
所以libs定义了myapp链接静态库pthread_static,deps定义了myapp依赖目标pthread_static。
总结: