cmake关于相对路径的一些参数

项目文件结构

 

 

cmake_minimum_required(VERSION 3.15)
project(AddTest)

message("CMAKE_CURRENT_BINARY_DIR: " ${CMAKE_CURRENT_BINARY_DIR})
message("CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
message("CMAKE_HOME_DIRECTORY: " ${CMAKE_HOME_DIRECTORY})
message("CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR})
message("PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR})
message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})

 

posted @ 2023-01-04 10:47  Wangtn  阅读(329)  评论(0编辑  收藏  举报