[Poppler-bugs] [Bug 77947] [PATCH] Libs.private in pkgconfig files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 5 11:11:11 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=77947

--- Comment #6 from Sandro Mani <manisandro at gmail.com> ---
So the only other nice option I saw was to read what was passed to
target_link_libraries, do some regex magic and use that in the pc files.
However, looks like there is no way to read the target_link_libraries a
posteriori.... 

So I suppose what one could do is introduce a variable containing what is
passed to target_link_libraries and then filter that to use in the pc files.
Along the lines of i.e.:

set(POPPLER_GLIB_LIBRARIES ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES}
${FREETYPE_LIBRARIES} -lpthread)

target_link_libraries(poppler-glib poppler ${POPPLER_GLIB_LIBRARIES})

string(REGEX REPLACE <stuff> <stuff> POPPLER_GLIB_LIBRARIES_CLEANED
${POPPLER_GLIB_LIBRARIES})

# In the .pc
Libs.private=@POPPLER_GLIB_LIBRARIES_CLEANED@

Perhaps adding a comment above the target_link_libraries notifying the
developer to add varabiles to POPPLER_XXX_LIBRARIES variable instead of
directly to the target_link_libraries.

Sounds like a plan?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150105/3e105c7b/attachment.html>


More information about the Poppler-bugs mailing list