forked from qt-creator/qt-creator
cmake build: Fix building with PCHs
- fix target name
- build pchs without extensions like all other targets
- require CMake 3.10 for plugins
Amends c038abb0ab
Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user