# HG changeset patch # User Teemu Piippo # Date 1441541940 -10800 # Node ID cb6b3625adf4c58ab9e55bd03d3b8dd8d6e22513 # Parent 8e1265119324b5fbb5151b5ee4f478e120e748a7 Use automoc so that it compiles again... diff -r 8e1265119324 -r cb6b3625adf4 CMakeLists.txt --- a/CMakeLists.txt Sun Sep 06 15:14:27 2015 +0300 +++ b/CMakeLists.txt Sun Sep 06 15:19:00 2015 +0300 @@ -182,21 +182,22 @@ endif() if (USE_QT5) - qt5_generate_moc (LDFORGE_MOC ${LDFORGE_HEADERS}) qt5_add_resources (LDFORGE_QRC ${LDFORGE_RESOURCES}) qt5_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS}) - add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_MOC} + add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_QRC} ${LDFORGE_FORMS_HEADERS} ${CMAKE_BINARY_DIR}/configurationvaluebag.cpp) else() - qt4_wrap_cpp (LDFORGE_MOC ${LDFORGE_HEADERS}) qt4_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS}) qt4_add_resources (LDFORGE_RCC ${LDFORGE_RESOURCES}) - add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_RCC} - ${LDFORGE_FORMS_HEADERS} ${LDFORGE_MOC} + add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_RCC} + ${LDFORGE_FORMS_HEADERS} ${LDFORGE_HEADERS} ${CMAKE_BINARY_DIR}/configurationvaluebag.cpp) endif() +set_source_files_properties (${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE) +set_target_properties (ldforge PROPERTIES AUTOMOC 1) + if (USE_QT5) target_link_libraries (ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) else()