-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCMakeLists.txt
41 lines (32 loc) · 1.09 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
cmake_minimum_required(VERSION 2.6.2)
project(stun-msg)
add_subdirectory(gtest)
config_compiler_and_linker() # Defined in gtest/cmake/internal_utils.cmake.
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
set(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
set(CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL})
set(CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
include_directories(include)
add_library(stunmsg STATIC
src/crc32.c src/crc32.h
src/hmac_sha1.c src/hmac_sha1.h
src/sha1.c src/sha1.h
src/md5.c src/md5.h
src/stun_msg.c include/stun/msg.h
)
include_directories(gtest/include src)
add_executable(stunmsg_tests
tests/stunmsg_unittest.cc
tests/stunmsgpp_unittest.cc
tests/sha1_unittest.cc
tests/hmac_sha1_unittest.cc
tests/md5_unittest.cc
tests/crc32_unittest.cc
include/stun++/message.h
)
add_dependencies(stunmsg_tests stunmsg gtest gtest_main)
target_link_libraries(stunmsg_tests stunmsg gtest gtest_main)
if(WIN32)
target_link_libraries(stunmsg_tests Ws2_32)
endif()