public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/c-portage:terietor_interegation commit in: src/, src/Qt/tests/, src/Qt/
@ 2011-10-11 11:55 Theofilos Intzoglou
  0 siblings, 0 replies; only message in thread
From: Theofilos Intzoglou @ 2011-10-11 11:55 UTC (permalink / raw
  To: gentoo-commits

commit:     ae40b3bc70886a26f6ec26fba31c30f23270ca8c
Author:     Theofilos Intzoglou <int.teo <AT> gmail <DOT> com>
AuthorDate: Tue Oct 11 11:55:11 2011 +0000
Commit:     Theofilos Intzoglou <int.teo <AT> gmail <DOT> com>
CommitDate: Tue Oct 11 11:55:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/c-portage.git;a=commit;h=ae40b3bc

A couple of fixes on the CMakeLists and change the test programs to use QCoreApplication instead of QApplication as GUI isn't necessary for the tests

---
 src/CMakeLists.txt                       |    3 +-
 src/Qt/CMakeLists.txt                    |    7 +++--
 src/Qt/qpackageproperties.h              |    1 -
 src/Qt/tests/CMakeLists.txt              |   34 ++---------------------------
 src/Qt/tests/qpackageproperties_test.cpp |   11 ++-------
 src/Qt/tests/qportagesettings_test.cpp   |   10 ++------
 6 files changed, 15 insertions(+), 51 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 22e27c7..3fb5b8b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,8 +8,9 @@ set(c-portage_SRCS dataconnect.c dict.c flag.c interpreter.c packageproperties.c
 set(c-portage_HDRS dataconnect.h dict.h flag.h internal.h interpreter.h packageproperties.h stringlist.h)
 
 add_library(c-portage SHARED ${c-portage_SRCS})
+target_link_libraries(c-portage ${PYTHON_LIBRARY})
 add_executable(tester tester.c)
-target_link_libraries(tester c-portage ${PYTHON_LIBRARY})
+target_link_libraries(tester c-portage)
 
 install(TARGETS c-portage DESTINATION lib)
 install(FILES ${c-portage_HDRS} DESTINATION include/c-portage)

diff --git a/src/Qt/CMakeLists.txt b/src/Qt/CMakeLists.txt
index 3159bfc..b2849e8 100644
--- a/src/Qt/CMakeLists.txt
+++ b/src/Qt/CMakeLists.txt
@@ -2,12 +2,13 @@ find_package(Qt4 REQUIRED)
 include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
 remove_definitions(-std=c99)
 
-set(cpp-portage_SRCS qportagesettings.cpp qpackageproperties.cpp)
-set(cpp-portage_HDRS qportagesettings.h qpackageproperties.h)
+set(cpp-portage_SRCS qportagesettings.cpp qpackageproperties.cpp qlistconverter.cpp)
+set(cpp-portage_HDRS qportagesettings.h qpackageproperties.h qlistconverter.h)
 
 QT4_WRAP_CPP(cpp-portage_MOC_SRCS ${cpp-portage_HDRS})
 
-add_library(cpp-portage qportagesettings.cpp ${cpp-portage_MOC_SRCS})
+add_library(cpp-portage SHARED qportagesettings.cpp ${cpp-portage_MOC_SRCS})
+target_link_libraries(cpp-portage c-portage ${QT_QTCORE_LIBRARY})
 
 install(TARGETS cpp-portage DESTINATION lib)
 install(FILES ${cpp-portage_HDRS} DESTINATION include/cpp-portage)

diff --git a/src/Qt/qpackageproperties.h b/src/Qt/qpackageproperties.h
index cfec142..fcda875 100644
--- a/src/Qt/qpackageproperties.h
+++ b/src/Qt/qpackageproperties.h
@@ -1,7 +1,6 @@
 #ifndef QPACKAGEPROPERTIES_H
 #define QPACKAGEPROPERTIES_H
 
-
 #include <QObject>
 #include "../packageproperties.h"
 

diff --git a/src/Qt/tests/CMakeLists.txt b/src/Qt/tests/CMakeLists.txt
index 9c10387..a2b1e28 100644
--- a/src/Qt/tests/CMakeLists.txt
+++ b/src/Qt/tests/CMakeLists.txt
@@ -1,34 +1,6 @@
-find_package(Qt4 REQUIRED)
-include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR})
-remove_definitions(-std=c99)
-
-set(cpp-portage-tests_SRCS qlistconverter_test.cpp qpackageproperties_test.cpp qportagesettings_test.cpp )
-
 add_executable(QtWrapperTest test.cpp)
