blob: 32a702511d536870ae6a737fd08beaa4c4fcb890 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
--- CMakeLists.txt 2016-06-04 21:18:20.000000000 +0200
+++ CMakeLists.txt.new 2017-01-12 17:12:10.000000000 +0100
@@ -373,11 +373,18 @@
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)
@@ -405,3 +412,14 @@
IF(BUILD_PLUGIN)
ADD_SUBDIRECTORY(plugin)
ENDIF(BUILD_PLUGIN)
+
+MESSAGE(STATUS "<<< Gentoo configuration >>>
+Build type ${CMAKE_BUILD_TYPE}
+Install path ${CMAKE_INSTALL_PREFIX}
+Compiler flags:
+C ${CMAKE_C_FLAGS}
+C++ ${CMAKE_CXX_FLAGS}
+Linker flags:
+Executable ${CMAKE_EXE_LINKER_FLAGS}
+Module ${CMAKE_MODULE_LINKER_FLAGS}
+Shared ${CMAKE_SHARED_LINKER_FLAGS}\n")
|