set(BUILD_TESTING ON CACHE BOOL "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "")
set(MT_BUILD_ANTS ON CACHE BOOL "")
set(MT_BUILD_ITK_TOOLS ON CACHE BOOL "")
set(MT_BUILD_LITE OFF CACHE BOOL "")
set(MT_BUILD_SHARED_LIBS ON CACHE BOOL "")
set(MT_BUILD_VISUAL_TOOLS ON CACHE BOOL "")
set(MT_USE_OPENMP ON CACHE BOOL "")
set(USE_SYSTEM_FFTW3D OFF CACHE BOOL "")
set(USE_SYSTEM_FFTW3F OFF CACHE BOOL "")
set(USE_SYSTEM_GLUT OFF CACHE BOOL "")
set(USE_SYSTEM_GSL OFF CACHE BOOL "")
set(USE_SYSTEM_HDF5 OFF CACHE BOOL "")
set(USE_SYSTEM_ITK OFF CACHE BOOL "")
set(USE_SYSTEM_NETCDF OFF CACHE BOOL "")
set(USE_SYSTEM_PCRE OFF CACHE BOOL "")
set(USE_SYSTEM_ZLIB OFF CACHE BOOL "")
I also used zlib on for good mesure
set(USE_SYSTEM_ZLIB OFF CACHE BOOL "")
But got the following on the make:
[ 24%] Building C object minctools/conversion/CMakeFiles/mnc2nii.dir/nifti1/mnc2nii.c.o
[ 24%] Linking C executable mnc2nii
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzopen':
znzlib.c:(.text+0x7d): undefined reference to `gzopen'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzdopen':
znzlib.c:(.text+0x11d): undefined reference to `gzdopen'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `Xznzclose':
znzlib.c:(.text+0x17d): undefined reference to `gzclose'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzread':
znzlib.c:(.text+0x24c): undefined reference to `gzread'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzwrite':
znzlib.c:(.text+0x37c): undefined reference to `gzwrite'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzrewind':
znzlib.c:(.text+0x47a): undefined reference to `gzseek'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzprintf':
znzlib.c:(.text+0x78f): undefined reference to `gzprintf'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzseek':
znzlib.c:(.text+0x432): undefined reference to `gzseek'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znztell':
znzlib.c:(.text+0x4c2): undefined reference to `gztell'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzputs':
znzlib.c:(.text+0x505): undefined reference to `gzputs'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzgets':
znzlib.c:(.text+0x547): undefined reference to `gzgets'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzflush':
znzlib.c:(.text+0x587): undefined reference to `gzflush'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzeof':
znzlib.c:(.text+0x5c2): undefined reference to `gzeof'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzputc':
znzlib.c:(.text+0x604): undefined reference to `gzputc'
../../external//usr/local/lib/libznz.a(znzlib.o): In function `znzgetc':
znzlib.c:(.text+0x664): undefined reference to `gzgetc'
collect2: error: ld returned 1 exit status
minctools/conversion/CMakeFiles/mnc2nii.dir/build.make:105: recipe for target 'minctools/conversion/mnc2nii' failed
make[2]: *** [minctools/conversion/mnc2nii] Error 1
CMakeFiles/Makefile2:5129: recipe for target 'minctools/conversion/CMakeFiles/mnc2nii.dir/all' failed
make[1]: *** [minctools/conversion/CMakeFiles/mnc2nii.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
I have tied adding the -lz option in the cmake flags for compilation but to no effect.
Here is my non default config for cmake:
I also used zlib on for good mesure
But got the following on the make:
I have tied adding the -lz option in the cmake flags for compilation but to no effect.