Apparently CMake requires the moc files to be compiled separately.. qt4_wrap_cpp does nothing if I don't include the results in the executable... why?

Thu, 22 Aug 2013 20:39:26 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 22 Aug 2013 20:39:26 +0300
changeset 475
1f5ab7410e4d
parent 474
63838461cb72
child 476
baa35b4b67dc

Apparently CMake requires the moc files to be compiled separately.. qt4_wrap_cpp does nothing if I don't include the results in the executable... why?

CMakeLists.txt file | annotate | diff | comparison | revisions
src/addObjectDialog.cpp file | annotate | diff | comparison | revisions
src/colorSelectDialog.cpp file | annotate | diff | comparison | revisions
src/configDialog.cpp file | annotate | diff | comparison | revisions
src/dialogs.cpp file | annotate | diff | comparison | revisions
src/download.cpp file | annotate | diff | comparison | revisions
src/file.cpp file | annotate | diff | comparison | revisions
src/gldraw.cpp file | annotate | diff | comparison | revisions
src/gui.cpp file | annotate | diff | comparison | revisions
src/messagelog.cpp file | annotate | diff | comparison | revisions
src/primitives.cpp file | annotate | diff | comparison | revisions
src/widgets.cpp file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Thu Aug 22 20:28:57 2013 +0300
+++ b/CMakeLists.txt	Thu Aug 22 20:39:26 2013 +0300
@@ -116,7 +116,7 @@
 
 include (${QT_USE_FILE})
 add_definitions (${QT_DEFINITIONS})
-add_executable (ldforge ${LDFORGE_SOURCES} ${LDFORGE_XFORMS} ${LDFORGE_XQRC})
+add_executable (ldforge ${LDFORGE_SOURCES} ${LDFORGE_XFORMS} ${LDFORGE_XQRC} ${LDFORGE_MOC})
 target_link_libraries (ldforge
 	${QT_LIBRARIES}
 	GL
--- a/src/addObjectDialog.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/addObjectDialog.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -34,7 +34,6 @@
 #include "widgets.h"
 #include "misc.h"
 #include "primitives.h"
-#include "moc_addObjectDialog.cxx"
 
 // =============================================================================
 // -----------------------------------------------------------------------------
--- a/src/colorSelectDialog.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/colorSelectDialog.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "misc.h"
 #include "ui_colorsel.h"
-#include "moc_colorSelectDialog.cxx"
 
 static const int g_numColumns = 16;
 static const short g_squareSize = 32;
--- a/src/configDialog.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/configDialog.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -38,7 +38,6 @@
 #include "colorSelectDialog.h"
 #include "gldraw.h"
 #include "ui_config.h"
-#include "moc_configDialog.cxx"
 
 extern_cfg (String, gl_bgcolor);
 extern_cfg (String, gl_maincolor);
--- a/src/dialogs.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/dialogs.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -42,7 +42,6 @@
 #include "ui_openprogress.h"
 #include "ui_extprogpath.h"
 #include "ui_about.h"
-#include "moc_dialogs.cxx"
 
 extern const char* g_extProgPathFilter;
 extern_cfg (String, io_ldpath);
--- a/src/download.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/download.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -26,7 +26,6 @@
 #include "ui_downloadfrom.h"
 #include "types.h"
 #include "gui.h"
-#include "moc_download.cxx"
 #include "file.h"
 #include "gldraw.h"
 
--- a/src/file.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/file.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -33,7 +33,6 @@
 #include "history.h"
 #include "dialogs.h"
 #include "gldraw.h"
-#include "moc_file.cxx"
 
 cfg (String, io_ldpath, "");
 cfg (List, io_recentfiles, {});
--- a/src/gldraw.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/gldraw.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -36,7 +36,6 @@
 #include "dialogs.h"
 #include "addObjectDialog.h"
 #include "messagelog.h"
-#include "moc_gldraw.cxx"
 
 static const struct staticCameraMeta {
 	const char glrotate[3];
--- a/src/gui.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/gui.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -919,4 +919,3 @@
 	return QImage (data, w, h, QImage::Format_ARGB32).rgbSwapped().mirrored();
 }
 
-#include "moc_gui.cxx"
\ No newline at end of file
--- a/src/messagelog.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/messagelog.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -21,7 +21,6 @@
 #include "messagelog.h"
 #include "gldraw.h"
 #include "gui.h"
-#include "moc_messagelog.cxx"
 
 static const unsigned int g_maxMessages = 5;
 static const int g_expiry = 5;
--- a/src/primitives.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/primitives.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -26,7 +26,6 @@
 #include "ui_makeprim.h"
 #include "misc.h"
 #include "colors.h"
-#include "moc_primitives.cxx"
 
 List<PrimitiveCategory> g_PrimitiveCategories;
 static PrimitiveLister* g_activePrimLister = null;
--- a/src/widgets.cpp	Thu Aug 22 20:28:57 2013 +0300
+++ b/src/widgets.cpp	Thu Aug 22 20:39:26 2013 +0300
@@ -30,7 +30,6 @@
 #include <map>
 
 #include "widgets.h"
-#include "moc_widgets.cxx"
 
 // =============================================================================
 // -----------------------------------------------------------------------------

mercurial