summaryrefslogtreecommitdiffstats
path: root/java/cmake/UseJavaSymlinks.cmake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-06-06 11:17:29 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-06-06 11:17:29 +0200
commit540d341d888f5f1f7da574ca5dccce82b7685b2c (patch)
treedd98236362d83a4745970d69ee3a9fb6c680872f /java/cmake/UseJavaSymlinks.cmake
parent88f283e4a205e09c2ec57413628f299b05b86b4f (diff)
downloadk8055-540d341d888f5f1f7da574ca5dccce82b7685b2c.zip
k8055-540d341d888f5f1f7da574ca5dccce82b7685b2c.tar.gz
add java cmake stuff from http://git.cryptomilk.org
Diffstat (limited to 'java/cmake/UseJavaSymlinks.cmake')
-rw-r--r--java/cmake/UseJavaSymlinks.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/java/cmake/UseJavaSymlinks.cmake b/java/cmake/UseJavaSymlinks.cmake
new file mode 100644
index 0000000..dbc4694
--- /dev/null
+++ b/java/cmake/UseJavaSymlinks.cmake
@@ -0,0 +1,15 @@
+if (UNIX AND _JAVA_TARGET_OUTPUT_LINK)
+ if (_JAVA_TARGET_OUTPUT_NAME)
+ find_program(LN_EXECUTABLE
+ NAMES
+ ln
+ )
+
+ execute_process(
+ COMMAND ${LN_EXECUTABLE} -sf "${_JAVA_TARGET_OUTPUT_NAME}" "${_JAVA_TARGET_OUTPUT_LINK}"
+ WORKING_DIRECTORY ${_JAVA_TARGET_DIR}
+ )
+ else (_JAVA_TARGET_OUTPUT_NAME)
+ message(SEND_ERROR "FATAL: Can't find _JAVA_TARGET_OUTPUT_NAME")
+ endif (_JAVA_TARGET_OUTPUT_NAME)
+endif (UNIX AND _JAVA_TARGET_OUTPUT_LINK)