2 # Helper script for UseJava.cmake
5 #=============================================================================
6 # Copyright 2010-2011 Andreas schneider <asn@redhat.com>
8 # Distributed under the OSI-approved BSD License (the "License");
9 # see accompanying file Copyright.txt for details.
11 # This software is distributed WITHOUT ANY WARRANTY; without even the
12 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # See the License for more information.
14 #=============================================================================
15 # (To distribute this file outside of CMake, substitute the full
16 # License text for the above reference.)
18 if (UNIX AND _JAVA_TARGET_OUTPUT_LINK)
19 if (_JAVA_TARGET_OUTPUT_NAME)
20 find_program(LN_EXECUTABLE
26 COMMAND ${LN_EXECUTABLE} -sf "${_JAVA_TARGET_OUTPUT_NAME}" "${_JAVA_TARGET_OUTPUT_LINK}"
27 WORKING_DIRECTORY ${_JAVA_TARGET_DIR}
30 message(SEND_ERROR "FATAL: Can't find _JAVA_TARGET_OUTPUT_NAME")