Hey guys,
in order to get QT to work properly I have to copy the QT dlls to the binary folder on windows.
According to the docs (https://cmake.org/cmake/help/latest/command/install.html#directory) this should be easily done via install(DIRECTORY "${QT_BASE_DIR}/bin/" DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILES_MATCHING PATTERN "*.dll")
However no files are copied to my binary folder. Am I missing something? Is this not the purpose of the install() function?
That command will not work for a build (unless you run the “INSTALL” command after every build). We used to copy all of the DLLs into the build directory but now we do this instead:
You need to escape the path separators ; as they are treated as list separators in CMake. Try to use \\\; or if that does not help try \;. As you are using a merge environment you only need to define the additional parts of the path, i.e. set_target_properties(${APP_NAME} PROPERTIES VS_DEBUGGER_ENVIRONMENT "PATH=${QT_ROOT}/bin\\\;${QT_ROOT}/plugins/platforms")