Merge branch 'build-refactor' into maybe-omemo

This commit is contained in:
vae 2021-05-11 23:05:27 +03:00
commit f94c3dac14
31 changed files with 366 additions and 420 deletions

View file

@ -1,31 +1,23 @@
cmake_minimum_required(VERSION 3.0)
project(squawkWidgets)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Instruct CMake to create code from Qt designer ui files
set(CMAKE_AUTOUIC ON)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED COMPONENTS Widgets Core)
target_sources(squawk PRIVATE
account.cpp
account.h
account.ui
accounts.cpp
accounts.h
accounts.ui
chat.cpp
chat.h
conversation.cpp
conversation.h
conversation.ui
joinconference.cpp
joinconference.h
joinconference.ui
newcontact.cpp
newcontact.h
newcontact.ui
room.cpp
room.h
)
add_subdirectory(vcard)
set(squawkWidgets_SRC
conversation.cpp
chat.cpp
room.cpp
newcontact.cpp
accounts.cpp
account.cpp
joinconference.cpp
)
add_library(squawkWidgets STATIC ${squawkWidgets_SRC})
# Use the Widgets module from Qt 5.
target_link_libraries(squawkWidgets vCardUI)
target_link_libraries(squawkWidgets squawkUIUtils)
target_link_libraries(squawkWidgets Qt5::Widgets)
qt5_use_modules(squawkWidgets Core Widgets)

View file

@ -30,7 +30,7 @@
#include <QDesktopServices>
#include "shared/message.h"
#include "order.h"
#include "shared/order.h"
#include "ui/models/account.h"
#include "ui/models/roster.h"
#include "ui/utils/flowlayout.h"

View file

@ -1,22 +1,9 @@
cmake_minimum_required(VERSION 3.0)
project(vCardUI)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Instruct CMake to create code from Qt designer ui files
set(CMAKE_AUTOUIC ON)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
set(vCardUI_SRC
vcard.cpp
target_sources(squawk PRIVATE
emailsmodel.cpp
emailsmodel.h
phonesmodel.cpp
)
# Tell CMake to create the helloworld executable
add_library(vCardUI STATIC ${vCardUI_SRC})
# Use the Widgets module from Qt 5.
target_link_libraries(vCardUI Qt5::Widgets)
phonesmodel.h
vcard.cpp
vcard.h
vcard.ui
)