What does ${PROJECT_SOURCE_DIR} represents?
In my CMakeList.txt, there is ${PROJECT_SOURCE_DIR} but I don't know the exact values it represents. So I enter something like "echo ${PROJECT_SOURCE_DIR}", but nothing comes out. My questions are:
1. how to find out what ${xxx} represents?
2. are there differences between ${} and $()?
echo
is not a CMake command, and${PROJECT_SOURCE_DIR}
is not an environment variable (so you can'techo
it). If you want to print it, usemessage("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
somewhere in yourCMakeLists.txt
.Thank you @gvdhoorn, @BennyRe and @Wolf. The combination of your three answers is the perfect answer.
@gvdhoom thank you for your answer, please once you use message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}") where would it be displayed/printed ?
On the console, during CMake configuration phase.