CMakeLists.txt 18.4 KB
Newer Older
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
set(SRC_FILES
    src/ComponentParser.cpp
    src/Crystal/BasicHKLFilters.cpp
    src/Crystal/BraggScatterer.cpp
    src/Crystal/BraggScattererFactory.cpp
    src/Crystal/BraggScattererInCrystalStructure.cpp
    src/Crystal/CenteringGroup.cpp
    src/Crystal/CompositeBraggScatterer.cpp
    src/Crystal/ConventionalCell.cpp
    src/Crystal/CrystalStructure.cpp
    src/Crystal/CyclicGroup.cpp
    src/Crystal/EdgePixel.cpp
    src/Crystal/Group.cpp
    src/Crystal/GroupTransformation.cpp
    src/Crystal/HKLFilter.cpp
    src/Crystal/HKLFilterWavelength.cpp
    src/Crystal/HKLGenerator.cpp
    src/Crystal/IndexingUtils.cpp
    src/Crystal/IsotropicAtomBraggScatterer.cpp
    src/Crystal/NiggliCell.cpp
    src/Crystal/OrientedLattice.cpp
    src/Crystal/PeakTransform.cpp
    src/Crystal/PeakTransformHKL.cpp
    src/Crystal/PeakTransformQLab.cpp
    src/Crystal/PeakTransformQSample.cpp
    src/Crystal/PeakTransformSelector.cpp
    src/Crystal/PointGroup.cpp
    src/Crystal/PointGroupFactory.cpp
    src/Crystal/ProductOfCyclicGroups.cpp
    src/Crystal/ReducedCell.cpp
    src/Crystal/ReflectionCondition.cpp
    src/Crystal/ReflectionGenerator.cpp
    src/Crystal/ScalarUtils.cpp
    src/Crystal/SpaceGroup.cpp
    src/Crystal/SpaceGroupFactory.cpp
    src/Crystal/StructureFactorCalculator.cpp
    src/Crystal/StructureFactorCalculatorSummation.cpp
    src/Crystal/SymmetryElement.cpp
    src/Crystal/SymmetryElementFactory.cpp
    src/Crystal/SymmetryOperation.cpp
    src/Crystal/SymmetryOperationFactory.cpp
    src/Crystal/SymmetryOperationSymbolParser.cpp
    src/Crystal/UnitCell.cpp
    src/Crystal/V3R.cpp
    src/IObjComponent.cpp
    src/Instrument.cpp
    src/Instrument/CompAssembly.cpp
    src/Instrument/Component.cpp
    src/Instrument/ComponentHelper.cpp
    src/Instrument/ComponentInfo.cpp
    src/Instrument/ComponentInfoBankHelpers.cpp
    src/Instrument/ComponentInfoIterator.cpp
    src/Instrument/Container.cpp
    src/Instrument/Detector.cpp
    src/Instrument/DetectorGroup.cpp
    src/Instrument/DetectorInfo.cpp
    src/Instrument/FitParameter.cpp
    src/Instrument/Goniometer.cpp
    src/Instrument/GridDetector.cpp
    src/Instrument/GridDetectorPixel.cpp
    src/Instrument/IDFObject.cpp
    src/Instrument/InstrumentDefinitionParser.cpp
    src/Instrument/InstrumentVisitor.cpp
    src/Instrument/ObjCompAssembly.cpp
    src/Instrument/ObjComponent.cpp
    src/Instrument/ParComponentFactory.cpp
    src/Instrument/Parameter.cpp
    src/Instrument/ParameterMap.cpp
    src/Instrument/RectangularDetector.cpp
    src/Instrument/ReferenceFrame.cpp
    src/Instrument/SampleEnvironment.cpp
    src/Instrument/StructuredDetector.cpp
    src/Instrument/XMLInstrumentParameter.cpp
    src/MDGeometry/CompositeImplicitFunction.cpp
    src/MDGeometry/GeneralFrame.cpp
    src/MDGeometry/HKL.cpp
    src/MDGeometry/IMDDimension.cpp
    src/MDGeometry/IMDDimensionFactory.cpp
    src/MDGeometry/MDBoxImplicitFunction.cpp
    src/MDGeometry/MDFrameFactory.cpp
    src/MDGeometry/MDGeometryXMLBuilder.cpp
    src/MDGeometry/MDGeometryXMLParser.cpp
    src/MDGeometry/MDHistoDimension.cpp
    src/MDGeometry/MDHistoDimensionBuilder.cpp
    src/MDGeometry/MDImplicitFunction.cpp
    src/MDGeometry/MDPlane.cpp
    src/MDGeometry/MDPlaneImplicitFunction.cpp
    src/MDGeometry/NullImplicitFunction.cpp
    src/MDGeometry/QLab.cpp
    src/MDGeometry/QSample.cpp
    src/MDGeometry/UnknownFrame.cpp
    src/Math/Acomp.cpp
    src/Math/Algebra.cpp
    src/Math/BnId.cpp
    src/Math/ConvexPolygon.cpp
    src/Math/ConvexPolygonIterator.cpp
    src/Math/PolyBase.cpp
    src/Math/PolygonEdge.cpp
    src/Math/PolygonIntersection.cpp
    src/Math/Quadrilateral.cpp
    src/Math/RotCounter.cpp
    src/Math/Triple.cpp
    src/Math/mathSupport.cpp
    src/Objects/BoundingBox.cpp
    src/Objects/CSGObject.cpp
    src/Objects/InstrumentRayTracer.cpp
    src/Objects/MeshObject.cpp
    src/Objects/MeshObject2D.cpp
    src/Objects/MeshObjectCommon.cpp
    src/Objects/RuleItems.cpp
    src/Objects/Rules.cpp
    src/Objects/ShapeFactory.cpp
    src/Objects/Track.cpp
    src/RandomPoint.cpp
    src/Rasterize.cpp
    src/Rendering/GeometryHandler.cpp
    src/Rendering/GeometryTriangulator.cpp
    src/Rendering/ShapeInfo.cpp
    src/Rendering/vtkGeometryCacheReader.cpp
    src/Rendering/vtkGeometryCacheWriter.cpp
    src/Surfaces/Cone.cpp
    src/Surfaces/Cylinder.cpp
    src/Surfaces/General.cpp
    src/Surfaces/Line.cpp
    src/Surfaces/LineIntersectVisit.cpp
    src/Surfaces/Plane.cpp
    src/Surfaces/Quadratic.cpp
    src/Surfaces/Sphere.cpp
    src/Surfaces/Surface.cpp
    src/Surfaces/SurfaceFactory.cpp
    src/Surfaces/Torus.cpp)
