forked from Infactum/tg2sip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (50 loc) · 1.37 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
cmake_minimum_required(VERSION 3.9)
project(tg2sip)
set(CMAKE_CXX_STANDARD 17)
add_subdirectory(libtgvoip)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(Td 1.2.0 REQUIRED)
find_package(spdlog 0.17 REQUIRED)
pkg_check_modules(PJSIP libpjproject>=2.8 REQUIRED)
pkg_check_modules(OPUS opus REQUIRED)
add_executable(tg2sip
tg2sip/main.cpp
tg2sip/tg.cpp
tg2sip/tg.h
tg2sip/sip.cpp
tg2sip/sip.h
tg2sip/settings.cpp
tg2sip/settings.h
tg2sip/logging.cpp
tg2sip/logging.h
tg2sip/utils.cpp
tg2sip/utils.h
tg2sip/queue.h
tg2sip/gateway.cpp
tg2sip/gateway.h
)
add_custom_command(
TARGET tg2sip PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/settings.ini
$<TARGET_FILE_DIR:tg2sip>)
target_include_directories(tg2sip PRIVATE
${PJSIP_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}
${OPUS_INCLUDE_DIRS}
include)
target_link_libraries(tg2sip PRIVATE
${PJSIP_LIBRARIES}
${OPUS_LIBRARIES}
libtgvoip
Threads::Threads
Td::TdStatic)
add_executable(gen_db
tg2sip/gen_db.cpp
tg2sip/settings.cpp
tg2sip/settings.h)
target_include_directories(gen_db PRIVATE
include)
target_link_libraries(gen_db PRIVATE
Td::TdStatic)