CMake: allow both SPIRV-Headers and spirv-headers

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1057
This commit is contained in:
Lei Zhang 2017-12-05 10:55:00 -05:00
parent 94e3e7b8ef
commit b93c066b0b
2 changed files with 6 additions and 2 deletions

View File

@ -17,7 +17,11 @@ 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)
if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Headers)
set(SPIRV_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Headers)
else()
set(SPIRV_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers)
endif()
endif()
if (IS_DIRECTORY ${SPIRV_HEADER_DIR})

View File

@ -23,7 +23,7 @@ if (NOT "${SPIRV_SKIP_TESTS}")
if (TARGET gmock_main)
message(STATUS "Found Google Mock, building tests.")
else()
message(STATUS "Did not find googletest, tests will not be built."
message(STATUS "Did not find googletest, tests will not be built. "
"To enable tests place googletest in '<spirv-dir>/external/googletest'.")
endif()
endif()