forked from progweb/gpx2video
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
166 lines (133 loc) · 3.39 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
project(GPX2VIDEO)
cmake_minimum_required(VERSION 2.9)
include(GNUInstallDirs)
include(CheckFunctionExists)
#
# DEBUG DEFAULT MODE
#
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "DEBUG")
endif()
#
# CONFIGURATION
#
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g -ggdb -fPIC -rdynamic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -g -ggdb -fPIC -fpermissive -rdynamic")
add_definitions(-Wall -Wextra -D_GNU_SOURCE)
#
# OPTIONS
#
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#
# VERSION
#
set(MAJOR 0)
set(MINOR 0)
set(PATCH 0)
set(VERSION ${MAJOR}.${MINOR}.${PATCH})
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
configure_file(src/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
#
# LIBS
#
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(LIBEVENT REQUIRED libevent>=2.0.0)
include_directories(${LIBEVENT_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBSSL REQUIRED libssl>=1.0.0)
include_directories(${LIBSSL_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl>=7.38.0)
include_directories(${LIBCURL_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBAVUTIL REQUIRED libavutil>=3.0.0)
include_directories(${LIBAVUTIL_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBAVFORMAT REQUIRED libavformat>=3.0.0)
include_directories(${LIBAVFORMAT_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBAVCODEC REQUIRED libavcodec>=3.0.0)
include_directories(${LIBAVCODEC_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBAVFILTER REQUIRED libavfilter>=3.0.0)
include_directories(${LIBAVFILTER_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBSWRESAMPLE REQUIRED libswresample>=2.0.0)
include_directories(${LIBSWRESAMPLE_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBSWSCALE REQUIRED libswscale>=3.0.0)
include_directories(${LIBSWSCALE_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBGEOGRAPHIC REQUIRED geographiclib)
include_directories(${LIBGEOGRAPHIC_INCLUDE_DIRS})
PKG_CHECK_MODULES(LIBCAIRO REQUIRED cairo)
include_directories(${LIBCAIRO_INCLUDE_DIRS})
FIND_PACKAGE(OpenImageIO 2.1.12 REQUIRED)
#FIND_PACKAGE(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
#
# INCLUDE
#
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${OIIO_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIR}
${Qt5Gui_INCLUDE_DIR}
${Qt5Widgets_INCLUDE_DIR}
)
#
# HEADERS
#
set(GPX2VIDEO_HEADERS
)
#
# SOURCES
#
set(GPX2VIDEO_SOURCES
src/log.c
src/evcurl.c
src/evcurl.cpp
src/kalman.c
src/gpx.cpp
src/oiioutils.cpp
src/ffmpegutils.cpp
src/decoder.cpp
src/encoder.cpp
src/frame.cpp
src/extractor.cpp
src/telemetry.cpp
src/gpx2video.cpp
src/map.cpp
src/track.cpp
src/cache.cpp
src/media.cpp
src/stream.cpp
src/audioparams.cpp
src/videoparams.cpp
src/videowidget.cpp
src/renderer.cpp
src/timesync.cpp
src/main.cpp
src/utils.cpp
utmconvert/utmconvert.cpp
)
#
# QT
#
#SET(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
#SET(CMAKE_AUTOMOC ON)
#
# LINK
#
#add_library(core STATIC ${OVERLAY_CORE_SOURCES})
#
# PROPRERTIES
#
#
# BINARIES
#
add_executable(gpx2video ${GPX2VIDEO_SOURCES})
target_link_libraries(gpx2video gpxlib layoutlib ${LIBEVENT_LIBRARIES} ${LIBCURL_LIBRARIES} ${LIBAVUTIL_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVCODEC_LIBRARIES} ${LIBAVFILTER_LIBRARIES} ${LIBSWRESAMPLE_LIBRARIES} ${LIBSWSCALE_LIBRARIES} ${OIIO_LIBRARIES} ${LIBGEOGRAPHIC_LIBRARIES} ${LIBCAIRO_LIBRARIES} ssl crypto)
#
# INSTALL
#
install(TARGETS gpx2video DESTINATION bin)
#
# SUB DIRECTORIES
#
add_subdirectory(gpxlib)
add_subdirectory(layoutlib)
add_subdirectory(tests)