forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCPackOptions.cmake.in
181 lines (164 loc) · 8.2 KB
/
CPackOptions.cmake.in
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# processed with configure_file @ONLY so may need @VAR@ rather than ${VAR} in some circumstances
# $Id$
#
#====================================================================
# NeXus - A common data format for neutron, x-ray and muon science.
#
# CPackOptions.cmake.in for building the NeXus library and applications.
#
# Copyright (C) 2008-2012 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# For further information, see <http://www.nexusformat.org>
#
#
#====================================================================
#
include(CPackComponent)
#set(CPACK_ALL_INSTALL_TYPES Full)
#set(CPACK_COMPONENTS_ALL manual definitions) # default is all components mentioned
if (NOT WIN32)
if (${CMAKE_VERSION} VERSION_LESS 2.8.4)
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove this line when CMake >= 2.8.4 is required
endif()
endif()
set (CPACK_PACKAGE_NAME "NeXusDefinitions")
if (${CPACK_GENERATOR} STREQUAL "DEB")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_INSTALL_PREFIX "/usr/share/nexus")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/share/nexus")
set(CPACK_PACKAGE_NAME "nexus") # used for components
# set(CPACK_DEBIAN_PACKAGE_DEBUG TRUE)
set (CPACK_DEBIAN_PACKAGE_NAME "nexus")
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.nexusformat.org/")
endif()
if (${CPACK_GENERATOR} STREQUAL "RPM")
# set(CPACK_RPM_USER_BINARY_SPECFILE "@CMAKE_BINARY_DIR@/nexus_definitions.spec")
set(CPACK_INSTALL_PREFIX "/usr/share/nexus")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/share/nexus")
# set(CPACK_RPM_PACKAGE_PREFIX "/usr/share/nexus")
# set(CPACK_RPM_PACKAGE_DEBUG TRUE)
set (CPACK_RPM_PACKAGE_NAME "nexus")
set (CPACK_RPM_PACKAGE_ARCHITECTURE "noarch")
set (CPACK_RPM_PACKAGE_RELEASE "1")
# set (CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
# set (CPACK_RPM_PACKAGE_PROVIDES "")
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_PACKAGE_LICENSE "LGPL")
set(CPACK_RPM_PACKAGE_URL "http://www.nexusformat.org/")
# set(CPACK_RPM_CHANGELOG_FILE "")
endif()
if (${CPACK_GENERATOR} STREQUAL "TGZ")
set(CPACK_TGZ_COMPONENT_INSTALL ON)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY ON)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ON)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
endif()
if (${CPACK_GENERATOR} STREQUAL "ZIP")
set(CPACK_ZIP_COMPONENT_INSTALL ON)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY ON)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ON)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
endif()
if (${CPACK_GENERATOR} STREQUAL "CygwinBinary")
set(CPACK_CYGWIN_PATCH_NUMBER 1)
set(CPACK_INSTALL_PREFIX "/usr/share/nexus")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/share/nexus")
endif()
if (${CPACK_GENERATOR} STREQUAL "PackageMaker")
# set(CPACK_MONOLITHIC_INSTALL ON)
# 10.4 is "Tiger", component based install needs 10.4 and above
set(CPACK_OSX_PACKAGE_VERSION 10.4)
set(CPACK_INSTALL_PREFIX "/usr/share/nexus")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/share/nexus")
endif()
if (${CPACK_GENERATOR} STREQUAL "Bundle")
endif()
set(CPACK_PACKAGE_CONTACT "NeXus Developers <[email protected]>")
set (CPACK_PACKAGE_VENDOR "NeXus International Advisory Committee ([email protected])")
set (CPACK_PACKAGE_VERSION_MAJOR "3")
set (CPACK_PACKAGE_VERSION_MINOR "1")
set (CPACK_PACKAGE_VERSION_PATCH "0")
set (CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set (CPACK_RESOURCE_FILE_LICENSE "@CMAKE_SOURCE_DIR@/LGPL.txt")
set (CPACK_RESOURCE_FILE_README "@CMAKE_SOURCE_DIR@/package/README.txt")
set (CPACK_RESOURCE_FILE_WELCOME "@CMAKE_SOURCE_DIR@/package/WELCOME.txt")
set (CPACK_PACKAGE_ICON "@CMAKE_SOURCE_DIR@/package/nexus.ico")
set (CPACK_PACKAGE_DESCRIPTION_FILE "@CMAKE_SOURCE_DIR@/package/description.txt")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "NeXus NXDL class definitions and manual, http://www.nexusformat.org/")
set (CPACK_PACKAGE_FILE_NAME "nexus-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "nexus-source-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "NeXus Definitions")
#set(CPACK_SOURCE_IGNORE_FILES
# "nexus_spec.in;~$;/\.svn/;/\.cvsignore/;/CMakeFiles/;/nbproject/;autogen.sh;cmake_install.cmake;Makefile;${CPACK_SOURCE_IGNORE_FILES}")
# we do not have any absolute paths, so do not need DESTDIR
SET(CPACK_SET_DESTDIR "OFF")
SET(CPACK_PACKAGE_RELOCATABLE "true")
if (${CPACK_GENERATOR} STREQUAL "NSIS")
### NSIS component installs seem to trigger download option at the moment, so set monolithic install and a full package name until we can figure out why
set(CPACK_MONOLITHIC_INSTALL ON)
set(CPACK_PACKAGE_FILE_NAME "nexus-definitions-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_NSIS_PACKAGE_NAME "NeXus Definitions ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} NeXus")
set(CPACK_NSIS_HELP_LINK "http://www.nexusformat.org/")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.nexusformat.org/")
set(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")
set(CPACK_NSIS_MODIFY_PATH OFF)
# set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \"@CMAKE_SOURCE_DIR@/nsis_install.nsh\"")
# set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include \"@CMAKE_SOURCE_DIR@/nsis_uninstall.nsh\"")
set(CPACK_PACKAGE_ICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\package\\nexus.ico")
set(CPACK_NSIS_MUI_ICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\package\\nexus.ico")
set(CPACK_NSIS_MUI_UNIICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\package\\nexus.ico")
set(CPACK_NSIS_MENU_LINKS "manual/NeXusManual.html" "NeXus Manual (HTML)"
"manual/NeXusManual.pdf" "NeXus User Manual (PDF)"
"manual/NeXusRefDoc.pdf" "NeXus Reference Manual (PDF)"
"definitions" "NeXus Definitions (NXDL)"
"http://www.nexusformat.org/" "NeXus Web Site")
endif()
cpack_add_component(definitions
DISPLAY_NAME "NeXus NXDL definitions"
DESCRIPTION "Binary applications such as nxconvert, nxbrowse etc..."
# INSTALL_TYPES Full
# GROUP definitions_group
)
cpack_add_component(manual
DISPLAY_NAME "NeXus Documentation"
DESCRIPTION "NeXus User Guide and Reference Documentation with examples."
# INSTALL_TYPES Full
# GROUP manual_group
)
#cpack_add_install_type(Full DISPLAY_NAME "Full")
#cpack_add_component_group(definitions_group
# DISPLAY_NAME definitions
# DESCRIPTION definitions
# EXPANDED
# BOLD_TITLE)
#cpack_add_component_group(manual_group
# DISPLAY_NAME manual
# DESCRIPTION manual
# EXPANDED
# BOLD_TITLE)
#cpack_add_component(Development
# DISPLAY_NAME "Development"
# DESCRIPTION "Development libraries and headers."
# )
#cpack_add_component(Examples
# DISPLAY_NAME "Examples"
# DESCRIPTION "Code example files."
# )