summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-25 13:14:01 (GMT)
committerBrad King <brad.king@kitware.com>2006-08-25 13:14:01 (GMT)
commit24cdf8aa6c0dbf2b0b3eb45d70df334890ddae92 (patch)
tree5eb70dd9aa773db35346e7ab4ee325c66358aa08
parent6e97ab11134c4ee5c1a1b222477f3663bf97103e (diff)
downloadCMake-24cdf8aa6c0dbf2b0b3eb45d70df334890ddae92.zip
CMake-24cdf8aa6c0dbf2b0b3eb45d70df334890ddae92.tar.gz
CMake-24cdf8aa6c0dbf2b0b3eb45d70df334890ddae92.tar.bz2
ENH: Added interface to add extra dependencies.
-rw-r--r--Modules/UseSWIG.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index b107d6c..fee83a5 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -12,6 +12,8 @@
# special flags to all swig calls.
# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify
# where to write all the swig generated module (swig -outdir option)
+# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used
+# to specify extra dependencies for the generated modules.
SET(SWIG_CXX_EXTENSION "cxx")
SET(SWIG_EXTRA_LIBRARIES "")
@@ -145,6 +147,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
-o "${swig_generated_file_fullname}"
"${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}"
+ DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source")
ELSE(CMAKE_SWIG_OUTDIR)
ADD_CUSTOM_COMMAND(
@@ -160,6 +163,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
-o "${swig_generated_file_fullname}"
"${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}"
+ DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source")
ENDIF(CMAKE_SWIG_OUTDIR)
SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}"