blob: 2120bf7057068a814aaaeab6a1b4aaf6b2d664cd [file] [log] [blame]
Matthew Sloyanac001ee2021-02-03 10:43:04 +00001#
2# Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3# SPDX-License-Identifier: MIT
4#
5
Matthew Sloyanac001ee2021-02-03 10:43:04 +00006# Read the OnnxParser version components from file
7file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnOnnxParser/Version.hpp onnxVersion)
8
9# Parse the OnnxParser version components
10string(REGEX MATCH "#define ONNX_PARSER_MAJOR_VERSION ([0-9]*)" _ ${onnxVersion})
11set(ONNX_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1})
12string(REGEX MATCH "#define ONNX_PARSER_MINOR_VERSION ([0-9]*)" _ ${onnxVersion})
13set(ONNX_PARSER_MINOR_VERSION ${CMAKE_MATCH_1})
14
15# Define LIB version
16set(ONNX_PARSER_LIB_VERSION "${ONNX_PARSER_MAJOR_VERSION}.${ONNX_PARSER_MINOR_VERSION}")
17
18# Define LIB soversion
19set(ONNX_PARSER_LIB_SOVERSION "${ONNX_PARSER_MAJOR_VERSION}")
20
21
22# Read the TfLiteParser version components from file
23file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTfLiteParser/Version.hpp tfLiteVersion)
24
25# Parse the TfLiteParser version components
26string(REGEX MATCH "#define TFLITE_PARSER_MAJOR_VERSION ([0-9]*)" _ ${tfLiteVersion})
27set(TFLITE_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1})
28string(REGEX MATCH "#define TFLITE_PARSER_MINOR_VERSION ([0-9]*)" _ ${tfLiteVersion})
29set(TFLITE_PARSER_MINOR_VERSION ${CMAKE_MATCH_1})
30
31# Define LIB version
32set(TFLITE_PARSER_LIB_VERSION "${TFLITE_PARSER_MAJOR_VERSION}.${TFLITE_PARSER_MINOR_VERSION}")
33
34# Define LIB soversion
35set(TFLITE_PARSER_LIB_SOVERSION "${TFLITE_PARSER_MAJOR_VERSION}")
36
37
38# Read the TfParser version components from file
39file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTfParser/Version.hpp tfVersion)
40
41# Parse the TfParser version components
42string(REGEX MATCH "#define TF_PARSER_MAJOR_VERSION ([0-9]*)" _ ${tfVersion})
43set(TF_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1})
44string(REGEX MATCH "#define TF_PARSER_MINOR_VERSION ([0-9]*)" _ ${tfVersion})
45set(TF_PARSER_MINOR_VERSION ${CMAKE_MATCH_1})
46
47# Define LIB version
48set(TF_PARSER_LIB_VERSION "${TF_PARSER_MAJOR_VERSION}.${TF_PARSER_MINOR_VERSION}")
49
50# Define LIB soversion
51set(TF_PARSER_LIB_SOVERSION "${TF_PARSER_MAJOR_VERSION}")