where is the ninja compile result located

hi friends:
Thank you in advance!!
I am trying to compile VTK as below tool chain: Cmake3.21.1 + VS2022 + VTK 9.1 + ninja
the detail command as below:

But though I had set the install-prefix to specify the install path, after the ninja done, the install directory is still empty, where is my compile result ??? what should I do ???

it is so so so so so so so so so diffcullt to built VTK9.1, I just want use vtk with QT6, I had encounter too many issues, it makes me confuse and had taken me too too too too many many many time, what a badly software!!!

ninja will just build the software. If you want it in the install tree, you need to do ninja install.

Thank you so much!! thank you, this issue had confuse me for a long time!!!

Hello,

Believe it or not, Kitware invented CMake exactly to make our lives easier when it comes to building VTK. This meta-make does its job so good that it has been adopted in almost all modern C++ projects. VTK’s configuration indeed has a slow learning curve. Give it some time to get acquainted to.

regards,

Paulo

Hi guys:
Actually, I had tried to use cmake + mingw to build VTK for Qt, But it had encounter too many many many many issues, and it takes me two weeks to built, so I had to gave up this tool chains, the official recommend tool chains of VTK is VS + Ninja + cmake, and I had compiled it successfully, but msvc is not a cross-plate tool, it makes me crazy and depressed!! the ITK is not support msvc very well too!!
to prepare the develop environment almost lead me give up to learn itk + vtk!!

VTK and ITK are both cross platform, with different build methods on each platform. How is that an issue ?

Hello,

Yes, MSVC is a Windows-only compiler. But you don’t need to worry about this. CMake is a meta-make, that is, it generates a makefile or VS solution file that will work on your platform and selected toolchain. The fact that MSVC is Windows-only is no more of a problem if you use a meta-make likc CMake, Autotools, QMake, etc.

But, if you still want to use MinGW64 (don’t use MinGW, which is a 32-bit only compiler), VTK and ITK compile just fine with it. Still, you don’t need to compile them if you don’t feel comfortable yet. I suggest you to install MSYS2, which is a POSIX-like evironment for Windows that comes with a Linux-like terminal to enter commands and a handy tool called pacman. pacman is a package manager for C/C++ libraries just like conda, pip install, yum, synaptic, etc. For example pacman -S mingw-w64-x86_64-toolchain installs MinGW64 in your MSYS2 environment. Then just use pacman to install all the libraries you want without building them. For example: pacman -S mingw-w64-x86_64-vtk will install a MinGW64-compiled VTK in your system.

If you still want to build all your dependencies, using Conan (https://conan.io/) is also a good solution. Conan is a C++ dependency manager like Java’s Maven. It’ll download, build and manage build artifacts automatically, provided there are the so-called “Conan recipes” for them. Conan recipes are Python scripts that contain instructions on how to build/acquire the dependencies, download sources, etc. You can even write a Conan recipe to build your own software. Conan facilitates a lot CI/CD especially if you need to deliver executables for multiple platforms.

I hope this helps,

Paulo

1 Like