Use automoc so that it compiles again...

Sun, 06 Sep 2015 15:19:00 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 06 Sep 2015 15:19:00 +0300
changeset 991
cb6b3625adf4
parent 990
8e1265119324
child 992
5a10b4e7bf4a

Use automoc so that it compiles again...

CMakeLists.txt file | annotate | diff | comparison | revisions
--- 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()

mercurial