diff options
author | Arne Schwabe <arne@rfc2549.org> | 2018-02-06 13:24:17 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2018-02-06 13:24:17 +0100 |
commit | f3c03a37a92ca0a69ed9ba49f720a4671899f84a (patch) | |
tree | f95426b7b0fad485eb0d8a3f690494b03931531c | |
parent | 68ecf387e4ec820850eba2e1661b43faf7ce6ea1 (diff) |
Be a bit more clever finding swig
-rw-r--r-- | main/src/main/cpp/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/src/main/cpp/CMakeLists.txt b/main/src/main/cpp/CMakeLists.txt index 65447398..ee12c1e4 100644 --- a/main/src/main/cpp/CMakeLists.txt +++ b/main/src/main/cpp/CMakeLists.txt @@ -21,10 +21,12 @@ include(openssl.cmake) # Super hacky way to determine flavour #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/arne/software/icsopenvpn/main/build/intermediates/cmake/normal/debug/obj/arm64-v8a if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*noovpn3.*/") + FIND_PACKAGE(SWIG 3.0) + add_subdirectory(mbedtls) add_custom_command(OUTPUT "ovpncli_wrap.cxx" COMMAND ${CMAKE_COMMAND} -E make_directory ovpn3 - COMMAND swig -outdir ovpn3 + COMMAND ${SWIG_EXECUTABLE} -outdir ovpn3 -c++ -java -package net.openvpn.ovpn3 -outcurrentdir @@ -32,6 +34,15 @@ if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*n -I${CMAKE_SOURCE_DIR}/openvpn3 ${CMAKE_SOURCE_DIR}/openvpn3/javacli/ovpncli.i) + + # proper way bunt unfinished + #INCLUDE(${SWIG_USE_FILE}) + #SET_SOURCE_FILES_PROPERTIES(openvpn3/javacli/ovpncli.i PROPERTIES SWIG_FLAGS "-package net.openvpn.ovpn3") + #SET_SOURCE_FILES_PROPERTIES(openvpn3/javacli/ovpncli.i PROPERTIES CPLUSPLUS ON) + #SWIG_ADD_MODULE(ovpen3cli java openvpn3/javacli/ovpncli.i) + + + set(ovpn3_SRCS openvpn3/client/ovpncli.cpp ovpncli_wrap.cxx) |