-
Notifications
You must be signed in to change notification settings - Fork 710
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
Added a new cmake_build for generating a debian #855
Open
tarunkartik
wants to merge
3
commits into
BehaviorTree:master
Choose a base branch
from
tarunkartik:generate_behaviortree_deb
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
if(BTCPP_GROOT_INTERFACE) | ||
find_package(ZeroMQ REQUIRED) | ||
list(APPEND BTCPP_EXTRA_LIBRARIES ${ZeroMQ_LIBRARIES}) | ||
list(APPEND BTCPP_EXTRA_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}) | ||
message(STATUS "ZeroMQ_LIBRARIES: ${ZeroMQ_LIBRARIES}") | ||
endif() | ||
|
||
if(BTCPP_SQLITE_LOGGING) | ||
find_package(SQLite3 REQUIRED) | ||
list(APPEND BTCPP_EXTRA_LIBRARIES ${SQLite3_LIBRARIES}) | ||
message(STATUS "SQLite3_LIBRARIES: ${SQLite3_LIBRARIES}") | ||
endif() | ||
|
||
|
||
set( BTCPP_LIB_DESTINATION lib ) | ||
set( BTCPP_INCLUDE_DESTINATION include ) | ||
set( BTCPP_BIN_DESTINATION bin ) | ||
set( BTCPP_CMAKE_DESTINATION ${CMAKE_INSTALL_PREFIX}/share ) | ||
|
||
# CPack configuration | ||
set( CPACK_GENERATOR "DEB" ) | ||
set( CPACK_PACKAGE_NAME "behaviortree-cpp" ) | ||
set( CPACK_PACKAGE_VERSION ${PROJECT_VERSION} ) | ||
set( CPACK_PACKAGE_DESCRIPTION "BehaviorTree.CPP library" ) | ||
set( CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/BehaviorTree/BehaviorTree.CPP" ) | ||
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libc6, libzmq3-dev, libsqlite3-dev" ) | ||
set( CPACK_DEBIAN_PACKAGE_SECTION "devel" ) | ||
set( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" ) | ||
set( CPACK_PACKAGE_CONTACT "example <[email protected]>" ) | ||
set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON ) | ||
|
||
include(CPack) | ||
|
||
mark_as_advanced( | ||
BTCPP_EXTRA_LIBRARIES | ||
BTCPP_LIB_DESTINATION | ||
BTCPP_INCLUDE_DESTINATION | ||
BTCPP_BIN_DESTINATION ) | ||
|
||
macro(export_btcpp_package) | ||
|
||
install(EXPORT ${PROJECT_NAME}Targets | ||
FILE "${PROJECT_NAME}Targets.cmake" | ||
DESTINATION "${BTCPP_CMAKE_DESTINATION}/cmake/${PROJECT_NAME}" | ||
NAMESPACE BT:: | ||
) | ||
export(PACKAGE ${PROJECT_NAME}) | ||
|
||
include(CMakePackageConfigHelpers) | ||
|
||
configure_package_config_file( | ||
"${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" | ||
INSTALL_DESTINATION "${BTCPP_CMAKE_DESTINATION}/cmake/${PROJECT_NAME}" | ||
) | ||
|
||
install( | ||
FILES | ||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" | ||
DESTINATION "${BTCPP_CMAKE_DESTINATION}/cmake/${PROJECT_NAME}" | ||
) | ||
endmacro() | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of adding this? Shouldn't it be the default ON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent is that the users would turn this ON only when they need standalone debians that do not depend on ROS (catkin/ament). That was my requirement for a project I have been working on where I am using BTCPP with a custom RTOS.
Maybe the variable could be named 'GENERATE_DEBS' instead of 'CMAKE_BUILD', if that makes it clearer?