From ecd0fec40bca23609ae483641fa2fc59f62a4053 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Fri, 5 Oct 2018 12:06:45 +0200 Subject: UseSWIG: fix regression for PHP language Refactoring in commit v3.12.0-rc1~481^2 (UseSWIG: modernize module, 2018-01-29) accidentally regressed support for PHP. Fix it. Fixes: #18421 --- Modules/UseSWIG.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index b7b9fe1..492842b 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -479,6 +479,10 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) get_property (compile_options SOURCE "${infile}" PROPERTY GENERATED_COMPILE_OPTIONS) set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_OPTIONS $> ${compile_options}) + if (SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG MATCHES "php") + set_property (SOURCE "${swig_generated_file_fullname}" APPEND PROPERTY INCLUDE_DIRECTORIES "${outdir}") + endif() + set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files} PARENT_SCOPE) # legacy support -- cgit v0.12