google / liquidfun

2D physics engine for games
http://google.github.io/liquidfun
4.73k stars 638 forks source link

error when running cmake: threads #92

Open galenwilkerson opened 6 years ago

galenwilkerson commented 6 years ago

Hi, great that this exists and thanks for the work!

Trying to install on ubuntu following these instructions: http://google.github.io/liquidfun/Building/html/md__building_linux.html

$ uname -a
Linux fibonacci 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

when I get to this step, get this output:

$ cmake -G'Unix Makefiles'

CMake Error at CMakeLists.txt:165 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  Threads::Threads

-- Configuring incomplete, errors occurred!
See also "/home/galen/Downloads/liquidfun-master/liquidfun/Box2D/CMakeFiles/CMakeOutput.log".
See also "/home/galen/Downloads/liquidfun-master/liquidfun/Box2D/CMakeFiles/CMakeError.log".

Files also attached. Thanks in advance for any help.

CMakeError.log CMakeOutput.log

csiki commented 5 years ago

just add find_package(Threads) to your CMakeLists.txt file, at least that worked for me on Ubuntu 18.04