summaryrefslogtreecommitdiffstats
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorcaryoscelus <caryoscelus@gmx.com>2016-11-28 18:46:41 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-29 15:21:05 (GMT)
commit62c4cb4b6f0cdb2be2729362133f850d6fe96c20 (patch)
tree72bdf48949ee4d0618f9aef340e610ce23ae0221 /Modules/UseSWIG.cmake
parent2f7e05fbc20150377668a4ea1b114fd1b4d92df6 (diff)
downloadCMake-62c4cb4b6f0cdb2be2729362133f850d6fe96c20.zip
CMake-62c4cb4b6f0cdb2be2729362133f850d6fe96c20.tar.gz
CMake-62c4cb4b6f0cdb2be2729362133f850d6fe96c20.tar.bz2
UseSWIG: Record generated java files as custom command outputs
When another target depends on the generated files CMake must know which custom command generates them in order to hook up the dependency properly. We already do this for Python. Add the Java files too.
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index c5912f8..651f9f1 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -57,7 +57,8 @@
set(SWIG_CXX_EXTENSION "cxx")
set(SWIG_EXTRA_LIBRARIES "")
-set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
+set(SWIG_PYTHON_EXTRA_FILE_EXTENSIONS ".py")
+set(SWIG_JAVA_EXTRA_FILE_EXTENSIONS ".java" "JNI.java")
#
# For given swig module initialize variables associated with it
@@ -123,9 +124,9 @@ macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
endif ()
endif()
- foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
+ foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSIONS})
set(${outfiles} ${${outfiles}}
- "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
+ "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}${it}")
endforeach()
endmacro()