Skip to content

Commit

Permalink
Move 3rd party lib to 3rd party directory and update path consequently
Browse files Browse the repository at this point in the history
  • Loading branch information
Perrine Aguiar committed Nov 22, 2016
1 parent f088376 commit 73c2c1b
Show file tree
Hide file tree
Showing 22 changed files with 3,020 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "miniglog"]
path = miniglog
path = third_party/miniglog
url = https://github.com/tzutalin/miniglog
[submodule "third_party/glog_catkin"]
path = third_party/glog_catkin
Expand Down
8 changes: 4 additions & 4 deletions RosApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* Download the roscpp\_android\_ndk [here](http://wiki.ros.org/android_ndk/Tutorials/Building%20The%20Example%20Applications%20using%20the%20Binary%20Distribution).
(See the second section *Get the files*)

* The roscpp\_android\_ndk should be placed inside the TangoApps directory.
* The roscpp\_android\_ndk should be placed inside TangoApps/third_party/.

* Replace the original Android.mk file of the roscpp\_android\_ndk by the one present in the Github repository under TangoApps/roscpp_android_ndk/.
* Replace the original Android.mk file of the roscpp\_android\_ndk by the one present in the Github repository under TangoApps/third\_party/roscpp\_android\_ndk/.

### The OpenCV sdk

* Download the OpenCV sdk [here](http://docs.opencv.org/2.4/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#get-the-opencv4android-sdk).

* Unpack it and copy the content of OpenCV-android-sdk/sdk/native/ into TangoApps/OpenCV_sdk_native.
* Unpack it and copy the content of OpenCV-android-sdk/sdk/native/ into TangoApps/third\_party/OpenCV\_sdk_native.

### Miniglog

* From the TangoApps repository:
```$ cd miniglog```
```$ cd third_party/miniglog```
```$ ./build.sh```

### Building the app with android studio
Expand Down
8 changes: 4 additions & 4 deletions tango_ros_common/tango_ros_native/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(CLEAR_VARS)
OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=STATIC
include $(PROJECT_ROOT)/../OpenCV_sdk_native/jni/OpenCV.mk
include $(PROJECT_ROOT)/../third_party/OpenCV_sdk_native/jni/OpenCV.mk

LOCAL_MODULE := tango_ros_native
LOCAL_SRC_FILES := $(LOCAL_PATH)/src/tango_ros_node.cpp $(LOCAL_PATH)/src/tango_ros_util.cpp
Expand All @@ -18,9 +18,9 @@ LOCAL_SHARED_LIBRARIES := tango_client_api tango_support_api
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)

include $(PROJECT_ROOT)/../miniglog/Android.mk
$(call import-add-path, $(PROJECT_ROOT)/..)
include $(PROJECT_ROOT)/../third_party/miniglog/Android.mk
$(call import-add-path, $(PROJECT_ROOT)/../third_party)
$(call import-module,roscpp_android_ndk)
$(call import-add-path, $(PROJECT_ROOT)/../tango_api)
$(call import-add-path, $(PROJECT_ROOT)/../third_party/tango_api)
$(call import-module,tango_client_api)
$(call import-module,tango_support_api)
1 change: 1 addition & 0 deletions third_party/miniglog
Submodule miniglog added at 7bfb25
36 changes: 36 additions & 0 deletions third_party/roscpp_android_ndk/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
LOCAL_PATH := $(call my-dir)

# These must go in some sort of order like include flags, otherwise they are dropped
# Oh no, need to automate this with catkin somehow....
stlibs := roscpp boost_signals boost_filesystem rosconsole rosconsole_print rosconsole_backend_interface boost_regex xmlrpcpp dynamic_reconfigure_config_init_mutex roscpp_serialization rostime boost_date_time cpp_common boost_system boost_thread console_bridge rotate_recovery tinyxml class_loader PocoFoundation roslib global_planner navfn costmap_2d layers laser_geometry pcl_ros_filters pcl_ros_io pcl_ros_tf pcl_common pcl_octree pcl_kdtree pcl_search pcl_sample_consensus pcl_filters pcl_io pcl_features pcl_registration pcl_surface pcl_tracking pcl_ml pcl_keypoints pcl_segmentation pcl_stereo pcl_recognition boost_iostreams qhullstatic flann_cpp_s flann_cpp_s-gd nodeletlib bondcpp uuid rosbag rosbag_storage boost_program_options roslz4 lz4 topic_tools voxel_grid tf tf2_ros actionlib message_filters tf2 move_slow_and_clear dwa_local_planner clear_costmap_recovery carrot_planner base_local_planner trajectory_planner_ros robot_state_publisher_solver tf_conversions kdl_conversions kdl_parser orocos-kdl urdfdom_sensor urdfdom_model_state urdfdom_model urdfdom_world rosconsole_bridge moveit_exceptions moveit_background_processing moveit_kinematics_base moveit_robot_model moveit_transforms moveit_robot_state moveit_robot_trajectory moveit_planning_interface moveit_collision_detection moveit_collision_detection_fcl moveit_kinematic_constraints moveit_planning_scene moveit_constraint_samplers moveit_planning_request_adapter moveit_profiler moveit_trajectory_processing moveit_distance_field moveit_kinematics_metrics moveit_dynamics_solver geometric_shapes octomap octomath shape_tools eigen_conversions random_numbers srdfdom pointcloud_filters laser_scan_filters mean params increment median transfer_function interactive_markers compressed_image_transport cv_bridge image_transport compressed_depth_image_transport amcl_sensors amcl_map amcl_pf depth_image_proc stereo_image_proc image_proc image_geometry polled_camera camera_info_manager pluginlib_tutorials nodelet_math collada_parser camera_calibration_parsers resource_retriever rospack


#shlibs :=

define include_shlib
$(eval include $$(CLEAR_VARS))
$(eval LOCAL_MODULE := $(1))
$(eval LOCAL_SRC_FILES := $$(LOCAL_PATH)/lib/lib$(1).so)
$(eval include $$(PREBUILT_SHARED_LIBRARY))
endef
define include_stlib
$(eval include $$(CLEAR_VARS))
$(eval LOCAL_MODULE := $(1))
$(eval LOCAL_SRC_FILES := $$(LOCAL_PATH)/lib/lib$(1).a)
$(eval include $$(PREBUILT_STATIC_LIBRARY))
endef

#$(foreach shlib,$(shlibs),$(eval $(call include_shlib,$(shlib))))
$(foreach stlib,$(stlibs),$(eval $(call include_stlib,$(stlib))))

include $(CLEAR_VARS)
LOCAL_MODULE := roscpp_android_ndk
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_CPPFLAGS := -fexceptions -frtti
#LOCAL_SRC_FILES := dummy.cpp
#LOCAL_EXPORT_LDLIBS := $(foreach l,$(shlibs),-l$(l)) -L$(LOCAL_PATH)/lib
#LOCAL_EXPORT_LDLIBS := -lstdc++ #-L$(LOCAL_PATH)/lib
#LOCAL_SHARED_LIBRARIES := $(shlibs)
LOCAL_STATIC_LIBRARIES := $(stlibs) gnustl_static

include $(BUILD_STATIC_LIBRARY)
30 changes: 30 additions & 0 deletions third_party/tango_api/tango_client_api/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2014 Google Inc. All Rights Reserved.
# Distributed under the Project Tango Preview Development Kit (PDK) Agreement.
# CONFIDENTIAL. AUTHORIZED USE ONLY. DO NOT REDISTRIBUTE.
# NDK import module for resolving symbols from selected private Android APIs.
### IMPORTANT ###
# This module has a non-standard extra step. Usage:
# $(call import-module,AndroidSystemLibs)
# $(call module-add-static-depends,<MY_MODULE>,AndroidSystemLibs)
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := tango_client_api


ifeq ($(TARGET_ARCH), x86)
LOCAL_EXPORT_LDLIBS := -L$(LOCAL_PATH)/lib/x86 -ltango_client_api
endif

ifeq ($(TARGET_ARCH), arm64)
LOCAL_EXPORT_LDLIBS := -L$(LOCAL_PATH)/lib/arm64-v8a -ltango_client_api
endif

ifeq ($(TARGET_ARCH), arm)
LOCAL_EXPORT_LDLIBS := -L$(LOCAL_PATH)/lib/armeabi-v7a -ltango_client_api
endif

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := lib/libtango_client_stub.a

include $(PREBUILT_STATIC_LIBRARY)
27 changes: 27 additions & 0 deletions third_party/tango_api/tango_client_api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 2.8.3)
project(tango_client_api)

find_package(catkin REQUIRED)

catkin_package(
INCLUDE_DIRS include
)

include_directories(
include
${catkin_INCLUDE_DIRS}
)

add_library(tango_client_api
src/tango_client_api.cpp
)

target_link_libraries(tango_client_api
${catkin_LIBRARIES}
)

install(TARGETS tango_client_api
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
Loading

0 comments on commit 73c2c1b

Please sign in to comment.