Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
ROS Java Build Tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CeTI
ROS
ROS Java Packages
ROS Java Build Tools
Commits
dbb49b39
Commit
dbb49b39
authored
May 29, 2013
by
Daniel Stonier
Browse files
Options
Downloads
Patches
Plain Diff
android setup macro for catkin.
parent
d953f2bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/rosjava.cmake.em
+47
-0
47 additions, 0 deletions
cmake/rosjava.cmake.em
with
47 additions
and
0 deletions
cmake/rosjava.cmake.em
+
47
−
0
View file @
dbb49b39
##############################################################################
# Utilities
##############################################################################
# Scans down directories till it finds the gradle wrapper.
# Scans down directories till it finds the gradle wrapper.
# It sets the following variables
# It sets the following variables
# - ${PROJECT_NAME}_gradle_BINARY
# - ${PROJECT_NAME}_gradle_BINARY
...
@@ -31,6 +35,9 @@ macro(find_gradle_repo_root)
...
@@ -31,6 +35,9 @@ macro(find_gradle_repo_root)
get_filename_component(${PROJECT_NAME}_gradle_ROOT ${${PROJECT_NAME}_gradle_SETTINGS} PATH)
get_filename_component(${PROJECT_NAME}_gradle_ROOT ${${PROJECT_NAME}_gradle_SETTINGS} PATH)
endmacro()
endmacro()
##############################################################################
# RosJava Package
##############################################################################
# Calls the gradle wrapper to compile just the package
# Calls the gradle wrapper to compile just the package
# that it is called in.
# that it is called in.
# Experimental - probably better to leave gradle handle entire repos.
# Experimental - probably better to leave gradle handle entire repos.
...
@@ -58,6 +65,10 @@ macro(catkin_rosjava_setup task)
...
@@ -58,6 +65,10 @@ macro(catkin_rosjava_setup task)
add_dependencies(gradle-clean gradle-clean-${PROJECT_NAME})
add_dependencies(gradle-clean gradle-clean-${PROJECT_NAME})
endmacro()
endmacro()
##############################################################################
# RosJava Repo
##############################################################################
# Calls the root level gradle wrapper to run the multi-project
# Calls the root level gradle wrapper to run the multi-project
# configuration and compile the entire suite.
# configuration and compile the entire suite.
macro(catkin_rosjava_repo_setup task)
macro(catkin_rosjava_repo_setup task)
...
@@ -76,3 +87,39 @@ macro(catkin_rosjava_repo_setup task)
...
@@ -76,3 +87,39 @@ macro(catkin_rosjava_repo_setup task)
endif()
endif()
endforeach()
endforeach()
endmacro()
endmacro()
##############################################################################
# Android Package
##############################################################################
# Calls the gradle wrapper to compile the android package.
# It checks the build type and determines whether it should run
# assembleDebug or assembleRelease
macro(catkin_android_setup)
find_gradle()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(gradle_task "assembleRelase")
else()
set(gradle_task "assembleDebug")
endif()
add_custom_target(gradle-${PROJECT_NAME}
ALL
COMMAND ${CATKIN_ENV} ${${PROJECT_NAME}_gradle_BINARY} ${gradle_task}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
catkin_package_xml()
foreach(depends in ${${PROJECT_NAME}_BUILD_DEPENDS})
if(TARGET gradle-${depends})
#message(STATUS "Adding dependency gradle-${depends}")
add_dependencies(gradle-${PROJECT_NAME} gradle-${depends})
endif()
endforeach()
if(NOT TARGET gradle-clean)
add_custom_target(gradle-clean)
endif()
add_custom_target(gradle-clean-${PROJECT_NAME}
COMMAND ${CATKIN_ENV} ${${PROJECT_NAME}_gradle_BINARY} clean
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_dependencies(gradle-clean gradle-clean-${PROJECT_NAME})
endmacro()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment