Refactor CMakeLists #46

Merged
blue merged 5 commits from vae/squawk:build-refactor into messageFeed 2021-05-11 23:31:59 +00:00
21 changed files with 214 additions and 264 deletions
Showing only changes of commit 6e06a1d5bc - Show all commits

View File

@ -1,52 +1,41 @@
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
project(squawk) project(squawk VERSION 0.1.6 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON) cmake_policy(SET CMP0076 NEW)
cmake_policy(SET CMP0079 NEW)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
include(GNUInstallDirs) add_executable(squawk)
include_directories(.) target_include_directories(squawk PRIVATE ${CMAKE_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
find_package(Qt5Widgets CONFIG REQUIRED) include(GNUInstallDirs)
find_package(Qt5Widgets CONFIG REQUIRED COMPONENTS Widgets DBus Core)
find_package(Qt5LinguistTools) find_package(Qt5LinguistTools)
find_package(Qt5Core CONFIG REQUIRED)
find_package(Qt5Gui CONFIG REQUIRED)
find_package(Qt5Network CONFIG REQUIRED)
find_package(Qt5Xml CONFIG REQUIRED)
find_package(LMDB REQUIRED)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
endif() endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
message("Build type: ${CMAKE_BUILD_TYPE}") message("Build type: ${CMAKE_BUILD_TYPE}")
target_compile_options(squawk PRIVATE
set(squawk_SRC "-Wall;-Wextra"
main.cpp "$<$<CONFIG:DEBUG>:-g>"
exception.cpp "$<$<CONFIG:RELEASE>:-O3>"
signalcatcher.cpp
shared/global.cpp
shared/utils.cpp
shared/message.cpp
shared/vcard.cpp
shared/icons.cpp
shared/messageinfo.cpp
) )
set(squawk_HEAD add_subdirectory(shared)
exception.h
signalcatcher.h
shared.h
shared/enums.h
shared/message.h
shared/global.h
shared/utils.h
shared/vcard.h
shared/icons.h
shared/messageinfo.h
)
configure_file(resources/images/logo.svg squawk.svg COPYONLY) configure_file(resources/images/logo.svg squawk.svg COPYONLY)
execute_process(COMMAND convert -background none -size 48x48 squawk.svg squawk48.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) execute_process(COMMAND convert -background none -size 48x48 squawk.svg squawk48.png WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@ -56,21 +45,22 @@ execute_process(COMMAND convert -background none -size 256x256 squawk.svg squawk
configure_file(packaging/squawk.desktop squawk.desktop COPYONLY) configure_file(packaging/squawk.desktop squawk.desktop COPYONLY)
set(TS_FILES set(TS_FILES
translations/squawk.ru.ts translations/squawk.ru.ts
) )
qt5_add_translation(QM_FILES ${TS_FILES}) qt5_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations ALL DEPENDS ${QM_FILES}) add_custom_target(translations ALL DEPENDS ${QM_FILES})
qt5_use_modules(squawk LINK_PUBLIC Core Widgets)
qt5_add_resources(RCC resources/resources.qrc) qt5_add_resources(RCC resources/resources.qrc)
option(SYSTEM_QXMPP "Use system qxmpp lib" ON) option(SYSTEM_QXMPP "Use system qxmpp lib" ON)
option(WITH_KWALLET "Build KWallet support module" ON) option(WITH_KWALLET "Build KWallet support module" ON)
option(WITH_KIO "Build KIO support module" ON) option(WITH_KIO "Build KIO support module" ON)
if (SYSTEM_QXMPP) if (SYSTEM_QXMPP)
find_package(QXmpp CONFIG) find_package(QXmpp CONFIG)
if (NOT QXmpp_FOUND) if (NOT QXmpp_FOUND)
set(SYSTEM_QXMPP OFF) set(SYSTEM_QXMPP OFF)
message("QXmpp package wasn't found, trying to build with bundled QXmpp") message("QXmpp package wasn't found, trying to build with bundled QXmpp")
@ -85,7 +75,7 @@ endif()
if (WITH_KWALLET) if (WITH_KWALLET)
find_package(KF5Wallet CONFIG) find_package(KF5Wallet CONFIG)
if (NOT KF5Wallet_FOUND) if (NOT KF5Wallet_FOUND)
set(WITH_KWALLET OFF) set(WITH_KWALLET OFF)
message("KWallet package wasn't found, KWallet support module wouldn't be built") message("KWallet package wasn't found, KWallet support module wouldn't be built")
@ -95,12 +85,19 @@ if (WITH_KWALLET)
endif() endif()
endif() endif()
add_executable(squawk ${squawk_SRC} ${squawk_HEAD} ${RCC}) target_sources(squawk PRIVATE ${RCC})
target_link_libraries(squawk Qt5::Widgets) target_link_libraries(squawk PRIVATE Qt5::Widgets)
target_link_libraries(squawk PRIVATE Qt5::DBus)
target_link_libraries(squawk PRIVATE Qt5::Network)
target_link_libraries(squawk PRIVATE Qt5::Gui)
target_link_libraries(squawk PRIVATE Qt5::Xml)
target_link_libraries(squawk PRIVATE qxmpp)
target_link_libraries(squawk PRIVATE lmdb)
target_link_libraries(squawk PRIVATE simpleCrypt)
if (WITH_KIO) if (WITH_KIO)
find_package(KF5KIO CONFIG) find_package(KF5KIO CONFIG)
if (NOT KF5KIO_FOUND) if (NOT KF5KIO_FOUND)
set(WITH_KIO OFF) set(WITH_KIO OFF)
message("KIO package wasn't found, KIO support modules wouldn't be built") message("KIO package wasn't found, KIO support modules wouldn't be built")
@ -116,11 +113,7 @@ add_subdirectory(plugins)
add_subdirectory(external/simpleCrypt) add_subdirectory(external/simpleCrypt)
target_link_libraries(squawk squawkUI) target_link_libraries(squawk PRIVATE uuid)
target_link_libraries(squawk squawkCORE)
target_link_libraries(squawk uuid)
add_dependencies(${CMAKE_PROJECT_NAME} translations) add_dependencies(${CMAKE_PROJECT_NAME} translations)

View File

@ -1,49 +1,34 @@
cmake_minimum_required(VERSION 3.3) target_sources(squawk PRIVATE
project(squawkCORE) account.cpp
account.h
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") adapterFuctions.cpp
archive.cpp
set(CMAKE_AUTOMOC ON) archive.h
conference.cpp
find_package(Qt5Core CONFIG REQUIRED) conference.h
find_package(Qt5Gui CONFIG REQUIRED) contact.cpp
find_package(Qt5Network CONFIG REQUIRED) contact.h
find_package(Qt5Xml CONFIG REQUIRED) main.cpp
find_package(LMDB REQUIRED) networkaccess.cpp
networkaccess.h
set(squawkCORE_SRC rosteritem.cpp
squawk.cpp rosteritem.h
account.cpp signalcatcher.cpp
archive.cpp signalcatcher.h
rosteritem.cpp squawk.cpp
contact.cpp squawk.h
conference.cpp storage.cpp
urlstorage.cpp storage.h
networkaccess.cpp urlstorage.cpp
adapterFuctions.cpp urlstorage.h
handlers/messagehandler.cpp )
handlers/rosterhandler.cpp
)
add_subdirectory(handlers)
add_subdirectory(passwordStorageEngines) add_subdirectory(passwordStorageEngines)
# Tell CMake to create the helloworld executable #if(SYSTEM_QXMPP)
add_library(squawkCORE STATIC ${squawkCORE_SRC}) # get_target_property(QXMPP_INTERFACE_INCLUDE_DIRECTORIES QXmpp::QXmpp INTERFACE_INCLUDE_DIRECTORIES)
# target_include_directories(squawk PRIVATE ${QXMPP_INTERFACE_INCLUDE_DIRECTORIES})
#endif()
if(SYSTEM_QXMPP)
get_target_property(QXMPP_INTERFACE_INCLUDE_DIRECTORIES QXmpp::QXmpp INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(squawkCORE PUBLIC ${QXMPP_INTERFACE_INCLUDE_DIRECTORIES})
endif()
# Use the Widgets module from Qt 5. # Use the Widgets module from Qt 5.
target_link_libraries(squawkCORE Qt5::Core)
target_link_libraries(squawkCORE Qt5::Network)
target_link_libraries(squawkCORE Qt5::Gui)
target_link_libraries(squawkCORE Qt5::Xml)
target_link_libraries(squawkCORE qxmpp)
target_link_libraries(squawkCORE lmdb)
target_link_libraries(squawkCORE simpleCrypt)
if (WITH_KWALLET)
target_link_libraries(squawkCORE kwalletPSE)
endif()

View File

@ -43,7 +43,7 @@
#include <QXmppVCardManager.h> #include <QXmppVCardManager.h>
#include <QXmppMessageReceiptManager.h> #include <QXmppMessageReceiptManager.h>
#include "shared.h" #include "shared/shared.h"
#include "contact.h" #include "contact.h"
#include "conference.h" #include "conference.h"
#include "networkaccess.h" #include "networkaccess.h"

View File

@ -25,7 +25,7 @@
#include <QMimeType> #include <QMimeType>
#include "shared/message.h" #include "shared/message.h"
#include "exception.h" #include "shared/exception.h"
#include <lmdb.h> #include <lmdb.h>
#include <list> #include <list>

View File

@ -0,0 +1,6 @@
target_sources(squawk PRIVATE
messagehandler.cpp
messagehandler.h
rosterhandler.cpp
rosterhandler.h
)

View File

@ -16,18 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "ui/squawk.h" #include "../shared/global.h"
#include "core/squawk.h" #include "../shared/messageinfo.h"
#include "../ui/squawk.h"
#include "signalcatcher.h" #include "signalcatcher.h"
#include "shared/global.h" #include "squawk.h"
#include "shared/messageinfo.h"
#include <QtWidgets/QApplication>
#include <QtCore/QThread>
#include <QtCore/QObject>
#include <QSettings>
#include <QTranslator>
#include <QLibraryInfo> #include <QLibraryInfo>
#include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
#include <QTranslator>
#include <QtCore/QObject>
#include <QtCore/QThread>
#include <QtWidgets/QApplication>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@ -1,37 +1,21 @@
cmake_minimum_required(VERSION 3.3) target_sources(squawk PRIVATE
project(pse) wrappers/kwallet.cpp
kwallet.cpp
blue marked this conversation as resolved
Review

А вот так вот точно нельзя, это должно быть миниатюрной разделяемой библиотекой, я её в рантайме пробую загрузить как плагин

А вот так вот точно нельзя, это должно быть миниатюрной разделяемой библиотекой, я её в рантайме пробую загрузить как плагин
kwallet.h
)
if (WITH_KWALLET) if (WITH_KWALLET)
set(CMAKE_AUTOMOC ON) # get_target_property(KWALLET_INTERFACE_INCLUDE_DIRECTORIES KF5::Wallet INTERFACE_INCLUDE_DIRECTORIES)
# get_target_property(Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES Qt5::Gui INTERFACE_INCLUDE_DIRECTORIES)
#
# target_include_directories(squawk PRIVATE ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
# target_include_directories(squawk PRIVATE ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
find_package(Qt5Core CONFIG REQUIRED) target_link_libraries(squawk PUBLIC Qt5::Core Qt5::Gui KF5::Wallet)
find_package(Qt5Gui CONFIG REQUIRED)
get_target_property(KWALLET_INTERFACE_INCLUDE_DIRECTORIES KF5::Wallet INTERFACE_INCLUDE_DIRECTORIES) # target_include_directories(kwalletWrapper PUBLIC ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
get_target_property(Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES Qt5::Gui INTERFACE_INCLUDE_DIRECTORIES) # target_include_directories(kwalletWrapper PUBLIC ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
set(kwalletPSE_SRC # target_link_libraries(kwalletWrapper KF5::Wallet)
kwallet.cpp # target_link_libraries(kwalletWrapper Qt5::Core)
)
add_library(kwalletPSE STATIC ${kwalletPSE_SRC})
target_include_directories(kwalletPSE PUBLIC ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
target_include_directories(kwalletPSE PUBLIC ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
target_link_libraries(kwalletPSE Qt5::Core)
set(kwalletW_SRC
wrappers/kwallet.cpp
)
add_library(kwalletWrapper SHARED ${kwalletW_SRC})
target_include_directories(kwalletWrapper PUBLIC ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
target_include_directories(kwalletWrapper PUBLIC ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
target_link_libraries(kwalletWrapper KF5::Wallet)
target_link_libraries(kwalletWrapper Qt5::Core)
install(TARGETS kwalletWrapper DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

19
shared/CMakeLists.txt Normal file
View File

@ -0,0 +1,19 @@
target_sources(squawk PRIVATE
${CMAKE_CURRENT_LIST_DIR}/enums.h
${CMAKE_CURRENT_LIST_DIR}/global.cpp
${CMAKE_CURRENT_LIST_DIR}/global.h
${CMAKE_CURRENT_LIST_DIR}/exception.cpp
${CMAKE_CURRENT_LIST_DIR}/exception.h
${CMAKE_CURRENT_LIST_DIR}/icons.cpp
${CMAKE_CURRENT_LIST_DIR}/icons.h
${CMAKE_CURRENT_LIST_DIR}/message.cpp
${CMAKE_CURRENT_LIST_DIR}/message.h
${CMAKE_CURRENT_LIST_DIR}/messageinfo.cpp
${CMAKE_CURRENT_LIST_DIR}/messageinfo.h
${CMAKE_CURRENT_LIST_DIR}/order.h
${CMAKE_CURRENT_LIST_DIR}/shared.h
${CMAKE_CURRENT_LIST_DIR}/utils.cpp
${CMAKE_CURRENT_LIST_DIR}/utils.h
${CMAKE_CURRENT_LIST_DIR}/vcard.cpp
${CMAKE_CURRENT_LIST_DIR}/vcard.h
)

View File

@ -19,12 +19,12 @@
#ifndef SHARED_H #ifndef SHARED_H
#define SHARED_H #define SHARED_H
#include "shared/enums.h" #include "enums.h"
#include "shared/utils.h" #include "global.h"
#include "shared/icons.h" #include "icons.h"
#include "shared/message.h" #include "message.h"
#include "shared/vcard.h" #include "messageinfo.h"
#include "shared/global.h" #include "utils.h"
#include "shared/messageinfo.h" #include "vcard.h"
#endif // SHARED_H #endif // SHARED_H

View File

@ -1,43 +1,5 @@
cmake_minimum_required(VERSION 3.3) target_sources(squawk PRIVATE squawk.cpp squawk.h squawk.ui)
project(squawkUI)
# 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(Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Core)
find_package(Boost 1.36.0 REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
add_subdirectory(models)
add_subdirectory(utils) add_subdirectory(utils)
add_subdirectory(widgets) add_subdirectory(widgets)
set(squawkUI_SRC
squawk.cpp
models/accounts.cpp
models/roster.cpp
models/item.cpp
models/account.cpp
models/contact.cpp
models/presence.cpp
models/group.cpp
models/room.cpp
models/abstractparticipant.cpp
models/participant.cpp
models/reference.cpp
models/messagefeed.cpp
models/element.cpp
)
# Tell CMake to create the helloworld executable
add_library(squawkUI STATIC ${squawkUI_SRC})
# Use the Widgets module from Qt 5.
target_link_libraries(squawkUI squawkWidgets)
target_link_libraries(squawkUI squawkUIUtils)
target_link_libraries(squawkUI Qt5::Widgets)
target_link_libraries(squawkUI Qt5::DBus)

28
ui/models/CMakeLists.txt Normal file
View File

@ -0,0 +1,28 @@
target_sources(squawk PRIVATE
${CMAKE_CURRENT_LIST_DIR}/abstractparticipant.cpp
${CMAKE_CURRENT_LIST_DIR}/abstractparticipant.h
${CMAKE_CURRENT_LIST_DIR}/account.cpp
${CMAKE_CURRENT_LIST_DIR}/account.h
${CMAKE_CURRENT_LIST_DIR}/accounts.cpp
${CMAKE_CURRENT_LIST_DIR}/accounts.h
${CMAKE_CURRENT_LIST_DIR}/contact.cpp
${CMAKE_CURRENT_LIST_DIR}/contact.h
${CMAKE_CURRENT_LIST_DIR}/element.cpp
${CMAKE_CURRENT_LIST_DIR}/element.h
${CMAKE_CURRENT_LIST_DIR}/group.cpp
${CMAKE_CURRENT_LIST_DIR}/group.h
${CMAKE_CURRENT_LIST_DIR}/item.cpp
${CMAKE_CURRENT_LIST_DIR}/item.h
${CMAKE_CURRENT_LIST_DIR}/messagefeed.cpp
${CMAKE_CURRENT_LIST_DIR}/messagefeed.h
${CMAKE_CURRENT_LIST_DIR}/participant.cpp
${CMAKE_CURRENT_LIST_DIR}/participant.h
${CMAKE_CURRENT_LIST_DIR}/presence.cpp
${CMAKE_CURRENT_LIST_DIR}/presence.h
${CMAKE_CURRENT_LIST_DIR}/reference.cpp
${CMAKE_CURRENT_LIST_DIR}/reference.h
${CMAKE_CURRENT_LIST_DIR}/room.cpp
${CMAKE_CURRENT_LIST_DIR}/room.h
${CMAKE_CURRENT_LIST_DIR}/roster.cpp
${CMAKE_CURRENT_LIST_DIR}/roster.h
)

View File

@ -39,7 +39,7 @@
#include "models/roster.h" #include "models/roster.h"
#include "widgets/vcard/vcard.h" #include "widgets/vcard/vcard.h"
#include "shared.h" #include "shared/shared.h"
namespace Ui { namespace Ui {
class Squawk; class Squawk;

View File

@ -1,32 +1,26 @@
cmake_minimum_required(VERSION 3.3) target_sources(squawk PRIVATE
project(squawkUIUtils) ${CMAKE_CURRENT_LIST_DIR}/badge.cpp
${CMAKE_CURRENT_LIST_DIR}/badge.h
# Instruct CMake to run moc automatically when needed. ${CMAKE_CURRENT_LIST_DIR}/comboboxdelegate.cpp
set(CMAKE_AUTOMOC ON) ${CMAKE_CURRENT_LIST_DIR}/comboboxdelegate.h
# Instruct CMake to create code from Qt designer ui files ${CMAKE_CURRENT_LIST_DIR}/exponentialblur.cpp
set(CMAKE_AUTOUIC ON) ${CMAKE_CURRENT_LIST_DIR}/exponentialblur.h
${CMAKE_CURRENT_LIST_DIR}/feedview.cpp
# Find the QtWidgets library ${CMAKE_CURRENT_LIST_DIR}/feedview.h
find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets Core) ${CMAKE_CURRENT_LIST_DIR}/flowlayout.cpp
${CMAKE_CURRENT_LIST_DIR}/flowlayout.h
set(squawkUIUtils_SRC ${CMAKE_CURRENT_LIST_DIR}/image.cpp
# messageline.cpp ${CMAKE_CURRENT_LIST_DIR}/image.h
# message.cpp ${CMAKE_CURRENT_LIST_DIR}/message.cpp
resizer.cpp ${CMAKE_CURRENT_LIST_DIR}/message.h
# image.cpp ${CMAKE_CURRENT_LIST_DIR}/messagedelegate.cpp
flowlayout.cpp ${CMAKE_CURRENT_LIST_DIR}/messagedelegate.h
badge.cpp ${CMAKE_CURRENT_LIST_DIR}/messageline.cpp
progress.cpp ${CMAKE_CURRENT_LIST_DIR}/messageline.h
comboboxdelegate.cpp ${CMAKE_CURRENT_LIST_DIR}/progress.cpp
feedview.cpp ${CMAKE_CURRENT_LIST_DIR}/progress.h
messagedelegate.cpp ${CMAKE_CURRENT_LIST_DIR}/resizer.cpp
exponentialblur.cpp ${CMAKE_CURRENT_LIST_DIR}/resizer.h
shadowoverlay.cpp ${CMAKE_CURRENT_LIST_DIR}/shadowoverlay.cpp
) ${CMAKE_CURRENT_LIST_DIR}/shadowoverlay.h
)
# Tell CMake to create the helloworld executable
add_library(squawkUIUtils STATIC ${squawkUIUtils_SRC})
# Use the Widgets module from Qt 5.
target_link_libraries(squawkUIUtils squawkWidgets)
target_link_libraries(squawkUIUtils Qt5::Widgets)

View File

@ -1,31 +1,23 @@
cmake_minimum_required(VERSION 3.0) target_sources(squawk PRIVATE
project(squawkWidgets) ${CMAKE_CURRENT_LIST_DIR}/account.cpp
${CMAKE_CURRENT_LIST_DIR}/account.h
# Instruct CMake to run moc automatically when needed. ${CMAKE_CURRENT_LIST_DIR}/account.ui
set(CMAKE_AUTOMOC ON) ${CMAKE_CURRENT_LIST_DIR}/accounts.cpp
# Instruct CMake to create code from Qt designer ui files ${CMAKE_CURRENT_LIST_DIR}/accounts.h
set(CMAKE_AUTOUIC ON) ${CMAKE_CURRENT_LIST_DIR}/accounts.ui
${CMAKE_CURRENT_LIST_DIR}/chat.cpp
# Find the QtWidgets library ${CMAKE_CURRENT_LIST_DIR}/chat.h
find_package(Qt5Widgets CONFIG REQUIRED COMPONENTS Widgets Core) ${CMAKE_CURRENT_LIST_DIR}/conversation.cpp
${CMAKE_CURRENT_LIST_DIR}/conversation.h
${CMAKE_CURRENT_LIST_DIR}/conversation.ui
${CMAKE_CURRENT_LIST_DIR}/joinconference.cpp
${CMAKE_CURRENT_LIST_DIR}/joinconference.h
${CMAKE_CURRENT_LIST_DIR}/joinconference.ui
${CMAKE_CURRENT_LIST_DIR}/newcontact.cpp
${CMAKE_CURRENT_LIST_DIR}/newcontact.h
${CMAKE_CURRENT_LIST_DIR}/newcontact.ui
${CMAKE_CURRENT_LIST_DIR}/room.cpp
${CMAKE_CURRENT_LIST_DIR}/room.h
)
add_subdirectory(vcard) 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 <QDesktopServices>
#include "shared/message.h" #include "shared/message.h"
#include "order.h" #include "shared/order.h"
#include "ui/models/account.h" #include "ui/models/account.h"
#include "ui/models/roster.h" #include "ui/models/roster.h"
#include "ui/utils/flowlayout.h" #include "ui/utils/flowlayout.h"

View File

@ -1,22 +1,9 @@
cmake_minimum_required(VERSION 3.0) target_sources(squawk PRIVATE
project(vCardUI) ${CMAKE_CURRENT_LIST_DIR}/emailsmodel.cpp
${CMAKE_CURRENT_LIST_DIR}/emailsmodel.h
# Instruct CMake to run moc automatically when needed. ${CMAKE_CURRENT_LIST_DIR}/phonesmodel.cpp
set(CMAKE_AUTOMOC ON) ${CMAKE_CURRENT_LIST_DIR}/phonesmodel.h
# Instruct CMake to create code from Qt designer ui files ${CMAKE_CURRENT_LIST_DIR}/vcard.cpp
set(CMAKE_AUTOUIC ON) ${CMAKE_CURRENT_LIST_DIR}/vcard.h
${CMAKE_CURRENT_LIST_DIR}/vcard.ui
# Find the QtWidgets library )
find_package(Qt5Widgets CONFIG REQUIRED)
set(vCardUI_SRC
vcard.cpp
emailsmodel.cpp
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)