cmake: compile with _FILE_OFFSET_BITS=64 for 32-bit targets

This commit is contained in:
Dmitry Kalinkin 2020-05-12 18:16:03 -04:00
parent e57d07f2ae
commit 467a87ba1d
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -71,6 +71,11 @@ stdenv.mkDerivation rec {
"--docdir=share/doc/${pname}${version}"
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
++ lib.optional (useQt4 || withQt5) "--qt-gui"
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
++ lib.optionals stdenv.hostPlatform.is32bit [
"CFLAGS=-D_FILE_OFFSET_BITS=64"
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
]
++ [
"--"
# We should set the proper `CMAKE_SYSTEM_NAME`.