Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  10 Aug 2020, Mathieu Guigue, Info, MidasConfig.cmake usage 
    Reply  28 May 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
       Reply  28 May 2021, Marius Koeppel, Info, MidasConfig.cmake usage 
          Reply  28 May 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
             Reply  31 May 2021, Stefan Ritt, Info, MidasConfig.cmake usage 
                Reply  02 Jun 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
                   Reply  04 Jun 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
                      Reply  04 Jun 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
                      Reply  20 Jun 2021, Lukas Gerritzen, Suggestion, MidasConfig.cmake usage 
                         Reply  20 Jun 2021, Konstantin Olchanski, Suggestion, MidasConfig.cmake usage 
                            Reply  22 Jun 2021, Lukas Gerritzen, Suggestion, MidasConfig.cmake usage 
                               Reply  24 Jun 2021, Konstantin Olchanski, Suggestion, MidasConfig.cmake usage 
                                  Reply  11 Jul 2021, Konstantin Olchanski, Suggestion, MidasConfig.cmake usage 
    Reply  13 Jul 2021, Stefan Ritt, Info, MidasConfig.cmake usage 
       Reply  13 Jul 2021, Konstantin Olchanski, Info, MidasConfig.cmake usage 
Message ID: 2185     Entry time: 28 May 2021     In reply to: 1974     Reply to this: 2186
Author: Konstantin Olchanski 
Topic: Info 
Subject: MidasConfig.cmake usage 
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.
ELOG V3.1.4-2e1708b5