From 38494814dac9cc7f0ffe9bbcec2bd727a9920c41 Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Fri, 1 Nov 2024 15:49:39 +0100 Subject: [PATCH] build spirv-tools even for android (#1414) spirv-tools library is needed for clspv-reflection --- CMakeLists.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cda2a8a5b..c0722c7d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)