[Insight-users] how to compile itk + fltk?

Luis Ibanez luis.ibanez@kitware.com
Sat, 12 Apr 2003 01:07:58 -0400


Hi Zhao,

Here is the minimal CMakeLists.txt
file that you need for combining ITK and FLTK


--------------------------------

PROJECT( myProject )

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
   INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
   MESSAGE(FATAL_ERROR
           "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)


FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
   INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ELSE(FLTK_FOUND)
   MESSAGE(FATAL_ERROR
         "Cannot build without FLTK.  Please set FLTK components.")
ENDIF(FLTK_FOUND)

SET(mySourceFiles
   file1.cxx
   file2.cxx
   file3.cxx
   )

ADD_GUI_EXECUTABLE(myExecutable "${mySourceFiles}")

FLTK_WRAP_UI(myExecutable  myGUI.fl)

TARGET_LINK_LIBRARIES(myExecutable ITKIO ITKBasicFilters)


-------------------------------------------------------




The myGUI.fl file is the GUI file that you write with
Fluid.  CMake will invoke fluid for you, in order
to generate the correspoinding myGUI.cxx and myGUI.h
files. (you don't need to explicitly add these files
to the project,... CMake will also do it for you).

When you run CMake, make sure to enable the
"Advanced" option and double check that all
the FLTK components are found. This includes:
Fluid, the Header files, and four libraries.



Regards


Luis



----------------------------------------

zhao yong qiang wrote:
> Hi all,
>    I decide to use fltk as GUI tool. But I don't know how to write
> cmakelists file to compile FLTK andITK, my environment is Win2000+MSVC. 
> Can someone give me some help?
> 
>   Thanks a lot!!!
> 
> Sincerely, 
>                           Zhao Yongqiang
>                           Dept. of Computer Science & Engineering
>                           Shanghai JiaoTong University
>                           Shanghai, China
>                           zhao-yq@cs.sjtu.edu.cn
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>