Qt 6.6.0 OpcUA Debug
-
Hi!
I am trying to compile the QtOpcUa modul with Qt6.6.0 on Windows 10 with MSVC and the Release build works just fine, but the Debug build stops at configure CMake with the error that there is no Debug version.
And I have found that the QtSetup.cmake in 6.6.0\msvc2019_64\lib\cmake\Qt6\ changed a lot and
in the line 58 theif("${CMAKE_BUILD_TYPE}" STREQUAL "${CMAKE_BUILD_TYPE_INIT}"should be
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "${CMAKE_BUILD_TYPE_INIT}"But I do not have enough experience in CMake.
Can somebody confirm that I am correct ?Thank you!
p.s.:
With the added NOT it builds fine. -
Ok! I have found out! Just for my reference! When I want to build Qt 6.11 (6.10... ) OPC UA Debug with embedded open62541 on Windows with mscv as the compiler and opened the CMakeLists.txt from Src/qtopcua directory with QtCreator 19.0 (but for 18 too) cmake says that there is no valid configuration and fals back to default: Release
The problem is that I am a CMake beginner, but I have found out that if I use:
'Desktop Qt 6.11.0 MSVC2022 64bit' from the 'Kits' and there the 'CMake generator' is set to 'NMake Makefiles JOM' than I always end up with a Release build.
But if I change the CMake generator to : 'Ninja Multi-Config' and in the 'Projects' tab I change the 'CMAKE_GENERATOR' parameter to 'Ninja Multi-Config' and hit the button 'Re-configure with Initial Parameters' than I will have a configuration with 'RelWithDebInfo;Debug'
After this I build to project. After the project is built in the debug build directory there will be a cmake_install.cmake file.
In my installation the Qt is in C:\Qt folder so in a command line I execute the following command:
c:\Qt\Tools\CMake_64\bin\cmake -DBUILD_TYPE=Debug -P cmake_install.cmake
And after that I will have the debug library installed.
After I have finished this I have to set the CMake generator in the 'Kits' back to 'NMake Makefiles JOM' to be able compile my projects with MSVC.
That is this simple.