Fix pkgconfig includedirs

E.g. linux minizip can be located in /usr/include/minizip, which
requires adding the extra includedir from pkgconfig.

If pkgconfig defines an includedir for a module, it should be included.
This commit is contained in:
Jeremy Newton 2024-07-09 17:06:07 -04:00
parent b92e354389
commit aea92651c7
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
message(STATUS "Using system ${library}")
dolphin_alias_library(${alias} PkgConfig::${library})
set(${library}_TYPE "System" PARENT_SCOPE)
if(${${alias}_INCLUDEDIR})
include_directories("${${alias}_INCLUDEDIR}")
endif()
else()
dolphin_add_bundled_library(${library} ${bundled_path})
set(${library}_TYPE "Bundled" PARENT_SCOPE)