From a3dc08745ac39faa55724e99a62916f802c1a78a Mon Sep 17 00:00:00 2001 From: Patrice Jiang <397136899@qq.com> Date: Fri, 14 Jul 2023 13:55:16 +0800 Subject: [PATCH] cmake/swig allow remove genereated/../temp directory --- native/cmake/predefine.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cmake/predefine.cmake b/native/cmake/predefine.cmake index bffb8619a7c..ad50d295355 100644 --- a/native/cmake/predefine.cmake +++ b/native/cmake/predefine.cmake @@ -301,7 +301,6 @@ function(cc_gen_swig_files cfg_directory output_dir) set(dep_files) get_filename_component(mod_name ${cfg} NAME_WE) - file(MAKE_DIRECTORY ${output_dir}/temp) set(output_file_tmp ${output_dir}/temp/jsb_${mod_name}_auto.cpp) set(output_file ${output_dir}/jsb_${mod_name}_auto.cpp) @@ -315,6 +314,7 @@ function(cc_gen_swig_files cfg_directory output_dir) ${output_hfile} ${output_file} COMMAND ${CMAKE_COMMAND} -E echo "Running swig with config file ${cfg} ..." + COMMAND ${CMAKE_COMMAND} -E make_directory ${output_dir}/temp COMMAND ${SWIG_EXEC} ${SWIG_ARGS} ${output_file_tmp} ${cfg}