官方文档
  ADD_EXECUTABLE: Add an executable to the project using the specified source files.//合成可执行文件  
   ADD_EXECUTABLE(exename [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
                 source1 source2 ... sourceN)   ADD_LIBRARY: Add a library to the project using the specified source files.//合成库文件
    
   LINK_DIRECTORIES: Specify directories in which to search for libraries.//为链接器添加搜索路径
    
       
    
 
 
  ADD_LIBRARY(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]
              source1 source2 ... sourceN)  LINK_DIRECTORIES(directory1 directory2 ...)
   INCLUDE_DIRECTORIES: Add include directories to the build.//添加include路径
 
  
  INCLUDE_DIRECTORIES([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)
   TARGET_LINK_LIBRARIES: Link a target to given libraries.//将 库文件 链接到 目标
 
  
 ADD_SUBDIRECTORY: Add a subdirectory to the build.//添加含有CMakeLists.txt子目录  TARGET_LINK_LIBRARIES(target library1
                        <debug | optimized> library2
                        ...)   ADD_SUBDIRECTORY(source_dir [binary_dir] 
                   [EXCLUDE_FROM_ALL]) 


 京公网安备 11010502036488号
京公网安备 11010502036488号