cmake: specify `CMAKE_INSTALL_LICENSEDIR` as a string
Giving it a PATH
type causes CMake to convert relative paths into
absolute paths by prepending the build tree to it. This is not wanted,
so change its type to a STRING
instead.
Fixes: #18266
Cc: @ArchangeGabriel