dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #19202
Re: Default installation of .cmake files
On Thursday August 19 2010 15:08:43 Garth N. Wells wrote:
> On Thu, 2010-08-19 at 13:25 -0700, Johan Hake wrote:
> > Ok.
> >
> > It does not look like /usr/local/share/ufc is looked into. I get this
> > missleading error from dolfin cmake
> >
> > CMake Error at CMakeLists.txt:98 (find_package):
> > Could not find a configuration file for package UFC.dolfin.
>
> Oh, you need to change that line. It should be
>
> find_package(UFC REQUIRED)
>
> This will pick up the system-wide installation. The line
>
> find_package(UFC.dolfin REQUIRED)
Ahh... I guess I learned some cmake today!
Now it actually finds ufc. Even if this is nice, I think it would be even
nicer if one could tell cmake to look in another place too. I never install
stuff at /usr/local, but rather $HOME/local.
Johan
> looks for the home-baked local file (dolfin/cmake/FindUFC.dolfin.cmake).
> The home-backed file calls pkg-config. We'll remove this soon.
>
> Garth
>
> > Set UFC.dolfin_DIR to the directory containing a CMake configuration
> > file
> >
> > for UFC.dolfin. The file will have one of the following names:
> > UFC.dolfinConfig.cmake
> > ufc.dolfin-config.cmake
> >
> > It is not possible to set environment variables with '.' in them...
> >
> > Johan
> >
> > On Thursday August 19 2010 13:13:35 Garth N. Wells wrote:
> > > On Thu, 2010-08-19 at 13:05 -0700, Johan Hake wrote:
> > > > I found out that the ufc-config.cmake are installed in
> > > >
> > > > prefix/share/ufc
> > > >
> > > > This is kindoff hard wired. When I removed the ufc-1.pc, DOLFIN cmake
> > > > cannot find ufc.
> > > >
> > > > With pkg-config we just put the file in a directory and included that
> > > > in PKG_CONFIG_PATH. Is there a similare directory or PATH we can add
> > > > for CMAKE, and hence put all .cmake files there?
> > > >
> > > > I know trilinos puts it in its prefix/include, so there might not be
> > > > a clear answer to this, I guess.
> > >
> > > I dug around a bit on the CMake search paths, but didn't reach any firm
> > > conclusion. I stumbled across
> > >
> > > prefix/share/ufc
> > >
> > > by accident. If you see UFC_DIR=prefix, then CMake will (I think) find
> > > the config file in prefix/share/ufc. I'm not sure what happens if it's
> > > in /usr/local/share/ufc. Can you try it out on your machine?
> > >
> > > Trilinos uses include, others use lib. 'share' seems a better place to
> > > me, especially if CMake searches there.
> > >
> > > Garth
> > >
> > > > Johan
> > > >
> > > > _______________________________________________
> > > > Mailing list: https://launchpad.net/~dolfin
> > > > Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> > > > Unsubscribe : https://launchpad.net/~dolfin
> > > > More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References