瀏覽代碼

Examples: GLFW+Vulkan: make GLFW_DIR overridable in cmake bit. (#8419)

ocornut 7 月之前
父節點
當前提交
1e18a6cf60
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      examples/example_glfw_vulkan/CMakeLists.txt

+ 3 - 1
examples/example_glfw_vulkan/CMakeLists.txt

@@ -15,7 +15,9 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES")
 
 
 # GLFW
 # GLFW
-set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo
+if(NOT GLFW_DIR)
+   set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo
+endif()
 option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
 option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
 option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
 option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
 option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
 option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)