diff --git a/.drone.yml b/.drone.yml index 0065aed..0f251dd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0043d94..38598b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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++) diff --git a/conanfile.py b/conanfile.py index 9de7cec..8119a3a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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"]