forked from shupp/libgpredict
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
56 lines (48 loc) · 1.2 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
cmake_minimum_required(VERSION 2.8)
project (gpredict)
set(CMAKE_BUILD_TYPE Release)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
# Glib
# cmake/FindGlib.cmake is taken from https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake
find_package(Glib REQUIRED)
include_directories(${GLIB_INCLUDE_DIR})
include_directories(${GLIBCONFIG_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_library(gpredict SHARED
sgpsdp/solar.c
sgpsdp/sgp_obs.c
sgpsdp/sgp_in.c
sgpsdp/sgp_time.c
sgpsdp/sgp_math.c
sgpsdp/sgp4sdp4.c
predict-tools.c
time-tools.c
orbit-tools.c
gtk-sat-data.c
qth-data.c
sat-vis.c
)
# link glib
target_link_libraries(gpredict ${GLIB_LIBRARIES})
install (TARGETS gpredict
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
INSTALL(FILES
gpredict.h
gtk-sat-data.h
orbit-tools.h
predict-tools.h
qth-data.h
sat-vis.h
time-tools.h
DESTINATION "include/gpredict"
)
INSTALL(FILES
sgpsdp/sgp4sdp4.h
DESTINATION "include/gpredict/sgpsdp"
)