fedorov
(Andrey Fedorov)
January 10, 2023, 9:21pm
1
I am maintaining dcmqi , which is a library that uses ITK for a handful of operations, including IO and some basic filtering. For quite some time I used an older version of ITK, which I customized manually to take out as much as possible in order to be able to build the package in AppVeyor within the free 60 min allowance.
Since I want to reduce build time of the main library, I am building packages for ITK and other dependencies separately, and reuse those packages in dcmqi. I use AppVeyor for CI.
Currently I am working to migrate to ITK 5.3, and use CMake options to select just the groups/modules that I need. I was able to build and package ITK, see ITK-dcmqi/appveyor.yml at dcmqi · QIICR/ITK-dcmqi · GitHub , but while building dcmqi I am getting errors due to missing header files:
I have Filtering group enabled while building ITK, and I further enabled ImageStatistics and LabelMap modules, but I am still missing those headers.
Am I doing something incorrectly, or is there a bug in ITK packaging and those files are just missed?
blowekamp
(Bradley Lowekamp)
January 10, 2023, 9:29pm
2
Hello @fedorov ,
You may be interesting in what is done in the libitk-feedstock for Conda-forge. Specifically the steps used to install ITK for Conda packaging:
1 Like
phcerdan
(Pablo Hernandez-Cerdan)
January 10, 2023, 9:38pm
3
I think you have a typo here:
- cmd: cmake --version
- ps: $client = new-object System.Net.WebClient;$client.DownloadFile("https://github.com/QIICR/zlib-dcmqi/releases/download/zlib-dcmqi-1.2.3-VS17-Win64-Release-static/zlib-dcmqi.zip", "C:\zlib-dcmqi.zip")
- cmd: 7z x C:\zlib-dcmqi.zip -oC:\zlib-install
- cmd: dir c:\zlib-install
- ps: $client = new-object System.Net.WebClient;$client.DownloadFile("https://github.com/QIICR/dcmtk-dcmqi/releases/download/DCMTK-dcmqi-3.6.7_20220105-VS12-Win64-Release-v0.0.32-static/DCMTK-dcmqi.zip", "C:\DCMTK-dcmqi.zip")
- cmd: 7z x C:\DCMTK-dcmqi.zip -oC:\DCMTK-install
- cmd: dir c:\DCMTK-install
- cmd: mkdir c:\ITK\ITK-build
- cmd: mkdir c:\ITK-install
- cmd: cd c:\ITK\ITK-build
- cmd: cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE:STRING=Release -DITK_USE_SYSTEM_ZLIB:BOOL=ON -DZLIB_ROOT:PATH=c:\zlib-install -DZLIB_INCLUDE_DIR:PATH=c:\zlib-install\include -DZLIB_LIBRARY:FILEPATH=c:\zlib-install\lib\zlib.lib -DDCMTK_DIR:STRING=C:\DCMTK-install\cmake -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DITK_BUILD_DEFAULT_MODULES:BOOL=OFF -DITKGroup_Core:BOOL=ON -DITK_GroupFiltering:BOOL=ON -DModule_ITKIOXML:BOOL=ON -DModule_ImageStatistics:BOOL=ON -DModule_LabelMap:BOOL=ON -DITK_GroupIO:BOOL=ON -DModule_MGHIO:BOOL=OFF -DITK_INSTALL_NO_DEVELOPMENT:BOOL=OFF -DKWSYS_USE_MD5:BOOL=ON -DITK_WRAPPING:BOOL=OFF -DITK_WRAP_PYTHON:BOOL=OFF -DCMAKE_INSTALL_PREFIX=c:\ITK-install -DBUILD_SHARED_LIBS:BOOL=OFF C:\ITK
build_script:
- cmd: type ITK.sln
- cmd: msbuild ITK.sln /m
- cmd: msbuild INSTALL.vcxproj
- ps: Copy-Item c:\ITK-install -Destination c:\ITK\ITK-install -Recurse
cache:
- C:\ProgramData\chocolatey\bin
- C:\ProgramData\chocolatey\lib
artifacts:
You have:
-DITKGroup_Core:BOOL=ON -DITK_GroupFiltering:BOOL=ON
It should be:
-DITKGroup_Core:BOOL=ON -DITKGroup_Filtering:BOOL=ON
Warnings about unused variables passed to CMake are quite useful.
4 Likes
fedorov
(Andrey Fedorov)
January 10, 2023, 10:42pm
4
@phcerdan thank you, that was it! Sorry I missed it.
3 Likes