Skip to content
Snippets Groups Projects
Commit b4c80fc3 authored by Lars Bilke's avatar Lars Bilke
Browse files

Merge branch 'deployqt' into 'master'

[de] Deploy Qt libraries on installation.

See merge request !3952

(cherry picked from commit e6e5255d)

25c33a48 [de] Deploy Qt libraries on installation.
parent 80f50c45
No related branches found
Tags 6.3.2
No related merge requests found
......@@ -77,3 +77,14 @@ set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "DataExplorer"
set(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "bin/DataExplorer.exe"
"Data Explorer" PARENT_SCOPE
)
if(MSVC)
# Install qt libraries
get_target_property(mocExe Qt5::moc IMPORTED_LOCATION)
get_filename_component(qtBinDir "${mocExe}" DIRECTORY)
find_program(DEPLOYQT_EXECUTABLE windeployqt PATHS "${qtBinDir}" NO_DEFAULT_PATH)
set(DEPLOY_OPTIONS [[bin/DataExplorer.exe --dir . --libdir bin --plugindir plugins]])
configure_file(${PROJECT_SOURCE_DIR}/scripts/cmake/packaging/deployapp.cmake.in deployapp.cmake @ONLY)
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/deployapp.cmake)
install(FILES ${PROJECT_SOURCE_DIR}/scripts/cmake/packaging/qt.conf TYPE BIN)
endif()
execute_process(
COMMAND "@DEPLOYQT_EXECUTABLE@" @DEPLOY_OPTIONS@
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
RESULT_VARIABLE result
)
if(result)
message(FATAL_ERROR "Executing @DEPLOYQT_EXECUTABLE@ failed: ${result}")
endif()
[Paths]
Prefix = ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment