Fix non-wayland build.

This commit is contained in:
Bartosz Taudul 2024-03-16 18:13:02 +01:00
parent 970250fc85
commit 58115b35c5
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -134,7 +134,7 @@ set(PROFILER_FILES
set(INCLUDES "")
set(LIBS "")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY)
if(USE_WAYLAND)
pkg_check_modules(WAYLAND REQUIRED egl wayland-egl wayland-cursor xkbcommon)
set(INCLUDES "${INCLUDES};${WAYLAND_INCLUDE_DIRS}")
set(LIBS "${LIBS};${WAYLAND_LIBRARIES}")
@ -144,6 +144,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY)
src/wayland/xdg-decoration.c
src/wayland/xdg-shell.c
)
else()
set(PROFILER_FILES ${PROFILER_FILES}
src/BackendGlfw.cpp
src/imgui/imgui_impl_glfw.cpp
)
endif()
include_directories(${INCLUDES})