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: 2192     Entry time: 02 Jun 2021     In reply to: 2190     Reply to this: 2205
Author: Konstantin Olchanski 
Topic: Info 
Subject: MidasConfig.cmake usage 
> MidasConfig.cmake might at some point get included in the standard Cmake installation (or some add-on). It will then reside in the Cmake system path 
> and you don't have to explicitly know where this is. Just the find_package(Midas) will then be enough.

Hi, Stefan, can you say more about this? If MidasConfig.cmake is part of the cmake distribution,
(did I understand you right here?) and is installed into a system-wide directory,
how can it know to use midas from /home/agmini/packages/midas or from /home/olchansk/git/midas?

Certainly we do not do system wide install of midas (into /usr/local/bin or whatever) because
typically different experiments running on the same computer use different versions of midas.

For ROOT, it looks as if for find_package(ROOT) to work, one has to add $ROOTSYS to the Cmake package
search path. This is what we do in our cmake build.

As for find_package() vs install(EXPORT), we may have the same situation as with my "make cmake",
where my one line solution is no good for people who prefer to type 3 lines of commands.

Specifically, the install(EXPORT) method defines the "midas" target which brings with it
all it's dependent include paths, libraries and compile flags. So to link midas you need
two lines:

include(.../midas/lib/midas-targets.cmake)
target_link_libraries(myexe midas)
target_link_libraries(myfrontend mfe)

whereas find_package() defines a bunch of variables (the best I can tell) and one has
to add them to the include paths and library paths and compile flags "by hand".

I do not know how find_package() handles the separate libmidas, libmfe and librmana. (and
the separate libmanalyzer and libmanalyzer_main).

K.O.
ELOG V3.1.4-2e1708b5