132

133
134
set(SRC_UNITY_IGNORE_FILES src/Instrument/CompAssembly.cpp
    src/Instrument/ObjCompAssembly.cpp)
Martyn Gigg's avatar
Martyn Gigg committed
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
set(INC_FILES
    inc/MantidGeometry/ComponentParser.h
    inc/MantidGeometry/Crystal/BasicHKLFilters.h
    inc/MantidGeometry/Crystal/BraggScatterer.h
    inc/MantidGeometry/Crystal/BraggScattererFactory.h
    inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h
    inc/MantidGeometry/Crystal/CenteringGroup.h
    inc/MantidGeometry/Crystal/CompositeBraggScatterer.h
    inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h
    inc/MantidGeometry/Crystal/ConventionalCell.h
    inc/MantidGeometry/Crystal/CrystalStructure.h
    inc/MantidGeometry/Crystal/CyclicGroup.h
    inc/MantidGeometry/Crystal/EdgePixel.h
    inc/MantidGeometry/Crystal/Group.h
    inc/MantidGeometry/Crystal/GroupTransformation.h
    inc/MantidGeometry/Crystal/HKLFilter.h
    inc/MantidGeometry/Crystal/HKLFilterWavelength.h
    inc/MantidGeometry/Crystal/HKLGenerator.h
    inc/MantidGeometry/Crystal/IPeak.h
    inc/MantidGeometry/Crystal/IndexingUtils.h
    inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h
    inc/MantidGeometry/Crystal/MatrixVectorPair.h
    inc/MantidGeometry/Crystal/MatrixVectorPairParser.h
    inc/MantidGeometry/Crystal/NiggliCell.h
    inc/MantidGeometry/Crystal/OrientedLattice.h
    inc/MantidGeometry/Crystal/PeakShape.h
    inc/MantidGeometry/Crystal/PeakTransform.h
    inc/MantidGeometry/Crystal/PeakTransformFactory.h
    inc/MantidGeometry/Crystal/PeakTransformHKL.h
    inc/MantidGeometry/Crystal/PeakTransformQLab.h
    inc/MantidGeometry/Crystal/PeakTransformQSample.h
    inc/MantidGeometry/Crystal/PeakTransformSelector.h
    inc/MantidGeometry/Crystal/PointGroup.h
    inc/MantidGeometry/Crystal/PointGroupFactory.h
    inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h
    inc/MantidGeometry/Crystal/ReducedCell.h
    inc/MantidGeometry/Crystal/ReflectionCondition.h
    inc/MantidGeometry/Crystal/ReflectionGenerator.h
    inc/MantidGeometry/Crystal/ScalarUtils.h
    inc/MantidGeometry/Crystal/SpaceGroup.h
    inc/MantidGeometry/Crystal/SpaceGroupFactory.h
    inc/MantidGeometry/Crystal/StructureFactorCalculator.h
    inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h
    inc/MantidGeometry/Crystal/SymmetryElement.h
    inc/MantidGeometry/Crystal/SymmetryElementFactory.h
    inc/MantidGeometry/Crystal/SymmetryOperation.h
    inc/MantidGeometry/Crystal/SymmetryOperationFactory.h
    inc/MantidGeometry/Crystal/SymmetryOperationSymbolParser.h
    inc/MantidGeometry/Crystal/UnitCell.h
    inc/MantidGeometry/Crystal/V3R.h
    inc/MantidGeometry/DllConfig.h
    inc/MantidGeometry/ICompAssembly.h
    inc/MantidGeometry/IComponent.h
    inc/MantidGeometry/IDetector.h
    inc/MantidGeometry/IDetector_fwd.h
    inc/MantidGeometry/IObjComponent.h
    inc/MantidGeometry/Instrument.h
    inc/MantidGeometry/Instrument/CompAssembly.h
    inc/MantidGeometry/Instrument/Component.h
    inc/MantidGeometry/Instrument/ComponentHelper.h
    inc/MantidGeometry/Instrument/ComponentInfo.h
    inc/MantidGeometry/Instrument/ComponentInfoBankHelpers.h
    inc/MantidGeometry/Instrument/ComponentInfoItem.h
    inc/MantidGeometry/Instrument/ComponentInfoIterator.h
    inc/MantidGeometry/Instrument/ComponentVisitor.h
    inc/MantidGeometry/Instrument/Container.h
    inc/MantidGeometry/Instrument/Detector.h
    inc/MantidGeometry/Instrument/DetectorGroup.h
    inc/MantidGeometry/Instrument/DetectorInfo.h
    inc/MantidGeometry/Instrument/DetectorInfoItem.h
    inc/MantidGeometry/Instrument/DetectorInfoIterator.h
    inc/MantidGeometry/Instrument/FitParameter.h
    inc/MantidGeometry/Instrument/Goniometer.h
    inc/MantidGeometry/Instrument/GridDetector.h
    inc/MantidGeometry/Instrument/GridDetectorPixel.h
    inc/MantidGeometry/Instrument/IDFObject.h
    inc/MantidGeometry/Instrument/InfoIteratorBase.h
    inc/MantidGeometry/Instrument/InstrumentDefinitionParser.h
    inc/MantidGeometry/Instrument/InstrumentVisitor.h
    inc/MantidGeometry/Instrument/ObjCompAssembly.h
    inc/MantidGeometry/Instrument/ObjComponent.h
    inc/MantidGeometry/Instrument/ParComponentFactory.h
    inc/MantidGeometry/Instrument/Parameter.h
    inc/MantidGeometry/Instrument/ParameterFactory.h
    inc/MantidGeometry/Instrument/ParameterMap.h
    inc/MantidGeometry/Instrument/RectangularDetector.h
    inc/MantidGeometry/Instrument/ReferenceFrame.h
    inc/MantidGeometry/Instrument/SampleEnvironment.h
    inc/MantidGeometry/Instrument/StructuredDetector.h
    inc/MantidGeometry/Instrument/XMLInstrumentParameter.h
    inc/MantidGeometry/Instrument_fwd.h
    inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h
    inc/MantidGeometry/MDGeometry/GeneralFrame.h
    inc/MantidGeometry/MDGeometry/HKL.h
    inc/MantidGeometry/MDGeometry/IMDDimension.h
    inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h
    inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h
    inc/MantidGeometry/MDGeometry/MDDimensionExtents.h
    inc/MantidGeometry/MDGeometry/MDFrame.h
    inc/MantidGeometry/MDGeometry/MDFrameFactory.h
    inc/MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h
    inc/MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h
    inc/MantidGeometry/MDGeometry/MDGeometryXMLParser.h
    inc/MantidGeometry/MDGeometry/MDHistoDimension.h
    inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h
    inc/MantidGeometry/MDGeometry/MDImplicitFunction.h
    inc/MantidGeometry/MDGeometry/MDPlane.h
    inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h
    inc/MantidGeometry/MDGeometry/MDTypes.h
    inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h
    inc/MantidGeometry/MDGeometry/NullImplicitFunction.h
    inc/MantidGeometry/MDGeometry/QLab.h
    inc/MantidGeometry/MDGeometry/QSample.h
    inc/MantidGeometry/MDGeometry/UnknownFrame.h
    inc/MantidGeometry/Math/Acomp.h
    inc/MantidGeometry/Math/Algebra.h
    inc/MantidGeometry/Math/BnId.h
    inc/MantidGeometry/Math/ConvexPolygon.h
    inc/MantidGeometry/Math/MapSupport.h
    inc/MantidGeometry/Math/PolyBase.h
    inc/MantidGeometry/Math/PolygonEdge.h
    inc/MantidGeometry/Math/PolygonIntersection.h
    inc/MantidGeometry/Math/Quadrilateral.h
    inc/MantidGeometry/Math/RotCounter.h
    inc/MantidGeometry/Math/Triple.h
    inc/MantidGeometry/Math/mathSupport.h
    inc/MantidGeometry/Objects/BoundingBox.h
    inc/MantidGeometry/Objects/CSGObject.h
    inc/MantidGeometry/Objects/IObject.h
    inc/MantidGeometry/Objects/InstrumentRayTracer.h
    inc/MantidGeometry/Objects/MeshObject.h
    inc/MantidGeometry/Objects/MeshObject2D.h
    inc/MantidGeometry/Objects/MeshObjectCommon.h
    inc/MantidGeometry/Objects/Rules.h
    inc/MantidGeometry/Objects/ShapeFactory.h
    inc/MantidGeometry/Objects/Track.h
    inc/MantidGeometry/RandomPoint.h
    inc/MantidGeometry/Rasterize.h
    inc/MantidGeometry/Rendering/GeometryHandler.h
    inc/MantidGeometry/Rendering/GeometryTriangulator.h
    inc/MantidGeometry/Rendering/RenderingHelpers.h
    inc/MantidGeometry/Rendering/RenderingMesh.h
    inc/MantidGeometry/Rendering/ShapeInfo.h
    inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h
    inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h
    inc/MantidGeometry/Surfaces/BaseVisit.h
    inc/MantidGeometry/Surfaces/Cone.h
    inc/MantidGeometry/Surfaces/Cylinder.h
    inc/MantidGeometry/Surfaces/General.h
    inc/MantidGeometry/Surfaces/Line.h
    inc/MantidGeometry/Surfaces/LineIntersectVisit.h
    inc/MantidGeometry/Surfaces/Plane.h
    inc/MantidGeometry/Surfaces/Quadratic.h
    inc/MantidGeometry/Surfaces/Sphere.h
    inc/MantidGeometry/Surfaces/Surface.h
    inc/MantidGeometry/Surfaces/SurfaceFactory.h
    inc/MantidGeometry/Surfaces/Torus.h)
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
set(TEST_FILES
    AcompTest.h
    AlgebraTest.h
    BasicHKLFiltersTest.h
    BnIdTest.h
    BoundingBoxTest.h
    BraggScattererFactoryTest.h
    BraggScattererInCrystalStructureTest.h
    BraggScattererTest.h
    CSGObjectTest.h
    CenteringGroupTest.h
    CompAssemblyTest.h
    ComponentInfoBankHelpersTest.h
    ComponentInfoIteratorTest.h
    ComponentInfoTest.h
    ComponentParserTest.h
    ComponentTest.h
    CompositeBraggScattererTest.h
    CompositeImplicitFunctionTest.h
    ConeTest.h
    ContainerTest.h
    ConventionalCellTest.h
    ConvexPolygonIteratorTest.h
    ConvexPolygonTest.h
    CrystalStructureTest.h
    CyclicGroupTest.h
    CylinderTest.h
    DetectorGroupTest.h
    DetectorInfoIteratorTest.h
    DetectorTest.h
    FitParameterTest.h
    GeneralFrameTest.h
    GeneralTest.h
    GoniometerTest.h
    GridDetectorPixelTest.h
    GridDetectorTest.h
    GroupTest.h
    GroupTransformationTest.h
    HKLFilterTest.h
    HKLFilterWavelengthTest.h
    HKLGeneratorTest.h
    HKLTest.h
    IDFObjectTest.h
    IMDDimensionFactoryTest.h
    IMDDimensionTest.h
    IndexingUtilsTest.h
    InstrumentDefinitionParserTest.h
    InstrumentRayTracerTest.h
    InstrumentTest.h
    InstrumentVisitorTest.h
    IsotropicAtomBraggScattererTest.h
    LineIntersectVisitTest.h
    LineTest.h
    MDBoxImplicitFunctionTest.h
    MDFrameFactoryTest.h
    MDGeometryXMLParserTest.h
    MDHistoDimensionBuilderTest.h
    MDHistoDimensionTest.h
    MDImplicitFunctionTest.h
    MDPlaneImplicitFunctionTest.h
    MDPlaneTest.h
    MapSupportTest.h
    MathSupportTest.h
    MatrixVectorPairParserTest.h
    MatrixVectorPairTest.h
    MeshObject2DTest.h
    MeshObjectCommonTest.h
    MeshObjectTest.h
    NiggliCellTest.h
    NullImplicitFunctionTest.h
    ObjCompAssemblyTest.h
    ObjComponentTest.h
    OrientedLatticeTest.h
    ParCompAssemblyTest.h
    ParComponentFactoryTest.h
    ParDetectorTest.h
    ParInstrumentTest.h
    ParObjCompAssemblyTest.h
    ParObjComponentTest.h
    ParameterMapTest.h
    ParametrizedComponentTest.h
    PeakTransformHKLTest.h
    PeakTransformQLabTest.h
    PeakTransformQSampleTest.h
    PeakTransformSelectorTest.h
    PlaneTest.h
    PointGroupFactoryTest.h
    PointGroupTest.h
    PolygonEdgeTest.h
    PolygonIntersectionTest.h
    ProductOfCyclicGroupsTest.h
    QLabTest.h
    QSampleTest.h
    QuadrilateralTest.h
    RandomPointTest.h
    RasterizeTest.h
    RectangularDetectorTest.h
    ReducedCellTest.h
    ReferenceFrameTest.h
    ReflectionConditionTest.h
    ReflectionGeneratorTest.h
    RotCounterTest.h
    RulesBoolValueTest.h
    RulesCompGrpTest.h
    RulesCompObjTest.h
    RulesIntersectionTest.h
    RulesSurfPointTest.h
    RulesTest.h
    RulesUnionTest.h
    SampleEnvironmentTest.h
    ScalarUtilsTest.h
    ShapeFactoryTest.h
    ShapeInfoTest.h
    SpaceGroupFactoryTest.h
    SpaceGroupTest.h
    SphereTest.h
    StructureFactorCalculatorSummationTest.h
    StructureFactorCalculatorTest.h
    StructuredDetectorTest.h
    SurfaceFactoryTest.h
    SurfaceTest.h
    SymmetryElementFactoryTest.h
    SymmetryElementTest.h
    SymmetryOperationFactoryTest.h
    SymmetryOperationSymbolParserTest.h
    SymmetryOperationTest.h
    TorusTest.h
    TrackTest.h
    TripleTest.h
    UnitCellTest.h
    V3RTest.h
    XMLInstrumentParameterTest.h)
