diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-23 15:10:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-23 15:10:41 (GMT) |
commit | e5fdf8335c19001ed162061e9f47b2e1876e557a (patch) | |
tree | f38a42be671e34109364fbdccb5b6d57e47315ad | |
parent | d184c10c69050362af0a3c3c0cf1d12589c16a86 (diff) | |
download | CMake-e5fdf8335c19001ed162061e9f47b2e1876e557a.zip CMake-e5fdf8335c19001ed162061e9f47b2e1876e557a.tar.gz CMake-e5fdf8335c19001ed162061e9f47b2e1876e557a.tar.bz2 |
ENH: fix build
-rw-r--r-- | Tests/Java/CMakeLists.txt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Tests/Java/CMakeLists.txt b/Tests/Java/CMakeLists.txt index 26be60c..4eccbfd 100644 --- a/Tests/Java/CMakeLists.txt +++ b/Tests/Java/CMakeLists.txt @@ -17,19 +17,20 @@ IF(OLD_CUSTOM_COMMAND_WAY) ADD_CUSTOM_COMMAND( OUTPUT ${hello_BINARY_DIR}/A.class MAIN_DEPENDENCY ${hello_SOURCE_DIR}/A.java - COMMAND ${CMAKE_Java_COMPILER} ARGS -d ${hello_BINARY_DIR} ${hello_SOURCE_DIR}/A.java) + COMMAND ${CMAKE_Java_COMPILER} ARGS -classpath . -d ${hello_BINARY_DIR} ${hello_SOURCE_DIR}/A.java) ADD_CUSTOM_COMMAND( OUTPUT ${hello_BINARY_DIR}/HelloWorld.class MAIN_DEPENDENCY ${hello_SOURCE_DIR}/HelloWorld.java - COMMAND ${CMAKE_Java_COMPILER} ARGS -d ${hello_BINARY_DIR} ${hello_SOURCE_DIR}/HelloWorld.java) - - ADD_CUSTOM_TARGET(foo.jar ALL - DEPENDS ${hello_BINARY_DIR}/A.class ${hello_BINARY_DIR}/HelloWorld.class) - - ADD_CUSTOM_COMMAND( TARGET foo.jar - PRE_BUILD + DEPENDS ${hello_BINARY_DIR}/A.class + COMMAND ${CMAKE_Java_COMPILER} ARGS -classpath . -d ${hello_BINARY_DIR} ${hello_SOURCE_DIR}/HelloWorld.java) + ADD_CUSTOM_COMMAND( + OUTPUT ${hello_BINARY_DIR}/foo.jar + DEPENDS ${hello_BINARY_DIR}/A.class ${hello_BINARY_DIR}/HelloWorld.class COMMAND ${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_Java_ARCHIVE} -cvf foo.jar *.class) + + ADD_CUSTOM_TARGET(foo.jar ALL + DEPENDS ${hello_BINARY_DIR}/foo.jar) ENDIF(OLD_CUSTOM_COMMAND_WAY) |