Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2021 Arm Ltd and Contributors. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | # Read the ArmNN Delegate version components from file |
| 7 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../delegate/include/Version.hpp delegateVersion) |
| 8 | |
| 9 | # Parse the ArmNN Delegate version components |
| 10 | string(REGEX MATCH "#define DELEGATE_MAJOR_VERSION ([0-9]*)" _ ${delegateVersion}) |
| 11 | set(DELEGATE_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 12 | string(REGEX MATCH "#define DELEGATE_MINOR_VERSION ([0-9]*)" _ ${delegateVersion}) |
| 13 | set(DELEGATE_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 14 | |
| 15 | # Define LIB version |
| 16 | set(DELEGATE_LIB_VERSION "${DELEGATE_MAJOR_VERSION}.${DELEGATE_MINOR_VERSION}") |
| 17 | # Define LIB soversion |
| 18 | set(DELEGATE_LIB_SOVERSION "${DELEGATE_MAJOR_VERSION}") |