-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (53 loc) · 1.49 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
cmake_minimum_required(VERSION 3.12)
project(libvisvid
VERSION 0.1.0
DESCRIPTION "Turns video data into a visual map"
)
option(libvisvid_build_examples "Build example files")
option(${PROJECT_NAME}_TESTS "Build test files" OFF)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# Set version metadata
string(TIMESTAMP LIBVISVID_VERSION_BUILD "%Y%m%d%H%M%S")
find_package(FFMPEG
COMPONENTS
avformat
avcodec
avutil
swscale
)
find_package(SDL2)
find_package(Doxygen)
find_package(Python3 COMPONENTS Interpreter Development)
#include(CTest)
add_subdirectory(src)
if(libvisvid_build_examples)
add_subdirectory(examples)
endif(libvisvid_build_examples)
# build tests
include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
# Build Documentation
include(cmake/buildDocumentation.cmake)
# Enable packaging
include(cmake/CPackConfig.cmake)
include(CPack)
include(CMakePackageConfigHelpers)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/VisVidConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/VisVidConfig.cmake
INSTALL_DESTINATION share/cmake/${PROJECT_NAME}
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/VisVidConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/VisVidConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/VisVidConfigVersion.cmake
DESTINATION
share/cmake/${PROJECT_NAME}
)