summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtModuleHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index deb5b001e1..dba0b27e98 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -195,7 +195,7 @@ function(qt_internal_add_module target)
endif()
endif()
- if(FEATURE_ltcg AND GCC AND is_static_lib)
+ if((FEATURE_ltcg OR CMAKE_INTERPROCEDURAL_OPTIMIZATION) AND GCC AND is_static_lib)
# CMake <= 3.19 appends -fno-fat-lto-objects for all library types if
# CMAKE_INTERPROCEDURAL_OPTIMIZATION is enabled. Static libraries need
# the opposite compiler option.