+target_link_libraries(QtWrapperTest cpp-portage)
 add_executable(QPackagepropertiesTest qpackageproperties_test.cpp)
+target_link_libraries(QPackagepropertiesTest cpp-portage)
 add_executable(QPortagesettingsTest qportagesettings_test.cpp)
-
-
-set(test_EXECS QtWrapperTest QPackagepropertiesTest QPortagesettingsTest)
-target_link_libraries(QtWrapperTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-target_link_libraries(QPackagepropertiesTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-target_link_libraries(QPortagesettingsTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-
-install(TARGETS QtWrapperTest QPackagepropertiesTest QPortagesettingsTest DESTINATION lib)
-
-
-
-#include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
-#remove_definitions(-std=c99)
-
-#set(cpp-portage_SRCS qportagesettings.cpp)
-#set(cpp-portage_HDRS qportagesettings.h)
-
-#QT4_WRAP_CPP(cpp-portage_MOC_SRCS ${cpp-portage_HDRS})
-
-#add_library(cpp-portage qportagesettings.cpp ${cpp-portage_MOC_SRCS})
-
-#install(TARGETS cpp-portage DESTINATION lib)
-#install(FILES ${cpp-portage_HDRS} DESTINATION include/cpp-portage)
-
-#add_subdirectory(tests)
\ No newline at end of file
+target_link_libraries(QPortagesettingsTest cpp-portage)

diff --git a/src/Qt/tests/qpackageproperties_test.cpp b/src/Qt/tests/qpackageproperties_test.cpp
index efde5e7..b7e99ac 100644
--- a/src/Qt/tests/qpackageproperties_test.cpp
+++ b/src/Qt/tests/qpackageproperties_test.cpp
@@ -1,14 +1,9 @@
-#include <QApplication>
+#include <QCoreApplication>
 #include <QDebug>
+#include <QStringList>
 
 #include "../qpackageproperties.h"
-#include "../qpackageproperties.cpp"
 #include "../qlistconverter.h"
-#include "../qlistconverter.cpp"
-#include <QStringList>
-namespace CppPortage {
-class QPackageProperties;
-}
 
 using namespace CppPortage;
 
@@ -27,6 +22,6 @@ void test() {
 int main(int argc, char *argv[])
 {
     test();
-    QApplication app(argc, argv);
+    QCoreApplication app(argc, argv);
     return app.exec();
 }
\ No newline at end of file

diff --git a/src/Qt/tests/qportagesettings_test.cpp b/src/Qt/tests/qportagesettings_test.cpp
index ba24df7..da02903 100644
--- a/src/Qt/tests/qportagesettings_test.cpp
+++ b/src/Qt/tests/qportagesettings_test.cpp
@@ -1,13 +1,9 @@
-#include <QApplication>
+#include <QCoreApplication>
 #include <QDebug>
 #include <QStringList>
+
 #include "../qportagesettings.h"
-#include "../qportagesettings.cpp"
 #include "../qlistconverter.h"
-#include "../qlistconverter.cpp"
-namespace CppPortage {
-    class QPortageSettings;
-}
 
 using namespace CppPortage;
 
@@ -32,7 +28,7 @@ void test() {
 int main(int argc, char *argv[])
 {
     test();
-    QApplication app(argc, argv);
+    QCoreApplication app(argc, argv);
 
     return app.exec();
 }



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-11 11:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 11:55 [gentoo-commits] proj/c-portage:terietor_interegation commit in: src/, src/Qt/tests/, src/Qt/ Theofilos Intzoglou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox