summaryrefslogtreecommitdiff
path: root/src/java/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/CMakeLists.txt')
-rw-r--r--src/java/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt
new file mode 100644
index 0000000..8095bdb
--- /dev/null
+++ b/src/java/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generate Java wrapper
+include_directories(../)
+
+set(KOLAB_SWIG_JAVA_SOURCE_FILE csharp_kolabformat_wrapper.cpp)
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_JAVA_SOURCE_FILE}
+ COMMAND ${SWIG} -v -c++ -java -o ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_JAVA_SOURCE_FILE} ../kolabformat.i
+ COMMENT "Generating Java bindings"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ../kolabformat.i kolabxml
+ VERBATIM
+ )
+SET_SOURCE_FILES_PROPERTIES(${KOLAB_SWIG_JAVA_SOURCE_FILE} PROPERTIES GENERATED 1)
+ADD_CUSTOM_TARGET(generate_JAVA_bindings ALL DEPENDS ${KOLAB_SWIG_JAVA_SOURCE_FILE})
+
+# Compile JAVA Bindings
+