forked from wernerd/gstzrtp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
136 lines (116 loc) · 4.55 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
set (sdes_src ${zrtpSrcs}/zrtp/ZrtpSdesStream.cpp)
set(zrtp_src_no_cache
${zrtpSrcs}/zrtp/ZrtpCallbackWrapper.cpp
${zrtpSrcs}/zrtp/ZRtp.cpp
${zrtpSrcs}/zrtp/ZrtpCrc32.cpp
${zrtpSrcs}/zrtp/ZrtpPacketCommit.cpp
${zrtpSrcs}/zrtp/ZrtpPacketConf2Ack.cpp
${zrtpSrcs}/zrtp/ZrtpPacketConfirm.cpp
${zrtpSrcs}/zrtp/ZrtpPacketDHPart.cpp
${zrtpSrcs}/zrtp/ZrtpPacketGoClear.cpp
${zrtpSrcs}/zrtp/ZrtpPacketClearAck.cpp
${zrtpSrcs}/zrtp/ZrtpPacketHelloAck.cpp
${zrtpSrcs}/zrtp/ZrtpPacketHello.cpp
${zrtpSrcs}/zrtp/ZrtpPacketError.cpp
${zrtpSrcs}/zrtp/ZrtpPacketErrorAck.cpp
${zrtpSrcs}/zrtp/ZrtpPacketPingAck.cpp
${zrtpSrcs}/zrtp/ZrtpPacketPing.cpp
${zrtpSrcs}/zrtp/ZrtpPacketSASrelay.cpp
${zrtpSrcs}/zrtp/ZrtpPacketRelayAck.cpp
${zrtpSrcs}/zrtp/ZrtpStateClass.cpp
${zrtpSrcs}/zrtp/ZrtpTextData.cpp
${zrtpSrcs}/zrtp/ZrtpConfigure.cpp
${zrtpSrcs}/zrtp/ZrtpCWrapper.cpp
${zrtpSrcs}/zrtp/Base32.cpp
${zrtpSrcs}/common/osSpecifics.c)
if (OPENSSL_FOUND)
set(crypto_src
${zrtpSrcs}/zrtp/crypto/openssl/zrtpDH.cpp
${zrtpSrcs}/zrtp/crypto/openssl/hmac256.cpp
${zrtpSrcs}/zrtp/crypto/openssl/sha256.cpp
${zrtpSrcs}/zrtp/crypto/openssl/hmac384.cpp
${zrtpSrcs}/zrtp/crypto/openssl/sha384.cpp
${zrtpSrcs}/zrtp/crypto/openssl/aesCFB.cpp
${zrtpSrcs}/zrtp/crypto/openssl/InitializeOpenSSL.cpp
${zrtpSrcs}/zrtp/crypto/twoCFB.cpp)
set(crypto_src_srtp
${zrtpSrcs}/srtp/crypto/openssl/hmac.cpp
${zrtpSrcs}/srtp/crypto/openssl/SrtpSymCrypto.cpp)
endif()
# in standalone mode we need bignumber lib and crypto primitives
if (CRYPTO_STANDALONE)
set(crypto_src
${zrtpSrcs}/cryptcommon/ZrtpRandom.cpp
${zrtpSrcs}/common/Thread.cpp
${zrtpSrcs}/common/MutexClass.cpp
${zrtpSrcs}/common/EventClass.cpp
${zrtpSrcs}/srtp/crypto/sha1.c
${zrtpSrcs}/bnlib/bn00.c
${zrtpSrcs}/bnlib/lbn00.c
${zrtpSrcs}/bnlib/bn.c
${zrtpSrcs}/bnlib/lbnmem.c
${zrtpSrcs}/bnlib/sieve.c
${zrtpSrcs}/bnlib/prime.c
${zrtpSrcs}/bnlib/bnprint.c
${zrtpSrcs}/bnlib/jacobi.c
${zrtpSrcs}/bnlib/germain.c
${zrtpSrcs}/bnlib/ec/ec.c
${zrtpSrcs}/bnlib/ec/ecdh.c
${zrtpSrcs}/bnlib/bnprint.c
${zrtpSrcs}/zrtp/crypto/zrtpDH.cpp
${zrtpSrcs}/zrtp/crypto/hmac256.cpp
${zrtpSrcs}/zrtp/crypto/sha256.cpp
${zrtpSrcs}/zrtp/crypto/hmac384.cpp
${zrtpSrcs}/zrtp/crypto/sha384.cpp
${zrtpSrcs}/zrtp/crypto/aesCFB.cpp
${zrtpSrcs}/zrtp/crypto/twoCFB.cpp
${zrtpSrcs}/zrtp/crypto/sha2.c)
set(crypto_src_srtp
${zrtpSrcs}/srtp/crypto/hmac.cpp
${zrtpSrcs}/srtp/crypto/SrtpSymCrypto.cpp
${zrtpSrcs}/srtp/crypto/sha1.c)
endif()
set(cryptcommon_srcs
${zrtpSrcs}/cryptcommon/twofish.c
${zrtpSrcs}/cryptcommon/twofish_cfb.c
${zrtpSrcs}/cryptcommon/aescrypt.c
${zrtpSrcs}/cryptcommon/aeskey.c
${zrtpSrcs}/cryptcommon/aestab.c
${zrtpSrcs}/cryptcommon/aes_modes.c
${zrtpSrcs}/cryptcommon/macSkein.cpp
${zrtpSrcs}/cryptcommon/skein.c
${zrtpSrcs}/cryptcommon/skein_block.c
${zrtpSrcs}/cryptcommon/skeinApi.c)
if (NOT enable_sqlite)
set(zrtp_src ${zrtp_src_no_cache}
${zrtpSrcs}/zrtp/ZIDCacheFile.cpp
${zrtpSrcs}/zrtp/ZIDRecordFile.cpp)
else()
set(zrtp_src ${zrtp_src_no_cache}
${zrtpSrcs}/zrtp/ZIDCacheDb.cpp
${zrtpSrcs}/zrtp/ZIDRecordDb.cpp
${zrtpSrcs}/zrtp/zrtpB64Encode.c
${zrtpSrcs}/zrtp/zrtpB64Decode.c
${zrtpSrcs}/zrtp/zrtpCacheSqliteBackend.c)
endif()
set(srtp_src
${zrtpSrcs}/srtp/CryptoContext.cpp
${zrtpSrcs}/srtp/CryptoContextCtrl.cpp
${crypto_src_srtp})
set(filter_src
gstzrtpfilter.c gstSrtpCWrapper.cpp)
set(gstzrtp_src ${zrtp_src} ${crypto_src} ${cryptcommon_srcs} ${srtp_src} ${filter_src})
set(LIBRARY_BUILD_TYPE SHARED)
add_library(gstzrtp ${LIBRARY_BUILD_TYPE} ${gstzrtp_src})
set_target_properties(gstzrtp PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
target_link_libraries(gstzrtp ${LIBS})
# add_custom_command(TARGET gstzrtp POST_BUILD
# COMMAND "${PROJECT_SOURCE_DIR}/doc/generateDoc.sh"
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc)
install(TARGETS gstzrtp DESTINATION ${LIBDIRNAME})
if (BUILD_TESTER)
set(tester_src gstzrtptester.c)
add_library(gstzrtptester ${LIBRARY_BUILD_TYPE} ${tester_src})
set_target_properties(gstzrtptester PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
target_link_libraries(gstzrtptester ${LIBS})
endif()