mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Convert QMake projects to CMake.
This commit is contained in:
+2
-1
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8)
|
||||
# builds and packages programs that use WebODF.
|
||||
|
||||
# Find installed dependencies
|
||||
ENABLE_TESTING()
|
||||
find_package(Qt4 COMPONENTS QtWebKit QtXml)
|
||||
|
||||
# Tools must be obtained to work with:
|
||||
include (ExternalProject)
|
||||
@@ -65,3 +65,4 @@ ExternalProject_Add(
|
||||
set(JSCOVERAGE ${CMAKE_BINARY_DIR}/JSCoverage-prefix/src/JSCoverage/jscoverage)
|
||||
|
||||
add_subdirectory(webodf)
|
||||
add_subdirectory(programs)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
if(QT4_FOUND)
|
||||
add_subdirectory(qtjsruntime)
|
||||
add_subdirectory(nativeQtClient)
|
||||
endif(QT4_FOUND)
|
||||
@@ -0,0 +1,27 @@
|
||||
include(${QT_USE_FILE})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${QT_QTCORE_INCLUDE_DIR})
|
||||
include_directories(/usr/include/minizip)
|
||||
QT4_WRAP_CPP(NATIVEQTCLIENT_MOC
|
||||
mainwindow.h
|
||||
zipnetworkreply.h
|
||||
odfview.h
|
||||
odfcontainer.h
|
||||
odf.h
|
||||
odfnetworkaccessmanager.h
|
||||
odfpage.h
|
||||
odftohtmlconverter.h)
|
||||
QT4_WRAP_UI(NATIVEQTCLIENT_UI mainwindow.ui)
|
||||
QT4_ADD_RESOURCES(NATIVEQTCLIENT_RES ../../webodf/application.qrc)
|
||||
add_executable(nativeQtClient
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
zipnetworkreply.cpp
|
||||
odfview.cpp
|
||||
odfcontainer.cpp
|
||||
odf.cpp
|
||||
odfnetworkaccessmanager.cpp
|
||||
odfpage.cpp
|
||||
odftohtmlconverter.cpp ${NATIVEQTCLIENT_MOC} ${NATIVEQTCLIENT_UI}
|
||||
${NATIVEQTCLIENT_RES})
|
||||
|
||||
target_link_libraries(nativeQtClient ${QT_LIBRARIES} quazip)
|
||||
@@ -1,17 +1,16 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "odfview.h"
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QFileSystemModel>
|
||||
#include <QtGui/QTreeView>
|
||||
#include <QtGui/QDockWidget>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QFileSystemModel>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QTreeView>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QSettings>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QSettings>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# -------------------------------------------------
|
||||
# Project created by QtCreator 2010-06-17T17:22:51
|
||||
# -------------------------------------------------
|
||||
QT += network \
|
||||
script \
|
||||
scripttools \
|
||||
webkit \
|
||||
xml \
|
||||
xmlpatterns \
|
||||
testlib
|
||||
TARGET = nativeQtClient
|
||||
INCLUDEPATH += /usr/include/minizip
|
||||
RESOURCES = ../webodf/application.qrc
|
||||
LIBS += -lquazip
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
zipnetworkreply.cpp \
|
||||
odfview.cpp \
|
||||
odfcontainer.cpp \
|
||||
odf.cpp \
|
||||
odfnetworkaccessmanager.cpp \
|
||||
odfpage.cpp \
|
||||
odftohtmlconverter.cpp
|
||||
HEADERS += mainwindow.h \
|
||||
zipnetworkreply.h \
|
||||
odfview.h \
|
||||
odfcontainer.h \
|
||||
odf.h \
|
||||
odfnetworkaccessmanager.h \
|
||||
odfpage.h \
|
||||
odftohtmlconverter.h
|
||||
FORMS += mainwindow.ui
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <QtWebKit/QWebView>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QDomDocument>
|
||||
#include <QtXml/QDomDocument>
|
||||
#include <quazip/quazip.h>
|
||||
#include <quazip/quazipfile.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ODFTOHTMLCONVERTER_H
|
||||
#define ODFTOHTMLCONVERTER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class QWebPage;
|
||||
class Odf;
|
||||
|
||||
@@ -80,5 +80,3 @@ OdfView::slotLoadFinished(bool ok) {
|
||||
QVariant out = frame->evaluateJavaScript(js);
|
||||
qDebug() << out;
|
||||
}
|
||||
|
||||
#include "moc_odfview.cpp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ZIPNETWORKREPLY_H
|
||||
#define ZIPNETWORKREPLY_H
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
||||
class OdfContainer;
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
include(${QT_USE_FILE})
|
||||
QT4_WRAP_CPP(QTJSRUNTIME_MOC nam.h pagerunner.h nativeio.h)
|
||||
add_executable(qtjsruntime qtjsruntime.cpp ${QTJSRUNTIME_MOC})
|
||||
target_link_libraries(qtjsruntime ${QT_LIBRARIES})
|
||||
@@ -1,13 +0,0 @@
|
||||
######################################################################
|
||||
# Automatically generated by qmake (2.01a) Wed Nov 10 23:58:49 2010
|
||||
######################################################################
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET =
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
QT += webkit network
|
||||
|
||||
# Input
|
||||
HEADERS += pagerunner.h nam.h nativeio.h
|
||||
SOURCES += qtjsruntime.cpp
|
||||
Reference in New Issue
Block a user