[Insight-users] Trying to compile ITKFltkImageViewer outside
the Insight-Applications
Luis Ibanez
luis.ibanez at kitware.com
Sun Aug 20 18:10:59 EDT 2006
Hi Jeff,
Please find attached the CMakeLists.txt file that you can use
in order to build the library FltkImageViewer outside of the
source tree of InsightApplications.
Note that the lines that were refering to the "Auxiliary" have
been modified in order to match the directory structure that
you have once you take the FltkImageViewer directory out of
InsightApplications.
Note also that adding the "PROJECT()" statement at the beginning
of the CMakeLists.txt file simplified the writing because now
you have access to the two variables
FltkImageViewer_SOURCE_DIR
FltkImageViewer_BINARY_DIR
that CMake creates automatically.
Regards,
Luis
-----------------
Jeff E wrote:
>
> Hi!
>
> Trying to compile ITKFltkImageViewer outside the Insight-Applications I
> get the following error:
>
> Deleting intermediate files and output files for project
> 'ITKFltkImageViewer', configuration 'Debug|Win32'.
> Generating fltkTimeProbesCollectorGUI.h
> The system cannot find the path specified.
> Project : error PRJ0019: A tool returned an error code from "Generating
> fltkTimeProbesCollectorGUI.h"
>
> What am I doing wrong?
>
> I've already added
>
> IF(USE_FLTK)
> FIND_PACKAGE(FLTK)
> IF(FLTK_FOUND)
> INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ENDIF(FLTK_FOUND)
> ENDIF(USE_FLTK)
>
> 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(VTK)
> IF(VTK_FOUND)
> INCLUDE(${VTK_USE_FILE})
> ELSE(VTK_FOUND)
> MESSAGE(FATAL_ERROR
> "Cannot build InsightApplications without VTK. Please set
> VTK_DIR.")
> ENDIF(VTK_FOUND)
>
> SET(FLTK_FLUID_EXECUTABLE ${FLTK_INCLUDE_DIR}/fluid/fluidd.exe)
>
> to the CMakeLists.txt
>
>
> Thanks,
>
> Jeffe
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
PROJECT(FltkImageViewer)
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)
FIND_PACKAGE(VTK REQUIRED)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)
FIND_PACKAGE(FLTK REQUIRED)
IF(FLTK_FOUND)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)
SET(FltkImageViewer_SRCS
fltkBox3D.cxx
fltkCone3D.cxx
fltkClippingPlane3DDrawer.cxx
fltkCylinder3D.cxx
fltkFrustum3D.cxx
fltkGlWindow.cxx
fltkGlWindowInteractive.cxx
fltkGlWindowInteractiveFlat.cxx
fltkImage2DViewerWindow.cxx
fltkRGBImage2DViewerWindow.cxx
fltkLightButton.cxx
fltkProgressBar.cxx
fltkShape3D.cxx
fltkSphere3D.cxx
fltkWindowInteractive.cxx
fltkTimeProbeGUI.cxx
fltkTimeProbesCollector.cxx
fltkUtils.cxx
)
SET(FltkImageViewer_GUI_SRCS
fltkClippingPlane3DDrawerGUI.fl
fltkDisplayGlWindowGUI.fl
fltkDisplayGlWindowFlatGUI.fl
fltkFrustumFunctionControlGUI.fl
fltkImageViewerGUI.fl
fltkImage2DViewerGUI.fl
fltkRGBImage2DViewerGUI.fl
fltkRegularStepGradientDescentGUI.fl
fltkSlice2DDrawerGUI.fl
fltkSlice3DDrawerGUI.fl
fltkSphereFunctionControlGUI.fl
fltkTimeProbesCollectorGUI.fl
)
IF(WIN32)
ADD_DEFINITIONS(-DWIN32)
ENDIF(WIN32)
INCLUDE_DIRECTORIES(
${FltkImageViewer_SOURCE_DIR}
${FltkImageViewer_BINARY_DIR}
)
# Take the list of GUI files, generate .cxx and .h from them and add
# them to the build process of the target
FLTK_WRAP_UI(ITKFltkImageViewer ${FltkImageViewer_GUI_SRCS} )
ADD_LIBRARY(ITKFltkImageViewer ${FltkImageViewer_SRCS} ${ITKFltkImageViewer_FLTK_UI_SRCS})
INSTALL_TARGETS(/lib ITKFltkImageViewer)
TARGET_LINK_LIBRARIES(ITKFltkImageViewer ${FLTK_LIBRARIES} ${OPENGL_glu_LIBRARY}
${OPENGL_LIBRARIES})
# The fluid-generated fltk sources have many warnings. Disable
# warnings for the generated files on some compilers.
IF(CMAKE_COMPILER_IS_GNUCXX)
FOREACH(f ${FltkImageViewer_GUI_SRCS})
STRING(REGEX REPLACE "\\.fl$" ".cxx" SRC "${f}")
SET(SRC ${FltkImageViewer_BINARY_DIR}/${SRC})
SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS -w)
ENDFOREACH(f)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
More information about the Insight-users
mailing list