Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
005c6f417e37b82373871db480c9071ecbd6109f
[simgrid.git] / examples / java / surfPlugin / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example java_surf_plugin)
4 set(sources
5    ${CMAKE_CURRENT_SOURCE_DIR}/TestPlugin.java
6    ${CMAKE_CURRENT_SOURCE_DIR}/TracePlugin.java
7    ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java
8    ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
9   )
10
11 if(enable_java)
12   add_custom_command(
13     COMMENT "Building ${example}..."
14     OUTPUT ${example}_compiled
15     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
16     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
17                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
18     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
19     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
20   )
21   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
22 endif()
23
24 set(tesh_files
25   ${tesh_files}
26   ${CMAKE_CURRENT_SOURCE_DIR}/surf_plugin.tesh
27   PARENT_SCOPE
28   )
29 set(xml_files
30   ${xml_files}
31   ${CMAKE_CURRENT_SOURCE_DIR}/surfPluginPlatform.xml
32   ${CMAKE_CURRENT_SOURCE_DIR}/surfPluginDeployment.xml  
33   PARENT_SCOPE
34   )
35 set(examples_src
36   ${examples_src}
37   ${sources}
38   PARENT_SCOPE
39   )
40 set(bin_files
41   ${bin_files}
42   PARENT_SCOPE
43   )
44 set(txt_files
45   ${txt_files}
46   ${CMAKE_CURRENT_SOURCE_DIR}/README
47   PARENT_SCOPE
48   )