From db8de6cdcc20d75736cee0f17d6a0ed91746cace Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 12 Apr 2020 11:52:07 +0200 Subject: [PATCH] Another attempt at fixing Windows build. --- .drone.yml | 2 +- CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index eefe284..83cd523 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,7 +62,7 @@ steps: - update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix - update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-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 -DWINDOWS=ON -DSTATICC=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 -DSTATICC=ON - cmake --build build-release-windows --target all -- -j 4 - cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll /drone/src/build-release-windows/bin/ - cp /drone/src/build-release-windows/lib/libpkmnLib.so /drone/src/build-release-windows/bin/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a76068..78624e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,9 @@ endif (WINDOWS) if (STATICC) SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++) - SET(_TESTLINKS ${_TESTLINKS} -static-libgcc -static-libstdc++) + if (NOT DEFINED CONAN_EXPORTED) + SET(_TESTLINKS ${_TESTLINKS} -static-libgcc -static-libstdc++) + endif() endif()