-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathCMakeLists.txt
72 lines (55 loc) · 2.55 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
cmake_minimum_required(VERSION 2.6)
find_package(PkgConfig)
PROJECT(rockchip_media_process_platform C CXX)
INCLUDE(GNUInstallDirs)
pkg_search_module(PTHREAD pthread)
ADD_DEFINITIONS(-Wmissing-declarations -Wall -Wextra -Wshadow -ffast-math)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -O0 -g3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os")
# putting those into config.h would be better
set(RKPLATFORM "" CACHE BOOL "Enable RK HW CONFIG")
if(RKPLATFORM)
ADD_DEFINITIONS(-DRKPLATFORM)
endif(RKPLATFORM)
# VCS version generation
# ----------------------------------------------------------------------------
# Start module definition
# ----------------------------------------------------------------------------
# project overall include file
include_directories(inc)
# small utile functions for test case
include_directories(utils)
# ----------------------------------------------------------------------------
# osal library
# ----------------------------------------------------------------------------
# Operation System Abstract Layer (OSAL) include
include_directories(osal/inc)
# OSAL is needed on all platform, do not need option
add_subdirectory(osal)
# ----------------------------------------------------------------------------
# utils for test case
# ----------------------------------------------------------------------------
add_subdirectory(utils)
# ----------------------------------------------------------------------------
# Media Process Platform library
# ----------------------------------------------------------------------------
# Media Process Platform include
include_directories(mpp/inc)
add_subdirectory(mpp)
# ----------------------------------------------------------------------------
# test / demo
# ----------------------------------------------------------------------------
add_subdirectory(test)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/inc/config.h.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/inc/config.h")
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/rockchip_mpp.pc.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/rockchip_mpp.pc" @ONLY)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/rockchip_vpu.pc.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/rockchip_vpu.pc" @ONLY)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/rockchip_mpp.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/rockchip_vpu.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/inc/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rockchip")
# End generate the build configure file