Skip to content
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
19 changes: 17 additions & 2 deletions Build/libHttpClient.Linux/libHttpClient_Linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ CONFIGURATION="Release"
BUILD_CURL=true
BUILD_SSL=true
BUILD_STATIC=false
BUILD_UNREAL_ENGINE_4=false
C_COMPILER="clang"
CXX_COMPILER="clang++"

while [[ $# -gt 0 ]]; do
case $1 in
Expand All @@ -28,6 +31,10 @@ while [[ $# -gt 0 ]]; do
BUILD_SSL=false
shift
;;
-ue4|--unreal-engine-4)
BUILD_UNREAL_ENGINE_4=true
shift
;;
-sg|--skipaptget)
DO_APTGET=false
shift
Expand Down Expand Up @@ -66,6 +73,14 @@ log "BUILD CURL = ${BUILD_CURL}"
log "CMakeLists.txt = ${SCRIPT_DIR}"
log "CMake output = ${SCRIPT_DIR}/../../Int/CMake/libHttpClient.Linux"

if [ "$BUILD_UNREAL_ENGINE_4" = true ]; then
log "Unreal Compatibility Enabled"
C_COMPILER="clang-11"
CXX_COMPILER="clang++-11"
else
log "Unreal Compatibility Disabled"
fi

# make libcrypto and libssl
if [ "$BUILD_SSL" = true ]; then
log "Building SSL"
Expand All @@ -81,10 +96,10 @@ fi

if [ "$BUILD_STATIC" = false ]; then
# make libHttpClient static
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D BUILD_SHARED_LIBS=YES
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D CMAKE_C_COMPILER=$C_COMPILER -D CMAKE_CXX_COMPILER=$CXX_COMPILER -D CMAKE_C_COMPILER=clang
sudo make -C "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux
else
# make libHttpClient shared
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D CMAKE_C_COMPILER=$C_COMPILER -D CMAKE_CXX_COMPILER=$CXX_COMPILER
sudo make -C "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux
fi
4 changes: 2 additions & 2 deletions Build/libHttpClient.Linux/openssl_Linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ sed -i -e 's/\r$//' Configure

if [ "$CONFIGURATION" = "Debug" ]; then
# make libcrypto and libssl
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw no-engine no-async -d
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw -d
else
# make libcrypto and libssl
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw no-engine no-async
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw
fi

make CFLAGS="-fvisibility=hidden" CXXFLAGS="-fvisibility=hidden"
Expand Down