Compare commits

...

2 Commits

Author SHA1 Message Date
BodgeMaster 18a9517370 Build system: Start working on Cygwin support 2022-10-30 19:39:46 +01:00
BodgeMaster cd93f4c4c6 gitignore: Ignore endianness check on Cygwin 2022-10-30 17:19:55 +01:00
5 changed files with 26 additions and 5 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@
# ignore endianness check
/.endianness
/resources/check_endianness
/resources/check_endianness.exe
# Java bytecode
*.class

11
.mingw-cross.cmake Normal file
View File

@ -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)

View File

@ -27,9 +27,13 @@ create_directory ./bin
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
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/
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0.7.1 bin/lib/
fi
ln -vs ../dependencies/sockpp-0.7.1/include/sockpp/ ./include/
ln -vs ../dependencies/tiny-utf8-4.4.3/include/tinyutf8/ ./include/

View File

@ -92,7 +92,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."
cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=$PROJECT_BASE_DIR/.mingw-cross.cmake -DSOCKPP_BUILD_SHARED=ON -DSOCKPP_BUILD_STATIC=OFF
else
cmake -Bbuild .
fi
cmake --build build
popd >/dev/null 2>&1

View File

@ -15,7 +15,7 @@
echo ">>> Loading shell environment for FOSS-VG development..."
PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
export PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
echo "Project base directory is $PROJECT_BASE_DIR"
if [ -f "$PROJECT_BASE_DIR/.localenv.bashrc" ]; then