Slicer build Error

zhuofalin
Mon, 31 Mar 2025 04:37:28 +0000
Development

Recently, I used cmake to compile the latest version of 3dSlicer and encountered many problems. I would like to ask you for advice.

Build Environment

System: Windows 10 22H2
Cmake: 4.0.0

Build Steps

1. Use Cmake-Gui to configure and generate slicer.sln;
2. Execute the following command

"C:\Program Files\CMake\bin\cmake.exe" --build C:\D\SD --config Debug

Error List:

1. Build Error One

CMake Error at CMakeLists.txt:555 (install):
    The file

      E:/build/teem-build/TeemLibraryDepends.cmake

    was generated by the export() command.  It may not be installed with the
    install() command.  Use the install(EXPORT) mechanism instead.  See the
    cmake-packages(7) manual for more.


  -- Configuring incomplete, errors occurred!
D:\vs2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: “E:\build\CMakeFiles\d0f89a43b6a
893837f2c66fd8fcc6b20\teem-update.rule;E:\build\CMakeFiles\d0f89a43b6a893837f2c66fd8fcc6b20\teem-patch.rule;E:\build\CM
akeFiles\d0f89a43b6a893837f2c66fd8fcc6b20\teem-configure.rule;E:\build\CMakeFiles\d0f89a43b6a893837f2c66fd8fcc6b20\teem
-build.rule;E:\build\CMakeFiles\d0f89a43b6a893837f2c66fd8fcc6b20\teem-install.rule;E:\build\CMakeFiles\a3ae6876636e24da
322ce04f92645239\teem-complete.rule;E:\build\CMakeFiles\d5760513ab1ffb7a106b6869ee861bc4\teem.rule”的自定义生成已退出，代码为 1。 [E:
\build\teem.vcxproj]

2. Build Other-Type Info

CMake Deprecation Warning at CMakeLists.txt:21 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.

5 posts - 4 participants