浏览代码

Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.

You may need to install python 3.x and also
[windows users] may need to get it in your path in front of python 2.7.x.

If you don't need the external projects (i.e., SPIRV-Tools) and don't want
to upgrade to python 3, don't create the External subdirectory and CMake
won't require python 3.  (CMake has a bug that makes it find the wrong one
on a first pass if the top level does not require the version needed by
lower levels.)
John Kessenich 6 年之前
父节点
当前提交
6fef1ca6f9
共有 5 个文件被更改,包括 11 次插入4 次删除
  1. 1 0
      .appveyor.yml
  2. 6 0
      CMakeLists.txt
  3. 1 1
      README.md
  4. 1 1
      glslang/Include/revision.h
  5. 2 2
      known_good.json

+ 1 - 0
.appveyor.yml

@@ -32,6 +32,7 @@ matrix:
 # scripts that run after cloning repository
 install:
   - C:/Python27/python.exe update_glslang_sources.py
+  - set PATH=C:\ninja;C:\Python36;%PATH%
   - git clone https://github.com/google/googletest.git External/googletest
   - cd External/googletest
   - git checkout 440527a61e1c91188195f7de212c63c77e8f0a45

+ 6 - 0
CMakeLists.txt

@@ -114,6 +114,12 @@ function(glslang_set_link_args TARGET)
     endif()
 endfunction(glslang_set_link_args)
 
+# CMake needs to find the right version of python, right from the beginning,
+# otherwise, it will find the wrong version and fail later
+if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
+    find_package(PythonInterp 3 REQUIRED)
+endif()
+
 # We depend on these for later projects, so they should come first.
 add_subdirectory(External)
 

+ 1 - 1
README.md

@@ -61,7 +61,7 @@ branch.
   (For MSVS: 2015 is recommended, 2013 is fully supported/tested, and 2010 support is attempted, but not tested.)
 * [CMake][cmake]: for generating compilation targets.
 * make: _Linux_, ninja is an alternative, if configured.
-* [Python 2.7][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools.)
+* [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.)
 * [bison][bison]: _optional_, but needed when changing the grammar (glslang.y).
 * [googletest][googletest]: _optional_, but should use if making any changes to glslang.
 

+ 1 - 1
glslang/Include/revision.h

@@ -1,3 +1,3 @@
 // This header is generated by the make-revision script.
 
-#define GLSLANG_PATCH_LEVEL 3214
+#define GLSLANG_PATCH_LEVEL 3216

+ 2 - 2
known_good.json

@@ -5,14 +5,14 @@
       "site" : "github",
       "subrepo" : "KhronosGroup/SPIRV-Tools",
       "subdir" : "External/spirv-tools",
-      "commit" : "26c1b8878315a7a5c188df45e0bc236bb222b698"
+      "commit" : "89fe836fe22c3e5c2a062ebeade012e2c2f0839b"
     },
     {
       "name" : "spirv-tools/external/spirv-headers",
       "site" : "github",
       "subrepo" : "KhronosGroup/SPIRV-Headers",
       "subdir" : "External/spirv-tools/external/spirv-headers",
-      "commit" : "2434b89345a50c018c84f42a310b0fad4f3fd94f"
+      "commit" : "c4f8f65792d4bf2657ca751904c511bbcf2ac77b"
     }
   ]
 }