summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-10-05 12:06:45 +0200
committerBrad King <brad.king@kitware.com>2018-10-05 13:11:17 -0400
commitecd0fec40bca23609ae483641fa2fc59f62a4053 (patch)
tree38aac182cf4c8ef074d81bf0afc5e5b4b4516497
parent3e5548784da085ee3a5ce3f7213c0cf281b68f31 (diff)
downloadcmake-ecd0fec40bca23609ae483641fa2fc59f62a4053.tar.gz
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
-rw-r--r--Modules/UseSWIG.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index b7b9fe1a18..492842b2af 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