krOoze / Hello_Triangle

Hello World like demo for Vulkan API

Home Page:http://vulkan.hys.cz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build on ubuntu

pemgithub opened this issue · comments

What environment variables do I set to build on Ubuntu?

$ cmake .
WSI: USE_PLATFORM_GLFW
Vulkan SDK path: /home/pem/vulkan/1.3.216.0
-- Using X11 for window creation
Vulkan include dir: VULKAN_INCLUDE-NOTFOUND
Vulkan libs: VULKAN_LIBRARY-NOTFOUND
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
VULKAN_INCLUDE
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
   used as include directory in directory /home/pem/pemcode/Hello_Triangle
VULKAN_LIBRARY
    linked by target "HelloTriangle" in directory /home/pem/pemcode/Hello_Triangle

CMake Error in CMakeLists.txt:
  Found relative path while evaluating include directories of
  "HelloTriangle":

    "VULKAN_INCLUDE-NOTFOUND"



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

$ echo $VULKAN_INCLUDE
/home/pem/vulkan/1.3.216.0/x86_64/include

$ ls $VULKAN_INCLUDE
dxc  glslang  robin_hood.h  shaderc  spirv  spirv_cross  SPIRV-Reflect  spirv-tools  vk_video  vma  volk  vulkan

edit I got progress when I did this:
export VULKAN_SDK=/home/pem/vulkan/1.3.216.0/x86_64

it is working now

Yes, I prefer to rely on VULKAN_SDK. The SDK documentation how to set up the environment properly is here: https://vulkan.lunarg.com/doc/view/1.3.216.0/linux/getting_started.html#user-content-set-up-the-runtime-environment