dlls are not loaded using qtwindeploy

255 Views Asked by At

I have a project and I need to prepare a CMakeLists.txt file for it. I also have tests which I need to get an executables for after building the project.

Tests are located in a separate backEndTest folder with their own CMakeLists.txt file. In order to achieve that I decided to use qtwindeploy tool for that. However, when I compile everything and try to run backEndText.exe file I have errors related to missing dlls.

That's what my main CMakeLists.txt file looks like:

add_subdirectory(backEndTest)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)

set(QtBinDir "C:/Qt/6.2.3/mingw_64/bin")

set(winDeploy "${QtBinDir}/windeployqt.exe")

set(backEndTest ${CMAKE_BINARY_DIR}/backEndTest/backEndTest.exe)

set(testBackEnd TRUE)

if (testBackEnd)
    execute_process(COMMAND ${winDeploy} ${backEndTest} --compiler-runtime )
endif()

Do you have any idea why dlls are not getting linked?

0

There are 0 best solutions below