In the compiled document, I see that if you don’t use Vulkan test or example program then you can compile glfw without Vulkan SDK. I can compile it collectly. However, when I try to build a cross-platform OpenGL program with GLFW supporting, while Vulkan is not used, my cmake config goes into error: Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR).
All I find on google is that you need to install Vulkan SDK and set the link collectively. However, I don’t need Vulkan in my program, so I want to confirm whether I must install Vulkan SDK before I build a not Vulkan related program with the glfw source file.
The GLFW part of my CMakeLists.txt is below:
# config glfw
set( GLFW_BUILD_EXAMPLES OFF CACHE BOOL "GLFW lib only" )
set( GLFW_BUILD_TESTS OFF CACHE BOOL "GLFW lib only" )
set( GLFW_BUILD_DOCS OFF CACHE BOOL "GLFW lib only" )
set( GLFW_BUILD_INSTALL OFF CACHE BOOL "GLFW lib only" )
add_subdirectory(3rd_party/glfw)
include_directories(3rd_party/glfw/include)
LIST(APPEND LIBS glfw ${GLFW_LIBRARIES})
I’m new in Cmake, maybe I miss sth important? Thx in advance.