WSL/SLF GitLab Repository

CMakeLists.txt 6.3 KB
Newer Older
1
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
2

3
IF(PLUGIN_SMETIO)
4
5
6
7
8
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_SMETIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_SMETIO)
	ENDIF(MSVC)
9
	SET(plugins_sources ${plugins_sources} plugins/SMETIO.cc)
10
ENDIF(PLUGIN_SMETIO)
11

12
IF(PLUGIN_ARCIO)
13
14
15
16
17
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_ARCIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_ARCIO)
	ENDIF(MSVC)
18
	SET(plugins_sources ${plugins_sources} plugins/ARCIO.cc)
19
ENDIF(PLUGIN_ARCIO)
20

21
IF(PLUGIN_A3DIO)
22
23
24
25
26
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_A3DIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_A3DIO)
	ENDIF(MSVC)
27
	SET(plugins_sources ${plugins_sources} plugins/A3DIO.cc)
28
29
ENDIF(PLUGIN_A3DIO)

30
IF(PLUGIN_ARPSIO)
31
32
33
34
35
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_ARPSIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_ARPSIO)
	ENDIF(MSVC)
36
	SET(plugins_sources ${plugins_sources} plugins/ARPSIO.cc)
37
ENDIF(PLUGIN_ARPSIO)
38

39
40
41
42
43
IF(PLUGIN_BORMAIO)
	FIND_PACKAGE(LibXML++ REQUIRED)
	INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
	SET(plugin_libs ${plugin_libs} ${LibXML++_LIBRARIES})
	IF(MSVC)
44
		ADD_DEFINITIONS(/DPLUGIN_BORMAIO) #it looks like some VC++ versions don't support -D syntax
45
	ELSE(MSVC)
46
		ADD_DEFINITIONS(-DPLUGIN_BORMAIO)
47
48
49
50
51
52
53
54
55
	ENDIF(MSVC)
	SET(plugins_sources ${plugins_sources} plugins/BormaIO.cc)
ENDIF(PLUGIN_BORMAIO)

IF(PLUGIN_COSMOXMLIO)
	FIND_PACKAGE(LibXML++ REQUIRED)
	INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
	SET(plugin_libs ${plugin_libs} ${LibXML++_LIBRARIES})
	IF(MSVC)
56
		ADD_DEFINITIONS(/DPLUGIN_COSMOXMLIO) #it looks like some VC++ versions don't support -D syntax
57
	ELSE(MSVC)
58
		ADD_DEFINITIONS(-DPLUGIN_COSMOXMLIO)
59
60
61
62
	ENDIF(MSVC)
	SET(plugins_sources ${plugins_sources} plugins/CosmoXMLIO.cc)
ENDIF(PLUGIN_COSMOXMLIO)

63
IF(PLUGIN_GRASSIO)
64
65
66
67
68
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_GRASSIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_GRASSIO)
	ENDIF(MSVC)
69
	SET(plugins_sources ${plugins_sources} plugins/GrassIO.cc)
70
ENDIF(PLUGIN_GRASSIO)
71

72
73
74
75
76
77
78
79
80
81
82
83
IF(PLUGIN_GRIBIO)
	FIND_PACKAGE(GribApi REQUIRED)
	INCLUDE_DIRECTORIES(${GribApi_INCLUDE_DIRS})
	SET(plugin_libs ${plugin_libs} ${GribApi_LIBRARIES})
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_GRIBIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_GRIBIO)
	ENDIF(MSVC)
	SET(plugins_sources ${plugins_sources} plugins/GRIBIO.cc)
ENDIF(PLUGIN_GRIBIO)

84
IF(PLUGIN_GEOTOPIO)
85
86
87
88
89
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_GEOTOPIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_GEOTOPIO)
	ENDIF(MSVC)
90
	SET(plugins_sources ${plugins_sources} plugins/GeotopIO.cc)
91
ENDIF(PLUGIN_GEOTOPIO)
92

93
IF(PLUGIN_GSNIO)
94
	#HACK
95
	#gsoap generates files that do lots of warnings, there is nothing we can do about it -> off
96
	IF(NOT MSVC)
97
98
		SET_SOURCE_FILES_PROPERTIES(plugins/gsn/soapC.cpp PROPERTIES COMPILE_FLAGS "-w")
		SET_SOURCE_FILES_PROPERTIES(plugins/gsn/stdsoap2.cpp PROPERTIES COMPILE_FLAGS "-w")
99
	ENDIF(NOT MSVC)
100
	IF(MSVC)
101
102
		SET_SOURCE_FILES_PROPERTIES(plugins/gsn/soapC.cpp PROPERTIES COMPILE_FLAGS "/W0")
		SET_SOURCE_FILES_PROPERTIES(plugins/gsn/stdsoap2.cpp PROPERTIES COMPILE_FLAGS "/W0")
