diff options
author | Brad King <brad.king@kitware.com> | 2011-04-12 18:44:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-04-12 18:44:09 (GMT) |
commit | dff009626dc062657c6f433472c5a2d02cd0a14a (patch) | |
tree | 1a22500e5c49fca4473b803b76d73fa22c5f4d85 /Modules/UseSWIG.cmake | |
parent | bc888800f5c294bcb2233b2a9d8db2cef43bd744 (diff) | |
parent | c08853651836aa0bae0494703cd4368451b738ae (diff) | |
download | CMake-dff009626dc062657c6f433472c5a2d02cd0a14a.zip CMake-dff009626dc062657c6f433472c5a2d02cd0a14a.tar.gz CMake-dff009626dc062657c6f433472c5a2d02cd0a14a.tar.bz2 |
Merge topic 'fixbug_0011215'
c088536 UseSWIG.cmake does not expand $(OutDir)
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r-- | Modules/UseSWIG.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index f9808c5..6d3f1de 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -180,8 +180,6 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir IF(CMAKE_SWIG_OUTDIR) SET(swig_outdir ${CMAKE_SWIG_OUTDIR}) - # it may not exist, so create it: - file(MAKE_DIRECTORY ${CMAKE_SWIG_OUTDIR}) ELSE(CMAKE_SWIG_OUTDIR) SET(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) ENDIF(CMAKE_SWIG_OUTDIR) @@ -227,6 +225,8 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) LIST(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${swig_extra_dependencies}) ADD_CUSTOM_COMMAND( OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files} + # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir) + COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir} COMMAND "${SWIG_EXECUTABLE}" ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}" ${swig_source_file_flags} |