How does "find_package (Midas REQUIRED)" find the location of MIDAS?
The best I can tell from the current code, the package config files are installed
inside $MIDASSYS somewhere and I see "find_package MIDAS" never find them (indeed,
find_package() does not know about $MIDASSYS, so it has to use telepathy or something).
Does anybody actually use "find_package(midas)", does it actually work for anybody?
Also it appears that "the cmake way" of importing packages is to use
the install(EXPORT) method.
In this scheme, the user package does this:
include(${MIDASSYS}/lib/midas-targets.cmake)
target_link_libraries(myprogram PUBLIC midas)
this causes all the midas include directories (including mxml, etc)
and dependancy libraries (-lutil, -lpthread, etc) to be automatically
added to "myprogram" compilation and linking.
of course MIDAS has to generate a sensible targets export file,
working on it now.
K.O. |