[CMake] [Fwd: [Insight-users] Cmake - QT : moc problem]
Hugo Gratama van Andel
h.a.gratamavanandel at amc.uva.nl
Fri Jan 6 03:30:41 EST 2006
Dear CMake users,
I send you a message that appeared on the Itk-user list. I experienced
the same error as described below. CMake 2.2.3 was not able to create
the makefile correctly on a Linux system, while the previous version(s)
of CMake were. Have the semantics of QT_WRAP_CPP changed?
thanks in advance,
Hugo
-------- Original Message --------
Subject: [Insight-users] Cmake - QT : moc problem
Date: Thu, 05 Jan 2006 07:04:52 -0800 (PST)
From: Devalkeneer Arnaud <arnauddebelgique at yahoo.com>
To: insight-users at itk.org
Hi everybody,
I'm currently updating a three months old segmentation
program and I'm very surprised that the compilation
process fails (althought it was succesfull three
months ago). It seems due to a problem with the
QT_WRAP_CPP command from the CMakeLists.txt file.
Actually I get an error like "No rule to build the
target « ATHENA_MOC_SRCS », which is necessary for «
moc_ATHENA_MOC_SRCS.cxx ». Stop." I am wondering: Is
there any change for the command QT_WRAP_CPP from the
version 2.0.6 to 2.2.3 of cmake? -> I did not have
this error three months ago...
When I change the line QT_WRAP_CPP(segment ATHENA_SRCS
ATHENA_MOC_SRCS) into QT_WRAP_CPP(segment Graphic.cxx
Graphic.h) I do not get the last error anymore but no
file "moc_Graphic.o" are builded, which is leading of
course to an executable linkage error...
I have copied the complete CMakeLists.txt file at the
end of this email.
Can you help me to solve this problem, please?
Thanks a lot for your help.
Happy New Year to you.
------------------------------------------------------
Source CMakeLists.txt file :
PROJECT(ATHENA)
INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
INCLUDE(${USE_ITK_FILE})
ENDIF (USE_ITK_FILE)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${QT_INCLUDE_PATH}
)
LINK_LIBRARIES (
ITKIO
${QT_QT_LIBRARY}
)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/./0_Bases
${CMAKE_CURRENT_SOURCE_DIR}/./1_Registration
)
SET(ATHENA_SRCS
main.cxx
mainCalcul.cxx
Graphic.cxx
./0_Bases/Timer.cxx
./1_Registration/PowellOptimizer.cxx
)
SET(ATHENA_MOC_SRCS
Graphic.h
)
IF(QT_WRAP_CPP)
QT_WRAP_CPP(segment ATHENA_SRCS ATHENA_MOC_SRCS)
ENDIF(QT_WRAP_CPP)
ADD_EXECUTABLE(segment ${ATHENA_SRCS})
TARGET_LINK_LIBRARIES(segment
ITKAlgorithms
ITKBasicFilters
ITKCommon
ITKIO
ITKMetaIO
ITKNumerics
itkvnl
itkvnl_algo
itknetlib
vtkRendering
vtkIO
)
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
More information about the CMake
mailing list