Commit dc67fcc3 authored by Ghislain MARY's avatar Ghislain MARY

Fix build on Windows.

parent 66ee3705
......@@ -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}
......
#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"
......
#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 {
......
#include "Camera.hpp"
#include <QOpenGLFunctions>
#include <QOpenGLTexture>
#include <QtMath>
#include "Camera.hpp"
// =============================================================================
struct CameraStateBinder {
......
#ifndef CAMERA_H_
#define CAMERA_H_
#include "../call/CallModel.hpp"
#include <QOpenGLFramebufferObject>
#include <QQuickFramebufferObject>
#include "../call/CallModel.hpp"
// =============================================================================
class Camera;
......
#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 {
......
#ifndef CONTACTS_LIST_PROXY_MODEL_H_
#define CONTACTS_LIST_PROXY_MODEL_H_
#include <QSortFilterProxyModel>
#include "../contact/ContactModel.hpp"
#include <QSortFilterProxyModel>
// =============================================================================
class ContactsListModel;
......
#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"
......
#ifndef ACCOUNT_SETTINGS_MODEL_H_
#define ACCOUNT_SETTINGS_MODEL_H_
#include <QObject>
#include "../presence/Presence.hpp"
#include <QObject>
// ===================================================================
class AccountSettingsModel : public QObject {
......
#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;
......
#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 {
......
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