Skip to content

Commit

Permalink
[CMake] Windows builds: Use windeployqt to pick up all Qt dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Mar 20, 2018
1 parent ab3d663 commit 8322319
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -184,6 +184,20 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
include(BundleUtilities)
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${_mainexename}.exe\" \"\" \"\${dll_source_dirs}\")
" COMPONENT Core)

# Run windeployqt to pick up all Qt dependencies
find_program(TOOL_WINDEPLOYQT NAMES windeployqt)
if(TOOL_WINDEPLOYQT)
install(CODE "
execute_process(
COMMAND ${TOOL_WINDEPLOYQT} \"\${CMAKE_INSTALL_PREFIX}/${_mainexename}.exe\" --no-compiler-runtime --no-angle --no-svg
)
" COMPONENT Core)
else()
message( WARNING "Unable to find windeployqt; installation may not included all required Qt libraries" )
endif()
else()
message( STATUS "CMAKE_CROSSCOMPILING is defined - skipping BundleUtilities" )
endif()

if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
Expand Down

0 comments on commit 8322319

Please sign in to comment.