nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.34k stars 142 forks source link

GLFW Not Found #29

Closed jruebsam closed 3 years ago

jruebsam commented 3 years ago

I tried to build the binaries like described in the tutorial with cloning the repositories:

git clone https://github.com/nvpro-samples/shared_sources.git 
git clone https://github.com/nvpro-samples/shared_external.git 
git clone https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR.git

and build with

cd vk_raytracing_tutorial_KHR
mkdir build
cd build
cmake ..

The Cmake configuration looks fine for me (if necessary I can add it) However when cd'ing into build directory and building with make I always get the error:

make[2]: *** No rule to make target 'glfw-NOTFOUND', needed by '/home/.../code/nvray/build_all/bin_x64/Release/vk_ray_tracing__before_KHR.exe'.  Stop.

I'm not sure whats happening here, beside the GLFW lib/headers in shared_external, I also have a system wide install of libglfw3. System is Ubuntu 20.04. Not sure what I'm missing here, thank you for any suggestions...

jruebsam commented 3 years ago

I was able to fix this bevahior by replacing find_package(glfw3 3.3 QUIET) with

find_package(PkgConfig REQUIRED) 
pkg_search_module(GLFW REQUIRED glfw3) 

in shared_sources/cmake/setup.cmake, Im not sure if this is an issue with Ubuntu 20.04. At least glfw3 is not availble when grepping for it in cmake --help-module-list.

NBickford-NV commented 3 years ago

Hi Jonas! Glad you were able to work around this. We have an update coming up that changes this entire system that should solve this. For now, my best guess is that maybe a version of glfw's installed that's less than 3.3? The relevant setup code should be here, where we try to find GLFW and download and include it if it couldn't be found: https://github.com/nvpro-samples/shared_sources/blob/master/cmake/setup.cmake#L53

Thanks!

jruebsam commented 3 years ago

Hi Neil, Thank you. I think that's the issue, Ubuntu 20.04 has no support for glfw3.3 in the current apt packages. I will close this issues for now since you will change your build system anyway. Cheers