Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
spell out -classpath with all letters as it seems to break on kfreebsd when written...
[simgrid.git] / examples / java / io / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example java_io)
4 set(sources
5   ${CMAKE_CURRENT_SOURCE_DIR}/IO.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Node.java
7   )
8
9 if(enable_java)
10   add_custom_command(
11     COMMENT "Building ${example}..."
12     OUTPUT ${example}_compiled
13     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
14     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
15                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
16     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
17     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
18   )
19   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
20 endif()
21
22 set(tesh_files
23   ${tesh_files}
24   PARENT_SCOPE
25   )
26 set(xml_files
27   ${xml_files}
28   ${CMAKE_CURRENT_SOURCE_DIR}/storage.xml
29   PARENT_SCOPE
30   )
31 set(examples_src
32   ${examples_src}
33   ${sources}
34   PARENT_SCOPE
35   )
36 set(bin_files
37   ${bin_files}
38   PARENT_SCOPE
39   )
40 set(txt_files
41   ${txt_files}
42   PARENT_SCOPE
43   )