-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (31 loc) · 938 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
project(opusenc CXX)
set(OP_DISABLE_HTTP true)
set(OP_DISABLE_EXAMPLES true)
set(OP_DISABLE_DOCS true)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_STANDARD 99)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_options(-Wfatal-errors)
if(DEFINED CMAKE_JS_VERSION)
set(
NODE_ADDON_INCLUDE_DIRECTORIES
${NODE_ADDON_INCLUDE_DIRECTORIES}
${CMAKE_JS_INC}
)
else()
set(
NODE_ADDON_INCLUDE_DIRECTORIES
${NODE_ADDON_INCLUDE_DIRECTORIES}
$ENV{NVM_INC} ${CMAKE_CURRENT_SOURCE_DIR}/node_modules/nan
)
endif()
add_library(node_addon INTERFACE)
target_include_directories(node_addon INTERFACE ${NODE_ADDON_INCLUDE_DIRECTORIES})
target_link_libraries(node_addon INTERFACE ${CMAKE_JS_LIB})
add_subdirectory(ogg)
add_subdirectory(opus)
add_subdirectory(opusfile)
add_subdirectory(speexdsp-cmake)
add_subdirectory(libopusenc-cmake)
add_subdirectory(src)