LibGfx: Use PkgConfig to find libdrm

On FreeBSD the libdrm headers are not in a standard location so this
makes the include more portable.
This commit is contained in:
Undefine 2025-09-12 15:58:05 +02:00 committed by Jelle Raaijmakers
parent abe536652f
commit bfa86f7961

View File

@ -173,4 +173,9 @@ endif()
if (HAS_VULKAN)
target_link_libraries(LibCore PUBLIC Vulkan::Vulkan Vulkan::Headers)
if ((LINUX AND NOT ANDROID) OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
pkg_check_modules(LibDRM REQUIRED libdrm)
target_include_directories(LibGfx PUBLIC ${LibDRM_INCLUDE_DIRS})
endif()
endif()