forked from sskorol/respeaker-websockets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (28 loc) · 1.11 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
cmake_minimum_required(VERSION 3.4.1)
project(respeaker_core VERSION 1.0.0)
set(MIN_LIBRESPEAKER_VERSION 2.1.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-fPIC -std=c++14 -fpermissive -fomit-frame-pointer")
include(FindPkgConfig)
pkg_check_modules(RESPEAKER REQUIRED respeaker>=${MIN_LIBRESPEAKER_VERSION})
include_directories(
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/libs
${RESPEAKER_INCLUDE_DIRS}
)
file(GLOB PIXEL_RING_SOURCES "${PROJECT_SOURCE_DIR}/src/*.c")
add_executable(respeaker_core src/main.cpp ${PIXEL_RING_SOURCES} ${PROJECT_SOURCE_DIR}/src/ws_transport.cpp ${PROJECT_SOURCE_DIR}/src/respeaker_core.cpp ${PROJECT_SOURCE_DIR}/src/config.cpp)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config.json
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
link_directories(
${RESPEAKER_LIBRARY_DIRS}
)
find_library(IXWEBSOCKET ixwebsocket lib)
target_link_libraries(
respeaker_core
${LIBGFLAGS_PATH} -lpthread -lz -lstdc++fs
${RESPEAKER_LIBRARIES}
${IXWEBSOCKET}
)