426

427
428
set(GMOCK_TEST_FILES
    MDGeometryXMLBuilderTest.h)
429

430
if(COVERAGE)
431
432
433
434
435
  foreach(loop_var ${SRC_FILES} ${INC_FILES})
    set_property(GLOBAL APPEND
                 PROPERTY COVERAGE_SRCS
                          "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
  endforeach(loop_var)
436
endif()
437

438
439
if(UNITY_BUILD)
  include(UnityBuild)
440
  enable_unity_build(Geometry SRC_FILES SRC_UNITY_IGNORE_FILES 10)
441
442
endif(UNITY_BUILD)

443
444
# A few defines needed for OpenCascade on the Mac

445
446
447
if(APPLE)
  add_definitions(-DHAVE_IOSTREAM -DHAVE_LIMITS -DHAVE_IOMANIP)
endif()
448

Martyn Gigg's avatar
Martyn Gigg committed
449
450
451
452
453
454
455
456
457
458
459
460
461
if(ENABLE_OPENGL)
  list(APPEND
    INC_FILES
    inc/MantidGeometry/Rendering/OpenGL_Headers.h)
  list(APPEND
    SRC_FILES
    src/Rendering/RenderingHelpersOpenGL.cpp)
else()
  list(APPEND
    SRC_FILES
    src/Rendering/RenderingHelpersThrowing.cpp)
endif()

462
# Add a precompiled header where they are supported
463
enable_precompiled_headers(inc/MantidGeometry/PrecompiledHeader.h SRC_FILES)
464
# Add the target for this directory
465
add_library(Geometry ${SRC_FILES} ${INC_FILES})
466
add_library(Mantid::Geometry ALIAS Geometry)
467

468
469
470
471
472
target_include_directories(Geometry PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
		$<INSTALL_INTERFACE:include/Mantid>
)

473
# Set the name of the generated library
474
475
476
477
478
set_target_properties(Geometry
                      PROPERTIES OUTPUT_NAME
                                 MantidGeometry
                                 COMPILE_DEFINITIONS
                                 IN_MANTID_GEOMETRY)
479

480
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
481
  set_target_properties(Geometry
482
                        PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Frameworks")
483
484
485
486
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  set_target_properties(Geometry
                        PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}")
endif()
487

488
if(ENABLE_OPENCASCADE)
489
  target_include_directories(Geometry SYSTEM PRIVATE ${OPENCASCADE_INCLUDE_DIR})
490
endif()
491

492
# Add to the 'Framework' group in VS
493
set_property(TARGET Geometry PROPERTY FOLDER "MantidFramework")
494

Stephen's avatar
Stephen committed
495
496
497
498
499
target_link_libraries(Geometry
                      PUBLIC
                      Mantid::Kernel
                      Mantid::Beamline
                      MuParser::MuParser
500
                      PRIVATE
Stephen's avatar
Stephen committed
501
                      Mantid::Json)
502

Martyn Gigg's avatar
Martyn Gigg committed
503
504
505
if(ENABLE_OPENGL)
  target_include_directories(Geometry SYSTEM PRIVATE ${OPENGL_INCLUDE_DIR})
  target_link_libraries(Geometry
Stephen's avatar
Stephen committed
506
    PRIVATE
Martyn Gigg's avatar
Martyn Gigg committed
507
508
509
510
    ${OPENGL_gl_LIBRARY}
    ${OPENGL_glu_LIBRARY})
endif()

511
if(ENABLE_OPENCASCADE)
Stephen's avatar
Stephen committed
512
  target_link_libraries(Geometry PRIVATE ${OPENCASCADE_LIBRARIES})
513
endif()
514

515
# Add the unit tests directory
516
add_subdirectory(test)
517
518

# Installation settings
Stephen's avatar
Stephen committed
519
520
521
522
523
524
525
# Auto-generate exports header
target_include_directories(Geometry PUBLIC
  $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/Framework/Geometry>
  $<INSTALL_INTERFACE:include/Mantid>
)

# Installation settings
526
if (CONDA_BUILD)
Stephen's avatar
Stephen committed
527
set(TARGET_EXPORT_NAME "MantidGeometryTargets")
528
529
530
531
532
533
534
535
mtd_install_framework_lib(TARGETS Geometry EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
                    Geometry
                    INSTALL_DIRS
                    ${LIB_DIR}
                    ${WORKBENCH_LIB_DIR})
endif()
536