Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2016-04-14 21:05:53 +0300
committerDavid Neto <dneto@google.com>2016-06-10 15:48:37 +0300
commit10dba9178197c96074bcae7d747761c45e5ab9cc (patch)
treec6ca537288377c9bf946dcbfd1808d1fdfa452cc /external
parent6fff41a6db27c42f7811229f1fd252f017548f68 (diff)
Use SPIR-V headers from the KhronosGroup/SPIRV-Headers repo.
Diffstat (limited to 'external')
-rw-r--r--external/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 39259d346..5c3f4866f 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -24,6 +24,20 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+if (DEFINED SPIRV-Headers_SOURCE_DIR)
+ # This allows flexible position of the SPIRV-Headers repo.
+ set(SPIRV_HEADER_DIR ${SPIRV-Headers_SOURCE_DIR})
+else()
+ set(SPIRV_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers)
+endif()
+
+if (IS_DIRECTORY ${SPIRV_HEADER_DIR})
+ set(SPIRV_HEADER_INCLUDE_DIR ${SPIRV_HEADER_DIR}/include PARENT_SCOPE)
+else()
+ message(FATAL_ERROR
+ "SPIRV-Headers was not found - please checkout a copy under external/.")
+endif()
+
if (NOT ${SPIRV_SKIP_EXECUTABLES})
# Find gmock if we can. If it's not already configured, then try finding
# it in external/googletest.