1 | # Installation: |
---|
2 | |
---|
3 | madx_install_targets(madxbin madx) |
---|
4 | |
---|
5 | madx_install_headers(${headerfiles}) |
---|
6 | |
---|
7 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/License.txt |
---|
8 | DESTINATION "share/doc/${PROJECT_NAME}${PKG_POSTFIX}" |
---|
9 | COMPONENT Files) |
---|
10 | |
---|
11 | if(APPLE AND MADX_BUNDLE) |
---|
12 | set(APPS "\${CMAKE_INSTALL_PREFIX}/madx${BINARY_POSTFIX}") # paths to executables |
---|
13 | set(DIRS "") |
---|
14 | INSTALL(CODE " |
---|
15 | include(BundleUtilities) |
---|
16 | fixup_bundle(\"${APPS}.app\" \"\" \"${DIRS}\") |
---|
17 | execute_process(COMMAND mv \"${APPS}.app/Contents\" \"${APPS}\" ) |
---|
18 | execute_process(COMMAND rm -rf \"${APPS}.app\") |
---|
19 | " COMPONENT Runtime) |
---|
20 | endif() |
---|
21 | |
---|
22 | # CPACK stuff |
---|
23 | # build a CPack driven installer package |
---|
24 | set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/License.txt") |
---|
25 | set (CPACK_PACKAGE_NAME "${PROJECT_NAME}${PKG_POSTFIX}") |
---|
26 | # Version: |
---|
27 | set (CPACK_PACKAGE_VERSION_MAJOR ${MADX_MAJOR_VERSION}) |
---|
28 | set (CPACK_PACKAGE_VERSION_MINOR ${MADX_MINOR_VERSION}) |
---|
29 | set (CPACK_PACKAGE_VERSION_PATCH ${MADX_PATCH_LEVEL}) |
---|
30 | |
---|
31 | set (CPACK_PACKAGE_CONTACT "Frank Schmidt <Frank.Schmidt@cern.ch>") |
---|
32 | set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MadX is a program for accelerator design and simulation") |
---|
33 | #Debian specific: |
---|
34 | set (CPACK_DEBIAN_PACKAGE_MAINTAINER |
---|
35 | "Yngve Inntjore Levinsen <Yngve.Inntjore.Levinsen@cern.ch>") # if this is not set, CPACK_PACKAGE_CONTACT is used instead.. |
---|
36 | set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "MadX is a program for accelerator design and simulation") |
---|
37 | set (CPACK_DEBIAN_PACKAGE_SECTION "science") |
---|
38 | set (CPACK_DEBIAN_PACKAGE_PRIORITY "extra") |
---|
39 | set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "gnuplot") |
---|
40 | if(NOT MADX_STATIC) |
---|
41 | set (CPACK_DEBIAN_PACKAGE_DEPENDS |
---|
42 | "libc6 (>= 2.3.1-6), libgcc1 (>= 1:4.1), zlib1g, libx11-xcb1, libxcb1, libxau6") # some version dependencies kept as examples |
---|
43 | endif() |
---|
44 | |
---|
45 | # RPM Specific: |
---|
46 | set (CPACK_RPM_PACKAGE_RELEASE 1) |
---|
47 | set (CPACK_RPM_PACKAGE_LICENSE "custom") |
---|
48 | set (CPACK_RPM_PACKAGE_GROUP "Development/Tools") |
---|
49 | if (NOT MADX_STATIC) |
---|
50 | # set(CPACK_RPM_PACKAGE_REQUIRES "libgcc >= 4.1.0, libxau >= 1.0.5") # I don't know the names of the packages... |
---|
51 | endif ( NOT MADX_STATIC ) |
---|
52 | |
---|
53 | # so that we can build dragndrop on osx: |
---|
54 | set(CPACK_BINARY_DRAGNDROP ON) |
---|
55 | include (CPack) |
---|
56 | # End CPACK stuff |
---|