-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (33 loc) · 1.13 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
cmake_minimum_required(VERSION 3.8)
project(SimpleAMR)
set(CMAKE_CXX_STANDARD 14)
find_library(AMRNB_LIBRARY
NAMES opencore-amrnb
)
find_library(AMRWB_LIBRARY
NAMES opencore-amrwb
)
find_library(AMRWBENC_LIBRARY
NAMES vo-amrwbenc
)
if(AMRNB_LIBRARY)
message("Found opencore-amrnb: ${AMRNB_LIBRARY}")
add_definitions(-DSIMPLEAMR_ENABLE_AMRNB)
endif()
if(AMRWB_LIBRARY)
message("Found opencore-amrwb: ${AMRWB_LIBRARY}")
add_definitions(-DSIMPLEAMR_ENABLE_AMRWB)
endif()
if(AMRWBENC_LIBRARY)
message("Found vo-amrwbenc: ${AMRWBENC_LIBRARY}")
add_definitions(-DSIMPLEAMR_ENABLE_AMRWBENC)
endif()
add_library(SimpleAMR SimpleAMR.cpp SimpleAMR.hpp)
target_link_libraries(SimpleAMR PUBLIC
$<$<BOOL:${AMRNB_LIBRARY}>:${AMRNB_LIBRARY}>
$<$<BOOL:${AMRWB_LIBRARY}>:${AMRWB_LIBRARY}>
$<$<BOOL:${AMRWBENC_LIBRARY}>:${AMRWBENC_LIBRARY}>)
add_executable(Test_AMRNB_Encode Test_AMRNB_Encode.cpp)
target_link_libraries(Test_AMRNB_Encode PUBLIC SimpleAMR)
add_executable(Test_AMRWB_Encode Test_AMRWB_Encode.cpp)
target_link_libraries(Test_AMRWB_Encode PUBLIC SimpleAMR)