CMakeJavaInformation.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # This should be included before the _INIT variables are
  2. # used to initialize the cache. Since the rule variables
  3. # have if blocks on them, users can still define them here.
  4. # But, it should still be after the platform file so changes can
  5. # be made to those values.
  6. IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
  7. INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
  8. ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
  9. IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
  10. INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
  11. ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
  12. # this is a place holder if java needed flags for javac they would go here.
  13. IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
  14. SET(CMAKE_Java_CREATE_STATIC_LIBRARY
  15. "<CMAKE_Java_ARCHIVE> -cf <TARGET> *.class")
  16. # should be this <OBJECTS> but compling a java file can create more than one .class file
  17. # so for now get all of them
  18. ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
  19. # compile a Java file into an object file
  20. IF(NOT CMAKE_Java_COMPILE_OBJECT)
  21. SET(CMAKE_Java_COMPILE_OBJECT
  22. "<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d <CMAKE_CURRENT_BINARY_DIR>")
  23. ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)
  24. # set java include flag option and the separator for multiple include paths
  25. SET(CMAKE_INCLUDE_FLAG_Java "-classpath ")
  26. IF(WIN32 AND NOT CYGWIN)
  27. SET(CMAKE_INCLUDE_FLAG_SEP_Java ";")
  28. ELSE(WIN32 AND NOT CYGWIN)
  29. SET(CMAKE_INCLUDE_FLAG_SEP_Java ":")
  30. ENDIF(WIN32 AND NOT CYGWIN)