Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
cpack: Reorganize variable definitions
Browse files Browse the repository at this point in the history
Move some definitions of some CPACK-related variables
from CMakePresets to CMakeLists.
  • Loading branch information
RoEdAl committed May 29, 2024
1 parent 49f45c2 commit 7cbbddc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,15 @@ IF(BUILD_CHAN_QUECTEL_BINARY)
IF(NOT DEFINED CPACK_PACKAGE_CONTACT)
SET(CPACK_PACKAGE_CONTACT "[email protected]")
ENDIF()
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
SET(CPACK_SET_DESTDIR ON)
SET(CPACK_STRIP_FILES ON)
SET(CPACK_THREADS 0)
SET(CPACK_ARCHIVE_THREADS 0)
SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")

IF(NOT DEFINED CPACK_GENERATOR)
SET(CPACK_GENERATOR "TGZ;DEB")
SET(CPACK_GENERATOR TGZ DEB)
ENDIF()
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CPACK_PACKAGE_ARCHITECTURE})
SET(CPACK_DEBIAN_FILE_NAME "${CMAKE_PROJECT_NAME}_${CHAN_VER_FSTR}_${CPACK_PACKAGE_ARCHITECTURE}.deb")
Expand All @@ -307,6 +313,7 @@ IF(BUILD_CHAN_QUECTEL_BINARY)
ELSE()
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <${CPACK_PACKAGE_CONTACT}>")
ENDIF()
SET(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION ON)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libasound2, libsqlite3-0, asterisk")
SET(CPACK_DEBIAN_PACKAGE_SECTION comm)
SET(CPACK_DEBIAN_PACKAGE_PRIORITY optional)
Expand All @@ -324,7 +331,7 @@ IF(BUILD_CHAN_QUECTEL_BINARY)
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${PROJECT_BINARY_DIR}/cpack/deb/conffiles ${PROJECT_BINARY_DIR}/cpack/deb/postinst)

IF(NOT DEFINED CPACK_SOURCE_GENERATOR)
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR TGZ)
ENDIF()
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${CHAN_VER_FSTR}_src")
SET(CPACK_SOURCE_IGNORE_FILES "/build/;/install/;/package/;/test/;/tools/;/\.vscode/;/\.git/;/\.gitignore;/\.gitattributes")
Expand Down
16 changes: 0 additions & 16 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@
"type": "STRING",
"value": "Edmunt Pienkowsky"
},
"CPACK_SET_DESTDIR": {
"type": "BOOL",
"value": true
},
"CPACK_RESOURCE_FILE_LICENSE": {
"type": "FILEPATH",
"value": "${sourceDir}/LICENSE.md"
},
"CPACK_PACKAGE_CONTACT": {
"type": "STRING",
"value": "[email protected]"
Expand All @@ -67,14 +59,6 @@
"type": "STRING",
"value": "SHA256"
},
"CPACK_STRIP_FILES": {
"type": "BOOL",
"value": true
},
"CPACK_THREADS": {
"type": "STRING",
"value": "0"
},
"CPACK_PACKAGE_DIRECTORY": {
"type": "PATH",
"value": "${sourceDir}/package"
Expand Down

0 comments on commit 7cbbddc

Please sign in to comment.