In the context of get_filename_component(), PATH is a legacy alias for DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for CMake versions > 2.8.11. [1] https://cmake.org/cmake/help/latest/command/get_filename_component.html