Skip to content

Commit

Permalink
it now builds on android and almost on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Feb 8, 2018
1 parent fcd1a95 commit 096b52e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ if(ANDROID)
set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/android/include)
set(CURL_LIBRARY ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/android/${ANDROID_ABI}/libcurl.a)
elseif(IOS)
set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/ios/include)
set(CURL_LIBRARY ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/ios/libcurl.a)
set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/iOS/include)
set(CURL_LIBRARY ${CMAKE_SOURCE_DIR}/core/third_party/curl-android-ios/prebuilt-with-ssl/iOS/libcurl.a)
elseif(MSVC)
# You need to call cmake with -DWIN_CURL_INCLUDE_DIR:STRING="C:\\curl-7.54.1\\include"
if(NOT WIN_CURL_INCLUDE_DIR)
Expand Down
2 changes: 1 addition & 1 deletion grpc/server/cmake/helpers/build_external.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(DRONECORESERVER_EXTERNAL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/third
set(DRONECORESERVER_EXTERNAL_BINARY_DIR "${CMAKE_BINARY_DIR}/third_party")

# TODO SPARTA necessary?
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)

include(cmake/helpers/build_boringssl.cmake)
include(cmake/helpers/build_protobuf.cmake)
Expand Down
1 change: 0 additions & 1 deletion grpc/server/cmake/helpers/build_target.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
function(build_target SRC_DIR TARGET_DIR)
file(MAKE_DIRECTORY ${TARGET_DIR}/build)

message(FATAL " SPARTA - OPENSSLAADFADSFSFSDFASDFADFA ${OPENSSL_ROOT_DIR}")
execute_process(
COMMAND ${CMAKE_COMMAND}
-G${CMAKE_GENERATOR}
Expand Down
1 change: 0 additions & 1 deletion grpc/server/cmake/third_party/boringssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(external-boringssl)

include(ExternalProject)

#set(ARG_GIT_REPOSITORY /home/jones/Documents/px4/tmp/dronecore-grpc-bare/boringssl.git)
set(ARG_GIT_REPOSITORY https://github.com/google/boringssl.git)
set(ARG_GIT_TAG 56d5d7085dd1beea9af220678091fc51e4b50d3e)

Expand Down
1 change: 0 additions & 1 deletion grpc/server/cmake/third_party/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(external-cares)

include(ExternalProject)

#set(ARG_GIT_REPOSITORY /home/jones/Documents/px4/tmp/dronecore-grpc-bare/c-ares.git)
set(ARG_GIT_REPOSITORY https://github.com/c-ares/c-ares.git)
set(ARG_GIT_TAG cares-1_13_0)

Expand Down
10 changes: 6 additions & 4 deletions grpc/server/cmake/third_party/grpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ project(external-grpc)

include(ExternalProject)

#set(ARG_GIT_REPOSITORY /home/jones/Documents/px4/tmp/dronecore-grpc-bare/grpc-bare)
set(ARG_GIT_REPOSITORY https://github.com/dronecore/grpc.git)
set(GIT_TAG enable-android-ios-build)
set(ARG_GIT_TAG enable-android-ios-build)

# This answer probably saved me from destroying my computer:
# https://stackoverflow.com/questions/45414507/pass-a-list-of-prefix-paths-to-externalproject-add-in-cmake-args
Expand All @@ -23,6 +22,7 @@ if(ANDROID)
grpc
GIT_REPOSITORY ${ARG_GIT_REPOSITORY}
GIT_TAG ${ARG_GIT_TAG}
GIT_SUBMODULES third_party/benchmark third_party/gflags
PREFIX grpc
LIST_SEPARATOR |
CMAKE_ARGS
Expand All @@ -36,7 +36,7 @@ if(ANDROID)
-DRUN_HAVE_STD_REGEX=0
-DRUN_HAVE_POSIX_REGEX=0
-DRUN_HAVE_STEADY_CLOCK=0
-DgRPC_BUILD_CODEGEN=off
-DgRPC_BUILD_CODEGEN=OFF
-DgRPC_BUILD_TESTS=OFF
-DgRPC_ZLIB_PROVIDER=package
-DgRPC_CARES_PROVIDER=package
Expand All @@ -54,6 +54,7 @@ elseif(IOS)
grpc
GIT_REPOSITORY ${ARG_GIT_REPOSITORY}
GIT_TAG ${ARG_GIT_TAG}
GIT_SUBMODULES third_party/benchmark third_party/gflags
PREFIX grpc
LIST_SEPARATOR |
CMAKE_ARGS
Expand All @@ -66,7 +67,7 @@ elseif(IOS)
-DRUN_HAVE_STD_REGEX=0
-DRUN_HAVE_POSIX_REGEX=0
-DRUN_HAVE_STEADY_CLOCK=0
-DgRPC_BUILD_CODEGEN=off
-DgRPC_BUILD_CODEGEN=OFF
-DgRPC_BUILD_TESTS=OFF
-DgRPC_ZLIB_PROVIDER=package
-DgRPC_CARES_PROVIDER=package
Expand All @@ -83,6 +84,7 @@ else()
grpc
GIT_REPOSITORY ${ARG_GIT_REPOSITORY}
GIT_TAG ${ARG_GIT_TAG}
GIT_SUBMODULES third_party/benchmark third_party/gflags
PREFIX grpc
LIST_SEPARATOR |
CMAKE_ARGS
Expand Down
1 change: 0 additions & 1 deletion grpc/server/cmake/third_party/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(external-protobuf)

include(ExternalProject)

#set(ARG_GIT_REPOSITORY /home/jones/Documents/px4/tmp/dronecore-grpc-bare/protobuf-bare)
set(ARG_GIT_REPOSITORY https://github.com/google/protobuf.git)
set(ARG_GIT_TAG master)

Expand Down

0 comments on commit 096b52e

Please sign in to comment.