Skip to content

Commit

Permalink
Fix package generation versioning.
Browse files Browse the repository at this point in the history
Signed-off-by: Rule Timothy (CC/EMT2) <[email protected]>
  • Loading branch information
timrulebosch committed May 22, 2023
1 parent 8ed32ff commit d05beb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 3 additions & 8 deletions dse/modelc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
cmake_minimum_required(VERSION 3.21)

# set(CMAKE_VERBOSE_MAKEFILE ON)
set(VERSION "$ENV{PACKAGE_VERSION}")

project(ModelC
DESCRIPTION "DSE Model C including: SimBus and ModelC."
HOMEPAGE_URL "${PROJECT_URL}"
)
set(VERSION "$ENV{PACKAGE_VERSION}")
set(PROJECT_VERSION ${VERSION})

include(GNUInstallDirs)
Expand Down Expand Up @@ -307,15 +307,10 @@ add_subdirectory(examples)
set(CPACK_SYSTEM_NAME $ENV{PACKAGE_ARCH})
set(CPACK_PACKAGE_VENDOR "Robert Bosch GmbH")
set(CPACK_PACKAGE_DESCRIPTION "DSE Model C including: SimBus and ModelC")
set(CPACK_PACKAGE_VERSION $ENV{PACKAGE_VERSION})
set(CPACK_OUTPUT_FILE_PREFIX _dist)
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_CHECKSUM MD5)

# Note: Component install is currently disabled, in order to get a single ZIP
# distribution with examples included.
# set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
# get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
set(CPACK_ARCHIVE_MODELC_FILE_NAME "ModelC-$ENV{PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
# set(CPACK_ARCHIVE_DYNAMIC_MODEL_FILE_NAME "DynamicModel-$ENV{PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
set(CPACK_PACKAGE_FILE_NAME "ModelC-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")

include(CPack)
6 changes: 6 additions & 0 deletions dse/modelc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ build: external
@find build/_out/ -type f -name '*' -exec ls -sh --color=auto {} \;

package:
@echo "Package parameters:"
@echo "-------------------"
@echo "NAMESPACE : $(NAMESPACE)"
@echo "MODULE : $(MODULE)"
@echo "VERSION : $(PACKAGE_VERSION)"
@echo "ARCH : $(PACKAGE_ARCH)"
cd build; make package
@echo ""
@echo "Package files: - $$(pwd)/build/_dist"
Expand Down

0 comments on commit d05beb5

Please sign in to comment.