Verified Commit bef7a520 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Restructure project

parent de240d92
......@@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.8.12)
set(KF5_MIN_VERSION "5.18.0")
set(QT_MIN_VERSION "5.5.0")
option(BUILD_TESTING "Build test programs" ON)
option(BUILD_WEBAPP_CONTAINER "Build webapp container" ON)
################# Disallow in-source build #################
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
......@@ -30,7 +33,7 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
################# Find dependencies #################
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2 Sql)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 Purpose I18n Config CoreAddons)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 Purpose I18n)
# Necessary to support QtWebEngine installed in a different prefix than the rest of Qt (e.g flatpak)
find_package(Qt5WebEngine REQUIRED)
......@@ -45,6 +48,9 @@ add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
if (BUILD_WEBAPP_CONTAINER)
add_subdirectory(angelfish-webapp)
endif()
install(PROGRAMS org.kde.mobile.angelfish.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.kde.mobile.angelfish.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
......
find_package(KF5 REQUIRED COMPONENTS Config CoreAddons)
set(angelfish_webapp_SRCS
main.cpp
../src/browsermanager.cpp
../src/bookmarkshistorymodel.cpp
../src/dbmanager.cpp
../src/iconimageprovider.cpp
../src/sqlquerymodel.cpp
../src/urlutils.cpp
../src/useragent.cpp
../src/tabsmodel.cpp
webapp-resources.qrc
../src/resources.qrc
)
add_executable(angelfish-webapp ${angelfish_webapp_SRCS} ${RESOURCES} ${WEBAPP_RESOURCES})
target_include_directories(angelfish-webapp PRIVATE ../src/)
target_link_libraries(angelfish-webapp
Qt5::Core
Qt5::Qml
Qt5::Quick
Qt5::Sql
Qt5::Svg
Qt5::WebEngine
KF5::I18n
KF5::CoreAddons
KF5::ConfigCore
KF5::ConfigGui
)
install(TARGETS angelfish-webapp ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
<RCC>
<qresource prefix="/">
<file alias="webapp.qml">contents/ui/webapp.qml</file>
<file alias="WebAppView.qml">contents/ui/WebAppView.qml</file>
</qresource>
</RCC>
......@@ -16,32 +16,3 @@ add_executable(angelfish ${angelfish_SRCS} ${RESOURCES})
target_link_libraries(angelfish Qt5::Core Qt5::Qml Qt5::Quick Qt5::Sql Qt5::Svg Qt5::WebEngine KF5::I18n)
install(TARGETS angelfish ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
set(angelfish_webapp_SRCS
webappmain.cpp
browsermanager.cpp
bookmarkshistorymodel.cpp
dbmanager.cpp
iconimageprovider.cpp
sqlquerymodel.cpp
urlutils.cpp
useragent.cpp
tabsmodel.cpp
)
qt5_add_resources(WEBAPP_RESOURCES webapp-resources.qrc)
add_executable(angelfish-webapp ${angelfish_webapp_SRCS} ${RESOURCES} ${WEBAPP_RESOURCES})
target_link_libraries(angelfish-webapp
Qt5::Core
Qt5::Qml
Qt5::Quick
Qt5::Sql
Qt5::Svg
Qt5::WebEngine
KF5::I18n
KF5::CoreAddons
KF5::ConfigCore
KF5::ConfigGui)
install(TARGETS angelfish-webapp ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
<RCC>
<qresource prefix="/">
<file alias="webapp.qml">contents/webapp-ui/webapp.qml</file>
<file alias="WebAppView.qml">contents/webapp-ui/WebAppView.qml</file>
</qresource>
</RCC>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment