blob: 07968b32bf7a0f926cc81a648d0bb32addd014f5 (
plain)
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
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -373,11 +373,17 @@
ENDIF(AUDIO_CAPTCHA)
IF(FROST_SUPPORT OR FCP_SSL_SUPPORT)
- ADD_SUBDIRECTORY(libs/mbedtls)
- TARGET_LINK_LIBRARIES(fms mbedtls)
- TARGET_LINK_LIBRARIES(fms mbedcrypto)
- TARGET_LINK_LIBRARIES(fms mbedx509)
- INCLUDE_DIRECTORIES(libs/mbedtls/include)
+ FIND_LIBRARY(MBEDTLS_LIBRARY NAMES mbedtls )
+ FIND_LIBRARY(MBEDCRYPTO_LIBRARY NAMES mbedcrypto mbedx509)
+ FIND_LIBRARY(MBEDX509_LIBRARY NAMES mbedx509)
+
+ IF(MBEDTLS_LIBRARY)
+ TARGET_LINK_LIBRARIES(fms ${MBEDTLS_LIBRARY})
+ TARGET_LINK_LIBRARIES(fms ${MBEDCRYPTO_LIBRARY})
+ TARGET_LINK_LIBRARIES(fms ${MBEDX509_LIBRARY})
+ ELSE(MBEDTLS_LIBRARY)
+ MESSAGE(FATAL ERROR: "Could not find mbedtls library.")
+ ENDIF(MBEDTLS_LIBRARY)
IF(FROST_SUPPORT)
ADD_DEFINITIONS(-DFROST_SUPPORT)
|