mirror of
https://github.com/louisrubet/rpn
synced 2024-11-16 07:47:26 +01:00
#135: CMake file to build all packages
This commit is contained in:
parent
4bc33791d8
commit
3d21b1e5db
3 changed files with 30 additions and 19 deletions
|
@ -16,6 +16,9 @@ set(RPN_DISPLAY_NAME "rpn")
|
|||
set(RPN_URL_INFO_ABOUT "https://github.com/louisrubet/rpn")
|
||||
set(RPN_CONTACT "Louis Rubet <louis@rubet.fr>")
|
||||
set(RPN_FRIENDLY_STRING "rpn - Reverse Polish Notation language")
|
||||
set(RPN_LICENSE "LGPLv3")
|
||||
set(RPN_LICENSE_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||
set(RPN_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
|
||||
|
||||
# compiler options
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -45,15 +48,21 @@ target_link_libraries(rpn libgmp.a)
|
|||
# install
|
||||
install(TARGETS rpn DESTINATION bin)
|
||||
|
||||
# packages
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${RPN_DISPLAY_NAME}-${RPN_VERSION}-amd64")
|
||||
# packages (common variables for all packages)
|
||||
SET(CPACK_PACKAGE_NAME ${RPN_DISPLAY_NAME})
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${RPN_DISPLAY_NAME}-${RPN_VERSION}-amd64")
|
||||
SET(CPACK_PACKAGE_VERSION ${RPN_VERSION})
|
||||
set(CPACK_PACKAGE_RELEASE 0)
|
||||
SET(CPACK_PACKAGE_CONTACT ${RPN_CONTACT})
|
||||
set(CPACK_PACKAGE_VENDOR ${RPN_CONTACT})
|
||||
set(CPACK_PACKAGE_LICENSE ${RPN_LICENSE})
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY, ${RPN_FRIENDLY_STRING})
|
||||
SET(CPACK_PACKAGE_DESCRIPTION, ${RPN_FRIENDLY_STRING})
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${RPN_DESCRIPTION_FILE})
|
||||
|
||||
# DEB package
|
||||
SET(CPACK_GENERATOR "DEB")
|
||||
SET(CPACK_GENERATOR "DEB;RPM;TGZ")
|
||||
SET(CPACK_DEBIAN_PACKAGE_NAME ${RPN_DISPLAY_NAME})
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION, ${RPN_FRIENDLY_STRING})
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${RPN_CONTACT})
|
||||
|
@ -62,3 +71,5 @@ SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${SYSTEM_PROCESSOR})
|
|||
SET(CPACK_DEBIAN_PACKAGE_SECTION "math")
|
||||
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
include(CPack)
|
||||
|
||||
# RPM package
|
||||
|
|
|
@ -59,8 +59,6 @@ rpn v2.2 is statically linked against
|
|||
|
||||
CMake must be installed on the generation machine
|
||||
|
||||
To build RPM package you should install CMake 2.6.0 or higher
|
||||
|
||||
```
|
||||
# cd rpn/
|
||||
# mkdir build
|
||||
|
@ -74,19 +72,20 @@ rpn v2.2 is statically linked against
|
|||
```
|
||||
|
||||
- packages
|
||||
- DEB
|
||||
|
||||
To build RPM package you should install CMake 2.6.0 or higher
|
||||
|
||||
```
|
||||
# cd rpn/build
|
||||
# make package
|
||||
```
|
||||
- RPM
|
||||
rpmbuild must be installed
|
||||
```
|
||||
# cd rpn/build
|
||||
# cpack -G RPM
|
||||
```
|
||||
- TGZ
|
||||
```
|
||||
# cd rpn/build
|
||||
# cpack -G TGZ
|
||||
```
|
||||
[100%] Built target rpn
|
||||
Run CPack packaging tool...
|
||||
CPack: Create package using DEB
|
||||
(...)
|
||||
CPack: Create package using RPM
|
||||
(...)
|
||||
CPack: Create package using TGZ
|
||||
(...)
|
||||
# ls rpn*
|
||||
rpn rpn-2.1-amd64.deb rpn-2.1-amd64.rpm rpn-2.1-amd64.tar.gz
|
||||
```
|
||||
|
|
|
@ -45,8 +45,9 @@ rpn>
|
|||
|
||||
### Objects
|
||||
|
||||
Following objects are managed: **floating numbers**, **symbols**, **strings**, **programs**, plus language **keywords** (commands and flow controls)
|
||||
Following objects are managed: **floating numbers**, **complexes**, **symbols**, **strings**, **programs**, plus language **keywords** (commands and flow controls)
|
||||
```
|
||||
5> (1,-2.33)
|
||||
4> 'symbol'
|
||||
3> "string"
|
||||
2> 12.3456
|
||||
|
|
Loading…
Reference in a new issue