nvpro-samples / vk_raytrace

Ray tracing glTF scene with Vulkan
Apache License 2.0
567 stars 35 forks source link

CMakeLists.txt Target Link Libraries Incomplete #5

Closed chrisdonlan closed 3 years ago

chrisdonlan commented 3 years ago

The issue was: both libdl and pthreads were missing. I am not sure what the optimal route would be in the context of the overall tutorial/example system. But, I got things working with the following change in CMakeLists.txt circa line 151 (the Linkage section):

From:

 #####################################################################################
# Linkage
#
target_link_libraries(${PROJNAME} ${PLATFORM_LIBRARIES} shared_sources)

To:

#####################################################################################
# Linkage
#
find_package(Threads REQUIRED)
set(PROJECT_LIBRARIES ${CMAKE_DL_LIBS} -lpthread)
target_link_libraries(${PROJNAME} ${PLATFORM_LIBRARIES}  ${PROJECT_LIBRARIES} shared_sources)
mklefrancois commented 3 years ago

We have done a big re-factor for Linux and hopefully the error you had is now resolved. Please feel free to re-open if there is still an issue.