Hi everyone,
I'm new to MITK development and am looking to build a Qt-based application that 
makes use of some its components. I'm trying to create a simple template 
application using the MitkPluginGenerator to set up my environment, but I'm 
running into some trouble.
These are the steps I've taken:
I created a new plugin/application using the following command from an existing 
MITK installation:
MitkPluginGenerator --view-name "PV" --project-name "PV" --project-app-name 
"PV" --out-dir C:\ --plugin-symbolic-name org.svenlafebre.pv

I started cmake-gui, set source path to C:/PV and build path to C:/PV-build and 
hit configure. After manually setting Qt5Widgets_DIR to 
C:/Qt/5.12.5/msvc2017_64/lib/cmake/Qt5Widgets both the configure and generate 
steps ran fine.

I opened up the generated PV-superbuild.sln in Visual Studio and started a 
build of the MITK solution. This downloaded and built the MITK sources (hash 
e935c1fc4f as of now) and built correctly.

Next, I started a build of the PV-Configure target, which failed because Qt5 
cannot be found:

> 3>CMake Warning at C:/PV-build/MITK/CMake/mitkMacroFindDependency.cmake:35 
> (find_package):
> 3> By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
> 3> asked CMake to find a package configuration file provided by "Qt5", but
> 3> CMake did not find one.
> 3>
> 3> Could not find a package configuration file provided by "Qt5" (requested
> 3> version 5.12) with any of the following names:
> 3>
> 3> Qt5Config.cmake
> 3> qt5-config.cmake
> 3>
> 3> Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
> 3> to a directory containing one of the above files. If "Qt5" provides a
> 3> separate development package or SDK, be sure it has been installed.
> 3>Call Stack (most recent call first):
> 3> C:/PV-build/MITK-superbuild/MITK-build/MITKConfig.cmake:132 
> (mitkMacroFindDependency)
> 3> CMakeLists.txt:129 (find_package)
> 3>
> 3>
> 3>CMake Error at CMakeLists.txt:129 (find_package):
> 3> Found package configuration file:
> 3>
> 3> C:/PV-build/MITK-superbuild/MITK-build/MITKConfig.cmake
> 3>
> 3> but it set MITK_FOUND to FALSE so package "MITK" is considered to be NOT
> 3> FOUND. Reason given by package:
> 3>
> 3> MITK could not be found because dependency Qt5 could not be found.

Okay, so I set the Qt5_DIR variable in my CMake cache and retried, but that 
gives me the same error. This is strange, because the full MITK sources were 
just built without a glitch, obviously using Qt5 libraries!

Maybe some of the CMake variables used when building the MITK target are not 
propagated correctly to my project's CMake environment? Am I missing something 
obvious? I'd appreciate any help on how to resolve this issue so I can get 
started properly!
Some additional info on my setup:
* Windows 10 Home
* CMake 3.15.2
* MS Visual Studio Community 2019 (version 16.3.9)
* Qt 5.12.5
Thanks and kind regards,
-Sven
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to