Skip to content

Commit 73e2fba

Browse files
committed
Fix linux build
1 parent 6661b5b commit 73e2fba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/xrAnimation/tools/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ else()
2828
message(WARNING "Install Vulkan SDK or run: sudo apt-get install libvulkan-dev vulkan-tools glslang-tools")
2929
endif()
3030

31+
# Find X11 libraries (required for GLFW on Linux)
32+
if(UNIX AND NOT APPLE)
33+
find_package(X11 REQUIRED)
34+
if(X11_FOUND)
35+
message(STATUS "X11 found: ${X11_LIBRARIES}")
36+
endif()
37+
endif()
38+
3139
# Shader compilation function
3240
function(add_shader TARGET SHADER)
3341
if(NOT GLSLC)
@@ -145,6 +153,14 @@ if(_ozz_animation_viewer_supported AND Vulkan_FOUND)
145153
Vulkan::Vulkan
146154
)
147155

156+
# Link X11 libraries on Linux
157+
if(UNIX AND NOT APPLE AND X11_FOUND)
158+
target_link_libraries(ozz_animation_viewer
159+
PRIVATE
160+
${X11_LIBRARIES}
161+
)
162+
endif()
163+
148164
target_include_directories(ozz_animation_viewer
149165
PRIVATE
150166
${CMAKE_CURRENT_SOURCE_DIR}/renderer

0 commit comments

Comments
 (0)