Fix linux build

On (arch) linux, compilation would not complete due to the following error:
```/usr/bin/ld: CMakeFiles/lovr.dir/src/lib/tinycthread/tinycthread.c.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status```

Adding `-lpthread` to the linker flags fixes this
This commit is contained in:
Bryan 2018-03-02 17:37:41 -07:00 committed by GitHub
parent 66836b4d3a
commit 9f2a9c67a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ elseif(WIN32)
else()
pkg_search_module(ODE REQUIRED ode)
include_directories(${ODE_INCLUDE_DIRS})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++ -lpthread")
set(LOVR_ODE ode)
endif()