Skip to content

Commit bfa86f7

Browse files
cqundefinegmta
authored andcommitted
LibGfx: Use PkgConfig to find libdrm
On FreeBSD the libdrm headers are not in a standard location so this makes the include more portable.
1 parent abe5366 commit bfa86f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Libraries/LibGfx/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,9 @@ endif()
173173

174174
if (HAS_VULKAN)
175175
target_link_libraries(LibCore PUBLIC Vulkan::Vulkan Vulkan::Headers)
176+
177+
if ((LINUX AND NOT ANDROID) OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
178+
pkg_check_modules(LibDRM REQUIRED libdrm)
179+
target_include_directories(LibGfx PUBLIC ${LibDRM_INCLUDE_DIRS})
180+
endif()
176181
endif()

0 commit comments

Comments
 (0)