View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001117CMakepublic2004-08-27 20:202005-07-14 15:25
ReporterFliipe Sousa 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001117: QT_WRAP_CPP create files in the wrong place
DescriptionI have the fallowing directory structure

/build/
/CMakeLists.txt
/main.cc
/subdir/view.h
/subdir/view.cc

and this is what I have in CMakeLists.txt

PROJECT(xyz)
FIND_PACKAGE(Qt)
QT_WRAP_CPP(xyz MocSources subdir/view.h)
ADD_EXECUTABLE(xyz ${MocSources} subdir/view.cc main.cc)
ADD_DEFINITIONS(${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(xyz ${QT_LIBRARIES})

When I run make in build directory, the generated Makefile instructs
moc to generate moc_view.cxx in /build directory instead of
/build/subdir. The view.cc is compiled in the right place
(subdir/view.o) as moc_view.cxx should be

$ cd build
$ make
Building QT Wrapped File /home/natros/xyz/build/moc_view.cxx...
Building dependencies cmake.check_depends...
Building object file moc_view.o...
Building object file subdir/view.o...
Building object file main.o...
Building executable /home/natros/xyz/cmakebug/build/xyz...
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0002666)
Bill Hoffman (manager)
2005-07-14 15:25

Please try this in 2.2.0.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team