瀏覽代碼

UseSWIG: Fix module name detection with relative source file (#15508)

When SWIG_GET_EXTRA_OUTPUT_FILES checks to see if a source file exists
for use in reading the module name, it must pass an absolute path to
the if(EXISTS) command.  Teach SWIG_ADD_SOURCE_TO_MODULE to give it
the absolute path it already knows.
Tuukka Pasanen 10 年之前
父節點
當前提交
dd7e31bc15
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/UseSWIG.cmake

+ 1 - 1
Modules/UseSWIG.cmake

@@ -156,7 +156,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
   SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
     swig_extra_generated_files
     "${swig_outdir}"
-    "${infile}")
+    "${swig_source_file_fullname}")
   set(swig_generated_file_fullname
     "${swig_outdir}/${swig_source_file_name_we}")
   # add the language into the name of the file (i.e. TCL_wrap)