Skip to content

Commit 0ceb990

Browse files
committed
build fix
1 parent f87e2f6 commit 0ceb990

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/sokol.cmake

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
if(BUILD_SOKOL)
66

7-
add_subdirectory(${THIRDPARTY_DIR}/glfw)
7+
if(NOT EMSCRIPTEN)
8+
set(GLFW_BUILD_WAYLAND OFF)
9+
add_subdirectory(${THIRDPARTY_DIR}/glfw)
10+
endif()
811

912
set(SOKOL_LIB_SRC ${CMAKE_SOURCE_DIR}/src/system/sokol/sokol.c)
1013

@@ -31,10 +34,11 @@ if(APPLE)
3134
"-framework MetalKit"
3235
"-framework AudioToolbox"
3336
"-framework GameController"
37+
glfw
3438
)
3539

3640
elseif(LINUX)
37-
target_link_libraries(sokol PRIVATE X11 GL Xi Xcursor m dl asound)
41+
target_link_libraries(sokol PRIVATE X11 GL Xi Xcursor m dl asound glfw)
3842
elseif(WIN32)
3943
target_link_libraries(sokol PRIVATE D3D11 glfw)
4044
endif()

0 commit comments

Comments
 (0)