Hi,<br><br>I have a Qt4 program that I&#39;m working on and ran into an issue yesterday with the automoc cpp files.  I had added a new slot and connected a comboxbox currentIndexChanged signal to it but when I ran the program I could see messages on stdout complaining that my slot didn&#39;t exist.  I tracked the problem down to the fact that the moc_ctrlBasic.cpp file was not being regenerated.  If I look in my cmake build directory I currently have 8 moc cpp files:<br>
<br>./moc_ctrlBasic.cpp<br>./moc_ctrlmenu.cpp<br>./moc_infoWin.cpp<br>./moc_qglDisplay.cpp<br>./moc_qglMultiWindow.cpp<br>./moc_qglWindow.cpp<br>./moc_videoGeneric.cpp<br>./yuv_player_automoc.cpp<br><br>I am using CMake 2.8.10.1 with Visual Studio 11 and when I do a clean solution these 8 moc cpp files are not deleted.  In order to get my new slot recognised I had to manually delete these moc files and then after a rebuild everything worked as expected.  None of my cpp files #include &quot;moc_xxx.cpp&quot; but that isn&#39;t necessary from my reading of the AUTOMOC property (i.e. ctrlBasic.cpp only does a #include &quot;ctrlBasic.h&quot;).  What am I doing wrong in my CMakeLists.txt file which looks like this:<br>

<br>cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)<br><br>project(yuv_player)<br><br>find_package(OpenGL REQUIRED)<br><br>find_package(Qt4 REQUIRED)<br>set(QT_USE_QTMAIN true)<br>set(QT_USE_QTOPENGL true)<br>include(${QT_USE_FILE})<br>

<br>set(CMAKE_AUTOMOC true)<br><br>if (MSVC)<br>    add_definitions(/MP)        # build in parallel<br>    # disable the security warnings for fopen, scanf etc.<br>    add_definitions(/D&quot;_CRT_SECURE_NO_WARNINGS&quot; /D&quot;_SCL_SECURE_NO_WARNINGS&quot;)<br>

endif()<br><br>set(sources<br>    main.cpp <br>    yuv_tools.cpp<br>    ctrlMenu/ctrlBasic.cpp<br>    ctrlMenu/ctrlmenu.cpp<br>    multiWindow/qglMultiWindow.cpp<br>    multiWindow/qglDisplay.cpp<br>    multiWindow/qglWindow.cpp<br>

    utils/readYuv.cpp<br>    utils/readOut2.cpp<br>    video_tools.cpp<br>    ctrlMenu/infoWin.cpp<br>    videoGeneric.cpp<br>)<br><br>set(headers <br>    yuv_tools.h<br>    ctrlMenu/ctrlBasic.h<br>    ctrlMenu/ctrlmenu.h<br>

    ctrlMenu/infoWin.h<br>    multiWindow/qglDisplay.h<br>    multiWindow/qglMultiWindow.h<br>    multiWindow/qglWindow.h<br>    utils/readYuv.h<br>    utils/readOut2.h<br>    video_tools.h<br>    ctrlMenu/infoWin.h<br>    videoGeneric.h<br>

    defs.h<br>)<br><br>include_directories(<br>    .<br>    multiWindow<br>    ctrlMenu<br>)<br><br>add_executable(yuv_player WIN32 ${sources} ${headers})<br><br>target_link_libraries(yuv_player ${QT_LIBRARIES} ${OPENGL_LIBRARIES})<br>

<br>--<br>Glenn<br><br>