aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/Qt/CMakeLists.txt10
2 files changed, 16 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7a39eea..8551779 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,4 +3,9 @@ find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
add_definitions(-std=c99)
add_library(c-portage dataconnect.c dict.c flag.c interpreter.c packageproperties.c portagesettings.c stringlist.c tester.c)
-target_link_libraries(${c-portage} stdlib.h types.h string.h stdio.h) \ No newline at end of file
+
+option(CppPortage "Enable c++ wrapper for c-portage (uses Qt4)")
+
+if (CppPortage)
+ add_subdirectory(Qt)
+endif(CppPortage) \ No newline at end of file
diff --git a/src/Qt/CMakeLists.txt b/src/Qt/CMakeLists.txt
new file mode 100644
index 0000000..2b11759
--- /dev/null
+++ b/src/Qt/CMakeLists.txt
@@ -0,0 +1,10 @@
+find_package(Qt4 REQUIRED)
+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})