Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpack] Add CPackConfig.cmake with common variables and logic
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
if(NOT CPACK_PACKAGE_NAME) | ||
set(CPACK_PACKAGE_NAME ${APP_NAME_LC}) | ||
endif() | ||
if(NOT CPACK_PACKAGE_VENDOR) | ||
set(CPACK_PACKAGE_VENDOR ${COMPANY_NAME}) | ||
endif() | ||
if(NOT CPACK_PACKAGE_DIRECTORY) | ||
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR}/packages) | ||
endif() | ||
if(NOT CPACK_PACKAGE_VERSION) | ||
set(CPACK_PACKAGE_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}) | ||
endif() | ||
if(NOT CPACK_PACKAGE_VERSION_MAJOR) | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${APP_VERSION_MAJOR}) | ||
endif() | ||
if(NOT CPACK_PACKAGE_VERSION_MINOR) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${APP_VERSION_MINOR}) | ||
endif() | ||
if(NOT CPACK_PACKAGE_VERSION_PATCH) | ||
set(CPACK_PACKAGE_VERSION_PATCH "0") | ||
endif() | ||
if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "\ | ||
Kodi®, formerly known as XBMC™, is an award-winning free and open source (GPL) \ | ||
software media center for playing videos, music, pictures, games, and more") | ||
endif() | ||
if(NOT CPACK_SYSTEM_NAME) | ||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_PROCESSOR}) | ||
if(CPACK_SYSTEM_NAME STREQUAL x86_64) | ||
set(CPACK_SYSTEM_NAME amd64) | ||
endif() | ||
endif() | ||
if(NOT CPACK_PACKAGE_FILE_NAME) | ||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") | ||
endif() | ||
if(NOT CPACK_PACKAGE_INSTALL_DIRECTORY) | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${APP_NAME_LC}) | ||
endif() | ||
|