Skip to content

Commit d6f60fc

Browse files
authored
Add UE4 compatibility option, Fix configuration file (#901)
Update libHttpClient_Linux.bash add clang-11 support
1 parent 2868d32 commit d6f60fc

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Build/libHttpClient.Linux/libHttpClient_Linux.bash

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ CONFIGURATION="Release"
1212
BUILD_CURL=true
1313
BUILD_SSL=true
1414
BUILD_STATIC=false
15+
BUILD_UNREAL_ENGINE_4=false
16+
C_COMPILER="clang"
17+
CXX_COMPILER="clang++"
1518

1619
while [[ $# -gt 0 ]]; do
1720
case $1 in
@@ -28,6 +31,10 @@ while [[ $# -gt 0 ]]; do
2831
BUILD_SSL=false
2932
shift
3033
;;
34+
-ue4|--unreal-engine-4)
35+
BUILD_UNREAL_ENGINE_4=true
36+
shift
37+
;;
3138
-sg|--skipaptget)
3239
DO_APTGET=false
3340
shift
@@ -66,6 +73,14 @@ log "BUILD CURL = ${BUILD_CURL}"
6673
log "CMakeLists.txt = ${SCRIPT_DIR}"
6774
log "CMake output = ${SCRIPT_DIR}/../../Int/CMake/libHttpClient.Linux"
6875

76+
if [ "$BUILD_UNREAL_ENGINE_4" = true ]; then
77+
log "Unreal Compatibility Enabled"
78+
C_COMPILER="clang-11"
79+
CXX_COMPILER="clang++-11"
80+
else
81+
log "Unreal Compatibility Disabled"
82+
fi
83+
6984
# make libcrypto and libssl
7085
if [ "$BUILD_SSL" = true ]; then
7186
log "Building SSL"
@@ -81,10 +96,10 @@ fi
8196

8297
if [ "$BUILD_STATIC" = false ]; then
8398
# make libHttpClient static
84-
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION -D BUILD_SHARED_LIBS=YES
99+
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
85100
sudo make -C "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux
86101
else
87102
# make libHttpClient shared
88-
sudo cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux -D CMAKE_BUILD_TYPE=$CONFIGURATION
103+
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
89104
sudo make -C "$SCRIPT_DIR"/../../Int/CMake/libHttpClient.Linux
90105
fi

Build/libHttpClient.Linux/openssl_Linux.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ sed -i -e 's/\r$//' Configure
5555

5656
if [ "$CONFIGURATION" = "Debug" ]; then
5757
# make libcrypto and libssl
58-
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw no-engine no-async -d
58+
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw -d
5959
else
6060
# make libcrypto and libssl
61-
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw no-engine no-async
61+
./Configure --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64-clang no-shared no-hw
6262
fi
6363

6464
make CFLAGS="-fvisibility=hidden" CXXFLAGS="-fvisibility=hidden"

0 commit comments

Comments
 (0)