CMAKE_SOURCE_DIR — CMake 3.23.0-rc3 Documentation
cmake.org › latest › variableThis is the full path to the top level of the current CMake source tree. For an in-source build, this would be the same as CMAKE_BINARY_DIR. When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR, CMAKE_SOURCE_DIR , CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR to the current working directory.
change CMAKE_CURRENT_SOURCE_DIR - Stack Overflow
stackoverflow.com › questions › 55028792Mar 06, 2019 · Seriously, CMAKE_CURRENT_SOURCE_DIR denotes location of the CMakeLists.txt which is currently processed. Some CMake functions (even internal ones) heavily rely on this property of the variable. This variable should NOT be changed manually. All variables which refers to SOURCE or BINARY directories should be treated as readonly. Among them: