|
Notes |
|
|
(0007949)
|
|
Isaac Clerencia
|
|
2007-06-27 12:55
|
|
My "fix" has been to change the inner loop in qt4_automoc to: GET_filename_component(_basename ${_current_MOC} NAME_WE)
SET(_header ${_abs_PATH}/${_basename}.h)
SET(_moc ${_abs_PATH}/${_basename}.moc)
ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_moc_INCS} ${_header} -o ${_moc}
DEPENDS ${_header}
) |
|
|
|
(0008038)
|
|
Alex Neundorf
|
|
2007-07-12 10:04
|
|
With your change the moc files are generated in the source directory. This breaks out-of-source builds (you can have multiple out-of-source builds for one source tree).
You can exclude one of the two files from automoc by generating the moc file for it explicitely:
qt4_generate_moc(event/base.h ${CMAKE_CURRENT_BINARY_DIR}/moc_event_base.cpp)
and add this moc_event_base.cpp to the sources of your target.
Alex
|
|
|
|
(0008072)
|
|
Isaac Clerencia
|
|
2007-07-15 10:20
|
|
Ok, I'll use that.
Anyway, if I have sources in dir/ and more sources in dir/subdir/, and I add an executable in dir like:
add_executable(foo foo.c subdir/bar.c)
in the builddir I get a "CMakefiles/foo.dir/" which includes a "subdir/" directory where the bar.o object ends up.
Wouldn't make sense for qt4_automoc to behave the same way and use a subdir in the build directory?
Best regards |
|
|
|
(0013870)
|
|
Alex Neundorf
|
|
2008-10-13 19:21
|
|
Assigning this to Clinton, since he is maintaining FindQt4.cmake
Alex
|
|
|
|
(0013879)
|
|
Clinton Stimpson
|
|
2008-10-14 17:24
|
|
|
Can you please post an example that demonstrates the problem? |
|
|
|
(0041373)
|
|
Kitware Robot
|
|
2016-06-10 14:27
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|