Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 1 | # |
Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 2 | # Copyright © 2021,2023 Arm Ltd and Contributors. All rights reserved. |
Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | # Read the ArmNN Delegate version components from file |
Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 7 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../delegate/classic/include/Version.hpp ClassicDelegateVersion) |
Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 8 | |
| 9 | # Parse the ArmNN Delegate version components |
Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 10 | string(REGEX MATCH "#define DELEGATE_MAJOR_VERSION ([0-9]*)" _ ${ClassicDelegateVersion}) |
Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 11 | set(DELEGATE_MAJOR_VERSION ${CMAKE_MATCH_1}) |
Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 12 | string(REGEX MATCH "#define DELEGATE_MINOR_VERSION ([0-9]*)" _ ${ClassicDelegateVersion}) |
Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 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}") |