diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba43a614..f67d3d10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,6 +275,8 @@ set (GAWK_SOURCES ${GAWK_SOURCES} add_executable (gawk ${GAWK_SOURCES}) target_link_libraries (gawk m ${EXTRA_LIBS}) +set(CPACK_PACKAGING_INSTALL_PREFIX /usr) +install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk DESTINATION bin) # Beware: before building the extension, -DGAWK gets undefined. add_subdirectory(extension) @@ -285,3 +287,15 @@ if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE") add_subdirectory(doc) endif() +include(InstallRequiredSystemLibraries) +SET(CPACK_GENERATOR "TGZ") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This is GNU Awk ${GAWK_VERSION}") +SET(CPACK_PACKAGE_NAME "gawk") +SET(CPACK_PACKAGE_VERSION "${GAWK_VERSION}") +SET(CPACK_PACKAGE_VERSION_MAJOR "${GAWK_MAJOR_VERSION}") +SET(CPACK_PACKAGE_VERSION_MINOR "${GAWK_MINOR_VERSION}") +SET(CPACK_PACKAGE_VERSION_PATCH "${GAWK_BUGFIX_VERSION}") +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") +SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README") + +INCLUDE(CPack) |