CMake : parent directory?
https://newbedev.com/cmake-parent-directoryAs of CMake 3.20, you can use the cmake_path command to get the parent directory of a given path: cmake_path(GET <path-var> PARENT_PATH <out-var>) This command supersedes the get_filename_component command. So, in your example, it would look like this: cmake_path(GET MYPROJECT_DIR PARENT_PATH PARENT_DIR)
CMake : parent directory? - Stack Overflow
stackoverflow.com › questions › 7035734Aug 12, 2011 · 3. This answer is not useful. Show activity on this post. As of CMake 3.20, you can use the cmake_path command to get the parent directory of a given path: cmake_path (GET <path-var> PARENT_PATH <out-var>) This command supersedes the get_filename_component command. So, in your example, it would look like this:
CMake : parent directory?
newbedev.com › cmake-parent-directoryAs of CMake 3.20, you can use the cmake_path command to get the parent directory of a given path: cmake_path(GET <path-var> PARENT_PATH <out-var>) This command supersedes the get_filename_component command. So, in your example, it would look like this: cmake_path(GET MYPROJECT_DIR PARENT_PATH PARENT_DIR)