-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
462 lines (420 loc) · 20 KB
/
CMakeLists.txt
File metadata and controls
462 lines (420 loc) · 20 KB
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# ------------------------------------------------------------------------------
# Required EbsdLib and H5Support
# ------------------------------------------------------------------------------
if(SIMPLNX_USE_LOCAL_EBSD_LIB)
include("${simplnx_SOURCE_DIR}/cmake/UseEbsdLib.cmake")
else()
find_package(H5Support REQUIRED)
find_package(EbsdLib REQUIRED)
endif()
# ------------------------------------------------------------------------------
# EbsdLib needs install rules for creating packages
# ------------------------------------------------------------------------------
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
#if(NOT GENERATOR_IS_MULTI_CONFIG)
get_property(SIMPLNX_EXTRA_LIBRARY_DIRS GLOBAL PROPERTY SIMPLNX_EXTRA_LIBRARY_DIRS)
set_property(GLOBAL PROPERTY SIMPLNX_EXTRA_LIBRARY_DIRS ${SIMPLNX_EXTRA_LIBRARY_DIRS} ${EbsdLib_LIB_DIRS})
#endif()
# ------------------------------------------------------------------------------
# Include the standard simplnx plugin cmake support codes
# ------------------------------------------------------------------------------
include("${simplnx_SOURCE_DIR}/cmake/Plugin.cmake")
set(PLUGIN_NAME "OrientationAnalysis")
set(${PLUGIN_NAME}_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
# ------------------------------------------------------------------------------
# These are all the filters in the plugin. All filters should be kept in the
# OrientationAnalysis/src/OrientationAnalysis/Filters/ directory.
set(FilterList
AlignSectionsMisorientationFilter
AlignSectionsMutualInformationFilter
BadDataNeighborOrientationCheckFilter
CAxisSegmentFeaturesFilter
ComputeAvgCAxesFilter
ComputeAvgOrientationsFilter
ComputeBoundaryStrengthsFilter
ComputeCAxisLocationsFilter
ComputeFaceIPFColoringFilter
ComputeFeatureFaceMisorientationFilter
ComputeFeatureNeighborCAxisMisalignmentsFilter
ComputeFeatureReferenceCAxisMisorientationsFilter
ComputeFeatureReferenceMisorientationsFilter
ComputeFZQuaternionsFilter
ComputeGBCDFilter
ComputeGBCDMetricBasedFilter
ComputeGBCDPoleFigureFilter
ComputeGBPDMetricBasedFilter
ComputeIPFColorsFilter
ComputeKernelAvgMisorientationsFilter
ComputeFeatureNeighborMisorientationsFilter
ComputeMisorientationsFilter
ComputeQuaternionConjugateFilter
ComputeSchmidsFilter
ComputeShapesFilter
ComputeSlipTransmissionMetricsFilter
ComputeShapesTriangleGeomFilter
ComputeTwinBoundariesFilter
ConvertHexGridToSquareGridFilter
ConvertOrientationsFilter
ConvertOrientationsToVertexGeometryFilter
ConvertQuaternionFilter
CreateEnsembleInfoFilter
EBSDSegmentFeaturesFilter
EbsdToH5EbsdFilter
MergeTwinsFilter
NeighborOrientationCorrelationFilter
ReadAngDataFilter
ReadChannel5DataFilter
ReadCtfDataFilter
ReadEnsembleInfoFilter
ReadGrainMapper3DFilter
ReadH5EbsdFilter
ReadH5EspritDataFilter
ReadH5OimDataFilter
ReadH5OinaDataFilter
RodriguesConvertorFilter
RotateEulerRefFrameFilter
WriteGBCDGMTFileFilter
WriteGBCDTriangleDataFilter
WriteINLFileFilter
WritePoleFigureFilter
WriteStatsGenOdfAngleFileFilter
)
set(STUB_FILTERS
CreateLambertSphere
EMsoftSO3Sampler
ComputeBoundaryStrengths
FindDistsToCharactGBs
ComputeKernelAvgMisorientations
ComputeFeatureNeighborMisorientations
ComputeSchmids
FindTwinBoundaries
FindTwinBoundarySchmidFactors
ComputeFaceIPFColoring
ComputeFeatureFaceMisorientation
GenerateOrientationMatrixTranspose
# ImportEbsdMontage # MISSING 1 or more Parameter Implementations
)
create_simplnx_plugin(NAME ${PLUGIN_NAME}
FILTER_LIST ${FilterList}
DESCRIPTION "${PLUGIN_NAME} Plugin"
VERSION "0.2.0"
DOC_CHECK
ADD_TO_GLOBAL_LIST
)
# ------------------------------------------------------------------------------
# Add any filter parameters to the `simplnx` target
# This should be integrated with the `create_simplnx_plugin` function call
#
# The `simplnx` target will need to know about any dependent libraries and any
# include directories that are needed for the parameter.
# ------------------------------------------------------------------------------
set(simplnx_injected_parameters
ReadH5EbsdFileParameter
OEMEbsdScanSelectionParameter
#EbsdToH5EbsdParameter
)
foreach(source ${simplnx_injected_parameters})
target_sources(simplnx PRIVATE
${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Parameters/${source}.h
${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Parameters/${source}.cpp)
source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}" PREFIX ${PLUGIN_NAME}
FILES ${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Parameters/${source}.h
${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Parameters/${source}.cpp)
endforeach()
target_include_directories(simplnx PUBLIC )
# ------------------------------------------------------------------------------
# Add a link library to simplnx because it now depends on EbsdLib. Simplnx will
# be able to find the include dirs from the CMake EbsdLib target
# ------------------------------------------------------------------------------
target_link_libraries(simplnx PUBLIC EbsdLib::EbsdLib)
# ------------------------------------------------------------------------------
# Include filters that need to be compiled but not available to the general user
# These are typically auto-generated sources that need to be compiled to ensure
# the stubs are following the latest API changes
# ------------------------------------------------------------------------------
foreach(file_name ${STUB_FILTERS})
list(APPEND hidden_filter_HDRS
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters_Private/${file_name}.hpp"
)
list(APPEND hidden_filter_SRCS
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters_Private/${file_name}.cpp"
)
endforeach()
option(${PLUGIN_NAME}_COMPILE_PRIVATE_FILTERS "Compile the Stubbed out filters" OFF)
if(${${PLUGIN_NAME}_COMPILE_PRIVATE_FILTERS})
target_sources(${PLUGIN_NAME}
PRIVATE ${hidden_filter_HDRS} ${hidden_filter_SRCS}
)
source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}" PREFIX ${PLUGIN_NAME} FILES ${hidden_filter_HDRS} ${hidden_filter_SRCS})
endif()
# ------------------------------------------------------------------------------
# Algorithms
# This should be integrated with the `create_simplnx_plugin` function call
# ------------------------------------------------------------------------------
set(filter_algorithms
AlignSectionsMisorientation
AlignSectionsMutualInformation
BadDataNeighborOrientationCheck
BadDataNeighborOrientationCheckScanline
BadDataNeighborOrientationCheckWorklist
CAxisSegmentFeatures
ComputeAvgCAxes
ComputeAvgOrientations
ComputeBoundaryStrengths
ComputeCAxisLocations
ComputeFaceIPFColoring
ComputeFeatureFaceMisorientation
ComputeFeatureNeighborCAxisMisalignments
ComputeFeatureNeighborMisorientations
ComputeFeatureReferenceCAxisMisorientations
ComputeFeatureReferenceMisorientations
ComputeFZQuaternions
ComputeGBCD
ComputeGBCDMetricBased
ComputeGBCDPoleFigureDirect
ComputeGBCDPoleFigureScanline
ComputeGBPDMetricBased
ComputeIPFColors
ComputeIPFColorsDirect
ComputeIPFColorsScanline
ComputeKernelAvgMisorientations
ComputeMisorientations
ComputeQuaternionConjugate
ComputeSchmids
ComputeShapes
ComputeShapesTriangleGeom
ComputeSlipTransmissionMetrics
ComputeTwinBoundaries
ConvertHexGridToSquareGrid
ConvertOrientations
ConvertOrientationsToVertexGeometry
ConvertQuaternion
CreateEnsembleInfo
EBSDSegmentFeatures
EbsdToH5Ebsd
MergeTwins
NeighborOrientationCorrelation
ReadAngData
ReadChannel5Data
ReadCtfData
ReadEnsembleInfo
ReadGrainMapper3D
ReadH5Ebsd
ReadH5EspritData
ReadH5OimData
ReadH5OinaData
RodriguesConvertor
RotateEulerRefFrame
WriteGBCDGMTFile
WriteGBCDTriangleData
WriteINLFile
WritePoleFigure
WriteStatsGenOdfAngleFile
)
foreach(algorithm ${filter_algorithms})
target_sources(${PLUGIN_NAME}
PRIVATE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters/Algorithms/${algorithm}.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters/Algorithms/${algorithm}.hpp"
)
source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}" PREFIX ${PLUGIN_NAME}
FILES "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters/Algorithms/${algorithm}.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/Filters/Algorithms/${algorithm}.hpp"
)
endforeach()
# ------------------------------------------------------------------------------
# Extra Sources
# ------------------------------------------------------------------------------
set(PLUGIN_EXTRA_SOURCES
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/inicpp.h"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/PhaseType.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/PhaseType.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/IEbsdOemReader.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/OrientationUtilities.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/OrientationUtilities.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/Fonts.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/SIMPLConversion.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/TiffWriter.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/TiffWriter.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/delaunator.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/delaunator.h"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/GrainMapper3DUtilities.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/GrainMapper3DUtilities.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/EbsdReaderUtilities.hpp"
)
target_sources(${PLUGIN_NAME} PRIVATE ${PLUGIN_EXTRA_SOURCES})
source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities"
PREFIX ${PLUGIN_NAME}
FILES ${PLUGIN_EXTRA_SOURCES})
# ------------------------------------------------------------------------------
# If there are additional libraries that this plugin needs to link against you
# can use the target_link_libraries() cmake call
# ------------------------------------------------------------------------------
target_link_libraries(${PLUGIN_NAME} PUBLIC EbsdLib::EbsdLib)
# ------------------------------------------------------------------------------
# If there are additional include directories that are needed for this plugin
# you can use the target_include_directories(.....) cmake call
target_include_directories(${PLUGIN_NAME}
PUBLIC
"${EbsdLib_INCLUDE_DIRS}"
"${${PLUGIN_NAME}_BINARY_DIR}"
"${${PLUGIN_NAME}_SOURCE_DIR}/3rdParty/canvas_ity/src"
)
# ------------------------------------------------------------------------------
# Add in the unit tests for the filters included in this plugin
if(SIMPLNX_BUILD_TESTS)
enable_testing()
add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
endif()
# -----------------------------------------------------------------------
# Install example pipelines
# -----------------------------------------------------------------------
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(is_multi_config)
set(CX_CONFIG_DIR "$<CONFIG>")
else()
set(CX_CONFIG_DIR ".")
endif()
if(EXISTS "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines")
set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipelines")
add_custom_target(Copy_${PLUGIN_NAME}_Pipeline_Folder ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory "${${PLUGIN_NAME}_SOURCE_DIR}/pipelines"
${PIPELINE_DEST_DIR}
COMMENT "Copying Pipeline Folder into Binary Directory"
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_Pipeline_Folder PROPERTIES FOLDER Plugins/${PLUGIN_NAME})
option(${PLUGIN_NAME}_INSTALL_PIPELINES "Enables install of ${PLUGIN_NAME} pipelines" ON)
if(${PLUGIN_NAME}_INSTALL_PIPELINES)
set(INSTALL_DESTINATION "${SIMPLNX_PIPELINE_INSTALL_DIR}/${PLUGIN_NAME}")
install(DIRECTORY
"${${PLUGIN_NAME}_SOURCE_DIR}/pipelines/"
DESTINATION "${INSTALL_DESTINATION}"
COMPONENT Applications
)
endif()
endif()
# -----------------------------------------------------------------------
# Download Example Data Files
# -----------------------------------------------------------------------
include(${simplnx_SOURCE_DIR}/cmake/Utility.cmake)
set(DATA_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/Data")
file(TO_CMAKE_PATH "${DREAM3D_DATA_DIR}" DREAM3D_DATA_DIR_NORM)
# -----------------------------------------------------------------------
# These data files are pulled from the 'simplnx data archive' on github,
# decompressed and then copied to the build folder. Install rules are also
# generated for each of the data sets.
# -----------------------------------------------------------------------
if(EXISTS "${DREAM3D_DATA_DIR}" AND SIMPLNX_DOWNLOAD_TEST_FILES)
if(NOT EXISTS ${DREAM3D_DATA_DIR}/TestFiles/)
file(MAKE_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles/")
endif()
download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR}
ARCHIVE_NAME T12-MAI-2010.tar.gz
SHA512 e33f224d19ad774604aa28a3263a00221a3a5909040685a3d14b6cba78e36d174b045223c28b462ab3eaea0fbc1c9f0657b1bd791a947799b9f088b13d777568
INSTALL)
add_custom_target(Copy_${PLUGIN_NAME}_T12-MAI-2010 ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/T12-MAI-2010.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/T12-MAI-2010" "${DATA_DEST_DIR}/T12-MAI-2010"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/T12-MAI-2010"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "Copying ${PLUGIN_NAME}/T12-MAI-2010 data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_T12-MAI-2010 PROPERTIES FOLDER Plugins/${PLUGIN_NAME})
download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR}
ARCHIVE_NAME Textured_Copper.tar.gz
SHA512 cb231a13abbc21fe2046fc0fc7be9753ea51440bce1827bd20ee225499cd38be07d67955ff8c09d15ad91c4c1934e2a0e34406a703e7e49fbe53068b29ef440e
INSTALL)
add_custom_target(Copy_${PLUGIN_NAME}_Textured_Copper ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/Textured_Copper.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/Textured_Copper" "${DATA_DEST_DIR}/Textured_Copper"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/Textured_Copper"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "Copying ${PLUGIN_NAME}/Textured_Copper data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_Textured_Copper PROPERTIES FOLDER Plugins/${PLUGIN_NAME})
download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR}
ARCHIVE_NAME Small_IN100.tar.gz
SHA512 79e9f6948d4e8e06187e11216a67596fa786ffd2700e51f594ad014090383eb8bcc003e14de2e88082aa9ae512cc4fc9cee22c80066fc54f38c3ebc75267eb5b
INSTALL)
add_custom_target(Copy_${PLUGIN_NAME}_Small_IN100 ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/Small_IN100.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${DREAM3D_DATA_DIR}/TestFiles/Small_IN100" "${DATA_DEST_DIR}/Small_IN100"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/Small_IN100"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "Copying ${PLUGIN_NAME}/Small_IN100 data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_Small_IN100 PROPERTIES FOLDER ZZ_COPY_FILES)
download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR}
ARCHIVE_NAME caxis_data.tar.gz
SHA512 56468d3f248661c0d739d9acd5a1554abc700bf136586f698a313804536916850b731603d42a0b93aae47faf2f7ee49d4181b1c3e833f054df6f5c70b5e041dc
)
add_custom_target(Copy_${PLUGIN_NAME}_CAxis_Data ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/caxis_data.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DREAM3D_DATA_DIR}/TestFiles/caxis_data/Combo-EBSD-120130.osc_r0c0.ang" "${DATA_DEST_DIR}/OrientationAnalysis/Combo-EBSD-120130.osc_r0c0.ang"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/caxis_data"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "Copying ${PLUGIN_NAME}/caxis_data data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
install(FILES "${DATA_DEST_DIR}/OrientationAnalysis/Combo-EBSD-120130.osc_r0c0.ang"
DESTINATION Data/${PLUGIN_NAME}
COMPONENT Applications
)
set_target_properties(Copy_${PLUGIN_NAME}_CAxis_Data PROPERTIES FOLDER ZZ_COPY_FILES)
download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR}
ARCHIVE_NAME 6_6_ImportH5Data.tar.gz
SHA512 68cf620d28a515d04040d66c4f8fa9d8d46707c65138b366b47f40d1d56a36c40e2e2cd0c9d35168b68c2cb5b2ce95650fa2a0d4e6ffce980d0dd0654908f40d
)
add_custom_target(Copy_${PLUGIN_NAME}_H5Data ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/6_6_ImportH5Data.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DREAM3D_DATA_DIR}/TestFiles/6_6_ImportH5Data/EdaxOIMData.h5" "${DREAM3D_DATA_DIR}/TestFiles/6_6_ImportH5Data/H5EspritReaderTest.h5" "${DATA_DEST_DIR}/${PLUGIN_NAME}/"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/6_6_ImportH5Data"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "Copying ${PLUGIN_NAME} data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_H5Data PROPERTIES FOLDER ZZ_COPY_FILES)
endif()
# -----------------------------------------------------------------------
# Create build folder copy rules and install rules for the 'data' folder
# for this plugin
# -----------------------------------------------------------------------
add_custom_target(Copy_${PLUGIN_NAME}_Data ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${${PLUGIN_NAME}_SOURCE_DIR}/data ${DATA_DEST_DIR}/${PLUGIN_NAME}
COMMENT "Copying ${PLUGIN_NAME} data into Binary Directory"
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_${PLUGIN_NAME}_Data PROPERTIES FOLDER Plugins/${PLUGIN_NAME})
option(${PLUGIN_NAME}_INSTALL_DATA_FILES "Enables install of ${PLUGIN_NAME} data files" ON)
set(Installed_Data_Files
${${PLUGIN_NAME}_SOURCE_DIR}/data/Ensemble.ini
${${PLUGIN_NAME}_SOURCE_DIR}/data/fz_quats.raw
${${PLUGIN_NAME}_SOURCE_DIR}/data/quats.raw
)
if(${PLUGIN_NAME}_INSTALL_DATA_FILES)
install(FILES
${Installed_Data_Files}
DESTINATION Data/${PLUGIN_NAME}
COMPONENT Applications
)
install(DIRECTORY
${${PLUGIN_NAME}_SOURCE_DIR}/data/IPF_Legend
DESTINATION Data/${PLUGIN_NAME}
COMPONENT Applications
)
endif()