blob: 4e5ef0033df5dcfdc9afbbe19d3537aae180aef4 (
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
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
|
if (BUILD_DM_ECMA)
if (JSC_FOUND)
set(USCXML_DATAMODELS "ecmascript(JSC) ${USCXML_DATAMODELS}")
# JavaScriptCore ecmascript datamodel
file(GLOB JSC_DATAMODEL
ecmascript/JavaScriptCore/*.cpp
ecmascript/JavaScriptCore/*.h
ecmascript/*.cpp
ecmascript/*.h
)
file(GLOB_RECURSE JSC_DOM
ecmascript/JavaScriptCore/dom/*.cpp
ecmascript/JavaScriptCore/dom/*.h
)
if (BUILD_AS_PLUGINS)
source_group("JavaScriptCore" FILES ${JSC_DATAMODEL})
source_group("dom" FILES ${JSC_DOM})
add_library(
datamodel_jsc SHARED
${JSC_DATAMODEL}
${JSC_DOM}
"../Plugins.cpp")
target_link_libraries(datamodel_jsc uscxml ${JSC_LIBRARY})
set_target_properties(datamodel_jsc PROPERTIES FOLDER "Plugin DataModel")
else()
list (APPEND USCXML_FILES ${JSC_DATAMODEL})
list (APPEND USCXML_FILES ${JSC_DOM})
list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY})
endif()
else()
# GOOGLE V8 ecmascript datamodel
set(USCXML_DATAMODELS "ecmascript(V8) ${USCXML_DATAMODELS}")
# set(ENV{V8_SRC} ${CMAKE_SOURCE_DIR}/../v8)
if (V8_FOUND AND BUILD_DM_ECMA)
file(GLOB V8_DATAMODEL
ecmascript/v8/*.cpp
ecmascript/v8/*.h
ecmascript/*.cpp
ecmascript/*.h
)
file(GLOB_RECURSE V8_DOM
ecmascript/v8/dom/*.cpp
ecmascript/v8/dom/*.h
)
if (BUILD_AS_PLUGINS)
source_group("V8" FILES ${V8_DATAMODEL})
source_group("dom" FILES ${V8_DOM})
add_library(
datamodel_v8 SHARED
${V8_DATAMODEL}
${V8_DOM}
"../Plugins.cpp")
target_link_libraries(datamodel_v8 uscxml ${V8_LIBRARY})
set_target_properties(datamodel_v8 PROPERTIES FOLDER "Plugin DataModel")
else()
list (APPEND USCXML_FILES ${V8_DATAMODEL})
list (APPEND USCXML_FILES ${V8_DOM})
endif()
endif()
endif()
endif()
# NULL datamodel
set(USCXML_DATAMODELS "null ${USCXML_DATAMODELS}")
file(GLOB NULL_DATAMODEL
null/*.cpp
null/*.h
)
if (BUILD_AS_PLUGINS)
source_group("" FILES ${NULL_DATAMODEL})
add_library(datamodel_null SHARED ${NULL_DATAMODEL} "../Plugins.cpp")
target_link_libraries(datamodel_null uscxml)
set_target_properties(datamodel_null PROPERTIES FOLDER "Plugin DataModel")
set_target_properties(datamodel_null PROPERTIES COMPILE_FLAGS "-DPLUGIN_EXPORTS")
else()
list (APPEND USCXML_FILES ${NULL_DATAMODEL})
endif()
# XPath datamodel
if (BUILD_DM_XPATH)
set(USCXML_DATAMODELS "xpath ${USCXML_DATAMODELS}")
file(GLOB XPATH_DATAMODEL
xpath/*.cpp
xpath/*.h
)
if (BUILD_AS_PLUGINS)
source_group("" FILES ${XPATH_DATAMODEL})
add_library(datamodel_xpath SHARED ${XPATH_DATAMODEL} "../Plugins.cpp")
target_link_libraries(datamodel_xpath uscxml)
set_target_properties(datamodel_xpath PROPERTIES FOLDER "Plugin DataModel")
else()
list (APPEND USCXML_FILES ${XPATH_DATAMODEL})
endif()
endif()
# SWI PROLOG datamodel
if (SWI_FOUND AND BUILD_DM_PROLOG)
set(USCXML_DATAMODELS "prolog ${USCXML_DATAMODELS}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/prolog/swi/SWIConfig.h.in ${CMAKE_BINARY_DIR}/uscxml/SWIConfig.h)
# message(FATAL_ERROR "SWI_INCLUDE_DIR: ${SWI_INCLUDE_DIR}")
# if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -read_only_relocs suppress")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -read_only_relocs suppress")
# set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -read_only_relocs suppress")
# set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -read_only_relocs suppress")
# endif()
file(GLOB_RECURSE SWI_DATAMODEL
prolog/swi/*.cpp
prolog/swi/*.h
)
if (BUILD_AS_PLUGINS)
source_group("" FILES ${SWI_DATAMODEL})
add_library(
datamodel_swi SHARED
${SWI_DATAMODEL}
"../Plugins.cpp")
target_link_libraries(datamodel_swi
uscxml
${GMP_LIBRARY}
${CURSES_LIBRARIES}
${SWI_LIBRARY})
set_target_properties(datamodel_swi PROPERTIES FOLDER "Plugin DataModel")
else()
list (APPEND USCXML_FILES ${SWI_DATAMODEL})
endif()
endif()
# Promela datamodel
if (BUILD_DM_PROMELA)
set(USCXML_DATAMODELS "promela ${USCXML_DATAMODELS}")
file(GLOB_RECURSE PROMELA_DATAMODEL
promela/*.cpp
promela/*.c
promela/*.h
)
if (BUILD_AS_PLUGINS)
source_group("" FILES PROMELA_DATAMODEL)
add_library(
datamodel_promela SHARED
${PROMELA_DATAMODEL}
"../Plugins.cpp")
target_link_libraries(datamodel_promela uscxml)
set_target_properties(datamodel_promela PROPERTIES FOLDER "Plugin DataModel")
else()
list (APPEND USCXML_FILES ${PROMELA_DATAMODEL})
endif()
endif()
set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE)
set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE)
set(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE)
|