File tree Expand file tree Collapse file tree 5 files changed +34
-5
lines changed
Build/libHttpClient.Linux Expand file tree Collapse file tree 5 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ get_filename_component(PATH_TO_ROOT "../.." ABSOLUTE)
44
55project ("libHttpClient.Linux" )
66
7- set (CMAKE_C_COMPILER clang)
8- set (CMAKE_CXX_COMPILER clang++)
97set (CMAKE_STATIC_LIBRARY_PREFIX "" )
108set (CMAKE_SHARED_LIBRARY_PREFIX "" )
119set (CMAKE_POSITION_INDEPENDENT_CODE ON )
Original file line number Diff line number Diff line change @@ -22,7 +22,19 @@ while [[ $# -gt 0 ]]; do
2222done
2323
2424pushd " $SCRIPT_DIR " /../../External/curl
25- autoreconf -fi " $SCRIPT_DIR " /../../External/curl
25+
26+ if [ ! -f ./configure ]; then
27+ if [ -f configure.ac ]; then
28+ if command -v autoreconf > /dev/null 2>&1 ; then
29+ autoreconf -fi
30+ else
31+ echo " autoreconf not found; skipping"
32+ fi
33+ else
34+ echo " Missing cURL sources. Please run 'git submodule update --init --recursive'."
35+ exit 1
36+ fi
37+ fi
2638
2739if [ -f " $SCRIPT_DIR /../../Out/x64/$CONFIGURATION /libcurl.Linux/libcurl.a" ]; then
2840 echo " Previously-built library present at $SCRIPT_DIR /../../Out/x64/$CONFIGURATION /libcurl.Linux/libcurl.a - skipping build"
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ CONFIGURATION="Release"
1212BUILD_CURL=true
1313BUILD_SSL=true
1414BUILD_STATIC=false
15+ DO_APTGET=true
1516
1617while [[ $# -gt 0 ]]; do
1718 case $1 in
@@ -66,6 +67,12 @@ log "BUILD CURL = ${BUILD_CURL}"
6667log " CMakeLists.txt = ${SCRIPT_DIR} "
6768log " CMake output = ${SCRIPT_DIR} /../../Int/CMake/libHttpClient.Linux"
6869
70+ # Verify that required submodules are present
71+ if [ ! -f " $SCRIPT_DIR /../../External/curl/configure.ac" ] || [ ! -f " $SCRIPT_DIR /../../External/openssl/Configure" ]; then
72+ echo " Required submodules are missing. Please run 'git submodule update --init --recursive'."
73+ exit 1
74+ fi
75+
6976# make libcrypto and libssl
7077if [ " $BUILD_SSL " = true ]; then
7178 log " Building SSL"
Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ while [[ $# -gt 0 ]]; do
2222 esac
2323done
2424
25- sudo hwclock --hctosys
25+ # Skip hwclock if not available
26+ if command -v hwclock > /dev/null 2>&1 ; then
27+ sudo hwclock --hctosys
28+ fi
2629sudo rm -rf /usr/local/ssl
2730sudo mkdir /usr/local/ssl
2831sudo mkdir /usr/local/ssl/lib
5053fi
5154
5255pushd $OPENSSL_SRC
56+
5357if [ -f Makefile ] && make -n clean > /dev/null 2>&1 ; then
5458 make clean
5559fi
6468fi
6569
6670make CFLAGS=" -fvisibility=hidden" CXXFLAGS=" -fvisibility=hidden"
67- sudo make install
71+ if make -n install > /dev/null 2>&1 ; then
72+ sudo make install
73+ fi
6874# copies binaries to final directory
6975mkdir -p " $SCRIPT_DIR " /../../Out/x64/" $CONFIGURATION " /libcrypto.Linux
7076cp -R " $PWD " /libcrypto.a " $SCRIPT_DIR " /../../Out/x64/" $CONFIGURATION " /libcrypto.Linux
Original file line number Diff line number Diff line change 1+ .PHONY : all clean
2+ all :
3+ @echo "Use build scripts under Build/ to compile"
4+
5+ clean :
6+ rm -rf Out Int
You can’t perform that action at this time.
0 commit comments