123456789101112131415161718192021222324 |
- # Set OpenViBE specific versions.
- function(OV_SET_PROJECT_VERSION)
-
- set(OV_GLOBAL_VERSION_MAJOR ${PROJECT_VERSION_MAJOR} PARENT_SCOPE)
- set(OV_GLOBAL_VERSION_MINOR ${PROJECT_VERSION_MINOR} PARENT_SCOPE)
- set(OV_GLOBAL_VERSION_PATCH ${PROJECT_VERSION_PATCH} PARENT_SCOPE)
- set(OV_GLOBAL_VERSION_BUILD ${PROJECT_VERSION_BUILD} PARENT_SCOPE)
- set(OV_GLOBAL_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_BUILD} PARENT_SCOPE)
-
- set(OV_PROJECT_BRANCH ${PROJECT_BRANCH} PARENT_SCOPE)
- set(OV_PROJECT_COMMITHASH ${PROJECT_COMMITHASH} PARENT_SCOPE)
-
- # Write version to .install file
- string(TIMESTAMP BUILD_DATE "%d/%m/%y %H:%M:%S")
- set(INSTALL_MANIFEST_STR "[Package]=${PROJECT_NAME}\
- \n[Version]=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_BUILD}\
- \n[BuildHash]=${PROJECT_COMMITHASH}\
- \n[BuildBranch]=${PROJECT_BRANCH}\
- \n[BuildDate]=${BUILD_DATE}"
- )
- file(WRITE ${CMAKE_BINARY_DIR}/.install "${INSTALL_MANIFEST_STR}")
-
- endfunction()
|