Updates cmake project version to 1.2 (#637)
Currently the CMake project version is set to 1.1 but the develop branch is starting to release 1.2. Changing project version to 1.2 and updating cmake to detect this error and cause a build break
This commit is contained in:
Родитель
d216ae05de
Коммит
e8f00af3c1
|
@ -21,7 +21,7 @@ if (NOT CMAKE_PROJECT_NAME)
|
|||
endif()
|
||||
|
||||
project(K4A LANGUAGES C CXX
|
||||
VERSION 1.1)
|
||||
VERSION 1.2)
|
||||
|
||||
option(K4A_BUILD_DOCS "Build K4A doxygen documentation" OFF)
|
||||
option(K4A_MTE_VERSION "Skip FW version check" OFF)
|
||||
|
|
|
@ -22,6 +22,16 @@ if (NOT VERSION_MATCH)
|
|||
message(FATAL_ERROR "Contents of VERSION_STR ('${VERSION_STR}') are not a valid version")
|
||||
endif()
|
||||
|
||||
if (NOT ("${CMAKE_MATCH_1}" STREQUAL "${PROJECT_VERSION_MAJOR}"))
|
||||
# You can update cmake project version in the project() command in the root CMakeLists.txt
|
||||
message(FATAL "CMake Project Major Version \"${PROJECT_VERSION_MAJOR}\" did not match VERSION_STR major version \"${CMAKE_MATCH_1}\"")
|
||||
endif()
|
||||
|
||||
if (NOT ("${CMAKE_MATCH_2}" STREQUAL "${PROJECT_VERSION_MINOR}"))
|
||||
# You can update cmake project version in the project() command in the root CMakeLists.txt
|
||||
message(FATAL "CMake Project Minor Version \"${PROJECT_VERSION_MINOR}\" did not match VERSION_STR minor version \"${CMAKE_MATCH_2}\"")
|
||||
endif()
|
||||
|
||||
set(K4A_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(K4A_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(K4A_VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
|
@ -33,6 +43,7 @@ if (NOT K4A_VERSION_REVISION)
|
|||
set(K4A_VERSION_REVISION "0")
|
||||
endif()
|
||||
|
||||
|
||||
set(K4A_COMPANYNAME "Microsoft")
|
||||
set(K4A_PRODUCTNAME "Azure Kinect")
|
||||
set(K4A_COPYRIGHT "Copyright Microsoft Corporation. All rights reserved.")
|
||||
|
|
Загрузка…
Ссылка в новой задаче