Issues in configuring software with VTK Dependency - Fails in VTK cmake files

I inserted a printout of ARGC, ARGV, and ARGN.

The resulting output is below, and below that is the result of using the flags you suggested. It appears that vtk_detect_library_type is recognizing the existence of three arguments. It recognizes PATH as one of the arguments. VIM automatically gives it special font as if it is a recognized keyword or something similar. I also don’t know if keywords or reserved words are treated as arguments under normal conditions. Then there is the inclusion of

""
"PATH"
""

cmake_parse_arguments. I recognize that the idea is that “_PATH” will be added to the base name of some variable to create a new variable name, but many of the examples I have found online have structured that process a bit differently and often include the use of set().

 ARGC 3
 ARGV glew_library_type;PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so
 ARGN PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so
 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake:25 (message):
   The `PATH` argument is required.
 Call Stack (most recent call first):
   /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/FindGLEW.cmake:19 (vtk_detect_library_type)
   /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:256 (find_package)
   /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtk-config.cmake:150 (include)
   ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE)

 Configuring incomplete, errors occurred!
 See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeOutput.log".
 See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeError.log".

Below is the output of cmake --debug-find --trace-expand starting at cmake_parse_arguments.

/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(17):  cmake_parse_arguments(PARSE_ARGV 1 vdlt  PATH  )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(85):  foreach(arg_name vdlt  )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(86):  set(PARSE_ARGV_vdlt )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(89):  foreach(option 1 )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(90):  set(PARSE_ARGV_1 FALSE )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(93):  set(PARSE_ARGV_UNPARSED_ARGUMENTS )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(95):  set(insideValues FALSE )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(96):  set(currentArgName )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(99):  foreach(currentArg PATH; )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(100):  list(FIND _optionNames PATH optionIndex )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(101):  list(FIND _singleArgNames PATH singleArgIndex )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(102):  list(FIND _multiArgNames PATH multiArgIndex )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(104):  if(-1 EQUAL -1 AND -1 EQUAL -1 AND -1 EQUAL -1 )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(105):  if(insideValues )
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(112):  else()
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(113):  list(APPEND PARSE_ARGV_UNPARSED_ARGUMENTS PATH )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(133):  foreach(arg_name vdlt  1 )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(134):  set(PARSE_ARGV_vdlt  PARENT_SCOPE )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(134):  set(PARSE_ARGV_1 FALSE PARENT_SCOPE )
/zfs_pool/Engineering/elmerfem/cmake/Modules/CMakeParseArguments.cmake(136):  set(PARSE_ARGV_UNPARSED_ARGUMENTS PATH PARENT_SCOPE )
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(21):  message(ARGC 3 )
ARGC 3
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(22):  message(ARGV glew_library_type;PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so )
ARGV glew_library_type;PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(23):  message(ARGN PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so )
ARGN PATH;/usr/lib/x86_64-linux-gnu/libGLEW.so
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(24):  if(NOT DEFINED vdlt_PATH )
/usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake(25):  message(FATAL_ERROR The `PATH` argument is required. )
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtkDetectLibraryType.cmake:25 (message):
  The `PATH` argument is required.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/FindGLEW.cmake:19 (vtk_detect_library_type)
  /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:256 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtk-config.cmake:150 (include)
  ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE)


CMake Debug Log at /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:256 (find_package):
  find_package considered the following paths for GLEW.cmake

    /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/patches/99/FindGLEW.cmake

  The file was found at

    /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/FindGLEW.cmake

  

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtk-config.cmake:150 (include)
  ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE)


CMake Debug Log at ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE):
  find_package considered the following paths for VTK.cmake

    /zfs_pool/Engineering/elmerfem/cmake/Modules/FindVTK.cmake
    /usr/share/cmake-3.22/Modules/FindVTK.cmake
    /zfs_pool/Engineering/elmerfem/ElmerGUI/cmake/Modules/FindVTK.cmake
    /usr/share/cmake-3.22/Modules/FindVTK.cmake

  The file was not found.

    /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/VTKConfig.cmake
    /usr/lib/x86_64-linux-gnu/cmake/vtk-9.1/vtk-config.cmake



CMake Debug Log at ElmerGUI/CMakeLists.txt:106 (FIND_PACKAGE):


-- Configuring incomplete, errors occurred!
See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeOutput.log".
See also "/zfs_pool/Engineering/elmerfem/build/CMakeFiles/CMakeError.log".