|  | @@ -47,16 +47,23 @@ endif()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # We need to link OpenSSL if not dynamically loading
 | 
	
		
			
				|  |  |  if (CIVETWEB_ENABLE_SSL)
 | 
	
		
			
				|  |  | -  if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
 | 
	
		
			
				|  |  | -    find_package(LibDl)
 | 
	
		
			
				|  |  | -    if (LIBDL_FOUND)
 | 
	
		
			
				|  |  | -      target_link_libraries(civetweb-c-library -ldl)
 | 
	
		
			
				|  |  | -    endif()
 | 
	
		
			
				|  |  | +  if (CIVETWEB_ENBALE_MBEDTLS)
 | 
	
		
			
				|  |  | +    find_package(MbedTLS)
 | 
	
		
			
				|  |  | +    include_directories(${MbedTLS_INCLUDE_DIR})
 | 
	
		
			
				|  |  | +    message(STATUS "MbedTLS include directory: {MbedTLS_INCLUDE_DIR}")
 | 
	
		
			
				|  |  | +    target_link_libraries(civetweb-c-library ${MbedTLS_LIBRARIES})
 | 
	
		
			
				|  |  |    else()
 | 
	
		
			
				|  |  | -    find_package(OpenSSL)
 | 
	
		
			
				|  |  | -    include_directories(${OPENSSL_INCLUDE_DIR})
 | 
	
		
			
				|  |  | -    message(STATUS "OpenSSL include directory: ${OPENSSL_INCLUDE_DIR}")
 | 
	
		
			
				|  |  | -    target_link_libraries(civetweb-c-library ${OPENSSL_LIBRARIES})
 | 
	
		
			
				|  |  | +    if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
 | 
	
		
			
				|  |  | +      find_package(LibDl)
 | 
	
		
			
				|  |  | +      if (LIBDL_FOUND)
 | 
	
		
			
				|  |  | +        target_link_libraries(civetweb-c-library -ldl)
 | 
	
		
			
				|  |  | +      endif()
 | 
	
		
			
				|  |  | +    else()
 | 
	
		
			
				|  |  | +      find_package(OpenSSL)
 | 
	
		
			
				|  |  | +      include_directories(${OPENSSL_INCLUDE_DIR})
 | 
	
		
			
				|  |  | +      message(STATUS "OpenSSL include directory: ${OPENSSL_INCLUDE_DIR}")
 | 
	
		
			
				|  |  | +      target_link_libraries(civetweb-c-library ${OPENSSL_LIBRARIES})
 | 
	
		
			
				|  |  | +    endif()
 | 
	
		
			
				|  |  |    endif()
 | 
	
		
			
				|  |  |  endif()
 | 
	
		
			
				|  |  |  
 |