Commit 24cdf8aa authored by Brad King's avatar Brad King
Browse files

ENH: Added interface to add extra dependencies.

parent 6e97ab11
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# special flags to all swig calls. # special flags to all swig calls.
# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify # Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify
# where to write all the swig generated module (swig -outdir option) # 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_CXX_EXTENSION "cxx")
SET(SWIG_EXTRA_LIBRARIES "") SET(SWIG_EXTRA_LIBRARIES "")
...@@ -145,6 +147,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) ...@@ -145,6 +147,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
-o "${swig_generated_file_fullname}" -o "${swig_generated_file_fullname}"
"${swig_source_file_fullname}" "${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}" MAIN_DEPENDENCY "${swig_source_file_fullname}"
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source") COMMENT "Swig source")
ELSE(CMAKE_SWIG_OUTDIR) ELSE(CMAKE_SWIG_OUTDIR)
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
...@@ -160,6 +163,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) ...@@ -160,6 +163,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
-o "${swig_generated_file_fullname}" -o "${swig_generated_file_fullname}"
"${swig_source_file_fullname}" "${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}" MAIN_DEPENDENCY "${swig_source_file_fullname}"
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source") COMMENT "Swig source")
ENDIF(CMAKE_SWIG_OUTDIR) ENDIF(CMAKE_SWIG_OUTDIR)
SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment