Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static libcurl #81

Merged
merged 6 commits into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ PWD_ROOT_DIR = $$PWD

CONFIG += core_x2t
include(../../../Common/base.pri)
include(../../../Common/3dParty/curl/curl.pri)

#BOOST
include($$PWD/../../../Common/3dParty/boost/boost.pri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ PWD_ROOT_DIR = $$PWD

CONFIG += core_x2t
include(../../../../Common/base.pri)
include(../../../../Common/3dParty/curl/curl.pri)

core_windows {
QMAKE_CXXFLAGS_RELEASE += -Ob0
Expand Down
73 changes: 73 additions & 0 deletions Common/3dParty/curl/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")

os=$(uname -s)
platform=""

case "$os" in
Linux*)
platform="linux"
BUILD_PLATFORM=Linux
;;
Darwin*)
platform="mac"
BUILD_PLATFORM=MacOSX
;;
*) exit ;;
esac


architecture=$(uname -m)
arch=""

case "$architecture" in
x86_64*) arch="_64" ;;
*) arch="_32" ;;
esac

if [[ -d "$SCRIPTPATH/$platform$arch" ]]
then
echo
else
mkdir "$SCRIPTPATH/$platform$arch"
fi

CURL_FOLDER=curl
cd ${CURL_FOLDER}

if [[ ! -f configure ]]
then
./buildconf
fi

if [[ ! -f Makefile ]]
then
./configure \
--disable-shared \
--enable-static \
--disable-ldap \
--disable-sspi \
--without-librtmp \
--disable-ftp \
--disable-file \
--disable-dict \
--disable-telnet \
--disable-tftp \
--disable-rtsp \
--disable-pop3 \
--disable-imap \
--disable-smtp \
--disable-gopher \
--disable-smb \
--without-libidn
fi

make

if [ ! -d "$SCRIPTPATH/$platform$arch/build" ]
then
DESTDIR="$SCRIPTPATH/$platform$arch" make install
mkdir -p "$SCRIPTPATH/$platform$arch/build"
cp "$SCRIPTPATH/$platform$arch/usr/local/lib/libcurl.a" "$SCRIPTPATH/$platform$arch/build/"
fi

5 changes: 5 additions & 0 deletions Common/3dParty/curl/curl.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
core_linux {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/usr/local/include

LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libcurl.a
}
3 changes: 1 addition & 2 deletions DesktopEditor/doctrenderer/doctrenderer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CONFIG += build_all_zlib build_zlib_as_sources
include(../../OfficeUtils/OfficeUtils.pri)

include(../../Common/3dParty/v8/v8.pri)
include(../../Common/3dParty/curl/curl.pri)

SOURCES += \
memorystream.cpp \
Expand Down Expand Up @@ -55,8 +56,6 @@ core_windows {
core_linux {
SOURCES += \
../../Common/FileDownloader/FileDownloader_curl.cpp

LIBS += -lcurl
}
core_mac {
OBJECTIVE_SOURCES += \
Expand Down
2 changes: 1 addition & 1 deletion X2tConverter/build/Qt/X2tConverter.pri
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib
#BOOST
CONFIG += core_boost_regex
include($$PWD/../../../Common/3dParty/boost/boost.pri)
include($$PWD/../../../Common/3dParty/curl/curl.pri)

core_windows {
LIBS += -lAdvapi32
Expand All @@ -155,7 +156,6 @@ core_windows {
core_linux {
LIBS += -lz
LIBS += -lxml2
LIBS += -lcurl
}

mac {
Expand Down