Skip to content

Commit 4b264b4

Browse files
author
Michal Klocek
committed
Minor. Add deployment script to simplebrowser example
Make simplebrowser deployable. Pick-to: 6.9 Change-Id: I4717c30d1048c0c76306a71c657499b997a146c4 Reviewed-by: Moss Heim <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
1 parent f8427fa commit 4b264b4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

examples/webenginewidgets/simplebrowser/CMakeLists.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
cmake_minimum_required(VERSION 3.16)
55
project(simplebrowser LANGUAGES CXX)
66

7-
set(CMAKE_AUTOMOC ON)
8-
set(CMAKE_AUTOUIC ON)
9-
10-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
11-
set(INSTALL_EXAMPLESDIR "examples")
12-
endif()
13-
14-
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginewidgets/simplebrowser")
15-
167
find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineWidgets)
178

9+
qt_standard_project_setup()
10+
1811
qt_add_executable(simplebrowser
1912
browser.cpp browser.h
2013
browserwindow.cpp browserwindow.h
@@ -103,7 +96,14 @@ if (APPLE)
10396
endif()
10497

10598
install(TARGETS simplebrowser
106-
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
107-
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
108-
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
99+
BUNDLE DESTINATION .
100+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
101+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
102+
)
103+
104+
qt_generate_deploy_app_script(
105+
TARGET simplebrowser
106+
OUTPUT_SCRIPT deploy_script
107+
NO_UNSUPPORTED_PLATFORM_ERROR
109108
)
109+
install(SCRIPT ${deploy_script})

0 commit comments

Comments
 (0)