From c2c28fe549ef41d87d7290cd4a3b490c1e7072a9 Mon Sep 17 00:00:00 2001 From: wyc <1104749580@qq.com> Date: Mon, 6 Jul 2026 11:39:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=97=8F=E6=9F=9C=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0_cmake_library/main.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/0_cmake_library/main.cmake b/0_cmake_library/main.cmake index bb098ee..0b4f695 100644 --- a/0_cmake_library/main.cmake +++ b/0_cmake_library/main.cmake @@ -342,10 +342,9 @@ endfunction() # 定义一个属性 -macro(w_use3rd name) - include("${CMAKE_SOURCE_DIR}/3rdParty/cmake/${name}.cmake") -endmacro() - +function(w_use3rd name) + include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../3rdParty/cmake/${name}.cmake") +endfunction() function(_create_directory_with_permissions dir_path) # 检查目录是否存在