MantisBT - ITK
View Issue Details
0009757ITKpublic2009-10-21 21:002010-11-05 00:02
mmr 
Cory W Quammen 
normalminorhave not tried
closedfixed 
x86Windows7
ITK-3-16 
 
completed
0009757: Feature Request: flatten the header directory structure produced when the INSTALL project is run
As per discussions on the itk-users mailing list, I request that the header output from the INSTALL project produced by CMake be flattened, rather than still organized in the same way as in cvs.
No tags attached.
Issue History
2009-10-21 21:00mmrNew Issue
2009-10-22 12:05Luis IbanezStatusnew => assigned
2009-10-22 12:05Luis IbanezAssigned To => Luis Ibanez
2009-10-22 12:09Luis IbanezNote Added: 0018192
2009-10-22 14:05Luis IbanezNote Added: 0018197
2009-10-22 14:50Luis IbanezNote Added: 0018198
2009-10-26 18:25mmrNote Added: 0018245
2009-10-26 21:58Luis IbanezNote Added: 0018247
2009-10-27 12:13mmrNote Added: 0018250
2010-11-05 00:00Cory W QuammenAssigned ToLuis Ibanez => Cory W Quammen
2010-11-05 00:02Cory W QuammenSprint Status => completed
2010-11-05 00:02Cory W QuammenNote Added: 0022886
2010-11-05 00:02Cory W QuammenStatusassigned => closed
2010-11-05 00:02Cory W QuammenResolutionopen => fixed

Notes
(0018192)
Luis Ibanez   
2009-10-22 12:09   
Locate all the CMakeLists.txt files that use the INSTALL_INCLUDE_DIR variable

Condition them with a new CMake variable, to provide the alternative of copying all the headers to the top (flat) directory INSTALL_INCLUDE_DIR, instead of creating subdirectories.

grep -r INSTALL_INCLUDE_DIR * | wc

reveals 117 instances of the variable.
(0018197)
Luis Ibanez   
2009-10-22 14:05   
Added a CMake option called

   ITK_USE_FLAT_DIRECTORY_INSTALL

in the top CMakeLists.txt file
and then conditioned the naming of the destination directories for headers in all the CMakeLists.txt files under Insight/Code/

For example:
Top CMakeLists.txt file:
http://www.itk.org/cgi-bin/viewcvs.cgi/CMakeLists.txt?root=Insight&r1=1.354&r2=1.355&sortby=date [^]

Insight/Code/Common/CMakeLists.txt file:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/CMakeLists.txt?root=Insight&r1=1.137&r2=1.138&sortby=date [^]
(0018198)
Luis Ibanez   
2009-10-22 14:50   
Most of the Utilities subdirectories have now been flattened.

The following issues remain:

1) MetaImage: Must be done by Stephen or Julien, and must check for VTK impact
2) kwsys: Must be done by Brad, and check implications in other toolkits
3) VXL: This tree actually have duplicated filenames...
(0018245)
mmr   
2009-10-26 18:25   
Using this build, I can get a library without using CMake. Just out of curiousity, should vnl be required in order to use the basic data class? Or should that dependency be removed? Instead of just using one include directory, I need three, because of the inclusion of vnl. Is VNL that intrinsic to what ITK does?
(0018247)
Luis Ibanez   
2009-10-26 21:58   
Thanks for verifying that the changes move us in the right direction.

VNL is used in very fundamental places in ITK, for example, in the itkMatrix class. You may be able to build applications that make minimal use of ITK without requiring VNL, but chances are that as you get into more interesting cases of segmentation or registration, then VNL headers will be brought in.

We will give it a try at flattening the VNL tree as well.
Work in progres...
(0018250)
mmr   
2009-10-27 12:13   
New news: adding in dicom reading also requires a few more include directories.

So far, the includes are:
ITK/include/InsightToolKit
ITK/include/InsightToolKit/gdcm/src
ITK/include/InsightToolKit/Utilities
ITK/include/InsightToolKit/Utilities/vxl/vcl
ITK/include/InsightToolKit/Utilities/vxl/core

As I add more, I'll put them in.

Thanks for looking into this, I appreciate it.
(0022886)
Cory W Quammen   
2010-11-05 00:02   
Assumed fixed with the ITK_USE_FLAT_DIRECTORY_INSTALL CMake option. Please reopen if that is not the case.