File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 - name : Deploy GUI
6262 run : |
6363 windeployqt build\bin\Debug || exit /b !errorlevel!
64- del build\bin\Debug\cppcheck-gui.ilk || exit /b !errorlevel!
65- del build\bin\Debug\cppcheck-gui.pdb || exit /b !errorlevel!
6664
6765 # TODO: run GUI tests
6866
7169 rem TODO: the Qt DLLs are not being installed
7270 cmake --build build --config Debug --target install
7371 rem TODO: validate the installed files
72+ rem TODO: the structure does not match an actual Windows installation
Original file line number Diff line number Diff line change @@ -26,6 +26,18 @@ if(BUILD_GUI)
2626 find_program (QHELPGENERATOR qhelpgenerator HINTS ${_qt_bin_dir} REQUIRED )
2727 endif ()
2828 endif ()
29+
30+ if (MSVC )
31+ find_program (WINDEPLOYQT windeployqt )
32+ if (NOT WINDEPLOYQT)
33+ # TODO: how to properly get the Qt binary folder?
34+ # piggy-back off Qt::qmake for now as it should be in the same folder as the binary we are looking for
35+ get_target_property (_qmake_executable Qt::qmake IMPORTED_LOCATION )
36+ get_filename_component (_qt_bin_dir ${_qmake_executable} DIRECTORY )
37+ message (STATUS "windeployqt not found in PATH - trying ${_qt_bin_dir} " )
38+ find_program (WINDEPLOYQT windeployqt HINTS ${_qt_bin_dir} REQUIRED )
39+ endif ()
40+ endif ()
2941endif ()
3042
3143if (HAVE_RULES)
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ CheckOptions:
7171 add_dependencies (cppcheck-gui online-help.qhc )
7272 endif ()
7373
74+ if (MSVC )
75+ message (STATUS "CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR } " )
76+ add_custom_target (windeployqt ${WINDEPLOYQT} ${CMAKE_BINARY_DIR } )
77+ add_dependencies (windeployqt cppcheck-gui )
78+ endif ()
79+
7480 install (TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications)
7581 install (FILES ${qms} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications)
7682
You can’t perform that action at this time.
0 commit comments