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 | |
Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 6 | # Read the OnnxParser version components from file |
| 7 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnOnnxParser/Version.hpp onnxVersion) |
| 8 | |
| 9 | # Parse the OnnxParser version components |
| 10 | string(REGEX MATCH "#define ONNX_PARSER_MAJOR_VERSION ([0-9]*)" _ ${onnxVersion}) |
| 11 | set(ONNX_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 12 | string(REGEX MATCH "#define ONNX_PARSER_MINOR_VERSION ([0-9]*)" _ ${onnxVersion}) |
| 13 | set(ONNX_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 14 | |
| 15 | # Define LIB version |
| 16 | set(ONNX_PARSER_LIB_VERSION "${ONNX_PARSER_MAJOR_VERSION}.${ONNX_PARSER_MINOR_VERSION}") |
| 17 | |
| 18 | # Define LIB soversion |
| 19 | set(ONNX_PARSER_LIB_SOVERSION "${ONNX_PARSER_MAJOR_VERSION}") |
| 20 | |
| 21 | |
| 22 | # Read the TfLiteParser version components from file |
| 23 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTfLiteParser/Version.hpp tfLiteVersion) |
| 24 | |
| 25 | # Parse the TfLiteParser version components |
| 26 | string(REGEX MATCH "#define TFLITE_PARSER_MAJOR_VERSION ([0-9]*)" _ ${tfLiteVersion}) |
| 27 | set(TFLITE_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 28 | string(REGEX MATCH "#define TFLITE_PARSER_MINOR_VERSION ([0-9]*)" _ ${tfLiteVersion}) |
| 29 | set(TFLITE_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 30 | |
| 31 | # Define LIB version |
| 32 | set(TFLITE_PARSER_LIB_VERSION "${TFLITE_PARSER_MAJOR_VERSION}.${TFLITE_PARSER_MINOR_VERSION}") |
| 33 | |
| 34 | # Define LIB soversion |
Nikhil Raj | 5d955cf | 2021-04-19 16:59:48 +0100 | [diff] [blame] | 35 | set(TFLITE_PARSER_LIB_SOVERSION "${TFLITE_PARSER_MAJOR_VERSION}") |