-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
35 lines (28 loc) · 905 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
cmake_minimum_required (VERSION 3.8)
project ("SipServer")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(HELPERS_SRC_FILES "${SRC_DIR}/Helpers")
file(GLOB_RECURSE HELPERS_SRC
"${HELPERS_SRC_FILES}/*.cpp"
"${HELPERS_SRC_FILES}/*.h"
"${HELPERS_SRC_FILES}/*.hpp"
)
set(SIP_SRC_FILES "${SRC_DIR}/SIP")
file(GLOB_RECURSE SIP_SRC
"${SIP_SRC_FILES}/*.cpp"
"${SIP_SRC_FILES}/*.h"
"${SIP_SRC_FILES}/*.hpp"
)
include_directories(${HELPERS_SRC_FILES} ${SIP_SRC_FILES})
add_executable (SipServer "main.cpp" ${SIP_SRC} ${HELPERS_SRC} )
if (WIN32)
target_link_libraries(SipServer wsock32 ws2_32)
elseif (UNIX)
target_link_libraries(SipServer -pthread)
else()
message(FATAL_ERROR "Unsupported platform.")
endif()
source_group("Helpers" FILES ${HELPERS_SRC_FILES})
source_group("SIP" FILES ${SIP_SRC_FILES})