pkg_get_variable (defined in FindPkgConfig.cmake) fails to honour CMAKE_PREFIX_PATH
PLplot links to libLASi. The libLASi package uses a pkg-config approach to publish information about that package so PLplot uses FindPkgConfig.cmake (all current tests are for CMake-3.13.4, if that makes any difference) to configure how it builds against libLASi. I had been testing a locally installed (in /home/software/lasi_svn/install) version of libLASi without issues using env ... CMAKE_PREFIX_PATH=...:/home/software/lasi_svn/install:...
However, just now I attempted to obtain an extra variable from that lasi.pc file using pkg_get_variable, and that failed to work with the above CMAKE_PREFIX_PATH. To work around that inconsistency with how CMAKE_PREFIX_PATH is honoured within FindPkgConfig.cmake, I replaced the above CMAKE_PREFIX_PATH approach with PKG_CONFIG_PATH=/home/software/lasi_svn/install/lib/pkgconfig, and all was well. So that is a reasonable workaround. Nevertheless, it "would be nice" if this inconsistency in how CMAKE_PREFIX_PATH is honoured within FindPkgConfig.cmake was fixed.