Compare commits
No commits in common. "78880e1c20a6178460b51dc9e78dea1ab38e15f9" and "63e1749ad1fb9a1477d46ae00404d30c401e9915" have entirely different histories.
78880e1c20
...
63e1749ad1
|
@ -0,0 +1,11 @@
|
|||
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,8 +28,7 @@ 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/cygsockpp-0.dll bin/lib/libsockpp.so
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/cygsockpp-0.dll bin/lib/
|
||||
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.dll bin/lib/libsockpp.so
|
||||
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,22 +93,12 @@ 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."
|
||||
|
||||
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
|
||||
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
|
||||
else
|
||||
cmake -Bbuild .
|
||||
cmake --build build
|
||||
fi
|
||||
cmake --build build
|
||||
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