Okay: I got it working by using qt4_generate_moc :) I am not sure it is the cleanest way. Fixing the "set(CMAKE_AUTOMOC ON)" abort will probably the cleanest.. Thank you for your help again! :)
Best Regards, Laszlo Papp cmake_minimum_required(VERSION 2.8) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) find_package(Qt4) include_directories( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) qt4_generate_moc(main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.moc) set(test_SRCS main.cpp main.moc ) add_executable(test ${test_SRCS}) target_link_libraries(test ${QT_QTCORE_LIBRARY}) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake