Build system: Start working on Cygwin support
parent
cd93f4c4c6
commit
18a9517370
|
@ -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)
|
|
@ -27,9 +27,13 @@ create_directory ./bin
|
|||
create_directory ./bin/lib
|
||||
create_directory ./include
|
||||
|
||||
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/
|
||||
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/
|
||||
|
|
|
@ -92,7 +92,12 @@ echo "done"
|
|||
|
||||
echo ">>> Building sockpp... "
|
||||
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
|
||||
cmake -Bbuild .
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue