Several fixes for new build, ensuring we build DLLs for Windows, and that the proper libraries are included.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
69bf782c4c
commit
f873dc97bf
|
@ -31,6 +31,7 @@ steps:
|
||||||
image: deukhoofd/windowsbuilder
|
image: deukhoofd/windowsbuilder
|
||||||
commands:
|
commands:
|
||||||
- cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang -D CMAKE_CXX_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang++ -DWINDOWS=ON -DSTATICC=ON
|
- cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang -D CMAKE_CXX_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang++ -DWINDOWS=ON -DSTATICC=ON
|
||||||
|
- sed -i 's/-fPIC//g' build-release-windows/CMakeFiles/Arbutils.dir/flags.make
|
||||||
- cmake --build build-release-windows --target all -- -j 4
|
- cmake --build build-release-windows --target all -- -j 4
|
||||||
- mv build-release-windows/ArbutilsTests build-release-windows/ArbutilsTests.exe
|
- mv build-release-windows/ArbutilsTests build-release-windows/ArbutilsTests.exe
|
||||||
- export WINEARCH=win64
|
- export WINEARCH=win64
|
||||||
|
|
|
@ -18,11 +18,16 @@ add_library(Arbutils ${LIBTYPE} ${SRC_FILES})
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
MESSAGE(WARNING, "Using Windows Build.")
|
MESSAGE(WARNING, "Using Windows Build.")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -pthread -wc-use-mingw-linker")
|
||||||
|
set_target_properties(Arbutils PROPERTIES SUFFIX ".dll")
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
if (STATICC)
|
if (STATICC)
|
||||||
target_link_libraries(Arbutils -static)
|
if (WINDOWS)
|
||||||
|
target_link_libraries(Arbutils -wc-static-runtime)
|
||||||
|
else ()
|
||||||
|
target_link_libraries(Arbutils -static-libgcc -static-libstdc++)
|
||||||
|
endif (WINDOWS)
|
||||||
endif (STATICC)
|
endif (STATICC)
|
||||||
|
|
||||||
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
||||||
|
|
Loading…
Reference in New Issue