summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2017-10-10 07:38:43 (GMT)
committerMarc Chevrier <marc.chevrier@sap.com>2017-10-10 08:00:23 (GMT)
commitdead049e0b4ff531866ef9bf362f3f5e8fb177aa (patch)
treef9ffe4758e59beb4212234502941ec83f6b8aaaf /Modules/UseJava.cmake
parentc798dc8573a205f90663e9983b793b21fea28521 (diff)
downloadCMake-dead049e0b4ff531866ef9bf362f3f5e8fb177aa.zip
CMake-dead049e0b4ff531866ef9bf362f3f5e8fb177aa.tar.gz
CMake-dead049e0b4ff531866ef9bf362f3f5e8fb177aa.tar.bz2
UseJava: OUTPUT_DIR must exists in all cases.
Fixes: #17316
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r--Modules/UseJava.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 1182875..b925ee2 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -516,6 +516,8 @@ function(add_jar _TARGET_NAME)
endforeach()
set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir")
+ # ensure output directory exists
+ file (MAKE_DIRECTORY "${CMAKE_JAVA_CLASS_OUTPUT_PATH}")
set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar")
if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION)