DicomToMesh OSX Building Issue - c++

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:
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

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

Related

Cannot find Qt6 installation?

Trying to follow the install instructions from a GitHub page: https://github.com/TASEmulators/fceux
I went through with installing Qt6 and when I do the following this happens:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQT6=1 -DCMAKE_BUILD_TYPE=Debug ..
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- GUI Frontend: Qt6
CMake Error at src/CMakeLists.txt:22 (find_package):
By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt6", but
CMake did not find one.
Could not find a package configuration file provided by "Qt6" with any of
the following names:
Qt6Config.cmake
qt6-config.cmake
Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
to a directory containing one of the above files. If "Qt6" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
As the error message says, you need up set the environment value Qt6_DIR to the location you installed qt6 to. This should be a part of the instructions in installing qt6.
You should link the instructions you used for installing qt6. They may contain instructions to set the environment variable QT_DIR instead of the Qt6_DIR which is required by what you're building. If this is the case just follow the instructions for setting QT_DIR to also set Qt6_DIR.

Cross-Compiling QT5 for windows on ubuntu host

I'm trying to compile this wallet on Ubuntu 14.04 machine. I already compiled it for Linux using the docs:
mkdir build && cd build && cmake .. && make
But, unfortunately, I don't have a windows machine to compile it.
I tried installing mingw32 and compile using those toolchains, and then by using this answer but it didn't work and thrown an error:
CMake Error at CMakeLists.txt:19 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Gui" with any
of the following names:
Qt5GuiConfig.cmake
qt5gui-config.cmake
Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
PS: I already installed QT5 using apt-get install qt5-default.

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"

I am trying to use cmake to build the Box2D library for c++. When I run cmake gui I get the error:
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!
Most questions like these people have answered by saying "Add MinGw/bin to the PATH" but I already have that on the PATH. What else could be causing this error?
mingw32-make.exe can be installed with the standard MinGW32 installer via the appropriate checkbox:
As rubenvb points out, you'll still need to ensure that it makes it into your PATH. If you edit your environment variables via System Properties, be sure to close and reopen the CMake GUI.
If you're more accustomed to using make.exe, install MSYS and use MSYS Makefiles as the CMake generator. You'll also need to put both mingw\bin and msys\1.0\bin into your PATH.
I had the same problem and I added these three to my system path and errors were solved.
C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
C:\Program Files\CMake\bin
C:\opencv\build\install\x64\mingw\bin
You can check this answer: https://stackoverflow.com/a/74240235/3110429
Firstly check the system.
Install MINGW https://www.msys2.org/
Install gcc, g++, gdb, and cmake using pacman.
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-gdb
pacman -S mingw-w64-x86_64-cmake
Check installation:
gcc --version
g++ --version
gdb --version
Edit environment variables for your account (PATH)
C:\msys64\mingw64\bin
For cmake project on Vscode:
Create a cmake project: https://code.visualstudio.com/docs/cpp/cmake-linux#_create-a-cmake-project
Choose the Kit (Toolchain) which was installed before
Set cmake.cmakePath (If you installed with pacman, the path should be same as gcc/g++.
"cmake.cmakePath": "C:\msys64\mingw64\bin\cmake.exe"
Reset VScode: Ctrl+shift+P and type "CMake:Reset CMake Tools for Extension State"
Configure project: Ctrl+shift+P and type "CMake: Configure". You will see "built" directory and generated files.
In the path MinGW\bin try to find make.exe or mingw32-make.exe. If you don't have it then mingw32-make.exe can be installed with the standard MinGW32 installer as shown in the pervious answer.
Then have a second copy of make.exe or mingw32-make.exe to have identical two files with those names make.exe and mingw32-make.exe
and it solved my problem.

Installing the SFGUI with Cmake

I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?

QGIS Source Code Build

following the QGIS Install guide
http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html
I downloaded all the required packages on Windows and created a Build directory, trying to configure the source code on CMake I get this error :
""
QGIS version: 2.11.0 Master (21100)
Could not find GRASS 6
Could not find GRASS 7
GEOS_INCLUDE_DIR=GEOS_INCLUDE_DIR-NOTFOUND
GEOS_LIBRARY=GEOS_LIBRARY-NOTFOUND
CMake Error at cmake/FindGEOS.cmake:182 (MESSAGE):
Could not find GEOS
Call Stack (most recent call first):
CMakeLists.txt:193 (FIND_PACKAGE)
Configuring incomplete, errors occurred!
See also "C:/QGIS/build/QGIS/CMakeFiles/CMakeOutput.log".
See also "C:/QGIS/build/QGIS/CMakeFiles/CMakeError.log".
""
I cannot proceed to the next step, how do I fix this?
When downloading packages using OSGeo4W just type "grass" in it then click it so that it changes to "Install".
I too selected it but it did not install it .. I had to select it again to install.
Use the standalone installer found at http://www.qgis.org/wiki/Download.
Then, set up a GRASS Database through the "Plugins > Grass > New Mapset" menu.