@@ -14,7 +14,7 @@ find_package(SDL2 REQUIRED)
14
14
include (CMakePackageConfigHelpers)
15
15
16
16
find_package (MUtils REQUIRED)
17
- find_package (Qt5 COMPONENTS Core Widgets Gui REQUIRED)
17
+ find_package (Qt6 COMPONENTS Core Widgets Gui REQUIRED)
18
18
19
19
set_property (GLOBAL PROPERTY AUTOMOC_FOLDER Automoc )
20
20
set_property (GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER Automoc )
@@ -57,18 +57,18 @@ target_include_directories(${DEMO_NAME}
57
57
${DEMO_ROOT} /demo_qt
58
58
${ZEP_ROOT} /src/qt
59
59
${ZEP_ROOT} /demos
60
- ${Qt5Widgets_INCLUDE_DIRS }
61
- ${Qt5Gui_INCLUDE_DIRS }
62
- ${Qt5Core_INCLUDE_DIRS }
60
+ ${Qt6Widgets_INCLUDE_DIRS }
61
+ ${Qt6Gui_INCLUDE_DIRS }
62
+ ${Qt6Core_INCLUDE_DIRS }
63
63
${CMAKE_BINARY_DIR}
64
64
${M3RDPARTY_DIR}
65
65
${ZEP_ROOT} /include )
66
66
67
67
target_link_libraries (${DEMO_NAME} PRIVATE
68
68
MUtils::MUtils
69
- Qt5 ::Core
70
- Qt5 ::Gui
71
- Qt5 ::Widgets
69
+ Qt6 ::Core
70
+ Qt6 ::Gui
71
+ Qt6 ::Widgets
72
72
Zep
73
73
ZepExtensions
74
74
#efsw::efsw
@@ -122,9 +122,9 @@ install(DIRECTORY ${ZEP_ROOT}/include/zep
122
122
# NOTE:
123
123
# This unfortunate mess is handling the problem of deploying Qt into the install folder.
124
124
# It takes the Qt deploy application output into a folder and copies it to the install location
125
- if (Qt5_FOUND AND WIN32 AND TARGET Qt5 ::qmake AND NOT TARGET Qt5 ::windeployqt)
125
+ if (Qt6_FOUND AND WIN32 AND TARGET Qt6 ::qmake AND NOT TARGET Qt6 ::windeployqt)
126
126
MESSAGE (STATUS "Found Qt for deploy" )
127
- get_target_property (_qt5_qmake_location Qt5 ::qmake IMPORTED_LOCATION )
127
+ get_target_property (_qt6_qmake_location Qt6 ::qmake IMPORTED_LOCATION )
128
128
129
129
execute_process (
130
130
COMMAND "${_qt5_qmake_location} " -query QT_INSTALL_PREFIX
@@ -136,21 +136,21 @@ if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
136
136
set (imported_location "${qt5_install_prefix} /bin/windeployqt.exe" )
137
137
138
138
if (EXISTS ${imported_location} )
139
- add_executable (Qt5 ::windeployqt IMPORTED )
139
+ add_executable (Qt6 ::windeployqt IMPORTED )
140
140
141
- set_target_properties (Qt5 ::windeployqt PROPERTIES
141
+ set_target_properties (Qt6 ::windeployqt PROPERTIES
142
142
IMPORTED_LOCATION ${imported_location}
143
143
)
144
144
endif ()
145
145
endif ()
146
146
147
- if (TARGET Qt5 ::windeployqt)
147
+ if (TARGET Qt6 ::windeployqt)
148
148
# execute windeployqt in a tmp directory after build
149
149
add_custom_command (TARGET ${DEMO_NAME}
150
150
POST_BUILD
151
151
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR} /windeployqt"
152
152
COMMAND set PATH =%PATH %$<SEMICOLON>${qt5_install_prefix} /bin
153
- COMMAND Qt5 ::windeployqt --dir "${CMAKE_CURRENT_BINARY_DIR} /windeployqt" "$<TARGET_FILE_DIR:${DEMO_NAME} >/$<TARGET_FILE_NAME:${DEMO_NAME} >"
153
+ COMMAND Qt6 ::windeployqt --dir "${CMAKE_CURRENT_BINARY_DIR} /windeployqt" "$<TARGET_FILE_DIR:${DEMO_NAME} >/$<TARGET_FILE_NAME:${DEMO_NAME} >"
154
154
)
155
155
156
156
# copy deployment directory during installation
0 commit comments