aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-18 14:59:19 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-18 15:45:45 +0100
commitbccc3450179402ea0cf608171833dbc4f297056f (patch)
tree26395c63d76518886f28a0778c7233f7526e9e0a /CMakeLists.txt
parented25e0e8932895686ffb5166966beb88ddcbd410 (diff)
downloadarmnn-bccc3450179402ea0cf608171833dbc4f297056f.tar.gz
Github #275 Generate versionned libraries
* Improved parsing of the ArmNN's version at compile time * Reading the version directly from the Version.hpp file, to make sure not to break any build made with a different build system than CMake (or Ninja) * The version macro is set in the Version.hpp just like before, so setting it from the command line is no longer necessary !android-nn-driver:2126 Signed-off-by: Guillaume Gardet <guillaume.gardet@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I0820094607734d283ded030e4ded0ae6f5889c86
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ad2eb3c5a..e2712dd55a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,6 +96,7 @@ if(BUILD_CAFFE_PARSER)
target_link_libraries(armnnCaffeParser armnn)
target_link_libraries(armnnCaffeParser ${PROTOBUF_LIBRARIES})
+ set_target_properties(armnnCaffeParser PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
endif()
@@ -120,6 +121,7 @@ if(BUILD_ONNX_PARSER)
# Protobuf
target_link_libraries(armnnOnnxParser ${PROTOBUF_LIBRARIES})
+ set_target_properties(armnnOnnxParser PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
endif()
if(BUILD_TF_PARSER)
@@ -143,6 +145,7 @@ if(BUILD_TF_PARSER)
# Protobuf (use the specific version tensorflow wants)
target_link_libraries(armnnTfParser ${PROTOBUF_LIBRARIES})
+ set_target_properties(armnnTfParser PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
endif()
if(BUILD_ARMNN_QUANTIZER AND ARMNNREF)
@@ -201,6 +204,8 @@ if(BUILD_ARMNN_QUANTIZER AND ARMNNREF)
target_link_libraries(ArmnnQuantizer pthread)
endif()
+ set_target_properties(ArmnnQuantizer PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+
endif()
@@ -545,6 +550,8 @@ if(PROFILING_BACKEND_STREAMLINE)
target_link_libraries(armnn pthread)
endif()
+set_target_properties(armnn PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+
if(BUILD_UNIT_TESTS)
set(unittest_sources)
list(APPEND unittest_sources