Dont include everything statically for Windows build.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-02-27 11:44:43 +01:00
parent 04009bbb34
commit 6efb7c55e8
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 6 additions and 5 deletions

View File

@ -34,7 +34,8 @@ steps:
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix - update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc -D CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DWINDOWS=ON - cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc -D CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DWINDOWS=ON
- cmake --build build-release-windows --target all -- -j 4 - cmake --build build-release-windows --target all -- -j 4
- cp /drone/src/build-release-windows/lib/libArbutils.so /drone/src/build-release-windows/bin/ - cp /drone/src/build-release-windows/lib/* /drone/src/build-release-windows/bin/
- cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll /drone/src/build-release-windows/bin/
- export WINEARCH=win64 - export WINEARCH=win64
- wine build-release-windows/bin/CreatureLibTests.exe -s - wine build-release-windows/bin/CreatureLibTests.exe -s
- name: conan-deploy - name: conan-deploy

View File

@ -71,11 +71,11 @@ if (WINDOWS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L ${CMAKE_BINARY_DIR}/bin") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L ${CMAKE_BINARY_DIR}/bin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition")
# Statically link libraries we need in Windows. # Statically link libraries we need in Windows.
target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibCore -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibLibrary -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibBattling -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibBattling -static-libgcc -static-libstdc++)
if (NOT DEFINED CONAN_EXPORTED) if (NOT DEFINED CONAN_EXPORTED)
target_link_libraries(CreatureLibTests -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibTests -static-libgcc -static-libstdc++)
endif () endif ()
endif (WINDOWS) endif (WINDOWS)