[Insight-users] Unknown CMake command "ADD_GUI_EXECUTABLE" error when isolating GaussianFilter outside InsightApplications
anna han wan
anna.han.wan at gmail.com
Sat Jun 29 14:12:17 EDT 2013
Dear itk users,
I try to isolate GaussianFilter from InsightApplications following the
instructions Mr. Luis has given in the following link:
http://public.kitware.com/pipermail/insight-users/2003-December/005780.html
I manage to isolate and build successfully FltkImageViewer outside
however when I configure GaussianFilter using
Cmake I get the following error:
Found FLTK:
C:/Tools/FLTK/FLTK_Bin/lib/Debug/fltkimagesd.lib;C:/Tools/FLTK/FLTK_Bin/lib/Debug/fltkformsd.lib;C:/Tools/FLTK/FLTK_Bin/lib/Debug/fltkgld.lib;opengl32;C:/Tools/FLTK/FLTK_Bin/lib/Debug/fltkd.lib
CMake Error at CMakeLists.txt:55 (ADD_GUI_EXECUTABLE):
Unknown CMake command "ADD_GUI_EXECUTABLE".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
FLTK_WRAP_UI was called with a target that was never created:
GaussianFilter. The problem was found while processing the source
directory: C:/Mycodes/GaussianFilter. This FLTK_WRAP_UI call will be
ignored.
FLTK_WRAP_UI was called with a target that was never created:
GaussianFilter2D. The problem was found while processing the source
directory: C:/Mycodes/GaussianFilter. This FLTK_WRAP_UI call will be
ignored.
Configuring incomplete, errors occurred!
Please can someone help, I don’t understand the origin of the above
error as I have well configured all fltk inputs (FLTK_BASE_LIBRARY,
FLTK_FLUID_EXECUTABLE,...).
Attached is my CMakeLists file.
Regards,
Anna.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130629/849eb31b/attachment.htm>
-------------- next part --------------
PROJECT(GaussianFilter)
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)
INCLUDE_DIRECTORIES(
${FltkImageViewer_SOURCE_DIR}
${FltkImageViewer_BINARY_DIR}
${GaussianFilter_SOURCE_DIR}
${GaussianFilter_BINARY_DIR}
)
SET(GaussianFilter_SRCS
liFilterConsole.cxx
liFilterConsoleBase.cxx
GaussianFilter.cxx
)
SET(GaussianFilter2D_SRCS
liFilterConsole2D.cxx
liFilterConsole2DBase.cxx
GaussianFilter2D.cxx
)
FLTK_WRAP_UI(GaussianFilter liFilterConsoleGUI.fl)
FLTK_WRAP_UI(GaussianFilter2D liFilterConsole2DGUI.fl)
SET(GaussianFilter_SRCS
${GaussianFilter_SRCS}
${GaussianFilter_FLTK_UI_SRCS}
)
SET(GaussianFilter2D_SRCS
${GaussianFilter2D_SRCS}
${GaussianFilter2D_FLTK_UI_SRCS}
)
ADD_GUI_EXECUTABLE(GaussianFilter "${GaussianFilter_SRCS}")
ADD_GUI_EXECUTABLE(GaussianFilter2D "${GaussianFilter2D_SRCS}")
ITK_DISABLE_FLTK_GENERATED_WARNINGS(GaussianFilter.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsoleGUI.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole2D.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole2DGUI.cxx)
TARGET_LINK_LIBRARIES(GaussianFilter ITKFltkImageViewer ITKIO ITKBasicFilters)
TARGET_LINK_LIBRARIES(GaussianFilter2D ITKFltkImageViewer ITKIO ITKBasicFilters)
More information about the Insight-users
mailing list