Re: [fltk/fltk] CMake: Use imported targets for PkgConfig packages (PR #954)
Jordan Williams
Apr 21, 2024
I'm not sure if I understand what you mean with this statement. It's clear that we can't simply export an imported target like PkgConfig::* (I tried that in a "naïve" first test just to be sure). I could try to create a separate INTERFACE library with all the PkgConfig::* details (either targets or explicit link libraries and include directories) instead of collecting them in variables like OPTIONAL_LIBS.
I'd need to look into it more to find how other projects accomplish this, but I'd guess that they incorporate the necessary find_package / pkg_check_modules calls in the CMake config to make the imported targets available. I think this would end up being more portable than using hard-coded paths or assuming everything can be found in system include and library directories.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/pull/954/c2068072202@github.com>
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.