-
Notifications
You must be signed in to change notification settings - Fork 65
/
CMakeIfPluginDependencies.class.st
50 lines (41 loc) · 1.22 KB
/
CMakeIfPluginDependencies.class.st
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
"
A CMakeIfPluginDependencies Template looks something like this:
'IF (MyPlugin_dependencies) ""set dependencies""
add_dependencies(MyPlugin ${MyPlugin_dependencies})
ENDIF (MyPlugin_dependencies)'.
"
Class {
#name : #CMakeIfPluginDependencies,
#superclass : #CMakeTemplate,
#instVars : [
'plugin',
'dependencies'
],
#category : #'CMakeVMMakerSqueak-CMakeCustomTemplates'
}
{ #category : #accessing }
CMakeIfPluginDependencies >> dependencies [
^ String streamContents: [:stream | dependencies asStringOn: stream delimiter: ' ' ]
]
{ #category : #'initialize-release' }
CMakeIfPluginDependencies >> initialize [
plugin:= 'foo'.
dependencies:= OrderedCollection with: 'bar' with: 'nun'.
self content:'
IF(',plugin, '_dependencies)
ADD_DEPENDENCIES(' , plugin, ' ' , self dependencies,')
ENDIF( ', plugin, '_dependencies)'
]
{ #category : #accessing }
CMakeIfPluginDependencies >> plugin [
^ plugin
]
{ #category : #'initialize-release' }
CMakeIfPluginDependencies >> plugin: pString dependencies: anOrderedCollection [
plugin:= pString.
dependencies:= anOrderedCollection.
self content:'
IF(',plugin, '_dependencies)
ADD_DEPENDENCIES( ', plugin, ' ' , self dependencies,')
ENDIF( ', plugin, '_dependencies)'
]