]> git.mxchange.org Git - simgear.git/blob - simgear/math/CMakeLists.txt
Fix math test linkage.
[simgear.git] / simgear / math / CMakeLists.txt
1 include (SimGearComponent)
2
3
4 set(HEADERS
5     SGBox.hxx
6     SGCMath.hxx
7     SGGeoc.hxx
8     SGGeod.hxx
9     SGGeodesy.hxx
10     SGGeometry.hxx
11     SGGeometryFwd.hxx
12     SGIntersect.hxx
13     SGLimits.hxx
14     SGLineSegment.hxx
15     SGLocation.hxx
16     SGMath.hxx
17     SGMathFwd.hxx
18     SGMatrix.hxx
19     SGMisc.hxx
20     SGPlane.hxx
21     SGQuat.hxx
22     SGRay.hxx
23     SGRect.hxx
24     SGSphere.hxx
25     SGTriangle.hxx
26     SGVec2.hxx
27     SGVec3.hxx
28     SGVec4.hxx
29     beziercurve.hxx
30     interpolater.hxx
31     leastsqs.hxx
32     sg_geodesy.hxx
33     sg_types.hxx
34     sg_random.h
35     )
36
37 set(SOURCES 
38     SGGeodesy.cxx
39     interpolater.cxx
40     leastsqs.cxx
41     sg_random.c
42     )
43
44 simgear_component(math math "${SOURCES}" "${HEADERS}")
45
46 if(ENABLE_TESTS)
47
48 if (SIMGEAR_SHARED)
49     set(TEST_LIBS SimGearCore)
50 else()
51     set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
52 endif()
53
54 add_executable(math_test SGMathTest.cxx)
55 target_link_libraries(math_test ${TEST_LIBS})
56 add_test(math ${EXECUTABLE_OUTPUT_PATH}/math_test)
57
58 add_executable(geometry_test SGGeometryTest.cxx)
59 target_link_libraries(geometry_test ${TEST_LIBS})
60 add_test(geometry ${EXECUTABLE_OUTPUT_PATH}/geometry_test)
61 endif(ENABLE_TESTS)