forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
88 additions
and
52 deletions.
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
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 |
---|---|---|
|
@@ -34,30 +34,67 @@ | |
# packaging | ||
|
||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${PX4_CONFIG}) | ||
set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG}) | ||
set(CPACK_PACKAGE_CONTACT ${package-contact}) | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # TODO: review packaging for linux boards | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel") | ||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") | ||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.") | ||
|
||
set(CPACK_PACKAGE_VENDOR "px4") | ||
|
||
set(CPACK_PACKAGE_VERSION_MAJOR ${PX4_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PX4_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PX4_VERSION_PATCH}) | ||
#set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG}) | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_CONFIG}-${PX4_GIT_TAG}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_GIT_TAG}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_CONFIG}-${PX4_GIT_TAG}-src") | ||
|
||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
|
||
set(CPACK_RESOURCE_FILE_LICENSE "${PX4_SOURCE_DIR}/LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${PX4_SOURCE_DIR}/README.md") | ||
|
||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)#ONE_PER_GROUP) | ||
# without this you won't be able to pack only specified component | ||
set(CPACK_DEB_COMPONENT_INSTALL YES) | ||
|
||
#set(CPACK_STRIP_FILES YES) | ||
|
||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2") | ||
set(CPACK_PACKAGING_INSTALL_PREFIX "") | ||
set(CPACK_SET_DESTDIR "OFF") | ||
|
||
if ("${CMAKE_SYSTEM}" MATCHES "Linux") | ||
if("${CMAKE_SYSTEM}" MATCHES "Linux") | ||
set(CPACK_GENERATOR "TBZ2") | ||
|
||
find_program(DPKG_PROGRAM dpkg) | ||
if (EXISTS ${DPKG_PROGRAM}) | ||
list (APPEND CPACK_GENERATOR "DEB") | ||
if(EXISTS ${DPKG_PROGRAM}) | ||
list(APPEND CPACK_GENERATOR "DEB") | ||
|
||
set(CPACK_SET_DESTDIR true) | ||
set(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") | ||
|
||
execute_process(COMMAND ${DPKG_PROGRAM} --print-architecture OUTPUT_VARIABLE DEB_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
message("Architecture: " ${DEB_ARCHITECTURE}) | ||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${DEB_ARCHITECTURE}") | ||
|
||
set(CPACK_INSTALL_PREFIX @DEB_INSTALL_PREFIX@) | ||
message ("==> CPACK_INSTALL_PREFIX = " ${CPACK_INSTALL_PREFIX}) | ||
|
||
################################################################################ | ||
|
||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Agar <${CPACK_PACKAGE_CONTACT}>") | ||
set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
|
||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PX4 autopilot") | ||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "misc") | ||
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) | ||
|
||
# autogenerate dependency information | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) | ||
set(CPACK_DEBIAN_COMPRESSION_TYPE xz) | ||
|
||
endif() | ||
else() | ||
set(CPACK_GENERATOR "ZIP") | ||
endif() | ||
|
||
include(CPack) | ||
|
||
if(${PX4_PLATFORM} MATCHES "nuttx") | ||
include(bloaty) | ||
endif() |
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