summaryrefslogtreecommitdiffstats
path: root/examples/java/CMakeLists.txt
blob: 6a5e01395625f3c7b103b7d06853f69afcfbeb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# examples/java/CMakeLists.txt
find_package(Java REQUIRED)
include(UseJava)

add_jar(HelloTinyB SOURCES HelloTinyB.java INCLUDE_JARS direct_bt_jar ENTRY_POINT HelloTinyB)
add_custom_command(TARGET HelloTinyB
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/HelloTinyB.dir/HelloTinyB.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(HelloTinyB direct_bt_jar)

add_jar(AsyncTinyB SOURCES AsyncTinyB.java INCLUDE_JARS direct_bt_jar ENTRY_POINT AsyncTinyB)
add_custom_command(TARGET AsyncTinyB
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/AsyncTinyB.dir/AsyncTinyB.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(AsyncTinyB direct_bt_jar)

add_jar(Notification SOURCES Notification.java INCLUDE_JARS direct_bt_jar ENTRY_POINT Notification)
add_custom_command(TARGET Notification
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/Notification.dir/Notification.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(Notification direct_bt_jar)

add_jar(ScannerTinyB00 SOURCES ScannerTinyB00.java INCLUDE_JARS direct_bt_jar ENTRY_POINT Notification)
add_custom_command(TARGET ScannerTinyB00
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/ScannerTinyB00.dir/ScannerTinyB00.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(ScannerTinyB00 direct_bt_jar)

add_jar(ScannerTinyB01 SOURCES ScannerTinyB01.java INCLUDE_JARS direct_bt_jar ENTRY_POINT Notification)
add_custom_command(TARGET ScannerTinyB01
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/ScannerTinyB01.dir/ScannerTinyB01.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(ScannerTinyB01 direct_bt_jar)

add_jar(ScannerTinyB02 SOURCES ScannerTinyB02.java INCLUDE_JARS direct_bt_jar ENTRY_POINT Notification)
add_custom_command(TARGET ScannerTinyB02
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/ScannerTinyB02.dir/ScannerTinyB02.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(ScannerTinyB02 direct_bt_jar)

add_jar(DBTScanner10 SOURCES DBTScanner10.java INCLUDE_JARS direct_bt_jar ENTRY_POINT Notification)
add_custom_command(TARGET DBTScanner10
        POST_BUILD
        COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/DBTScanner10.dir/DBTScanner10.class" "${CMAKE_CURRENT_BINARY_DIR}"
)
add_dependencies(DBTScanner10 direct_bt_jar)