Skip to content

Commit 955fce5

Browse files
authored
Replace CMAKE_CURRENT_FUNCTION_LIST_DIR (#4200)
`CMAKE_CURRENT_FUNCTION_LIST_DIR` is added in version 3.17 and currently most of `cmake_minimum_required()` with 3.14. Refer to https://cmake.org/cmake/help/latest/variable/CMAKE_CURRENT_FUNCTION_LIST_DIR.html
1 parent 0ba6532 commit 955fce5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build-scripts/package.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (C) 2019 Intel Corporation. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

4+
set(_WAMR_BUILD_SCRIPTS_DIR "${CMAKE_CURRENT_LIST_DIR}")
5+
46
function(install_iwasm_package)
57
install (EXPORT iwasmTargets
68
FILE iwasmTargets.cmake
@@ -9,7 +11,7 @@ function(install_iwasm_package)
911
)
1012

1113
include (CMakePackageConfigHelpers)
12-
configure_package_config_file (${CMAKE_CURRENT_FUNCTION_LIST_DIR}/iwasmConfig.cmake.in
14+
configure_package_config_file (${_WAMR_BUILD_SCRIPTS_DIR}/iwasmConfig.cmake.in
1315
"${CMAKE_CURRENT_BINARY_DIR}/iwasmConfig.cmake"
1416
INSTALL_DESTINATION lib/cmake/iwasm
1517
)

0 commit comments

Comments
 (0)