Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compile dronecore_server for Android and iOS #261

Merged
merged 8 commits into from
Feb 12, 2018

Conversation

JonasVautherin
Copy link
Collaborator

@JonasVautherin JonasVautherin commented Feb 11, 2018

Compile dronecore_server and its dependencies on Android and iOS (when BUILD_DRONECORESERVER is set).

It has been tested to run on Android armeabi-v7a, though it had some warnings in Debug mode. There was a segmentation fault with armeabi, which we may or may not want to address depending on the devices we target right now.

Some work now needs to be done on dronecore_server itself before it can be tested on an iOS app (I will work on that from tomorrow on).

Fixes #212, fixes #213

@JonasVautherin JonasVautherin changed the title 212 cross compile android Cross compile dronecore_server for Android and iOS Feb 11, 2018
@@ -5,8 +5,17 @@ function(build_target SRC_DIR TARGET_DIR)
COMMAND ${CMAKE_COMMAND}
-G${CMAKE_GENERATOR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The " are a bit ugly but I guess that's required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, unfortunately it is, for lists :-). I just tried to rebuild without the quotes and it fails.

set(GRPC_CPP_PLUGIN_BINARY ${CMAKE_BINARY_DIR}/../default/third_party/grpc/bin/grpc_cpp_plugin)

if(NOT EXISTS ${PROTOC_BINARY} OR NOT EXISTS ${GRPC_CPP_PLUGIN_BINARY})
message(FATAL_ERROR "Could not find 'protoc' or 'grpc_cpp_plugin' in the 'default' build folder. Please build for your host first (`make BUILD_DRONECORESERVER=YES default`).")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to warn like that.

@@ -1,4 +1,4 @@
add_library(dronecore_mission SHARED
add_library(dronecore_mission ${PLUGIN_LIBRARY_TYPE}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other plugins will need that too, not just the three we have right now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll change that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'll merge like this and will change that when adding those plugins to dronecore_server.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sure!

@JonasVautherin JonasVautherin merged commit 65f57f8 into develop Feb 12, 2018
@JonasVautherin JonasVautherin deleted the 212-cross-compile-android branch February 12, 2018 14:58
dlech pushed a commit to dlech/MAVSDK that referenced this pull request Jan 14, 2022
mission: add way to set up trigger distance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-compile the backend for iOS Cross-compile the backend for Android
2 participants