summaryrefslogtreecommitdiffstats
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-10-05 10:06:45 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-05 17:11:17 (GMT)
commitecd0fec40bca23609ae483641fa2fc59f62a4053 (patch)
tree38aac182cf4c8ef074d81bf0afc5e5b4b4516497 /Modules/UseSWIG.cmake
parent3e5548784da085ee3a5ce3f7213c0cf281b68f31 (diff)
downloadCMake-ecd0fec40bca23609ae483641fa2fc59f62a4053.zip
CMake-ecd0fec40bca23609ae483641fa2fc59f62a4053.tar.gz
CMake-ecd0fec40bca23609ae483641fa2fc59f62a4053.tar.bz2
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
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake4
1 files changed, 4 insertions, 0 deletions
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 $<TARGET_GENEX_EVAL:${target_name},$<TARGET_PROPERTY:${target_name},SWIG_GENERATED_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