Skip to content

Commit

Permalink
FindPoppler.cmake: add POPPLER_EXTRA_LIBRARIES (e.g. for gisinternals…
Browse files Browse the repository at this point in the history
… to add linking to freetype)
  • Loading branch information
rouault committed Jul 9, 2022
1 parent 63eca88 commit 95ee1f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/modules/packages/FindPoppler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,19 @@ if(Poppler_FOUND)
set(Poppler_LIBRARIES ${Poppler_LIBRARY})
if(NOT TARGET Poppler::Poppler)
add_library(Poppler::Poppler UNKNOWN IMPORTED)
set(POPPLER_EXTRA_TARGETS)
foreach(_lib IN LISTS POPPLER_EXTRA_LIBRARIES)
add_library(Poppler::Poppler_${INCR} UNKNOWN IMPORTED)
set_target_properties(Poppler::Poppler_${INCR} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${_lib}")
list(APPEND POPPLER_EXTRA_TARGETS Poppler::Poppler_${INCR})
math(EXPR INCR "${INCR}+1")
endforeach()
set_target_properties(Poppler::Poppler PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${Poppler_INCLUDE_DIR}
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
INTERFACE_LINK_LIBRARIES "${POPPLER_EXTRA_TARGETS}"
IMPORTED_LOCATION "${Poppler_LIBRARY}")
foreach(tgt IN LISTS Poppler_known_components)
add_library(Poppler::${tgt} UNKNOWN IMPORTED)
Expand Down

0 comments on commit 95ee1f8

Please sign in to comment.