# USE\_SYSTEM\_qt not there while building Superbuild on Windows 11 | No Paraview Application

**URL:** https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898
**Category:** Development
**Created:** [April 16, 2023, 4:11am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898 "2023-04-16T04:11:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 16, 2023, 4:11am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/1 "2023-04-16T04:11:39Z")

</div>

Hi, I have followed the following steps to build superbuild:

- Install Visual Studio 2019 community with all C++ related tools
- Install cmake
- Install git bash
- Install Ninja  
I thought I won’t have to install Qt (which is one of the reason to use Superbuild), but **without installing Qt I was getting error that Qt5 Dir and Qt5-cmake not found so then I installed Qt**
- Install Qt 5.15.2 VS2019 (had to add Qt cmake directory path in cmake Qt\_Dir)  
then I did:

```auto
git clone --recursive https://gitlab.kitware.com/paraview/paraview-superbuild.git
cd paraview-superbuild
git fetch origin 
$ git checkout master
$ git submodule update

```

Outside source directory I created pv-build directory  
Open Visual Studio Native Command X64

then:

```auto
cd pv-build

```

I had to run this in the pv-build folder before running cmake-gui

```auto
cmake -DCMAKE_BUILD_TYPE=STRING=Release /path/to/source

```

In my Cmake I don’t find **USE\_SYSTEM\_qt** options, did I miss something?  
I want to create a binary of my custom application and don’t want my user to install Qt or other dependency. So what should I do.

I cinfigure and generate. After this I run ninja. The build is successful, but when I open paraview app which is in:  
C:\Users\msaad\pv-build\superbuild\paraview\build\bin  
i get errors. But if I open paraview app in C:\Users\msaad\pv-sup-build\install\bin it works, why are there multiple version?

Please guide, thanks

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 7:31am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/2 "2023-04-17T07:31:27Z")

</div>

You need to explicitly enable the `qt` project of the superbuild with `ENABLE_qt5=ON`

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 1:50pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/3 "2023-04-17T13:50:02Z")

</div>

I did ENABLE\_qt5 = ON in cmake\_gui (which I opened from VS Native Command x64). But even then it was giving me error that Qt5 Dir and Qt5-cmake not found, so I had to install Qt5 on my system for that.  
And even with ENABLE\_qt5 I could not see USE\_SYSTEM\_qt option.  
Am I doing something wrong?

Thanks for a quick response.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 2:02pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/4 "2023-04-17T14:02:50Z")

</div>

Ahh sorry, in windows you must use a system Qt.

So you need to install Qt on the build machine, and set `Qt5_DIR` to point your install.

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 2:04pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/5 "2023-04-17T14:04:32Z")

</div>

Yeah I did that. But then once I build my application binaries and distribute them I don’t want my customers to install Qt and other dependencies (same as when I download Paraview’s binary I don’t have to install anything), how can I do that?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 2:09pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/6 "2023-04-17T14:09:36Z")

</div>

I think that thanks to [this line](https://gitlab.kitware.com/paraview/paraview-based-superbuild-example/-/blob/main/projects/win32/simpleparaview.bundle.cmake#L11) of the custom app superbuild, the `packaging` step will copy the dlls

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 2:14pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/7 "2023-04-17T14:14:26Z")

</div>

Perfect, thanks!  
One more question, I think because I created two different question threads it’s confusing me 😛  
So just using the simpleparaview superbuild example is enough to generate our own binaries, but in this thread we are talking about building superbuild ourselves on the machine (which is not needed if our goal to create and distribute binaries of our application) so why should one build superbuild on their machines 🤔?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 2:36pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/8 "2023-04-17T14:36:59Z")

</div>

I’m not sure to follow.

The superbuild is intended to be used for creating redistributable binaries. For ParaView, we have the [superbuild](https://gitlab.kitware.com/paraview/paraview-superbuild/) repo.

Then paraview-based applications can reuse most of this. The [simple pv](https://gitlab.kitware.com/paraview/paraview-based-superbuild-example) is an example of how to do that.

Those projects should be build somewhere to get the binaries: either on a CI or on a local machine. And doing that on a local machine make it easier at first place while work is in progress and debug is needed.

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 2:47pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/9 "2023-04-17T14:47:01Z")

</div>

Sorry. I got confused. So what I was saying was that do I not need to build [paraview-superbuild](https://gitlab.kitware.com/paraview/paraview-superbuild/) on my machine and directly use [simple pv example](https://gitlab.kitware.com/paraview/paraview-based-superbuild-example) and replace simple-paraview with my application. But it wasn’t making sense

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 2:49pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/10 "2023-04-17T14:49:54Z")

</div>

Ah ok. So yes, build directly the _simple_ version.

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 3:07pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/11 "2023-04-17T15:07:06Z")

</div>

Thank you! So now I would not build paraview-superbuild on my machine and directly use simple-pv example (and it would take care of everything like paraview source code itself etc). Is this correct?

