aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-11-16 10:54:32 +0100
committerEike Ziller <eike.ziller@qt.io>2020-11-16 10:00:58 +0000
commit9ff91ef0d9675869473b84b6de35b5b530211fd5 (patch)
tree86346164633b28ae1d521a701e41d5245835dee2 /cmake
parentd661c2ed12e4962739e8ba68b5be5d3152ae5c2a (diff)
cmake build: Fix building with PCHs
- fix target name - build pchs without extensions like all other targets - require CMake 3.10 for plugins Amends c038abb0abc9c346d5041c4cbbe201905e2ac041 Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPIInternal.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake
index 585ee1b0ee..6a8dc4c39c 100644
--- a/cmake/QtCreatorAPIInternal.cmake
+++ b/cmake/QtCreatorAPIInternal.cmake
@@ -324,7 +324,9 @@ function(enable_pch target)
set_target_properties(${pch_target} PROPERTIES
PRECOMPILE_HEADERS ${pch_file}
CXX_VISIBILITY_PRESET hidden
- VISIBILITY_INLINES_HIDDEN ON)
+ VISIBILITY_INLINES_HIDDEN ON
+ CXX_EXTENSIONS OFF
+ )
target_link_libraries(${pch_target} PRIVATE ${pch_dependency})
endif()
endfunction()
@@ -351,7 +353,7 @@ function(enable_pch target)
if ("Qt5::Widgets" IN_LIST dependencies)
set(PCH_TARGET ${PROJECT_NAME}PchGui)
elseif ("Qt5::Core" IN_LIST dependencies)
- set(PCH_TARGET ${PROJECT_NAME}Console)
+ set(PCH_TARGET ${PROJECT_NAME}PchConsole)
endif()
if (TARGET "${PCH_TARGET}")