[Insight-users] (Still Struggling) Problems with Cmake and
ImageViewer application
Wu Zheying
u0303820 at nus.edu.sg
Tue Feb 20 23:33:26 EST 2007
Hi all,
I am still having problems with building the application using CMAKE and i do not understand what went wrong. Would appreciate if I could get some help or pointers in the right direction. Thanks, and i am attaching my CMAKE cache here for more info...
# This is the CMakeCache file.
# For build in directory: c:/InsightToolkit-2.8.1/2D/AppImageViewer/binaries
# It was generated by CMake: C:/Program Files/CMake 2.4/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND
//For backwards compatibility, what version of CMake commands and
// syntax should this version of CMake allow.
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
//C++ compiler
CMAKE_CXX_COMPILER:STRING=cl
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING= /DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /GZ
//Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /D NDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG
//Flags used by the compiler during Release with Debug Info builds.
//
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /D NDEBUG
//Libraries linked by defalut with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
//C compiler
CMAKE_C_COMPILER:STRING=cl
//Flags for C compiler.
CMAKE_C_FLAGS:STRING= /DWIN32 /D_WINDOWS /W3 /Zm1000
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /GZ
//Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /D NDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG
//Flags used by the compiler during Release with Debug Info builds.
//
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /D NDEBUG
//Libraries linked by defalut with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL:YES
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL:YES
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files/ImageViewer
//make program
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MIAF9D~1/Common/MSDev98/Bin/MSDEV.COM
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386
//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL:YES
//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL:YES
//RC compiler
CMAKE_RC_COMPILER:STRING=rc
//Flags for Fortran compiler.
CMAKE_RC_FLAGS:STRING=' '
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386
//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL:YES
//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL:YES
//If set, runtime paths are not added when using shared libraries.
//
CMAKE_SKIP_RPATH:BOOL=OFF
//If true, cmake will use relative paths in makefiles and projects.
//
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF
//Single output directory for building all executables.
EXECUTABLE_OUTPUT_PATH:PATH=
//The directory containing FLTKConfig.cmake. This is either the
// root of the build tree, or PREFIX/lib/fltk for an installation.
//
FLTK_DIR:PATH=C:/fltk-1.1.7
//Fluid executable
FLTK_FLUID_EXECUTABLE:FILEPATH=C:/fltk-1.1.7/fluid/fluidd.exe
//The directory containing ITKConfig.cmake. This is either the
// root of the build tree, or PREFIX/lib/InsightToolkit for an
// installation.
ITK_DIR:PATH=C:/InsightToolkit-2.8.1
//Value Computed by CMake
ImageViewer_BINARY_DIR:STATIC=C:/InsightToolkit-2.8.1/2D/AppImageViewer/binaries
//Value Computed by CMake
ImageViewer_SOURCE_DIR:STATIC=C:/InsightToolkit-2.8.1/2D/AppImageViewer
//Single output directory for building all libraries.
LIBRARY_OUTPUT_PATH:PATH=
########################
# INTERNAL cache entries
########################
//Advanced flag for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//What is the target build tool cmake is generating for.
CMAKE_BUILD_TOOL:INTERNAL=C:/PROGRA~1/MIAF9D~1/Common/MSDev98/Bin/MSDEV.COM
//This is the directory where this CMakeCahe.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/InsightToolkit-2.8.1/2D/AppImageViewer/binaries
//Major version of cmake used to create the current loaded cache
//
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
//Minor version of cmake used to create the current loaded cache
//
CMAKE_CACHE_MINOR_VERSION:INTERNAL=4
//Major version of cmake used to create the current loaded cache
//
CMAKE_CACHE_RELEASE_VERSION:INTERNAL=patch 3
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake 2.4/bin/cmake.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake 2.4/bin/ctest.exe
//Advanced flag for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
CMAKE_CXX_COMPILER_WORKS:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_STANDARD_LIBRARIES
CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
CMAKE_C_COMPILER_WORKS:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_STANDARD_LIBRARIES
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake 2.4/bin/CMakeSetup.exe
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
//
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 6
//Start directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/InsightToolkit-2.8.1/2D/AppImageViewer
//Advanced flag for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
//
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
//
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=1
//noop for ranlib
CMAKE_RANLIB:INTERNAL=:
//Advanced flag for variable: CMAKE_RC_COMPILER
CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
CMAKE_RC_COMPILER_WORKS:INTERNAL=1
//Advanced flag for variable: CMAKE_RC_FLAGS
CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Program Files/CMake 2.4/share/CMake
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
//
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
//
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Result of TRY_RUN
CMAKE_SIZEOF_VOID_P:INTERNAL=4
//Advanced flag for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_USE_RELATIVE_PATHS
CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Extra libraries for fltk_images library.
FLTK_IMAGES_LIBS:INTERNAL=fltk_jpeg;fltk_png;fltk_zlib
//Result of TRY_COMPILE
HAVE_CMAKE_SIZEOF_VOID_P:INTERNAL=TRUE
Best regards,
Zheying
-----Original Message-----
From: Wu Zheying
Sent: Tue 2/20/2007 4:46 PM
To: insight-users at itk.org
Subject: Problems with Cmake and ImageViewer application
Hi all,
I am trying out the image viewer application. I have built FLTK already and ITK already, and everything seems to be running ok. But I am experiencing the following errors when configuring using CMAKE:
CMake Error: Cannot find source file
"C:/InsightToolkit-2.8.1/2D/AppImageViewer/ImageViewer.cxx;C:/InsightToolkit-2.8.1/2D/
AppImageViewer/binaries/ImageViewerGUI.cxx for target "ImageViewer"
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .h++ .hm .hpp .hxx .in .txx
Can anyone help me on this? Thanks in advance.
I am also attaching my cMakeList code below:
PROJECT(ImageViewer)
#IF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )
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})
ELSE (FLTK_FOUND)
MESSAGE( FATAL_ERROR "This application requires FLTK. One of these
components is missing. Please verify configuration")
ENDIF (FLTK_FOUND)
#ENDIF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )
INCLUDE_DIRECTORIES (
${ImageViewer_SOURCE_DIR}/Auxiliary/FltkImageViewer
)
LINK_LIBRARIES (
ITKBasicFilters
ITKIO
ITKFltkImageViewer
)
SET(ImageViewer_GUI_SRCS
ImageViewerGUI.fl
)
FLTK_WRAP_UI( ImageViewer ${ImageViewer_GUI_SRCS} )
#ITK_DISABLE_FLTK_GENERATED_WARNINGS("${ImageViewer_GUI_SRCS}")
SET ( ImageViewer_SRCS
ImageViewer.cxx
${ImageViewer_FLTK_UI_SRCS}
)
ADD_EXECUTABLE( ImageViewer "${ImageViewer_SRCS}" )
Regards
Zheying
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070221/c43c4ce3/attachment.html
More information about the Insight-users
mailing list