From c5ac1413f0108d111160711b00eec61c81c5e293 Mon Sep 17 00:00:00 2001 From: Daniel Rakos Date: Tue, 18 Jul 2023 16:18:46 +0200 Subject: build: Add API_TYPE variable --- CMakeLists.txt | 6 ++++-- scripts/CMakeLists.txt | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31edbb24..6525f513 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,10 @@ cmake_minimum_required(VERSION 3.17.2) project(Vulkan-Tools) +# This variable enables downstream users to customize the target API +# variant (e.g. Vulkan SC) +set(API_TYPE "vulkan") + add_subdirectory(scripts) # User-interface declarations ---------------------------------------------------------------------------------------------------- @@ -34,8 +38,6 @@ option(BUILD_ICD "Build icd" ON) # Require the user to ask that it be installed if they really want it. option(INSTALL_ICD "Install icd" OFF) -set(API_TYPE "vulkan") - if (UNIX AND NOT APPLE) # i.e. Linux option(ENABLE_ADDRESS_SANITIZER "Use addres sanitization" OFF) endif() diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index ad467ae0..3038d6e6 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -40,6 +40,8 @@ if (UPDATE_DEPS) endif() list(APPEND update_dep_command "--config") list(APPEND update_dep_command "${_build_type}") + list(APPEND update_dep_command "--api") + list(APPEND update_dep_command "${API_TYPE}") set(UPDATE_DEPS_DIR_SUFFIX "${_build_type}") if (ANDROID) -- cgit v1.2.3