diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake index 76b09e6bd0..cc7cf84c77 100644 --- a/Modules/CMakeJavaInformation.cmake +++ b/Modules/CMakeJavaInformation.cmake @@ -14,16 +14,22 @@ ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) # this is a place holder if java needed flags for javac they would go here. IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY) + IF(WIN32) + SET(class_files_mask "*.class") + ELSE(WIN32) + SET(class_files_mask ".") + ENDIF(WIN32) + SET(CMAKE_Java_CREATE_STATIC_LIBRARY - " -cf -C *.class") - # "*.class" should really be "" but compling a java file can create - # more than one .class file, so for now get all of them + " -cf -C ${class_files_mask}") + # "${class_files_mask}" should really be "" but compling a *.java + # file can create more than one *.class file... ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY) # compile a Java file into an object file IF(NOT CMAKE_Java_COMPILE_OBJECT) SET(CMAKE_Java_COMPILE_OBJECT - " -d ") + " -d ") ENDIF(NOT CMAKE_Java_COMPILE_OBJECT) # set java include flag option and the separator for multiple include paths