forked from Archive/PX4-Autopilot
Automatically set cmake version.
This commit is contained in:
parent
73462dc5e5
commit
50159cabbe
|
@ -242,17 +242,20 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
|||
cmake_policy(SET CMP0054 NEW) # don't dereference quoted variables
|
||||
endif()
|
||||
|
||||
# version info from git
|
||||
execute_process(
|
||||
COMMAND Tools/tag_to_version.py ${PX4_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE version
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
execute_process(
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
set(version_major 1)
|
||||
set(version_minor 5)
|
||||
set(version_patch 0)
|
||||
set(version "${version_major}.${version_minor}.${version_patch}")
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
message(STATUS "PX4 VERSION: ${version}")
|
||||
|
||||
#=============================================================================
|
||||
# find programs and packages
|
||||
|
|
8
Makefile
8
Makefile
|
@ -260,11 +260,9 @@ format:
|
|||
check_%:
|
||||
@echo
|
||||
$(call colorecho,"Building" $(subst check_,,$@))
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@mkdir -p Binaries
|
||||
@mkdir -p Meta/$(subst check_,,$@)
|
||||
@cp build_$(subst check_,,$@)/*.xml Meta/$(subst check_,,$@) 2> /dev/null || :
|
||||
@find build_$(subst check_,,$@)/src/firmware -type f -name 'nuttx-*-default.px4' -exec cp "{}" Binaries \; 2> /dev/null || :
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@) package
|
||||
@mkdir -p Packages
|
||||
@cp build_$(subst check_,,$@)/*.zip Packages
|
||||
@rm -rf build_$(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
|
|
Loading…
Reference in New Issue