summaryrefslogtreecommitdiff
path: root/indra/llmath/CMakeLists.txt
blob: 61d13c0b1cd8bef2b2c7e2a35a175cf8e531620f (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
# -*- cmake -*-

project(llmath)

include(00-Common)
include(LLCommon)
include(Boost)

include_directories(
    ${LLCOMMON_INCLUDE_DIRS}
    ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
    )

set(llmath_SOURCE_FILES
    llbbox.cpp
    llbboxlocal.cpp
    llcalc.cpp
    llcalcparser.cpp
    llcamera.cpp
    llcoordframe.cpp
    llline.cpp
    llmatrix3a.cpp
    llmodularmath.cpp
    lloctree.cpp
    llperlin.cpp
    llquaternion.cpp
    llrect.cpp
    llsphere.cpp
    llvector4a.cpp
    llvolume.cpp
    llvolumemgr.cpp
    llvolumeoctree.cpp
    llsdutil_math.cpp
    m3math.cpp
    m4math.cpp
    raytrace.cpp
    v2math.cpp
    v3color.cpp
    v3dmath.cpp
    v3math.cpp
    v4color.cpp
    v4coloru.cpp
    v4math.cpp
    xform.cpp
    )

set(llmath_HEADER_FILES
    CMakeLists.txt

    camera.h
    coordframe.h
    llbbox.h
    llbboxlocal.h
    llcalc.h
    llcalcparser.h
    llcamera.h
    llcoord.h
    llcoordframe.h
    llinterp.h
    llline.h
    llmath.h
    llmatrix3a.h
    llmatrix3a.inl
    llmodularmath.h
    lloctree.h
    llperlin.h
    llplane.h
    llquantize.h
    llquaternion.h
    llquaternion2.h
    llquaternion2.inl
    llrect.h
    llsimdmath.h
    llsimdtypes.h
    llsimdtypes.inl
    llsphere.h
    lltreenode.h
    llvector4a.h
    llvector4a.inl
    llvector4logical.h
    llvolume.h
    llvolumemgr.h
    llvolumeoctree.h
    llsdutil_math.h
    m3math.h
    m4math.h
    raytrace.h
    v2math.h
    v3color.h
    v3colorutil.h
    v3dmath.h
    v3math.h
    v4color.h
    v4coloru.h
    v4math.h
    xform.h
    )

set_source_files_properties(${llmath_HEADER_FILES}
                            PROPERTIES HEADER_FILE_ONLY TRUE)

list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})

add_library (llmath ${llmath_SOURCE_FILES})

target_link_libraries(llmath
    ${LLCOMMON_LIBRARIES}
    )

# Add tests
if (LL_TESTS)
  include(LLAddBuildTest)
  # UNIT TESTS
  SET(llmath_TEST_SOURCE_FILES
    llbboxlocal.cpp
    llmodularmath.cpp
    llrect.cpp
    v2math.cpp
    v3color.cpp
    v4color.cpp
    v4coloru.cpp
    )
  set_source_files_properties(
    ${llmath_TEST_SOURCE_FILES}
    PROPERTIES
    LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_THREAD_LIBRARY}"
  )
  LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}")

  # INTEGRATION TESTS
  set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
  # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
  LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}")
  LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}")
  LL_ADD_INTEGRATION_TEST(llquaternion llquaternion.cpp "${test_libs}")
  LL_ADD_INTEGRATION_TEST(mathmisc "" "${test_libs}")
  LL_ADD_INTEGRATION_TEST(m3math "" "${test_libs}")
  LL_ADD_INTEGRATION_TEST(v3dmath v3dmath.cpp "${test_libs}")
  LL_ADD_INTEGRATION_TEST(v3math v3math.cpp "${test_libs}")
  LL_ADD_INTEGRATION_TEST(v4math v4math.cpp "${test_libs}")
  LL_ADD_INTEGRATION_TEST(xform xform.cpp "${test_libs}")
endif (LL_TESTS)