File: BALLComponents.cmake

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 239,924 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; javascript: 164; makefile: 88
file content (183 lines) | stat: -rw-r--r-- 6,674 bytes parent folder | download | duplicates (4)
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
182
183
MACRO(SET_COMPONENT_NAME COMPONENT NAME DESCRIPTION)
	STRING(TOUPPER ${COMPONENT} CURRENT_COMPONENT)
	SET(CPACK_COMPONENT_${CURRENT_COMPONENT}_DISPLAY_NAME ${NAME})
	SET(CPACK_COMPONENT_${CURRENT_COMPONENT}_DESCRIPTION  ${DESCRIPTION})
ENDMACRO()

MACRO(SET_COMPONENT_DEPENDENCIES COMPONENT DEPENDENCIES)
	## Dependencies of components seem to be currently broken for PackageMaker.
	## Or we do something completely wrong...
	IF (NOT APPLE)
		STRING(TOUPPER ${COMPONENT} CURRENT_COMPONENT)
		SET(CPACK_COMPONENT_${CURRENT_COMPONENT}_DEPENDS ${DEPENDENCIES})
	ENDIF()
ENDMACRO()

SET(BALL_PACKAGE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")

IF (UNIX AND NOT APPLE)
	## libraries
	SET(COMPONENT_LIBBALL "libBALL${BALL_PACKAGE_VERSION}")
	SET(COMPONENT_LIBVIEW "libVIEW${BALL_PACKAGE_VERSION}")

	## development
	SET(COMPONENT_LIBBALL_DEV "libBALL${BALL_PACKAGE_VERSION}-dev")
	SET(COMPONENT_LIBVIEW_DEV "libVIEW${BALL_PACKAGE_VERSION}-dev")

	## Python bindings
	SET(COMPONENT_PYTHON_BINDINGS_BALL "python-ball${BALL_PACKAGE_VERSION}")
	SET(COMPONENT_PYTHON_BINDINGS_VIEW "python-ballview${BALL_PACKAGE_VERSION}")

	## Documentation
	SET(COMPONENT_DOCUMENTATION_EXAMPLES "libball${BALL_PACKAGE_VERSION}-doc")
	SET(COMPONENT_DOCUMENTATION_HTML "libball${BALL_PACKAGE_VERSION}-doc")
	SET(COMPONENT_DOCUMENTATION_PDF  "libball${BALL_PACKAGE_VERSION}-doc")

	## applications
	SET(COMPONENT_BALLVIEW "BALLView${BALL_PACKAGE_VERSION}")
ELSEIF(APPLE)
	## libraries
	SET(COMPONENT_LIBBALL "libBALL${BALL_PACKAGE_VERSION}")
	SET(COMPONENT_LIBVIEW "libVIEW${BALL_PACKAGE_VERSION}")

	## development
	SET(COMPONENT_LIBBALL_DEV "libBALL${BALL_PACKAGE_VERSION}-dev")
	SET(COMPONENT_LIBVIEW_DEV "libBALL${BALL_PACKAGE_VERSION}-dev")

	## Python bindings
	SET(COMPONENT_PYTHON_BINDINGS_BALL "python-ball${BALL_PACKAGE_VERSION}")
	SET(COMPONENT_PYTHON_BINDINGS_VIEW "python-ballview${BALL_PACKAGE_VERSION}")

	## Documentation
	SET(COMPONENT_DOCUMENTATION_EXAMPLES "libball${BALL_PACKAGE_VERSION}-doc-examples")
	SET(COMPONENT_DOCUMENTATION_HTML "libball${BALL_PACKAGE_VERSION}-doc-html")
	SET(COMPONENT_DOCUMENTATION_PDF  "libball${BALL_PACKAGE_VERSION}-doc-pdf")

	## applications
	SET(COMPONENT_BALLVIEW "BALLView${BALL_PACKAGE_VERSION}")
ELSEIF(WIN32)
	## libraries
	SET(COMPONENT_LIBBALL "Runtime")
	SET(COMPONENT_LIBVIEW "Runtime")

	## development
	SET(COMPONENT_LIBBALL_DEV "Development")
	SET(COMPONENT_LIBVIEW_DEV "Development")

	## Python bindings
	SET(COMPONENT_PYTHON_BINDINGS_BALL "PythonBindings")
	SET(COMPONENT_PYTHON_BINDINGS_VIEW "PythonBindings")

	## Documentation
	SET(COMPONENT_DOCUMENTATION_EXAMPLES "DocumentationExamples")
	SET(COMPONENT_DOCUMENTATION_HTML "DocumentationHTML")
	SET(COMPONENT_DOCUMENTATION_PDF  "DocumentationPDF")

	## applications
	SET(COMPONENT_BALLVIEW "BALLView")
ENDIF()

INCLUDE(source/EXTENSIONS/BALLPluginComponents.cmake)

## Note: On MacOS X, it is necessary to have the applications (COMPONENT_BALLVIEW) at the
##       *end* of this list; otherwise, the automatic fixing of import library names will omit all components 
##       that come after it
SET(BALL_COMPONENTS
 ${COMPONENT_LIBBALL} 
 ${COMPONENT_LIBVIEW} 
 ${COMPONENT_LIBBALL_DEV} 
 ${COMPONENT_LIBVIEW_DEV}
 ${COMPONENT_PYTHON_BINDINGS_BALL}
 ${COMPONENT_PYTHON_BINDINGS_VIEW}
 ${COMPONENT_DOCUMENTATION_EXAMPLES}
 ${COMPONENT_DOCUMENTATION_HTML}
 ${COMPONENT_DOCUMENTATION_PDF}
 "Unspecified"
 ${COMPONENT_PLUGINS}
)

LIST(APPEND BALL_COMPONENTS ${COMPONENT_BALLVIEW})

LIST(REMOVE_DUPLICATES BALL_COMPONENTS)

SET_COMPONENT_NAME(${COMPONENT_LIBBALL} 
	"BALL libraries and runtime"
	"The Biochemical Algorithms Library (BALL) is a rapid application development framework written in C++. It offers a variety of data structures and algorithms for all kinds of applications arising in molecular modelling."
)

IF (NOT COMPONENT_LIBBALL STREQUAL ${COMPONENT_LIBVIEW})

	SET_COMPONENT_NAME(${COMPONENT_LIBVIEW} 
		"VIEW library"
		"The VIEW library contains BALL's functionality for molecular visualization."
	)
	SET_COMPONENT_DEPENDENCIES(${COMPONENT_LIBVIEW} ${COMPONENT_LIBBALL})

ENDIF()

SET_COMPONENT_NAME(${COMPONENT_LIBBALL_DEV}
	"Development components for BALL"
	"Files required for developing with BALL (C++ - header files, ...)"
)
SET_COMPONENT_DEPENDENCIES(${COMPONENT_LIBBALL_DEV} ${COMPONENT_LIBBALL})

IF (NOT COMPONENT_LIBBALL_DEV STREQUAL ${COMPONENT_LIBVIEW_DEV})

	SET_COMPONENT_NAME(${COMPONENT_LIBVIEW_DEV}
		"Development components for VIEW"
		"Files required for developing with VIEW (C++ - header files, ...)"
	)

	SET_COMPONENT_DEPENDENCIES(${COMPONENT_LIBVIEW_DEV} "${COMPONENT_LIBVIEW} ${COMPONENT_LIBBALL_DEV}")

ENDIF()

SET_COMPONENT_NAME(${COMPONENT_PYTHON_BINDINGS_BALL} 
	"BALL Python bindings"
	"The Python bindings can be used to develop fully functional BALL-based applications completely in Python. In addition, they allow to freely script BALLView"
)
SET_COMPONENT_DEPENDENCIES(${COMPONENT_PYTHON_BINDINGS_BALL} ${COMPONENT_LIBBALL})

IF (NOT COMPONENT_PYTHON_BINDINGS_BALL STREQUAL ${COMPONENT_PYTHON_BINDINGS_VIEW})

	SET_COMPONENT_NAME(${COMPONENT_PYTHON_BINDINGS_VIEW} 
		"BALL Python bindings"
		"The Python bindings can be used to develop fully functional BALL-based applications completely in Python. In addition, they allow to freely script BALLView"
	)
	SET_COMPONENT_DEPENDENCIES(${COMPONENT_PYTHON_BINDINGS_VIEW} "${COMPONENT_LIBVIEW} ${COMPONENT_PYTHON_BINDINGS_BALL}")

ENDIF()

SET_COMPONENT_NAME(${COMPONENT_DOCUMENTATION_HTML}
	"BALL html Documentation"
	"This package contains the full documentation to the BALL and VIEW libraries in html format"
)
SET_COMPONENT_DEPENDENCIES(${COMPONENT_DOCUMENTATION_HTML} ${COMPONENT_LIBBALL})

IF (NOT COMPONENT_DOCUMENTATION_HTML STREQUAL ${COMPONENT_DOCUMENTATION_PDF})

	SET_COMPONENT_NAME(${COMPONENT_DOCUMENTATION_PDF}
		"BALL PDF Documentation"
		"This package contains the full documentation to the BALL and VIEW libraries in PDF format"
	)
	SET_COMPONENT_DEPENDENCIES(${COMPONENT_DOCUMENTATION_PDF} ${COMPONENT_LIBBALL})

ENDIF()

IF (NOT COMPONENT_DOCUMENTATION_EXAMPLES STREQUAL ${COMPONENT_DOCUMENTATION_PDF})

	SET_COMPONENT_NAME(${COMPONENT_DOCUMENTATION_EXAMPLES}
		"BALL Usage Examples"
		"This package contains a number of examples showing the use of BALL as a library and python module"
	)
	SET_COMPONENT_DEPENDENCIES(${COMPONENT_DOCUMENTATION_EXAMPLES} ${COMPONENT_LIBBALL})

ENDIF()

SET_COMPONENT_NAME(${COMPONENT_BALLVIEW} 
	"BALLView"
	"BALLView is a feature-rich molecular viewing and modelling application based on BALL."
)
SET_COMPONENT_DEPENDENCIES(${COMPONENT_BALLVIEW} "${COMPONENT_LIBVIEW}")

SET(CPACK_COMPONENTS_ALL ${BALL_COMPONENTS})