Make libcurl a required dependency and always build KICAD_CURL

This commit is contained in:
Jon Evans 2020-02-23 11:35:01 -05:00
parent 9f8ff236d6
commit 009641d151
3 changed files with 6 additions and 17 deletions

View File

@ -648,11 +648,9 @@ find_package( GLM 0.9.5.1 REQUIRED )
add_definitions( -DGLM_FORCE_CTOR_INIT )
#
# Find CURL library, required for github plugin
# Find CURL library, required
#
if( BUILD_GITHUB_PLUGIN )
find_package( CURL REQUIRED )
endif()
#
# Find Cairo library, required

View File

@ -303,6 +303,8 @@ set( COMMON_SRCS
hotkey_store.cpp
hotkeys_basic.cpp
html_messagebox.cpp
kicad_curl/kicad_curl.cpp
kicad_curl/kicad_curl_easy.cpp
kiface_i.cpp
kiway.cpp
kiway_express.cpp
@ -351,13 +353,6 @@ if( NOT HAVE_STRTOKR )
list( APPEND COMMON_SRCS strtok_r.c )
endif()
if( BUILD_GITHUB_PLUGIN )
list( APPEND COMMON_SRCS
kicad_curl/kicad_curl.cpp
kicad_curl/kicad_curl_easy.cpp
)
endif()
set( COMMON_SRCS
${COMMON_SRCS}

View File

@ -30,13 +30,12 @@
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
#ifdef BUILD_GITHUB_PLUGIN
// kicad_curl.h can create conflicts for some defines, at least on Windows
// so we are using here 2 proxy functions to know Curl version to avoid
// including kicad_curl.h to know Curl version
extern std::string GetKicadCurlVersion();
extern std::string GetCurlLibVersion();
#endif
#if defined( KICAD_USE_OCC ) | defined( KICAD_USE_OCE )
#include <Standard_Version.hxx>
#endif
@ -492,9 +491,8 @@ void DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml )
aMsg << "Libraries:" << eol;
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
#ifdef BUILD_GITHUB_PLUGIN
aMsg << indent4 << GetKicadCurlVersion() << eol;
#endif
aMsg << "Platform: " << wxGetOsDescription() << ", "
<< platform.GetArchName() << ", "
<< platform.GetEndiannessName() << ", "
@ -528,9 +526,7 @@ void DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml )
aMsg << indent4 << "OpenCASCADE Community Edition: " << OCC_VERSION_COMPLETE << eol;
#endif
#ifdef BUILD_GITHUB_PLUGIN
aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol;
#endif
aMsg << indent4 << "Compiler: ";
#if defined(__clang__)