Revert "Don't link C libraries statically by default for Windows, as this isn't needed if another library has their own C libraries already has them statically linked."
This reverts commit 978fa704
This commit is contained in:
parent
c033060c16
commit
c230f8b11c
|
@ -29,7 +29,7 @@ steps:
|
||||||
- update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
- 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-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
|
- 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 -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
|
||||||
- cmake --build build-release-windows --target all -- -j 4
|
- cmake --build build-release-windows --target all -- -j 4
|
||||||
- export WINEARCH=win64
|
- export WINEARCH=win64
|
||||||
- wine build-release-windows/ArbutilsTests.exe -s
|
- wine build-release-windows/ArbutilsTests.exe -s
|
||||||
|
|
|
@ -21,15 +21,12 @@ endif()
|
||||||
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 -Wl,-allow-multiple-definition")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition")
|
||||||
endif (WINDOWS)
|
# Statically link libraries we need in Windows.
|
||||||
|
|
||||||
if (STATICC)
|
|
||||||
target_link_libraries(Arbutils -static -static-libgcc -static-libstdc++)
|
target_link_libraries(Arbutils -static -static-libgcc -static-libstdc++)
|
||||||
if (NOT DEFINED CONAN_EXPORTED)
|
if (NOT DEFINED CONAN_EXPORTED)
|
||||||
target_link_libraries(ArbutilsTests -static -static-libgcc -static-libstdc++)
|
target_link_libraries(ArbutilsTests -static -static-libgcc -static-libstdc++)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif (WINDOWS)
|
||||||
|
|
||||||
|
|
||||||
if (NOT DEFINED CONAN_EXPORTED)
|
if (NOT DEFINED CONAN_EXPORTED)
|
||||||
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
|
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
|
||||||
|
|
|
@ -7,8 +7,8 @@ class ArbutilsConan(ConanFile):
|
||||||
url = "https://git.p-epsilon.com/Deukhoofd/Arbutils"
|
url = "https://git.p-epsilon.com/Deukhoofd/Arbutils"
|
||||||
description = "A helper library for the Epsilon project."
|
description = "A helper library for the Epsilon project."
|
||||||
settings = "os", "compiler"
|
settings = "os", "compiler"
|
||||||
options = {"shared": [True, False], "staticC": [True, False]}
|
options = {"shared": [True, False]}
|
||||||
default_options = {"shared": True, "staticC": False}
|
default_options = {"shared": True}
|
||||||
generators = "cmake"
|
generators = "cmake"
|
||||||
exports_sources = "*"
|
exports_sources = "*"
|
||||||
compiler = "clang"
|
compiler = "clang"
|
||||||
|
@ -19,8 +19,6 @@ class ArbutilsConan(ConanFile):
|
||||||
if self.settings.os == "Windows":
|
if self.settings.os == "Windows":
|
||||||
self.output.warn("Noticed Windows target, setting Cmake WINDOWS=On.")
|
self.output.warn("Noticed Windows target, setting Cmake WINDOWS=On.")
|
||||||
cmake.definitions["WINDOWS"] = "On"
|
cmake.definitions["WINDOWS"] = "On"
|
||||||
if self.options.staticC:
|
|
||||||
cmake.definitions["STATICC"] = "On"
|
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue