From 6efb7c55e8082fcf3c3aea34a778a4b5999739cc Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 27 Feb 2020 11:44:43 +0100 Subject: [PATCH] Dont include everything statically for Windows build. --- .drone.yml | 3 ++- CMakeLists.txt | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0f251dd..26fdbc8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,7 +34,8 @@ steps: - 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 --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 - wine build-release-windows/bin/CreatureLibTests.exe -s - name: conan-deploy diff --git a/CMakeLists.txt b/CMakeLists.txt index 38598b7..f54a696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition") # Statically link libraries we need in Windows. - target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++) - target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++) - target_link_libraries(CreatureLibBattling -static -static-libgcc -static-libstdc++) + target_link_libraries(CreatureLibCore -static-libgcc -static-libstdc++) + target_link_libraries(CreatureLibLibrary -static-libgcc -static-libstdc++) + target_link_libraries(CreatureLibBattling -static-libgcc -static-libstdc++) if (NOT DEFINED CONAN_EXPORTED) - target_link_libraries(CreatureLibTests -static -static-libgcc -static-libstdc++) + target_link_libraries(CreatureLibTests -static-libgcc -static-libstdc++) endif () endif (WINDOWS)