Compare commits
3 Commits
63e1749ad1
...
78880e1c20
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 78880e1c20 | |
BodgeMaster | 1d899db889 | |
BodgeMaster | 3cc91ae33d |
|
@ -1,11 +0,0 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(WIN32 true)
|
||||
set(UNIX false)
|
||||
|
||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -28,7 +28,8 @@ create_directory ./bin/lib
|
|||
create_directory ./include
|
||||
|
||||
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.dll bin/lib/libsockpp.so
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/cygsockpp-0.dll bin/lib/libsockpp.so
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/cygsockpp-0.dll bin/lib/
|
||||
else
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so bin/lib/
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0 bin/lib/
|
||||
|
|
|
@ -93,12 +93,22 @@ echo "done"
|
|||
echo ">>> Building sockpp... "
|
||||
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
|
||||
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
|
||||
echo "Adding cygwin workaound for building sockpp."
|
||||
cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=$PROJECT_BASE_DIR/.mingw-cross.cmake -DSOCKPP_BUILD_SHARED=ON -DSOCKPP_BUILD_STATIC=OFF
|
||||
echo "Adding Cygwin workaound for building sockpp."
|
||||
|
||||
for FILE in "$(find ./ -type f)"; do
|
||||
sed -i -e 's/_WIN32/PLEASE_DO_NOT_DEFINE_THIS_MACRO/g' $FILE
|
||||
done
|
||||
mv ./include/sockpp/socket.h ./include/sockpp/socket.h_original
|
||||
echo '#include <sys/time.h>
|
||||
#include "socket.h_original"' > ./include/sockpp/socket.h
|
||||
sed -i -e 's/SO_REUSEPORT/SO_REUSEADDR/g' ./src/acceptor.cpp
|
||||
|
||||
CFLAGS="-D_XOPEN_SOURCE=700" CXXFLAGS="-D_XOPEN_SOURCE=700" cmake -Bbuild
|
||||
CFLAGS="-D_XOPEN_SOURCE=700" CXXFLAGS="-D_XOPEN_SOURCE=700" cmake --build build
|
||||
else
|
||||
cmake -Bbuild .
|
||||
fi
|
||||
cmake --build build
|
||||
fi
|
||||
popd >/dev/null 2>&1
|
||||
|
||||
echo ">>> Cleaning up..."
|
||||
|
|
|
@ -43,7 +43,7 @@ echo "Added aliases and functions."
|
|||
|
||||
export PATH="$PROJECT_BASE_DIR/bin:$PROJECT_BASE_DIR/bin/tools:$PROJECT_BASE_DIR/scripts/tools:$PATH"
|
||||
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
|
||||
echo "Adding cygwin workaound for library path."
|
||||
echo "Adding Cygwin workaound for library path."
|
||||
export PATH="$PROJECT_BASE_DIR/bin/lib:$PATH"
|
||||
fi
|
||||
echo "PATH is $PATH"
|
||||
|
|
Loading…
Reference in New Issue