--- ../luxrender-luxrays-7459cd8a9583/samples/slglibdemo/CMakeLists.txt.orig
+++ ../luxrender-luxrays-7459cd8a9583/samples/slglibdemo/CMakeLists.txt
@@ -25,10 +25,12 @@
 #
 #############################################################################
 
+find_package(Threads)
+
 set(SLGLIBDEMO_SRCS
 	slglibdemo.cpp
 	)
 
 add_executable(slg4libdemo ${SLGLIBDEMO_SRCS})
 
-TARGET_LINK_LIBRARIES(slg4libdemo smallluxgpu luxrays)
+TARGET_LINK_LIBRARIES(slg4libdemo smallluxgpu luxrays ${CMAKE_THREAD_LIBS_INIT})
