[Insight-users] Regarding to set INCLUDE_DIRECTORIES.

Luis Ibanez luis . ibanez at kitware . com
Sun, 03 Aug 2003 11:17:03 -0400


Hi Hon,

Please post the CMakeCache.txt files that
CMake generated in your directory
D:/ITK Research/FltkImageViewer
and in the binary directory where you are
attempting to build the GaussianFilter.

These two files will help us to figure out
what may be wrong with your configuration.


Thanks,


  Luis


------------------------
Hon-Cheng Wong wrote:
> Dear Luis and all ITK users,
>          In order to separate the GaussianFilter in independent project, 
> I have separated the FLTKImageViewer library and built it using
> *IN-SOURCE* build. Both my source and bin of FLTKImageViewer
> are located at D:\ITK Research\FltkImageViewer. My GaussianFilter
> is located at D:\ITK Research\GaussianFilter.
>  
>          I have tried to the following:
> INCLUDE_DIRECTORIES(
>  D:/ITK Research/FltkImageViewer
>  ${GaussianFilter_SOURCE_DIR}
>  ${GaussianFilter_BINARY_DIR}
>  )
>  
>            However, it doesn't work, the compiler still could not file 
> the header files
> which locate in D:\ITK Research\FltkImageViewer. I have read the document
> of CMake, but I could not find out how to specify a user directory like my
> case in it.
>  
>            Could you help me to find out the way to set the 
> INCLUDE_DIRECTORIES
> correctly?
>  
> Thank you very much in advance!!
>  
> Regards,
> Hugo
>  
> Hon-Cheng Wong, Hugo
> Faculty of Information Technology,
> Macao University of Science and Technology,
> Macao, China
>  
> I got the following messages:
>  
> 
> --------------------Configuration: GaussianFilter - Win32 
> Release--------------------
> 
> Compiling...
> 
> GaussianFilter.cxx
> 
> D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error C1083:
> 
> Cannot open include file: 'fltkImageViewer.h': No such file or directory
> 
> liFilterConsole.cxx
> 
> D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error C1083:
> 
> Cannot open include file: 'fltkImageViewer.h': No such file or directory
> 
> liFilterConsoleGUI.cxx
> 
> D:/ITK Research/GaussianFilter/liFilterConsoleGUI.h(8) : fatal error C1083:
> 
> Cannot open include file: 'fltkLightButton.h': No such file or directory
> 
> Generating Code...
> 
> Error executing cl.exe.
> 
>  
> 
> ALL_BUILD - 3 error(s), 0 warning(s)
> 
>  
> 
> And here is the modified *CMakeList.txt* of GaussianFilter:
> 
>  
> 
> PROJECT(GaussianFilter)
> 
>  
> 
> FIND_PACKAGE(ITK)
> 
> IF(ITK_FOUND)
> 
>   INCLUDE(${ITK_USE_FILE})
> 
> ELSE(ITK_FOUND)
> 
>   MESSAGE(FATAL_ERROR
> 
>           "Cannot build InsightApplications without ITK.  Please set 
> ITK_DIR.")
> 
> ENDIF(ITK_FOUND)
> 
>  
> 
> FIND_PACKAGE(FLTK)
> 
>   IF(FLTK_FOUND)
> 
>     INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> 
> ENDIF(FLTK_FOUND)
> 
>  
> 
> FIND_LIBRARY(FLTK_IMAGE_VIEWER_LIBRARY NAMES FltkImageViewer
> 
>           PATHS /usr/lib /usr/local/lib
> 
>           /usr/local/fltk/lib
> 
>           /usr/X11R6/lib)
> 
>  
> INCLUDE_DIRECTORIES(
>  D:/ITK Research/FltkImageViewer
>  ${GaussianFilter_SOURCE_DIR}
>  ${GaussianFilter_BINARY_DIR}
>  )
> 
>  
> 
> ADD_EXECUTABLE(GaussianFilter liFilterConsole.cxx
> 
>                liFilterConsoleBase.cxx GaussianFilter.cxx)
> 
> ADD_EXECUTABLE(GaussianFilter2D liFilterConsole2D.cxx
> 
>                liFilterConsole2DBase.cxx GaussianFilter2D.cxx)
> 
>  
> 
> FLTK_WRAP_UI(GaussianFilter liFilterConsoleGUI.fl)
> 
> FLTK_WRAP_UI(GaussianFilter2D liFilterConsole2DGUI.fl)
> 
>  
> 
> TARGET_LINK_LIBRARIES(GaussianFilter ITKFltkImageViewer ITKIO 
> ITKBasicFilters)
> 
> TARGET_LINK_LIBRARIES(GaussianFilter2D ITKFltkImageViewer ITKIO 
> ITKBasicFilters)
> 
>  
> 
>  
> 
>