aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/PaludisPackage.cmake
blob: ecbd54e92b21b1d2d88603a91cda33fd91d3f048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
set(CPACK_SET_DESTDIR TRUE)
set(CPACK_SOURCE_GENERATOR "TBZ2")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VERISON_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERISON_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERISON_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_SOURCE_IGNORE_FILES
      "/build/"
      "/.git/"
      "\\\\.sw[opn]$"
      ".*~"
      "cscope.*"
      # TODO(compnerd) remove this set when the autotools build system is removed
      "/.gitignore"
      "/.gitreview"
      "/aclocal.m4"
      "/autogen.bash"
      "/autom4te.cache/"
      "/autotools_prepare.bash"
      "/config.h.in"
      "/configure.ac"
      "Makefile.am"
      "Makefile.am.m4"
      "Makefile.in"
      "/misc/common-makefile.am"
      "files.m4"
      "${CPACK_SOURCE_IGNORE_FILES}")

include(CPack)

add_custom_target(dist COMMAND "${CMAKE_MAKE_PROGRAM}" package_source)