summaryrefslogtreecommitdiff
path: root/Modules/javaTargets.cmake.in
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
commit915c76ded744c0f5f151402b9fa69f3fd8452573 (patch)
treeca6a387466543248890f346847acaa8343989b22 /Modules/javaTargets.cmake.in
parent317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff)
downloadcmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Modules/javaTargets.cmake.in')
-rw-r--r--Modules/javaTargets.cmake.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/Modules/javaTargets.cmake.in b/Modules/javaTargets.cmake.in
new file mode 100644
index 000000000..c5f9c7835
--- /dev/null
+++ b/Modules/javaTargets.cmake.in
@@ -0,0 +1,39 @@
+cmake_minimum_required(VERSION 2.8)
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.8)
+
+#----------------------------------------------------------------
+# Generated CMake Java target import file.
+#----------------------------------------------------------------
+
+# Protect against multiple inclusion, which would fail when already imported targets are added once more.
+set(_targetsDefined)
+set(_targetsNotDefined)
+set(_expectedTargets)
+foreach(_expectedTarget @__targets__@)
+ list(APPEND _expectedTargets ${_expectedTarget})
+ if(TARGET ${_expectedTarget})
+ list(APPEND _targetsDefined ${_expectedTarget})
+ else()
+ list(APPEND _targetsNotDefined ${_expectedTarget})
+ endif()
+endforeach()
+if("%${_targetsDefined}" STREQUAL "%${_expectedTargets}")
+ unset(_targetsDefined)
+ unset(_targetsNotDefined)
+ unset(_expectedTargets)
+ cmake_policy(POP)
+ return()
+endif()
+if(NOT "${_targetsDefined}" STREQUAL "")
+ message(FATAL_ERROR
+ "Some (but not all) targets in this export set were already defined.\n"
+ "Targets Defined: ${_targetsDefined}\n"
+ "Targets not yet defined: ${_targetsNotDefined}\n")
+endif()
+unset(_targetsDefined)
+unset(_targetsNotDefined)
+unset(_expectedTargets)
+
+@__targetdefs__@
+cmake_policy(POP)