But if this is correct, the only question remains is that would I be able to test my application without building paraview-superbuild on my machine?

Sorry if it is confusing

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2023, 3:24pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/12 "2023-04-17T15:24:55Z")

</div>

To create redistributable binaries: just use a modified version of paraview-based-superbuild-example, this will do all the necessary stuff including download and build paraview itself.

To test and develop a ParaView based application, you need a build version of ParaView, but not necessary from the superbuild. You can just manually install the required dependency and build the ParaView project (see [instructions](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md) )

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 3:33pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/13 "2023-04-17T15:33:33Z")

</div>

Perfect, thank you so much!

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 17, 2023, 4:49pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/14 "2023-04-17T16:49:47Z")

</div>

So if I use the simple pv example to test it does work but after installation of the binary file of simple pv it creates a bin folder in simpleParaview folder which has all the dll and other paraview files, is there a way to not expose those files to the user.

In short is there a way for user to only access the Application and not the other files?  
And secondly, while creating the binary this way, does it link Qt dynamically or statically?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 18, 2023, 7:42am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/15 "2023-04-18T07:42:57Z")

</div>

To avoid the whole dll list, you should build in static.

But note I’m not sure that you can have Qt statically, because to do that you will need to rebuild Qt and as we stated before, it is not supported in our superbuild on windows.

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [April 18, 2023, 5:15pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/16 "2023-04-18T17:15:45Z")

</div>

That makes sense, and yes I would also want to dynamically link Qt.  
But I can also see vtk dll files, and it also builds the complete paraview application. Why is complete paraview app also generated?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 19, 2023, 6:50am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/17 "2023-04-19T06:50:12Z")

</div>

No idea on how to remove the paraview exe from here.  
You should dig into the cmake options or look at the packaging step to remove it.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 2, 2023, 12:10pm UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/18 "2023-05-02T12:10:30Z")

</div>

You are building ParaView, so paraview.exe is generated, just do not package it.

---

<div class="post-metadata">

### Author: ![Muhammad\_Saad\_Atique](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_saad_atique/32/11159_2.png) [@Muhammad\_Saad\_Atique](https://discourse.paraview.org/u/Muhammad_Saad_Atique)
#### Post date: [June 15, 2023, 4:22am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/19 "2023-06-15T04:22:09Z")

</div>

Hi, So I am trying to create a redistributable binary for my custom application.  
What are the steps I should follow to create the redistributable binaries?

The way I am doing it is to clone the [Super Build Example](https://gitlab.kitware.com/paraview/paraview-based-superbuild-example) and then make changes to it. For now I am trying to build [clone 1 example](https://github.com/Kitware/ParaView/tree/master/Examples/CustomApplications/Clone1) instead of simple-paraview example given in super build example.

And then make the following changes:

1. In **projects/unix** I changed the file name to **clone1.bunble.cmake**
2. In **projects/unix/clone1.bundle.cmake:**

- set(CPACK\_PACKAGE\_NAME **“Clone1-1.0-ParaView”** )
- superbuild\_unix\_install\_program("{superbuild\_install\_location} **/bin/clone1"** “lib”  
SEARCH\_DIRECTORIES “${library\_paths}”)
- Changed **other paths in projects/unix/clone1.bundle.cmake** from simpleparaview to clone1

1. Same changes made in **projects/win32/clone1.bundle.cmake**
2. In projects/clone1.cmake changed the **superbuild\_add\_project** from simpleparaview to clone1
3. **Did not make any changes to pvsb**
4. In main **CmakeLists.txt:**

- Changed **project from simpleparaview-superbuild to clone1-superbuild**
- In **superbuild\_find\_projects function** I changed simpleparaview to clone1 in set projects
- foreach (generator IN LISTS generators)  
superbuild\_add\_extra\_package\_test( **strong text\*\*\*\*clone1** “${generator}”  
LABELS **“Clone1”**  
TIMEOUT 6400)
- **set the default project** s: set(_superbuild\_default_ **clone1** ON)

1. In **versions.cmake** changed the **superbuild\_set\_version** name from simpleparaview to clone1, also changed the URL and URL\_MD5
2. Change the file names.

But right at the end of the build I get this error:

```auto
CMake Error at CMakeLists.txt:78 (message):
  Failed to find the VTK CMake directory. Did you forget to initialize the
  submodule? (git submodule update --init --recursive)

-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/msaad/build_clone/pvsb/superbuild/sb-clone1-configure.cmake:47 (message):
  Failed with exit code 1

ninja: build stopped: subcommand failed.

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 15, 2023, 8:27am UTC](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898/20 "2023-06-15T08:27:14Z")

</div>

Looks like your paraview project does not have submodule initialized. Can you try again with the pure superbuild example ?

[Next page](https://discourse.paraview.org/t/use-system-qt-not-there-while-building-superbuild-on-windows-11-no-paraview-application/11898.md?page=2)
