--- a/fsl/CMakeLists.txt
+++ b/fsl/CMakeLists.txt
@@ -6,4 +6,5 @@
 INCLUDE_DIRECTORIES( ${FSL_DIR}/extras/include/zlib )
 ADD_DEFINITIONS ( -DHAVE_ZLIB )
 
-SUBDIRS(znzlib niftiio fslio newmat libprob cprob miscmaths utils)
+# Debian: do not build stuff available from other Debian package
+SUBDIRS( fslio cprob miscmaths utils)
--- a/fsl/fslio/fslio.h
+++ b/fsl/fslio/fslio.h
@@ -25,8 +25,8 @@
 #define __FSLIO_H
 
 #include <stdio.h>
-#include "niftiio/nifti1_io.h"
-#include "znzlib/znzlib.h"
+#include <nifti1_io.h>
+#include <znzlib.h>
 #include "dbh.h"
 
 #ifdef __cplusplus
--- a/src/fslview/CMakeLists.txt
+++ b/src/fslview/CMakeLists.txt
@@ -192,7 +192,8 @@
   FILE( GLOB qwtlibs ${QWT_DIR}/lib/*.so* )
   FILE( GLOB qtlibs ${QT_QT_LIBRARY}* ${QT_QASSISTANTCLIENT_LIBRARY}* )
   FILE( GLOB assistant ${QT_INCLUDE_DIR}/../bin/assistant )
-  INSTALL(FILES ${vtklibs} ${osmesa} ${qtlibs} ${qwtlibs} DESTINATION lib)
+# no installation of system files on Debian
+#  INSTALL(FILES ${vtklibs} ${osmesa} ${qtlibs} ${qwtlibs} DESTINATION lib)
 #  INSTALL(FILES ${assistant} DESTINATION lib)
 #   INSTALL(TARGETS fslview atlasquery RUNTIME DESTINATION /bin )
 ENDIF(APPLE)
--- a/src/storage/test/CMakeLists.txt
+++ b/src/storage/test/CMakeLists.txt
@@ -14,7 +14,8 @@
 
 ADD_EXECUTABLE (testhistfns ${testhist_SOURCES})
 TARGET_LINK_LIBRARIES (testhistfns storage miscmaths newmat niftiio fslio znz z)
-TARGET_LINK_LIBRARIES (testhistfns ${FSLVIEW_BINARY_DIR}/lib/libfslio.a )
+# Debian: no static fslio
+#TARGET_LINK_LIBRARIES (testhistfns ${FSLVIEW_BINARY_DIR}/lib/libfslio.a )
 
 ADD_EXECUTABLE(testimage ${testimage_SOURCES})
 TARGET_LINK_LIBRARIES(testimage utils storage miscmaths newmat niftiio fslio znz z)
