Fixes for Windows build.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-02-27 11:21:23 +01:00
parent 894a644f50
commit 04009bbb34
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
3 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,7 @@ 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/
- export WINEARCH=win64
- wine build-release-windows/bin/CreatureLibTests.exe -s
- name: conan-deploy

View File

@ -61,7 +61,6 @@ target_link_libraries(CreatureLibCore Arbutils)
target_link_libraries(CreatureLibLibrary Arbutils)
target_link_libraries(CreatureLibBattling Arbutils)
if (NOT DEFINED CONAN_EXPORTED)
target_link_libraries(CreatureLibTests CreatureLibLibrary)
target_link_libraries(CreatureLibTests CreatureLibBattling)
@ -69,6 +68,7 @@ endif ()
if (WINDOWS)
MESSAGE(WARNING, "Using Windows Build.")
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++)

View File

@ -31,6 +31,10 @@ class CreatureLibConan(ConanFile):
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.so", dst="lib", keep_path=False)
def imports(self):
if self.settings.os == "Windows":
self.copy("*.dll", "bin", "bin")
def package_info(self):
self.cpp_info.libs = ["CreatureLibCore", "CreatureLibLibrary", "CreatureLibBattling"]