mayingzhen / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

Build Fails without adding pthread to linker flags #149

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am attaching the patch

What version of the product are you using? On what operating system?
2.0.8-1, Fedora 14 i686

Original issue reported on code.google.com by hicham.h...@gmail.com on 29 Nov 2010 at 1:51

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the heads up! It's strange that this work fine on most other 
distributions. 

The right thing to do would be to add ${CMAKE_THREAD_LIBS_INIT} to the list of 
libraries, since the name of the thread library may be different depending on 
the platform and I'm not using pthreads directly (it must be a dependency of 
another library that I'm linking against).

The easiest way of doing that is probably adding this line:

SET(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})

somewhere after FIND_PACKAGE(Threads). Can you confirm whether that works for 
you?

Original comment by cast...@gmail.com on 29 Nov 2010 at 7:06

GoogleCodeExporter commented 8 years ago
yes, the following patch works also

Original comment by hicham.h...@gmail.com on 29 Nov 2010 at 8:39

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1211.

Original comment by cast...@gmail.com on 30 Nov 2010 at 8:30

GoogleCodeExporter commented 8 years ago
Thanks for testing that! I've committed your changes.

Original comment by cast...@gmail.com on 30 Nov 2010 at 8:30