Have you read the section on Deployment in the Qt documentation?
Running in a development environment (like Qt Creator or Visual Studio) works because the IDE has set up the paths to the DLLs and other binaries required to build and run programs. In a standalone environment, if the DLLs are not searchable via your PATH variable or are not installed as described in the Deployment documentation, the program will not run and will give the error you are seeing.
All the TARGET_LINK_LIBRARIES() command in your CMakelists file is doing is telling CMake to link your program with the -import libraries- (.lib) to resolve any symbols that will later have to be located in the DLLs that are loaded at runtime. It has nothing to do with telling the executable where to find those DLLs at run time.
If you specify an "install()" command in your CMakelists file, you can use it to deploy your executable and the DLLs it needs to execute. You can then run it standalone from a command prompt after you have CD'd to that directory.
Bookmarks