mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix build on Windows.
This commit is contained in:
parent
66ee370547
commit
dc67fcc363
12 changed files with 50 additions and 40 deletions
|
|
@ -32,6 +32,7 @@ include(GNUInstallDirs)
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if(NOT WIN32)
|
||||
set(CUSTOM_FLAGS "\
|
||||
-Wall \
|
||||
-Wcast-align \
|
||||
|
|
@ -49,6 +50,7 @@ set(CUSTOM_FLAGS "\
|
|||
-Wuninitialized \
|
||||
-Wunused \
|
||||
")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")
|
||||
|
||||
|
|
@ -59,8 +61,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG -DQT_DECLARAT
|
|||
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 LinguistTools)
|
||||
|
||||
find_package(Linphone REQUIRED)
|
||||
|
||||
set(LIBS "${CMAKE_SOURCE_DIR}/../OUTPUT/desktop/lib64/liblinphone++.so")
|
||||
find_package(LinphoneCxx REQUIRED)
|
||||
|
||||
set(SOURCES
|
||||
src/app/App.cpp
|
||||
|
|
@ -161,10 +162,12 @@ foreach (line ${QRC_RESOURCES_CONTENT})
|
|||
endif ()
|
||||
endforeach ()
|
||||
|
||||
add_custom_target(
|
||||
check_qml DEPENDS ${QML_SOURCES}
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/check_qml_syntax"
|
||||
)
|
||||
if(NOT WIN32)
|
||||
add_custom_target(
|
||||
check_qml DEPENDS ${QML_SOURCES}
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/tools/check_qml_syntax"
|
||||
)
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Init git hooks.
|
||||
|
|
@ -190,9 +193,15 @@ qt5_add_resources(RESOURCES ${QRC_RESOURCES})
|
|||
|
||||
# Build.
|
||||
# Note: `update_translations` is provided by `languages/CMakeLists.txt`.
|
||||
add_executable(${LINPHONE_EXEC} ${SOURCES} ${HEADERS} ${RESOURCES})
|
||||
add_dependencies(${LINPHONE_EXEC} update_translations)
|
||||
add_dependencies(update_translations check_qml)
|
||||
if(WIN32)
|
||||
add_executable(${LINPHONE_EXEC} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES})
|
||||
else()
|
||||
add_executable(${LINPHONE_EXEC} ${SOURCES} ${HEADERS} ${RESOURCES})
|
||||
endif()
|
||||
add_dependencies(${LINPHONE_EXEC} update_translations)
|
||||
if(NOT WIN32)
|
||||
add_dependencies(update_translations check_qml)
|
||||
endif()
|
||||
|
||||
target_include_directories(${LINPHONE_EXEC} SYSTEM PRIVATE "${LINPHONE_INCLUDE_DIRS}")
|
||||
foreach (package ${QT5_PACKAGES})
|
||||
|
|
@ -204,7 +213,7 @@ foreach (package ${QT5_PACKAGES})
|
|||
endif()
|
||||
endforeach ()
|
||||
|
||||
target_link_libraries(${LINPHONE_EXEC} ${LIBS} ${LINPHONE_LIBRARIES})
|
||||
target_link_libraries(${LINPHONE_EXEC} ${LINPHONE_LIBRARIES} ${LINPHONECXX_LIBRARIES})
|
||||
|
||||
install(TARGETS ${LINPHONE_EXEC}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
#include <QMenu>
|
||||
#include <QQmlComponent>
|
||||
#include <QQmlContext>
|
||||
#include <QQuickView>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../components/calls/CallsListModel.hpp"
|
||||
#include "../components/camera/Camera.hpp"
|
||||
#include "../components/chat/ChatProxyModel.hpp"
|
||||
|
|
@ -16,6 +10,12 @@
|
|||
|
||||
#include "App.hpp"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QQmlComponent>
|
||||
#include <QQmlContext>
|
||||
#include <QQuickView>
|
||||
#include <QtDebug>
|
||||
|
||||
#define LANGUAGES_PATH ":/languages/"
|
||||
#define WINDOW_ICON_PATH ":/assets/images/linphone.png"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
#ifndef APP_H_
|
||||
#define APP_H_
|
||||
|
||||
#include "../components/notifier/Notifier.hpp"
|
||||
#include "AvatarProvider.hpp"
|
||||
#include "DefaultTranslator.hpp"
|
||||
#include "ThumbnailProvider.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQmlFileSelector>
|
||||
#include <QQuickWindow>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include "../components/notifier/Notifier.hpp"
|
||||
#include "AvatarProvider.hpp"
|
||||
#include "DefaultTranslator.hpp"
|
||||
#include "ThumbnailProvider.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class App : public QApplication {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "Camera.hpp"
|
||||
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QOpenGLTexture>
|
||||
#include <QtMath>
|
||||
|
||||
#include "Camera.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
struct CameraStateBinder {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef CAMERA_H_
|
||||
#define CAMERA_H_
|
||||
|
||||
#include "../call/CallModel.hpp"
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickFramebufferObject>
|
||||
|
||||
#include "../call/CallModel.hpp"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class Camera;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef CHAT_PROXY_MODEL_H_
|
||||
#define CHAT_PROXY_MODEL_H_
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "ChatModel.hpp"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ChatProxyModel : public QSortFilterProxyModel {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
#define CONTACTS_LIST_MODEL_H_
|
||||
|
||||
#include <linphone++/linphone.hh>
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#include "../contact/ContactModel.hpp"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ContactsListModel : public QAbstractListModel {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef CONTACTS_LIST_PROXY_MODEL_H_
|
||||
#define CONTACTS_LIST_PROXY_MODEL_H_
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "../contact/ContactModel.hpp"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ContactsListModel;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "../../app/App.hpp"
|
||||
|
||||
#include "Notifier.hpp"
|
||||
|
||||
#include <QQmlComponent>
|
||||
#include <QQuickWindow>
|
||||
#include <QtDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#include "../../app/App.hpp"
|
||||
|
||||
#include "Notifier.hpp"
|
||||
|
||||
// Notifications QML properties/methods.
|
||||
#define NOTIFICATION_SHOW_METHOD_NAME "show"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef ACCOUNT_SETTINGS_MODEL_H_
|
||||
#define ACCOUNT_SETTINGS_MODEL_H_
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "../presence/Presence.hpp"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class AccountSettingsModel : public QObject {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef SIP_ADDRESSES_MODEL_H_
|
||||
#define SIP_ADDRESSES_MODEL_H_
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#include "../chat/ChatModel.hpp"
|
||||
#include "../contact/ContactModel.hpp"
|
||||
#include "../contact/ContactObserver.hpp"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class CoreHandlers;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef SMART_SEARCH_BAR_MODEL_H_
|
||||
#define SMART_SEARCH_BAR_MODEL_H_
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "../sip-addresses/SipAddressesModel.hpp"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class SmartSearchBarModel : public QSortFilterProxyModel {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue