mirror of
https://github.com/KhronosGroup/Vulkan-Headers.git
synced 2025-04-12 23:42:56 +00:00
Build: Change VULKAN SC CMake option to be consistent with other options
- use -DVULKANSC=ON instead of -DVulkanSC=TRUE
This commit is contained in:
parent
39a669f332
commit
d42c8a3979
2 changed files with 9 additions and 8 deletions
4
BUILD.md
4
BUILD.md
|
@ -277,12 +277,12 @@ The instructions for building this repository on MacOS are similar to those for
|
|||
## Building Vulkan SC
|
||||
|
||||
To build Vulkan SC instead of Vulkan (required for `sc_main` and derived branches)
|
||||
set the `VulkanSC` CMake variable to `TRUE`.
|
||||
set the `VULKANSC` CMake variable to `ON`.
|
||||
|
||||
For example:
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install -DVulkanSC=TRUE ..
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install -DVULKANSC=ON ..
|
||||
make install
|
||||
|
|
|
@ -24,11 +24,12 @@ cmake_minimum_required(VERSION 3.10.2)
|
|||
project(Vulkan-Headers NONE)
|
||||
|
||||
|
||||
# Add support for VulkanSC mode from the command line
|
||||
set(VulkanSC FALSE CACHE BOOL "User defined variable for VulkanSC mode to be passed in through cmake command line e.g. -DVulkanSC=TRUE")
|
||||
# Add preprocessor definition for VulkanSC.
|
||||
# This "VulkanSC" definition can be used to deactivate code that is not required for the VulkanSC builds.
|
||||
if(VulkanSC)
|
||||
# Add support for VULKANSC mode from the command line
|
||||
set(VULKANSC OFF CACHE BOOL "User defined variable for VULKANSC mode to be passed in through cmake command line e.g. -DVULKANSC=ON")
|
||||
|
||||
# Add preprocessor definition for Vulkan SC.
|
||||
# This "VULKANSC" definition can be used to deactivate the loader code that is not required for the VULKANSC builds.
|
||||
if(VULKANSC)
|
||||
add_definitions(-DVULKANSC)
|
||||
endif()
|
||||
|
||||
|
@ -56,7 +57,7 @@ target_include_directories(Vulkan-Registry INTERFACE "${CMAKE_CURRENT_SOURCE_DIR
|
|||
add_library(Vulkan::Registry ALIAS Vulkan-Registry)
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
if(NOT VulkanSC)
|
||||
if(NOT VULKANSC)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vk_video" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan)
|
||||
|
|
Loading…
Add table
Reference in a new issue