@@ -109,17 +109,6 @@ if(NOT SQLITE3_LIBRARY)
109
109
message (SEND_ERROR "Failed to find the sqlite3 library" )
110
110
endif ()
111
111
112
- find_path (OPENSSL_INCLUDE_DIR openssl/ssl.h )
113
- find_library (OPENSSL_LIBRARY ssl )
114
- if (NOT OPENSSL_INCLUDE_DIR )
115
- message (SEND_ERROR "Failed to find openssl include files (ssl.h)" )
116
- endif ()
117
- if (NOT OPENSSL_LIBRARY )
118
- message (SEND_ERROR "Failed to find the openssl library" )
119
- else ()
120
- add_definitions (-DNS_ENABLE_SSL )
121
- endif ()
122
-
123
112
FIND_PROGRAM (SVN_EXECUTABLE svn
124
113
DOC "subversion command line client" )
125
114
@@ -304,6 +293,18 @@ else()
304
293
MESSAGE (STATUS "==== LibUSB not found, support for TE923/Voltcraft disabled!" )
305
294
ENDIF (LIBUSB_FOUND )
306
295
296
+ find_path (OPENSSL_INCLUDE_DIR openssl/ssl.h )
297
+ find_library (OPENSSL_LIBRARY ssl )
298
+ if (NOT OPENSSL_INCLUDE_DIR )
299
+ message (SEND_ERROR "Failed to find openssl include files (ssl.h), no HTTPS support" )
300
+ endif ()
301
+ if (NOT OPENSSL_LIBRARY )
302
+ message (SEND_ERROR "Failed to find the openssl library, no HTTPS support" )
303
+ else ()
304
+ add_definitions (-DNS_ENABLE_SSL )
305
+ target_link_libraries (domoticz ${OPENSSL_LIBRARY} )
306
+ endif ()
307
+
307
308
## support lua popen on Linux platforms
308
309
#IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
309
310
# SET(OperatingSystem "Linux")
@@ -364,7 +365,7 @@ else()
364
365
message (STATUS "Not building on Raspberry Pi. GPIO support disabled." )
365
366
ENDIF (RaspberryPi )
366
367
367
- target_link_libraries (domoticz ${Boost_LIBRARIES} ${SQLITE3_LIBRARY} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} pthread lua ${CMAKE_DL_LIBS} ${OPENSSL_LIBRARY} )
368
+ target_link_libraries (domoticz ${Boost_LIBRARIES} ${SQLITE3_LIBRARY} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} pthread lua ${CMAKE_DL_LIBS} )
368
369
369
370
ADD_PRECOMPILED_HEADER (domoticz "main/stdafx.h" )
370
371
0 commit comments