DicomToMesh icon indicating copy to clipboard operation
DicomToMesh copied to clipboard

ccmake build error related to qt5 - macOS Big Sur

Open rezowan099 opened this issue 4 years ago • 4 comments

I have installed vtk 9.0 which has installed qt5 version 5.15.2 as dependency automatically. Now while compiling each time i'm getting the following error

CMake Error at /usr/local/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:115 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package 
configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested version 5.15) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing 
one of the above files.  If "Qt5" provides a separate development package or SDK, be sure it has been installed. 
Call Stack (most recent call first): /usr/local/lib/cmake/vtk-9.0/vtk-config.cmake:131 (include)

Please someone suggest how can I solve this issue. Here you can find my CMakeError.log and CMakeOutput.log files CMakeError.log CMakeOutput.log

rezowan099 avatar Oct 08 '21 23:10 rezowan099

Hi, Sorry for not responding. Are you still looking for a solution? First, VTK 9.0 is not running well together with dicom2mesh, respectively some side components which can be enabled. I use VTK 7. Second, Qt is only used when you build the GUI (BUILD_GUI=ON) - is that what you really want?

eidelen avatar Mar 16 '22 16:03 eidelen

I'm having a similar problem. The config option BUILD_GUI isn't available in the cmake UI like it's shown in the README.

EDIT: nvm, figured it out. Have to manually add /opt/homebrew/opt/qt5/lib/cmake/Qt5 in the ccmake config screen.

alxlu avatar Apr 04 '22 19:04 alxlu

That's good to hear that it worked out. I am just wondering, do you really want to use the GUI? This is a very quick (and dirty) implementation, which does not offer all the features. Back in days, I made that for our product managers. There exists much better GUI applications for transforming a DICOM into a mesh - take a look at ITK-SNAP.

eidelen avatar Apr 06 '22 21:04 eidelen

Oh, I didn't want to use the GUI (and didn't use it). It just seems to have qt as a mandatory dependency in order to build on macOS for whatever reason although it's possible I was doing something wrong. But when you install VTK on macOS through homebrew, it seems to also install Qt anyway, so it's not a big deal.

alxlu avatar Apr 06 '22 22:04 alxlu

FYI this is still broken.

  • Sonoma
  • QT5 and QT6

sammcj avatar Oct 17 '23 01:10 sammcj

Thank you for the comment. In your case, the cmake error is generated within VTK too? Under OSX, I am building VTK manually. I don't know how the brew version is built. Regarding Qt6 I do not have any experience. Do you want to use it for building the little GUI which comes with Dicom2Mesh? If you are only interested in the commandline tool (as most are), Qt should be not required.

eidelen avatar Oct 17 '23 06:10 eidelen