Closed hazelnusse closed 3 years ago
The test option USE_INSTALLED_VERSION
is meant to check a local installation, found using find_package(Greeter)
, of the main library (named Greeter in this case). If you haven't installed the library before (e.g. through cmake -S. -Bbuild && cmake --build build --target install
), this error is expected.
Usually this test should be run on CI level to check if installing the package is possible.
@hazelnusse does this explain your problem or did I misunderstand the issue?
@hazelnusse Thank you for the explanation, it makes sense now. I was able to install to a local dir via -DCMAKE_INSTALL_PREFIX
and then at the configure step for the test directory, specify that path via CMAKE_PREFIX_PATH
and it found the installed version as desired.
I'm not sure whether this is expected or not, but I figured I would report here just to clarify.
In contrast, the following does work as expected (I think):