From 6a47e1c4ee8fab26a2ceac5fc6c452b8de0e1bff Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 12 Jun 2020 19:45:19 +0200 Subject: CMake: Propagate largefile flags to all internal consumers The large file flags in qmake land are set in the mkspecs/features/unix/largefile.prf file, which is loaded by qmake when a CONFIG += largefile entry is written by configure into qmodule.pri. This essentially makes them global flags for all private Qt targets because qmodule.pri is a global file loaded load(qt_build_config) Thus assign the flags onto the PlatformCommonInternal target instead of the PlatformModuleInternal one. One peculiarity though is that in qmake land these flags are also applied when building examples as part of the main Qt build. This is because qt_build_config loads qmodule.pri even for an example, because qmake sees it as part of the overall Qt build. The flags are not applied by qmake if the example is built in a different standalone build dir not part of the Qt buil dir. We don't do that in the CMake build, and thus examples will never have those flags. Task-number: QTBUG-83929 Change-Id: If653a669b4835aadd1de84acb477c375ab523909 Reviewed-by: Cristian Adam --- cmake/QtInternalTargets.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index bf4d33126c..68ab141c44 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -96,7 +96,7 @@ if(WIN32) target_compile_definitions(PlatformModuleInternal INTERFACE _USE_MATH_DEFINES) endif() if(FEATURE_largefile AND UNIX) - target_compile_definitions(PlatformModuleInternal + target_compile_definitions(PlatformCommonInternal INTERFACE "_LARGEFILE64_SOURCE;_LARGEFILE_SOURCE") endif() -- cgit v1.2.3