Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix dependencies for Java and its examples.
[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_JAR}
14     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
15                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
16     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
17   )
18   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
19 endif()
20
21 set(tesh_files
22   ${tesh_files}
23   PARENT_SCOPE
24   )
25 set(xml_files
26   ${xml_files}
27   ${CMAKE_CURRENT_SOURCE_DIR}/storage.xml
28   PARENT_SCOPE
29   )
30 set(examples_src
31   ${examples_src}
32   ${sources}
33   PARENT_SCOPE
34   )
35 set(bin_files
36   ${bin_files}
37   PARENT_SCOPE
38   )
39 set(txt_files
40   ${txt_files}
41   PARENT_SCOPE
42   )