Add versioning support and update CMake configuration
This commit is contained in:
committed by
Marcin Kolny
parent
67cd5043d3
commit
e64685f43c
25
build-scripts/version.cmake
Normal file
25
build-scripts/version.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
# BE AWARE: This file depends on ${WAMR_ROOT_DIR}
|
||||
|
||||
set(WAMR_VERSION_MAJOR 2)
|
||||
set(WAMR_VERSION_MINOR 2)
|
||||
set(WAMR_VERSION_PATCH 0)
|
||||
|
||||
message("-- WAMR version: ${WAMR_VERSION_MAJOR}.${WAMR_VERSION_MINOR}.${WAMR_VERSION_PATCH}")
|
||||
|
||||
# Configure the version header file
|
||||
configure_file(
|
||||
${WAMR_ROOT_DIR}/core/version.h.in
|
||||
${WAMR_ROOT_DIR}/core/version.h
|
||||
)
|
||||
|
||||
# Set the library version and SOVERSION
|
||||
function(set_version_info target)
|
||||
set_target_properties(${target}
|
||||
PROPERTIES
|
||||
VERSION ${WAMR_VERSION_MAJOR}.${WAMR_VERSION_MINOR}.${WAMR_VERSION_PATCH}
|
||||
SOVERSION ${WAMR_VERSION_MAJOR}
|
||||
)
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user