- Code: Select all
--- QxOrm_orig/include/QxCommon/QxConfig.h 2012-04-02 09:36:10.000000000 +0200
+++ QxOrm/include/QxCommon/QxConfig.h 2012-05-28 01:02:52.758483483 +0200
@@ -67,7 +67,10 @@
#define _QX_USE_GCC_EXPORT_ALL_SYMBOLS 1
#define _QX_USE_GCC_VISIBILITY 0
#define _QX_USE_ASSERT 1
-#define _QX_ENABLE_QT_GUI_DEPENDENCY 1
+// _QX_ENABLE_QT_GUI_DEPENDENCY: Defined the in configuration.
+#ifndef _QX_ENABLE_QT_GUI_DEPENDENCY
+#error _QX_ENABLE_QT_GUI_DEPENDENCY macro has not defined
+#endif
#define _QX_ENABLE_QT_NETWORK_DEPENDENCY 1
#define _QX_SUPPORT_COVARIANT_RETURN_TYPE 1
#define _QX_USE_QX_SINGLETON_X 1
diff -Naur QxOrm_orig/QxOrm.pri QxOrm/QxOrm.pri
--- QxOrm_orig/QxOrm.pri 2012-01-31 11:10:52.000000000 +0100
+++ QxOrm/QxOrm.pri 2012-05-28 01:07:27.968784535 +0200
@@ -27,11 +27,15 @@
# Qt GUI module dependency #
############################
-# To remove QtGui dependency :
-# 1- in "./include/QxCommon/QxConfig.h" file, modify "_QX_ENABLE_QT_GUI_DEPENDENCY" constant to : "#define _QX_ENABLE_QT_GUI_DEPENDENCY 0"
-# 2- in "./QxOrm.pri" file, add the following line : "QT -= gui"
+# To remove QtGui dependency, uncomment the following line.
+# CONFIG += QX_NO_QT_GUI
-# QT -= gui
+CONFIG(QX_NO_QT_GUI){
+QT -= gui
+DEFINES += _QX_ENABLE_QT_GUI_DEPENDENCY=0
+} else {
+DEFINES += _QX_ENABLE_QT_GUI_DEPENDENCY=1
+}
###############################
# boost Library Configuration #
jduran