Non consistency of the config file name and the installation subdirectory
Hi,
When trying to use find_package(arpack-ng) as usual, I realized that you have recently changed (cf. #350) the name of the config file installed from arpack-ng-config.cmake to arpackng-config.cmake.
The problem is that the installation subdirectory for this file has not being updated consistently cf.
https://github.com/opencollab/arpack-ng/blob/master/CMakeLists.txt#L812 https://github.com/opencollab/arpack-ng/blob/master/CMakeLists.txt#L814
the DESTINATION should be updated to ${CMAKE_INSTALL_LIBDIR}/cmake/arpackng so that users can use find_package(arpackng) successfully.
Thanks
No problem: arpack-ng was the previous name, you just need to export env variables to point the correct dir.
When trying to use find_package(arpack-ng) as usual, I realized that you have recently changed
I had to. For this to work, the token you pass to find_package must match the cmake file name and the env variable name you must export (there can be no arpack-ng_DIR but arpackng_DIR works) https://github.com/opencollab/arpack-ng/blob/e7abe8b42bb941f1f0d6e1026c7d98c888393e04/cmake/tstCMakeInstall.sh.in#L24
Yes you can do this way but it's a pity to be limited to only one option over all possibilities of CMake. Say ${ARPACK_PREFIX} is the installation directory root, we cannot use -DCMAKE_PREFIX_PATH="${ARPACK_PREFIX}" or arpackng_ROOT=${ARPACK_PREFIX} as env. var. for instance.
Reading the documentation the <name>* used should be consistent with the <PackageName> or names given by NAMES.
I can also change the way I use find_package, for instance :
find_package(arpackng REQUIRED NAMES arpackng arpack-ng)
is working. But still it's a pity that is does not work by default with standard means of cmake. For me this call
find_package(arpackng REQUIRED)
should work directly with -DCMAKE_PREFIX_PATH="${ARPACK_PREFIX}".