# \#cmake

**URL:** https://discourse.slicer.org/tag/cmake/429.md

[Latest](https://discourse.slicer.org/latest.md) · [Categories](https://discourse.slicer.org/categories.md) · [Tags](https://discourse.slicer.org/tags.md)

---

## [Configuring the running environment for an extension build-tree](https://discourse.slicer.org/t/configuring-the-running-environment-for-an-extension-build-tree/43103)

<div class="topic-metadata">

**Author:** [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Replies:** 1\
**Last updated:** [May 26, 2025, 8:02pm UTC](https://discourse.slicer.org/t/configuring-the-running-environment-for-an-extension-build-tree/43103 "2025-05-26T20:02:19Z")

</div>

Hello. Is there any reason for the following code not taking effect when added to a External\_something.cmake file in a superbuild extension? set(${proj}\_ENVVARS\_LAUNCHER\_BUILD "VAR1=${VAR1}" "VAR2=anything" …

---

## [3D Slicer Release Build Error (Variable Slicer\_WC\_LAST\_CHANGED\_DATE is expected to be defined in SlicerPackageAndUploadTarget)](https://discourse.slicer.org/t/3d-slicer-release-build-error-variable-slicer-wc-last-changed-date-is-expected-to-be-defined-in-slicerpackageanduploadtarget/20984)

<div class="topic-metadata">

**Author:** [@mertsaner](https://discourse.slicer.org/u/mertsaner)\
**Replies:** 24\
**Last updated:** [January 29, 2025, 10:41am UTC](https://discourse.slicer.org/t/3d-slicer-release-build-error-variable-slicer-wc-last-changed-date-is-expected-to-be-defined-in-slicerpackageanduploadtarget/20984 "2025-01-29T10:41:16Z")

</div>

Hello, When I build Slicer in my Windows 11 Intel laptop using the following instructions as stated in Slicer website the I got the following error, Instructions: mkdir C:\\D\\S4R cd /d C:\\D\\S4R "C:\\Program Files\\CMake\\…

---

## [Custom Build App Win11 VS 2022 Qt5.15.2 Error FindCTK.cmake](https://discourse.slicer.org/t/custom-build-app-win11-vs-2022-qt5-15-2-error-findctk-cmake/33554)

<div class="topic-metadata">

**Author:** [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Replies:** 0\
**Last updated:** [December 29, 2023, 10:51am UTC](https://discourse.slicer.org/t/custom-build-app-win11-vs-2022-qt5-15-2-error-findctk-cmake/33554 "2023-12-29T10:51:48Z")

</div>

Hi Everyone! I´m trying to build a Custom App with SlicerCustomAppTemplate in Windows 11 with VS 2022 and Qt5.15.2 and I get this error: CMake Error at CMakeLists.txt:890 (find\_package): 33\> By not providing “FindCTK.…

---

## [How to export compile commands?](https://discourse.slicer.org/t/how-to-export-compile-commands/31410)

<div class="topic-metadata">

**Author:** [@somso2e](https://discourse.slicer.org/u/somso2e)\
**Replies:** 1\
**Last updated:** [October 13, 2023, 9:24am UTC](https://discourse.slicer.org/t/how-to-export-compile-commands/31410 "2023-10-13T09:24:56Z")

</div>

Hi clangd depends on the compile\_commands.json file to work but I can’t generate it by setting the CMAKE\_EXPORT\_COMPILE\_COMMANDS flag like below. cmake -DCMAKE\_EXPORT\_COMPILE\_COMMANDS:BOOL=ON Slicer-SuperBuild-Debug/

---

## [CMake error in SlicerExtensionCPack.cmake while configuring extension](https://discourse.slicer.org/t/cmake-error-in-slicerextensioncpack-cmake-while-configuring-extension/32080)

<div class="topic-metadata">

**Author:** [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Replies:** 1\
**Last updated:** [October 6, 2023, 9:42pm UTC](https://discourse.slicer.org/t/cmake-error-in-slicerextensioncpack-cmake-while-configuring-extension/32080 "2023-10-06T21:42:50Z")

</div>

I am getting the error below while trying to configure the build for the SlicerIDCBrowser extension. The error seems to be unrelated to the extension. Does anyone know how to work around it? I am using the latest, and t…

---

## [Are there any examples of integrating conan into 3d slicer extension?](https://discourse.slicer.org/t/are-there-any-examples-of-integrating-conan-into-3d-slicer-extension/29895)

<div class="topic-metadata">

**Author:** [@james94g](https://discourse.slicer.org/u/james94g)\
**Replies:** 4\
**Last updated:** [June 7, 2023, 10:27pm UTC](https://discourse.slicer.org/t/are-there-any-examples-of-integrating-conan-into-3d-slicer-extension/29895 "2023-06-07T22:27:50Z")

</div>

Operating system: Ubuntu 22.04 Slicer version: 5.3.0 Expected behavior: After successfully building custom extension with conan cmake, I expect my modified OpenIGTLinkIF module to show up in modules. Actual behavior: …

---

## [Cmake setting in vscode](https://discourse.slicer.org/t/cmake-setting-in-vscode/28981)

<div class="topic-metadata">

**Author:** [@park](https://discourse.slicer.org/u/park)\
**Replies:** 0\
**Last updated:** [April 18, 2023, 7:30am UTC](https://discourse.slicer.org/t/cmake-setting-in-vscode/28981 "2023-04-18T07:30:06Z")

</div>

Hi all, I am tring to create an enviornment for 3D slicer using vscode. I have built my project using the “setting.json” as shown below: { "cmake.configureArgs": \[ "-DCMAKE\_BUILD\_TYPE=Debug", "-G",…

---

## [Prevent some C++ code from being wrapped for Python](https://discourse.slicer.org/t/prevent-some-c-code-from-being-wrapped-for-python/26675)

<div class="topic-metadata">

**Author:** [@adeguet1](https://discourse.slicer.org/u/adeguet1)\
**Replies:** 1\
**Last updated:** [December 10, 2022, 4:55pm UTC](https://discourse.slicer.org/t/prevent-some-c-code-from-being-wrapped-for-python/26675 "2022-12-10T16:55:33Z")

</div>

Hello, I have some code I’d like to NOT wrap in Python. In my extension’s MRML directory, I created some “internal” classes that should ideally not be exposed to the user. I’ve been looking at 3 options: A preprocesso…

---

## [MSB8066 error while building 3DSlicer latest version](https://discourse.slicer.org/t/msb8066-error-while-building-3dslicer-latest-version/26246)

<div class="topic-metadata">

**Author:** [@Dya](https://discourse.slicer.org/u/Dya)\
**Replies:** 12\
**Last updated:** [December 2, 2022, 3:14pm UTC](https://discourse.slicer.org/t/msb8066-error-while-building-3dslicer-latest-version/26246 "2022-12-02T15:14:26Z")

</div>

The cmake has compiled and generated without any error. I am getting this error message while building 3DSlicer in visual studio 2022 .I have searched this topic and found out to use the latest version of 3d slicer pa…

---

## [Cmake cannot generate the SlicerConfig.cmake](https://discourse.slicer.org/t/cmake-cannot-generate-the-slicerconfig-cmake/22069)

<div class="topic-metadata">

**Author:** [@user5](https://discourse.slicer.org/u/user5)\
**Replies:** 9\
**Last updated:** [March 16, 2022, 4:01pm UTC](https://discourse.slicer.org/t/cmake-cannot-generate-the-slicerconfig-cmake/22069 "2022-03-16T16:01:05Z")

</div>

I already follow the instruction to build the Slicer inner-build folder in git bash or cmake gui, but it still comes out this error. Documentation/Nightly/Developers/Build Instructions/Configure - Slicer Wiki Extens…

---

## [Stable version of SlicerVR](https://discourse.slicer.org/t/stable-version-of-slicervr/22336)

<div class="topic-metadata">

**Author:** [@Leung\_Aaron](https://discourse.slicer.org/u/Leung_Aaron)\
**Replies:** 0\
**Last updated:** [March 6, 2022, 8:30pm UTC](https://discourse.slicer.org/t/stable-version-of-slicervr/22336 "2022-03-06T20:30:37Z")

</div>

Hello Since I have a project needed to use SlicerVR, so I would like to build SlicerVR project in cmake. I have tried many version of SlicerVR in github, most of them fail to build the project in vtkRenderingOpenVR and…

---

## [Add\_subdirectory() fails with ‘-features=no%anachronisms’](https://discourse.slicer.org/t/add-subdirectory-fails-with-features-no-anachronisms/20395)

<div class="topic-metadata">

**Author:** [@joachim](https://discourse.slicer.org/u/joachim)\
**Replies:** 0\
**Last updated:** [October 27, 2021, 10:34pm UTC](https://discourse.slicer.org/t/add-subdirectory-fails-with-features-no-anachronisms/20395 "2021-10-27T22:34:52Z")

</div>

I started working on my own loadable module based on Extension Wizard. My module has a subfolder containing a library that my module depends on. This library is a CMake project. But in my module’s CMakeLists.txt, the lin…

---

## [How to build module dependencies with CMakeLists.txt?](https://discourse.slicer.org/t/how-to-build-module-dependencies-with-cmakelists-txt/20371)

<div class="topic-metadata">

**Author:** [@joachim](https://discourse.slicer.org/u/joachim)\
**Replies:** 3\
**Last updated:** [October 27, 2021, 3:57am UTC](https://discourse.slicer.org/t/how-to-build-module-dependencies-with-cmakelists-txt/20371 "2021-10-27T03:57:14Z")

</div>

Consider an extension with two modules Wheel and Car : . ├── CMakeLists.txt ├── Car │ ├── CMakeLists.txt │ ├── Widgets │ │ ├── CMakeLists.txt │ │ ├── qSlicerCarFooBarWidget.cxx │ │ └── qSlicerCarFooBarWi…
