Fixes for Windows build.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
894a644f50
commit
04009bbb34
|
@ -34,6 +34,7 @@ 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/
|
||||||
- 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
|
||||||
|
|
|
@ -61,7 +61,6 @@ target_link_libraries(CreatureLibCore Arbutils)
|
||||||
target_link_libraries(CreatureLibLibrary Arbutils)
|
target_link_libraries(CreatureLibLibrary Arbutils)
|
||||||
target_link_libraries(CreatureLibBattling Arbutils)
|
target_link_libraries(CreatureLibBattling Arbutils)
|
||||||
|
|
||||||
|
|
||||||
if (NOT DEFINED CONAN_EXPORTED)
|
if (NOT DEFINED CONAN_EXPORTED)
|
||||||
target_link_libraries(CreatureLibTests CreatureLibLibrary)
|
target_link_libraries(CreatureLibTests CreatureLibLibrary)
|
||||||
target_link_libraries(CreatureLibTests CreatureLibBattling)
|
target_link_libraries(CreatureLibTests CreatureLibBattling)
|
||||||
|
@ -69,6 +68,7 @@ endif ()
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
MESSAGE(WARNING, "Using Windows Build.")
|
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")
|
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 -static-libgcc -static-libstdc++)
|
||||||
|
|
|
@ -31,6 +31,10 @@ class CreatureLibConan(ConanFile):
|
||||||
self.copy("*.dll", dst="bin", keep_path=False)
|
self.copy("*.dll", dst="bin", keep_path=False)
|
||||||
self.copy("*.so", dst="lib", 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):
|
def package_info(self):
|
||||||
self.cpp_info.libs = ["CreatureLibCore", "CreatureLibLibrary", "CreatureLibBattling"]
|
self.cpp_info.libs = ["CreatureLibCore", "CreatureLibLibrary", "CreatureLibBattling"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue