this fixes a bug when including a package via pkg-config:

We will append the call to the config file to find the package
via find_package. However this does not work when the package was included
with pkg-config
This commit is contained in:
Mathis Logemann 2021-07-21 20:08:22 +02:00
parent 282986c503
commit 199fd8218b

View file

@ -16,10 +16,14 @@ endmacro()
macro(mapnik_find_package)
find_package(${ARGN})
set(MAPNIK_TMP_DEP ${ARGN})
list(JOIN MAPNIK_TMP_DEP " " MAPNIK_TMP_DEP)
list(APPEND MAPNIK_DEPENDENCIES "find_dependency(${MAPNIK_TMP_DEP})")
mapnik_print_version(${ARGV0})
if(${ARGV0}_FOUND)
set(MAPNIK_TMP_DEP ${ARGN})
list(JOIN MAPNIK_TMP_DEP " " MAPNIK_TMP_DEP)
list(APPEND MAPNIK_DEPENDENCIES "find_dependency(${MAPNIK_TMP_DEP})")
mapnik_print_version(${ARGV0})
else()
message(STATUS "not found: ${ARGV0}")
endif()
endmacro()
macro(mapnik_find_threads)