2 #=============================================================================
3 # Copyright 2004-2011 Kitware, Inc.
5 # Distributed under the OSI-approved BSD License (the "License");
6 # see accompanying file Copyright.txt for details.
8 # This software is distributed WITHOUT ANY WARRANTY; without even the
9 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # See the License for more information.
11 #=============================================================================
12 # (To distribute this file outside of CMake, substitute the full
13 # License text for the above reference.)
15 # This should be included before the _INIT variables are
16 # used to initialize the cache. Since the rule variables
17 # have if blocks on them, users can still define them here.
18 # But, it should still be after the platform file so changes can
19 # be made to those values.
21 if(CMAKE_USER_MAKE_RULES_OVERRIDE)
22 # Save the full path of the file so try_compile can use it.
23 include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
24 set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
27 if(CMAKE_USER_MAKE_RULES_OVERRIDE_Java)
28 # Save the full path of the file so try_compile can use it.
29 include(${CMAKE_USER_MAKE_RULES_OVERRIDE_Java} RESULT_VARIABLE _override)
30 set(CMAKE_USER_MAKE_RULES_OVERRIDE_Java "${_override}")
33 # this is a place holder if java needed flags for javac they would go here.
34 if(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
36 # set(class_files_mask "*.class")
38 set(class_files_mask ".")
41 set(CMAKE_Java_CREATE_STATIC_LIBRARY
42 "<CMAKE_Java_ARCHIVE> -cf <TARGET> -C <OBJECT_DIR> ${class_files_mask}")
43 # "${class_files_mask}" should really be "<OBJECTS>" but compling a *.java
44 # file can create more than one *.class file...
47 # compile a Java file into an object file
48 if(NOT CMAKE_Java_COMPILE_OBJECT)
49 set(CMAKE_Java_COMPILE_OBJECT
50 "<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d <OBJECT_DIR>")
53 # set java include flag option and the separator for multiple include paths
54 set(CMAKE_INCLUDE_FLAG_Java "-classpath ")
55 if(WIN32 AND NOT CYGWIN)
56 set(CMAKE_INCLUDE_FLAG_SEP_Java ";")
58 set(CMAKE_INCLUDE_FLAG_SEP_Java ":")