diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ec6a58..ff42bdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,8 +304,8 @@ elseif(WIN32) target_link_libraries(sokol D3dcompiler_47) endif() elseif(LINUX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") - target_link_libraries(sokol X11 GL m dl asound) + find_package (Threads) + target_link_libraries(sokol X11 GL m dl asound ${CMAKE_THREAD_LIBS_INIT}) endif() target_include_directories(sokol PRIVATE 3rd-party/sokol)