aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJuan Ramos <[email protected]>2023-01-11 14:48:32 -0700
committerJuan Ramos <[email protected]>2023-01-11 14:49:54 -0700
commit50f8b24b8530ed9eec00367d7b19af777ae1f6c0 (patch)
tree9b37cc0757488ed8ec9461d0164051ae82e61512
parent7ecb09e4109a3408186f6cde2237f4742f811dc0 (diff)
downloadVulkan-Headers-50f8b24b8530ed9eec00367d7b19af777ae1f6c0.tar.gz
Vulkan-Headers-50f8b24b8530ed9eec00367d7b19af777ae1f6c0.zip
cmake: Cleanup vlk_get_header_version function
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e439358..ceb793b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,19 +25,19 @@ function(vlk_get_header_version)
file(READ ${vulkan_core_header_file} ver)
if (ver MATCHES "#define[ ]+VK_HEADER_VERSION_COMPLETE[ ]+VK_MAKE_API_VERSION\\([ ]*[0-9]+,[ ]*([0-9]+),[ ]*([0-9]+),[ ]*VK_HEADER_VERSION[ ]*\\)")
- set(VK_VERSION_MAJOR "${CMAKE_MATCH_1}")
- set(VK_VERSION_MINOR "${CMAKE_MATCH_2}")
+ set(MAJOR_VERSION "${CMAKE_MATCH_1}")
+ set(MINOR_VERSION "${CMAKE_MATCH_2}")
else()
message(FATAL_ERROR "Couldn't get major/minor version")
endif()
if (ver MATCHES "#define[ ]+VK_HEADER_VERSION[ ]+([0-9]+)")
- set(VK_PATCH_VERSION "${CMAKE_MATCH_1}")
+ set(PATCH_VERSION "${CMAKE_MATCH_1}")
else()
message(FATAL_ERROR "Couldn't get the patch version")
endif()
- set(VK_VERSION_STRING "${VK_VERSION_MAJOR}.${VK_VERSION_MINOR}.${VK_PATCH_VERSION}" PARENT_SCOPE)
+ set(VK_VERSION_STRING "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}" PARENT_SCOPE)
endfunction()
vlk_get_header_version()