Skip to content

Commit ffcab13

Browse files
authored
Merge pull request #904 from helaslo/fix-wayland-include-path
Fix imgui not building on distros which don't have wayland headers on the default include path on Linux
2 parents 1a4c081 + 2be1685 commit ffcab13

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ endif()
163163
# We still use gtk on Linux for the file browser dialog in "native" mode)
164164
if(LINUX)
165165
pkg_check_modules(GTK QUIET IMPORTED_TARGET REQUIRED gtk+-3.0)
166+
pkg_search_module(WAYLAND_CLIENT wayland-client IMPORTED_TARGET GLOBAL REQUIRED)
166167
endif()
167168

168169
#WORKAROUND Fedora 38 does not include Threads from the glslang .cmake file, fixed in Fedora 39+

src/ngscopeclient/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ target_include_directories(ngscopeclient
196196
#Linker settings
197197
if(LINUX)
198198
set(PLATFORM_LIBS X11)
199+
if(${WAYLAND_CLIENT_FOUND})
200+
list(APPEND PLATFORM_LIBS ${WAYLAND_CLIENT_MODULE_NAME})
201+
target_include_directories(ngscopeclient SYSTEM PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS})
202+
endif ()
199203
else()
200204
set(PLATFORM_LIBS "")
201205
endif()

0 commit comments

Comments
 (0)