diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-11 11:21:17 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-11 09:41:54 +0000 |
commit | 449eee2d108589d2b8549d6682c8b5e792e659b8 (patch) | |
tree | 7cb378d4be0b9f91a72ce9d8563cc32aa786d48b /cmake | |
parent | 44c9ad561799b51c1e4d10c8b9821fbff6143ef1 (diff) |
Don't add _LARGEFILE64_SOURCE define on Windows
In qmake land, the largefile.prf feature is automatically loaded due
to 'largefile' being added to CONFIG via the equivalent feature.
The prf file is in the 'unix' subfolder though, which means that qmake
doesn't load it on Windows.
We need to do the same, otherwise we get build errors due to the
define being checked in ZLIB headers, and selecting an invalid code
branch on Windows.
Change-Id: Ibe9202a639754927262bb8aaa28289934f2e23ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 7ca78fbbff..083be94ab4 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -72,8 +72,9 @@ if(WIN32) # It's set for every module being built, but it's not propagated to user apps. target_compile_definitions(PlatformModuleInternal INTERFACE _USE_MATH_DEFINES) endif() -if(FEATURE_largefile) - target_compile_definitions(PlatformModuleInternal INTERFACE "_LARGEFILE64_SOURCE;_LARGEFILE_SOURCE") +if(FEATURE_largefile AND UNIX) + target_compile_definitions(PlatformModuleInternal + INTERFACE "_LARGEFILE64_SOURCE;_LARGEFILE_SOURCE") endif() # We can't use the gold linker on android with the NDK, which is the default |