-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
76 lines (61 loc) · 2.23 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
project(celmek)
set(CELMEK_SRC "src/coordinates.c"
"src/de4xx.c"
"src/elp2000-82b.c"
"src/goffin-j2000.c"
"src/iau-rotation.c"
"src/kepler.c"
"src/lieske-e2x3.c"
"src/mean-orbits.c"
"src/models.c"
"src/mpc-orbit-reader.c"
"src/orbital-elements.c"
"src/time-formats.c"
"src/gust86.c"
"src/vsop87.c")
set(CELMEK_HDR "include/celmek/celmek.h"
"include/celmek/cm-math.h"
"include/celmek/cm-time.h"
"include/celmek/cm-model.h"
"include/celmek/cm-coordinates.h"
"include/celmek/cm-astro.h")
# We are building a library, we make the include here a sys include dir
# in order to let tools and code build with '<>' includes.
include_directories(BEFORE "src")
include_directories(BEFORE SYSTEM "include")
include_directories(BEFORE SYSTEM "../vmath/include")
add_library(celmek STATIC ${CELMEK_SRC})
target_link_libraries(celmek vmath)
add_executable(deconvert "tools/de4xx-convert.c")
target_link_libraries(deconvert celmek)
add_executable(desim "tools/de4xx-sim.c")
target_link_libraries(desim celmek)
add_executable(cmsim "tools/orbital-sim.c")
target_link_libraries(cmsim celmek)
install(TARGETS celmek
ARCHIVE DESTINATION "lib/")
install(FILES ${CELMEK_HDR}
DESTINATION "include/celmek/")
# Optionally add documentation target if we have Doxygen available
find_package(Doxygen)
if (DOXYGEN_FOUND)
# Try to locate dot, if available we use it to generate call graphs
find_program(DOT_EXECUTABLE dot)
if (DOT_EXECUTABLE)
set(DOT_FOUND "YES")
set(DOT_PATH "${DOT_EXECUTABLE}")
else (DOT_EXECUTABLE)
set(DOT_FOUND "NO")
set(DOT_PATH "")
endif (DOT_EXECUTABLE)
# Configure the doxygen file
set(DOXYGEN_CONFIG "${CMAKE_BINARY_DIR}/Doxyfile")
configure_file( "${CMAKE_SOURCE_DIR}/Doxyfile.in"
"${DOXYGEN_CONFIG}"
@ONLY)
if (NOT TARGET docs)
add_custom_target(docs ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endif (NOT TARGET docs)
endif (DOXYGEN_FOUND)