跳至主要內容

08.CMake命令

约 75 字小于 1 分钟

## 编译
cmake .
cmake ..



多个CMakeLists.txt

## 包含子目录CMakeLists.txt
add_subdirectory(目录)
add_subdirectory(./aaa)


# 包含子目录相关头文件,这样才能在主库中使用相关的函数
include_directories(test/include)

target_link_libraries(
    
    # 这里可以直接用子目录生成的这个库
    test
)