Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename SG_java -> simgrid-java.
[simgrid.git] / examples / java / kademlia / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example java_kademlia)
4 set(sources
5   ${CMAKE_CURRENT_SOURCE_DIR}/Answer.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Bucket.java
7   ${CMAKE_CURRENT_SOURCE_DIR}/Common.java
8   ${CMAKE_CURRENT_SOURCE_DIR}/Contact.java
9   ${CMAKE_CURRENT_SOURCE_DIR}/FindNodeAnswerTask.java
10   ${CMAKE_CURRENT_SOURCE_DIR}/FindNodeTask.java
11   ${CMAKE_CURRENT_SOURCE_DIR}/Kademlia.java
12   ${CMAKE_CURRENT_SOURCE_DIR}/KademliaTask.java
13   ${CMAKE_CURRENT_SOURCE_DIR}/Node.java
14   ${CMAKE_CURRENT_SOURCE_DIR}/PingAnswerTask.java
15   ${CMAKE_CURRENT_SOURCE_DIR}/PingTask.java
16   ${CMAKE_CURRENT_SOURCE_DIR}/RoutingTable.java
17   )
18
19 if(enable_java)
20   add_custom_command(
21     COMMENT "Building ${example}..."
22     OUTPUT ${example}_compiled
23     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
24     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
25                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
26     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
27     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
28   )
29   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
30 endif()
31
32 set(tesh_files
33   ${tesh_files}
34   ${CMAKE_CURRENT_SOURCE_DIR}/kademlia.tesh
35   PARENT_SCOPE
36   )
37 set(xml_files
38   ${xml_files}
39   ${CMAKE_CURRENT_SOURCE_DIR}/kademlia.xml
40   PARENT_SCOPE
41   )
42 set(examples_src
43   ${examples_src}
44   ${sources}
45   PARENT_SCOPE
46   )
47 set(bin_files
48   ${bin_files}
49   PARENT_SCOPE
50   )
51 set(txt_files
52   ${txt_files}
53   PARENT_SCOPE
54   )