From 507204c39956d889f3a3f2ba059a5d8aab2588d2 Mon Sep 17 00:00:00 2001
From: Bruno Pagani <bruno.n.pagani@gmail.com>
Date: Tue, 19 Oct 2021 09:33:38 -0400
Subject: [PATCH] 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.

Same thing as https://gitlab.kitware.com/paraview/paraview/-/merge_requests/5070.

Fixes: #18266
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90e98d74564..89972a99589 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,7 @@ cmake_dependent_option(VTK_UNIFIED_INSTALL_TREE "Assume that the install tree co
 mark_as_advanced(VTK_UNIFIED_INSTALL_TREE)
 
 set(CMAKE_INSTALL_LICENSEDIR ""
-  CACHE PATH "License files (DATAROOTDIR/licenses/${CMAKE_PROJECT_NAME}")
+  CACHE STRING "License files (DATAROOTDIR/licenses/${CMAKE_PROJECT_NAME}")
 mark_as_advanced(CMAKE_INSTALL_LICENSEDIR)
 if (NOT CMAKE_INSTALL_LICENSEDIR)
   set(CMAKE_INSTALL_LICENSEDIR
-- 
GitLab