Skip to content

Commit bb3f7c9

Browse files
committed
Partial reland of [CMake] Treat QtWebEngineProcess as app target
The change from a customly installed executable target to a standard installed app target in d73e99f caused some regression and led to a revert. Partially restore these changes by using qt_internal_add_app, but also using NO_INSTALL and instead keep the logic we had before for installation and for deciding which location debug information should be stored in. Pick-to: 6.9 Fixes: QTBUG-133593 Change-Id: Iac8ae0fd98086e7e486816440eb115dd5cbb23db Reviewed-by: Moss Heim <[email protected]>
1 parent 5ae11c4 commit bb3f7c9

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/process/CMakeLists.txt

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ find_package(Qt6 COMPONENTS Gui)
1313
get_target_property(qtWebEngineProcessName WebEngineCore QTWEBENGINEPROCESS_NAME)
1414
get_target_property(isFramework WebEngineCore FRAMEWORK)
1515

16-
qt_internal_add_executable(${qtWebEngineProcessName}
16+
if(isFramework)
17+
set(install_dir "${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers")
18+
else()
19+
set(install_dir "${INSTALL_LIBEXECDIR}")
20+
endif()
21+
22+
qt_internal_add_app(${qtWebEngineProcessName}
23+
TARGET_DESCRIPTION "QtWebEngine internal process"
1724
NO_INSTALL
25+
INCLUDE_DIRECTORIES ../core
1826
SOURCES main.cpp
1927
)
2028

@@ -43,21 +51,12 @@ qt_internal_extend_target(${qtWebEngineProcessName}
4351
Qt::WebEngineCorePrivate
4452
)
4553

46-
target_include_directories(${qtWebEngineProcessName} PRIVATE ../core)
47-
4854
qt_get_cmake_configurations(configs)
4955

5056
foreach(config ${configs})
5157
string(TOUPPER "${config}" config_upper)
52-
if(isFramework)
53-
set(outputPath
54-
"${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers"
55-
)
56-
else()
57-
set(outputPath "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}")
58-
endif()
5958
set_target_properties(${qtWebEngineProcessName} PROPERTIES
60-
RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${outputPath}"
59+
RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${QT_BUILD_DIR}/${install_dir}"
6160
)
6261

6362
if("${config}" STREQUAL "Debug")
@@ -67,6 +66,8 @@ foreach(config ${configs})
6766
endif()
6867
endforeach()
6968

69+
set_property(TARGET ${qtWebEngineProcessName} PROPERTY EXCLUDE_FROM_ALL OFF)
70+
7071
if(isFramework)
7172
set_target_properties(${qtWebEngineProcessName} PROPERTIES
7273
MACOSX_BUNDLE TRUE
@@ -86,20 +87,20 @@ if(isFramework)
8687
USES_TERMINAL
8788
)
8889
install(TARGETS ${qtWebEngineProcessName}
89-
BUNDLE DESTINATION "${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers"
90+
BUNDLE DESTINATION "${install_dir}"
9091
COMPONENT Runtime
9192
)
9293
qt_enable_separate_debug_info(${qtWebEngineProcessName}
9394
"${INSTALL_LIBDIR}" QT_EXECUTABLE
9495
DSYM_OUTPUT_DIR "${CMAKE_BINARY_DIR}/${INSTALL_LIBDIR}"
9596
)
9697
else()
97-
qt_apply_rpaths(TARGET ${qtWebEngineProcessName} INSTALL_PATH "${INSTALL_LIBEXECDIR}" RELATIVE_RPATH)
98+
qt_apply_rpaths(TARGET ${qtWebEngineProcessName} INSTALL_PATH "${install_dir}" RELATIVE_RPATH)
9899
install(TARGETS ${qtWebEngineProcessName}
99100
CONFIGURATIONS ${configs}
100-
RUNTIME DESTINATION "${INSTALL_LIBEXECDIR}"
101+
RUNTIME DESTINATION "${install_dir}"
101102
)
102-
qt_enable_separate_debug_info(${qtWebEngineProcessName} "${INSTALL_LIBEXECDIR}" QT_EXECUTABLE)
103-
qt_internal_install_pdb_files(${qtWebEngineProcessName} "${INSTALL_LIBEXECDIR}")
103+
qt_enable_separate_debug_info(${qtWebEngineProcessName} "${install_dir}" QT_EXECUTABLE)
104+
qt_internal_install_pdb_files(${qtWebEngineProcessName} "${install_dir}")
104105
endif()
105106

0 commit comments

Comments
 (0)