Am Montag, 22. Dezember 2014, 18:55:16 schrieb Daniele E. Domenichelli:
> Hello Eike,
> 
> On 22/12/14 16:39, Rolf Eike Beer wrote:
> > What I would like to get is the following: when a list of libraries and
> > directories is returned by PkgConfig then for every of these libraries the
> > absolute path to the library is determined using find_library() using the
> > given directories as hints.
> > [...]
> > Since this would introduce new behavior people would need to adapt
> > their CMakeLists.txt to this new feature. Therefore I think it would be a
> > good idea to expose this new information not by new variables, but using
> > targets.
> We have a macro to do exactly this and a few other things (actually 2
> macros, that diverged slightly I will make them one again as soon I as I
> have some time), you can find them here:
> 
> 
https://github.com/robotology/yarp/blob/master/conf/MacroStandardFindModule.cmake
> 
https://github.com/robotology/ycm/blob/master/modules/StandardFindModule.cmake

[...]

> > So if I search for OpenSSL using PkgConfig I would get a target
> > PkgConfig::OpenSSL that I can link to, and that has the libraries, compile
> > flags, include dirs and whatnot.
> > 
> > Sadly, I don't quite understand all the macros in FindPkgConfig.cmake. Can
> > you either point me to the right place where I would hook up something
> > like that or try doing it?
> 
> You can start from the macros I linked before for the pkg-config part, and
> then have a look at the CMake modules that create imported targets
> (FindQt4, FindGTK2, FindZLIB, FindGLUT, FindGLEW) for the targets part
> (all the variables you need should be there already).
> Let me know if you do it, I'd like to do it too one day...

The imported targets was not the thing worrying me, although my experience 
with this is a bit limited at the moment.

> About the FindPkgConfig macros documentation, what is that is not clear?

It's not about the documentation of that module, but where I need to hack it 
into the module. The code is quite a bit of indirections, I guess I would need 
to do this _pkg_check_modules_internal at the end of the last foreach?

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to