103
	ENDIF(MSVC)
104

105
	IF(WIN32)
106
107
108
		IF(MINGW)
			ADD_DEFINITIONS(-D_isnan=isnan)
		ENDIF(MINGW)
109
110
		SET(EXTRA_LINK_LIBS "ws2_32")
	ENDIF(WIN32)
111
112
113
114
115
116
117
118

	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_GSNIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_GSNIO)
	ENDIF(MSVC)

	SET(plugins_sources ${plugins_sources} plugins/GSNIO.cc plugins/gsn/soapGSNWebServiceSoap12BindingProxy.cpp plugins/gsn/soapC.cpp plugins/gsn/stdsoap2.cpp)
119
ENDIF(PLUGIN_GSNIO)
120

121
IF(PLUGIN_IMISIO)
122
	FIND_PACKAGE(OCCI REQUIRED)
123
	INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCCI_INCLUDE_DIR})
124
125
126
127
128
129
130
	SET(plugin_libs ${plugin_libs} ${OCCI_LIBRARIES})
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_IMISIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_IMISIO)
	ENDIF(MSVC)
	SET(plugins_sources ${plugins_sources} plugins/ImisIO.cc)
131
ENDIF(PLUGIN_IMISIO)
132

133
IF(PLUGIN_PGMIO)
134
135
136
137
138
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_PGMIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_PGMIO)
	ENDIF(MSVC)
139
140
	SET(plugins_sources ${plugins_sources} plugins/PGMIO.cc)
ENDIF(PLUGIN_PGMIO)
141

142
143
144
145
146
147
148
149
150
151
152
IF(PLUGIN_PNGIO)
	FIND_PACKAGE(PNG REQUIRED)
	INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
	SET(plugin_libs ${plugin_libs} ${PNG_LIBRARY})
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_PNGIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_PNGIO)
	ENDIF(MSVC)
	SET(plugins_sources ${plugins_sources} plugins/PNGIO.cc)
ENDIF(PLUGIN_PNGIO)
153

154
IF(PLUGIN_SNIO)
155
156
157
158
159
	IF(MSVC)
		ADD_DEFINITIONS(/DPLUGIN_SNIO) #it looks like some VC++ versions don't support -D syntax
	ELSE(MSVC)
		ADD_DEFINITIONS(-DPLUGIN_SNIO)
	ENDIF(MSVC)
160
161
	SET(plugins_sources ${plugins_sources} plugins/SNIO.cc)
ENDIF(PLUGIN_SNIO)
162

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# IF(PLUGIN_GSNIO)
# 	INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} "/usr/include")
# 	#gsoap generates files that do lots of warnings, there is nothing we can do about it -> off
# 	IF(NOT MSVC)
# 		SET_SOURCE_FILES_PROPERTIES(gsn/soapC.cpp PROPERTIES COMPILE_FLAGS "-w")
# 		SET_SOURCE_FILES_PROPERTIES(gsn/stdsoap2.cpp PROPERTIES COMPILE_FLAGS "-w")
# 	ENDIF(NOT MSVC)
# 	IF(MSVC)
# 		SET_SOURCE_FILES_PROPERTIES(gsn/soapC.cpp PROPERTIES COMPILE_FLAGS "/W0")
# 		SET_SOURCE_FILES_PROPERTIES(gsn/stdsoap2.cpp PROPERTIES COMPILE_FLAGS "/W0")
# 	ENDIF(MSVC)
# 	ADD_LIBRARY(${GSNIONAME} GSNIO.cc gsn/soapGSNWebServiceSoap12BindingProxy.cpp gsn/soapC.cpp gsn/stdsoap2.cpp)
# 	IF(WIN32)
# 		IF(MINGW)
# 			ADD_DEFINITIONS(-D_isnan=isnan)
# 		ENDIF(MINGW)
# 		SET(EXTRA_LINK_LIBS "ws2_32")
# 	ENDIF(WIN32)
# 	TARGET_LINK_LIBRARIES(${GSNIONAME} ${SHAREDNAME} ${EXTRA_LINK_LIBS})
# 	SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES
# 		PREFIX "${LIBPREFIX}"
# 		LIBRARY_OUTPUT_DIRECTORY ${PLUGIN_DIR}
# 		RUNTIME_OUTPUT_DIRECTORY ${PLUGIN_DIR}
# 		VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
# 		SOVERSION ${VERSION_MAJOR})
# 	#necessary because gsoap uses long long
# 	IF(NOT MSVC)
# 		SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES COMPILE_FLAGS "-Wno-long-long")
# 	ENDIF(NOT MSVC)
# 	SET(MYPLUGINS ${MYPLUGINS} ${GSNIONAME})
# ENDIF(PLUGIN_GSNIO)