Skip to content

Commit

Permalink
build spirv-tools even for android (#1414)
Browse files Browse the repository at this point in the history
spirv-tools library is needed for clspv-reflection
  • Loading branch information
rjodinchr authored Nov 1, 2024
1 parent 781c86d commit 3849481
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,14 @@ if (NOT DEFINED SPIRV_TOOLS_SOURCE_DIR)
use_component(${SPIRV_TOOLS_SOURCE_DIR})
endif()

if (NOT ANDROID)
option(CLSPV_BUILD_SPIRV_DIS "Enable build of spirv-dis if the target does not exist" ON)
if (NOT TARGET spirv-dis AND CLSPV_BUILD_SPIRV_DIS)
# First tell SPIR-V Tools where to find SPIR-V Headers
set(SPIRV-Headers_SOURCE_DIR ${SPIRV_HEADERS_SOURCE_DIR})

# Bring in the SPIR-V Tools repository
add_subdirectory(${SPIRV_TOOLS_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/third_party/SPIRV-Tools EXCLUDE_FROM_ALL)
endif()
option(CLSPV_BUILD_SPIRV_DIS "Enable build of spirv-dis if the target does not exist" ON)
if (NOT TARGET spirv-dis AND CLSPV_BUILD_SPIRV_DIS)
# First tell SPIR-V Tools where to find SPIR-V Headers
set(SPIRV-Headers_SOURCE_DIR ${SPIRV_HEADERS_SOURCE_DIR})

# Bring in the SPIR-V Tools repository
add_subdirectory(${SPIRV_TOOLS_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/third_party/SPIRV-Tools EXCLUDE_FROM_ALL)
endif()

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down

0 comments on commit 3849481

Please sign in to comment.