Clean up curl define

It doesn't have to be win32-specific, we could (for example) use this on
mac as well to build without curl/SN support.
pull/1275/head
Jason Rhinelander 4 years ago
parent 856cf82c0e
commit 28362fd6a6

@ -43,6 +43,7 @@ target_link_libraries(lokinet-util PUBLIC
)
if(TARGET curl)
target_link_libraries(lokinet-util PUBLIC curl)
target_compile_definitions(lokinet-util HAVE_CURL)
if(TARGET libcurl_external)
add_dependencies(lokinet-util libcurl_external)
endif()

@ -6,7 +6,7 @@
#include "crypto/crypto.hpp"
#include "crypto/types.hpp"
#ifndef _WIN32
#ifdef HAVE_CURL
#include <curl/curl.h>
#endif
@ -230,8 +230,8 @@ namespace llarp
bool
KeyManager::loadIdentityFromLokid()
{
#if defined(_WIN32) || defined(_WIN64)
LogError("service node mode not supported on windows");
#ifndef HAVE_CURL
LogError("this lokinet was not built with service node mode support");
return false;
#else
CURL* curl = curl_easy_init();

Loading…
Cancel
Save