0

I want to compile DicomToMesh according to the instructions in this link.

> git clone https://github.com/AOT-AG/DicomToMesh.git
> cd DicomToMesh
> mkdir build
> cd build
> ccmake ..  #opens ccmake window

By executing above instruction I supposed to get something similar to the following within the ccmake window,

BUILD_GUI                        OFF
CMAKE_BUILD_TYPE                 DEBUG
CMAKE_INSTALL_PREFIX             /usr/local                                   
USE_VTK_DICOM                    OFF                                          
VTK_DIR                          /home/eidelen/Development/libs/vtk/build     

But in my case I'm getting this result: my results

After pressing c, it generates 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)
   CMakeLists.txt:5 (find_package)

 Configuring incomplete, errors occurred!
 See also "/Users/mrhs/DicomToMesh/build/CMakeFiles/CMakeOutput.log".
 See also "/Users/mrhs/DicomToMesh/build/CMakeFiles/CMakeError.log".

I have installed QT5 5.15.2 using

brew install qt5

I tried to follow this solution using command

brew install qtbase5-dev
brew install qtdeclarative5-dev

But getting Warning: No available formula or cask with the name "qtbase5-dev". and Error: No similarly named formulae found'

I have tried this solution by using the command

export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt@5/
cd build

but it is showing No such file or directory

I'm using this for the first time and my be i'm missing something which I could not figure out yet. I will be really very thankful and will appreciate it if anyone can help me. I badly need to solve this issue and has spend a lot of time but in vain.

N.B. This is my CMakeError.log and CMakeOutput.log

Suvro
  • 352
  • 2
  • 13
  • 1
    Hi, Im the author of Dicom2Mesh. Qt is only required when you build the GUI (BUILD_GUI=ON). For the command line application you don't need it. Further on I saw that you use VTK 9. Unfortunately that does not work, however there is a special branch for that: vtk-9-novisual – Adrian Schneider Nov 07 '21 at 21:40

1 Answers1

0

Installing brew install qt5, at the end the process is going to display something like :

echo 'export PATH="/usr/local/opt/qt@5/bin:$PATH"' >> ~/.zshrc
export LDFLAGS="-L/usr/local/opt/qt@5/lib" 
export CPPFLAGS="-I/usr/local/opt/qt@5/include"

Just type them in your terminal

mmerle
  • 451
  • 4
  • 10
  • I applied your solution but I'm still having the same Error "Could not find a package configuration file provided by Qt5" after the compilation but qt5 is already installed. I have executed your solution both inside the build folder and out side of it. I don't know what's the missing point. – Suvro Oct 08 '21 at 21:47
  • 1
    @Suvro can you reinstall qt with `brew reinstall qt@5` ? At the end you'll see the commands. Maybe the paths will be slightly different on your computer – mmerle Oct 11 '21 at 07:01