-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (48 loc) · 1.57 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
cmake_minimum_required(VERSION 3.12)
project(nbsdk)
set(CMAKE_CXX_STANDARD 17)
include_directories(${CMAKE_CURRENT_LIST_DIR})
### compiler version
message(STATUS "CXX compiler: ${CMAKE_CXX_COMPILER}, version: "
"${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "C compiler: ${CMAKE_C_COMPILER}, version: "
"${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
### build type
set(CMAKE_BUILD_TYPE Release)
### for platform
if(ANDROID)
add_definitions(-DOS_ANDROID)
elseif(UNIX)
add_definitions(-DOS_UNIX)
endif()
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/external")
### for boost
set(Boost_NO_BOOST_CMAKE TRUE)
set(BOOST_ROOT /opt/third_party/boost/boost_1.71)
find_package(Boost REQUIRED COMPONENTS system thread)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
MESSAGE( STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
MESSAGE( STATUS "Boost_LIBRARIES = ${Boost_LIBRARIES}")
MESSAGE( STATUS "Boost_LIB_VERSION = ${Boost_LIB_VERSION}")
endif()
### for fftw3
find_package(FFTW3 REQUIRED)
if(FFTW3_FOUND)
include_directories(${FFTW3_INCLUDES})
message(STATUS " libraries: ${FFTW3_INCLUDES}")
message(STATUS " libraries: ${FFTW3_LIBRARIES}")
endif()
### for webrtc
if(ANDROID)
elseif(UNIX)
include_directories(third/webrtc/x86_64/include/webrtc_audio_processing)
link_directories(third/webrtc/x86_64/lib)
add_definitions(-DWEBRTC_POSIX)
endif()
### include module
add_subdirectory(base)
add_subdirectory(memery)
add_subdirectory(math)
add_subdirectory(net)
add_subdirectory(test)