File tree 6 files changed +67
-0
lines changed
product-mini/platforms/linux
6 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ if (WAMR_BUILD_STATIC)
174
174
target_link_libraries (iwasm_static PRIVATE ntdll)
175
175
endif ()
176
176
177
+ set_version_info (iwasm_static)
177
178
install (TARGETS iwasm_static ARCHIVE DESTINATION lib)
178
179
endif ()
179
180
@@ -196,6 +197,7 @@ if (WAMR_BUILD_SHARED)
196
197
target_link_libraries (iwasm_shared PRIVATE ntdll)
197
198
endif ()
198
199
200
+ set_version_info (iwasm_shared)
199
201
install (TARGETS iwasm_shared LIBRARY DESTINATION lib)
200
202
endif ()
201
203
@@ -204,4 +206,5 @@ install (FILES
204
206
${WAMR_ROOT_DIR} /core/iwasm/include /wasm_c_api.h
205
207
${WAMR_ROOT_DIR} /core/iwasm/include /wasm_export.h
206
208
${WAMR_ROOT_DIR} /core/iwasm/include /lib_export.h
209
+ ${WAMR_ROOT_DIR} /core/version .h
207
210
DESTINATION include )
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ else ()
131
131
unset (LLVM_AVAILABLE_LIBS)
132
132
endif ()
133
133
134
+ # Version
135
+ include (${WAMR_ROOT_DIR} /build -scripts/version .cmake)
136
+
134
137
# Sanitizers
135
138
136
139
if (NOT DEFINED WAMR_BUILD_SANITIZER)
Original file line number Diff line number Diff line change
1
+ # Copyright (C) 2019 Intel Corporation. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
+
4
+ # BE AWARE: This file depends on ${WAMR_ROOT_DIR}
5
+
6
+ set (WAMR_VERSION_MAJOR 2)
7
+ set (WAMR_VERSION_MINOR 2)
8
+ set (WAMR_VERSION_PATCH 0)
9
+
10
+ message ("-- WAMR version: ${WAMR_VERSION_MAJOR} .${WAMR_VERSION_MINOR} .${WAMR_VERSION_PATCH} " )
11
+
12
+ # Configure the version header file
13
+ configure_file (
14
+ ${WAMR_ROOT_DIR} /core/version .h.in
15
+ ${WAMR_ROOT_DIR} /core/version .h
16
+ )
17
+
18
+ # Set the library version and SOVERSION
19
+ function (set_version_info target )
20
+ set_target_properties (${target}
21
+ PROPERTIES
22
+ VERSION ${WAMR_VERSION_MAJOR} .${WAMR_VERSION_MINOR} .${WAMR_VERSION_PATCH}
23
+ SOVERSION ${WAMR_VERSION_MAJOR}
24
+ )
25
+ endfunction ()
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
*/
5
5
6
+ /*
7
+ * version.h.in is a template file. version.h is a generated file.
8
+ * Please do not edit both files directly.
9
+ *
10
+ * Any changes to the version should be done in the version.cmake file.
11
+ */
12
+
6
13
#ifndef _WAMR_VERSION_H_
7
14
#define _WAMR_VERSION_H_
15
+
16
+ /* clang-format off */
8
17
#define WAMR_VERSION_MAJOR 2
9
18
#define WAMR_VERSION_MINOR 2
10
19
#define WAMR_VERSION_PATCH 0
20
+ /* clang-format on */
21
+
11
22
#endif
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (C) 2019 Intel Corporation. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+ */
5
+
6
+ /*
7
+ * version.h.in is a template file. version.h is a generated file.
8
+ * Please do not edit both files directly.
9
+ *
10
+ * Any changes to the version should be done in the version.cmake file.
11
+ */
12
+
13
+ #ifndef _WAMR_VERSION_H_
14
+ #define _WAMR_VERSION_H_
15
+
16
+ /* clang-format off */
17
+ #define WAMR_VERSION_MAJOR @WAMR_VERSION_MAJOR@
18
+ #define WAMR_VERSION_MINOR @WAMR_VERSION_MINOR@
19
+ #define WAMR_VERSION_PATCH @WAMR_VERSION_PATCH@
20
+ /* clang-format on */
21
+
22
+ #endif
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
142
142
check_pie_supported()
143
143
add_library (vmlib ${WAMR_RUNTIME_LIB_SOURCE} )
144
144
set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON )
145
+ set_version_info (vmlib)
145
146
146
147
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections" )
147
148
@@ -169,6 +170,7 @@ endif ()
169
170
include (${SHARED_DIR} /utils/uncommon/shared_uncommon.cmake)
170
171
171
172
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE} )
173
+ set_version_info (iwasm)
172
174
173
175
set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON )
174
176
@@ -184,6 +186,7 @@ target_link_libraries(iwasm
184
186
install (TARGETS iwasm DESTINATION bin)
185
187
186
188
add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE} )
189
+ set_version_info (libiwasm)
187
190
188
191
install (TARGETS libiwasm DESTINATION lib)
189
192
You can’t perform that action at this time.
0 commit comments