mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Merge branch 'wip_julien'
This commit is contained in:
commit
34f90d3d7d
14 changed files with 376 additions and 423 deletions
499
CMakeLists.txt
499
CMakeLists.txt
|
|
@ -29,9 +29,16 @@ cmake_minimum_required(VERSION 3.1)
|
|||
project(linphoneqt VERSION 4.1.1)
|
||||
|
||||
# Prepare gobal CMAKE configuration specific to the current project
|
||||
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/linphone-sdk/desktop;${CMAKE_BINARY_DIR}/OUTPUT")
|
||||
message("${CMAKE_PREFIX_PATH}")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/OUTPUT")
|
||||
set(SDK_BUILD_DIR "${CMAKE_BINARY_DIR}/WORK") # SDK build in WORK. Keep all in it.
|
||||
set(LINPHONE_OUTPUT_DIR "${CMAKE_BINARY_DIR}/linphone-sdk/desktop") #This is fixed by the SDK
|
||||
set(MINIZIP_OUTPUT_DIR "${CMAKE_BINARY_DIR}/minizip_OUTPUT")
|
||||
|
||||
set(APPLICATION_OUTPUT_DIR "${CMAKE_BINARY_DIR}/OUTPUT")
|
||||
|
||||
message("minizip=${MINIZIP_OUTPUT_DIR} sdk=${LINPHONE_OUTPUT_DIR}")
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH "${LINPHONE_OUTPUT_DIR};${MINIZIP_OUTPUT_DIR};${APPLICATION_OUTPUT_DIR}")
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/lib64;$ORIGIN/../lib64;$ORIGIN/lib;$ORIGIN/../lib")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
|
@ -39,7 +46,7 @@ endif()
|
|||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
# Avoid cmake warning if CMP0071 is not set.
|
||||
if (POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
endif ()
|
||||
#set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
|
|
@ -85,199 +92,202 @@ find_package(belcard CONFIG)
|
|||
find_package(Mediastreamer2 CONFIG)
|
||||
find_package(ortp CONFIG)
|
||||
|
||||
if( NOT (LinphoneCxx_FOUND))
|
||||
if( NOT (LinphoneCxx_FOUND) OR NOT (Linphone_FOUND) OR NOT (bctoolbox_FOUND) OR NOT (belcard_FOUND) OR NOT (Mediastreamer2_FOUND) OR NOT (ortp_FOUND))
|
||||
message("Linphone packages are not installed. Build and install it in order to build Minizip and then Desktop Application.")
|
||||
add_subdirectory("linphone-sdk" "linphone-sdk/build-sdk")
|
||||
set(CMAKE_INSTALL_PREFIX "${LINPHONE_OUTPUT_DIR}")
|
||||
add_subdirectory("linphone-sdk" "${SDK_BUILD_DIR}")
|
||||
else()
|
||||
# Linphone SDK has been builded
|
||||
message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}")
|
||||
find_package(Minizip)
|
||||
# Linphone SDK has been builded
|
||||
message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}")
|
||||
find_package(Minizip)
|
||||
if( NOT(Minizip_FOUND))
|
||||
message("Minizip are not installed. Build and install it in order to build Desktop Application.")
|
||||
add_subdirectory(submodules/externals/minizip "submodules/externals/minizip/build-minizip")
|
||||
set(CMAKE_INSTALL_PREFIX "${MINIZIP_OUTPUT_DIR}")
|
||||
add_subdirectory(submodules/externals/minizip "submodules/externals/minizip/build-minizip")
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||
message("MINIZIP : ${MINIZIP_INCLUDE_DIRS} => ${MINIZIP_LIBRARIES}")
|
||||
message("INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} FRAMEWORK_PATH=${CMAKE_FRAMEWORK_PATH}")
|
||||
message("LINPHONE : ${LINPHONE_INCLUDE_DIRS} => ${LINPHONE_LIBRARIES}")
|
||||
message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}")
|
||||
|
||||
# Build configuration
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")
|
||||
if( WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_")#remove error from windows headers order
|
||||
endif()
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h
|
||||
|
||||
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network)
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_PACKAGES DBus)
|
||||
endif ()
|
||||
set(QT5_PACKAGES_OPTIONAL TextToSpeech)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
#-------------------------------------------------
|
||||
set(ASSETS_DIR "assets")
|
||||
|
||||
# Build configuration
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")
|
||||
if( WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_")#remove error from windows headers order
|
||||
endif()
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h
|
||||
|
||||
set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network)
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_PACKAGES DBus)
|
||||
endif ()
|
||||
set(QT5_PACKAGES_OPTIONAL TextToSpeech)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
#-------------------------------------------------
|
||||
set(ASSETS_DIR "assets")
|
||||
set(SOURCES
|
||||
src/app/App.cpp
|
||||
src/app/AppController.cpp
|
||||
src/app/cli/Cli.cpp
|
||||
src/app/logger/Logger.cpp
|
||||
src/app/paths/Paths.cpp
|
||||
src/app/providers/AvatarProvider.cpp
|
||||
src/app/providers/ImageProvider.cpp
|
||||
src/app/providers/ThumbnailProvider.cpp
|
||||
src/app/translator/DefaultTranslator.cpp
|
||||
src/components/assistant/AssistantModel.cpp
|
||||
src/components/authentication/AuthenticationNotifier.cpp
|
||||
src/components/call/CallModel.cpp
|
||||
src/components/calls/CallsListModel.cpp
|
||||
src/components/calls/CallsListProxyModel.cpp
|
||||
src/components/camera/Camera.cpp
|
||||
src/components/camera/CameraPreview.cpp
|
||||
src/components/camera/MSFunctions.cpp
|
||||
src/components/chat/ChatModel.cpp
|
||||
src/components/chat/ChatProxyModel.cpp
|
||||
src/components/codecs/AbstractCodecsModel.cpp
|
||||
src/components/codecs/AudioCodecsModel.cpp
|
||||
src/components/codecs/VideoCodecsModel.cpp
|
||||
src/components/conference/ConferenceAddModel.cpp
|
||||
src/components/conference/ConferenceHelperModel.cpp
|
||||
src/components/conference/ConferenceModel.cpp
|
||||
src/components/contact/ContactModel.cpp
|
||||
src/components/contact/VcardModel.cpp
|
||||
src/components/contacts/ContactsListModel.cpp
|
||||
src/components/contacts/ContactsListProxyModel.cpp
|
||||
src/components/core/CoreHandlers.cpp
|
||||
src/components/core/CoreManager.cpp
|
||||
src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp
|
||||
src/components/file/FileDownloader.cpp
|
||||
src/components/file/FileExtractor.cpp
|
||||
src/components/notifier/Notifier.cpp
|
||||
src/components/other/clipboard/Clipboard.cpp
|
||||
src/components/other/colors/Colors.cpp
|
||||
src/components/other/text-to-speech/TextToSpeech.cpp
|
||||
src/components/other/units/Units.cpp
|
||||
src/components/presence/OwnPresenceModel.cpp
|
||||
src/components/presence/Presence.cpp
|
||||
src/components/settings/AccountSettingsModel.cpp
|
||||
src/components/settings/SettingsModel.cpp
|
||||
src/components/sip-addresses/SipAddressesModel.cpp
|
||||
src/components/sip-addresses/SipAddressesProxyModel.cpp
|
||||
src/components/sip-addresses/SipAddressObserver.cpp
|
||||
src/components/sound-player/SoundPlayer.cpp
|
||||
src/components/telephone-numbers/TelephoneNumbersModel.cpp
|
||||
src/components/timeline/TimelineModel.cpp
|
||||
src/components/url-handlers/UrlHandlers.cpp
|
||||
src/utils/LinphoneUtils.cpp
|
||||
src/utils/MediastreamerUtils.cpp
|
||||
src/utils/QExifImageHeader.cpp
|
||||
src/utils/Utils.cpp
|
||||
)
|
||||
src/app/App.cpp
|
||||
src/app/AppController.cpp
|
||||
src/app/cli/Cli.cpp
|
||||
src/app/logger/Logger.cpp
|
||||
src/app/paths/Paths.cpp
|
||||
src/app/providers/AvatarProvider.cpp
|
||||
src/app/providers/ImageProvider.cpp
|
||||
src/app/providers/ThumbnailProvider.cpp
|
||||
src/app/translator/DefaultTranslator.cpp
|
||||
src/components/assistant/AssistantModel.cpp
|
||||
src/components/authentication/AuthenticationNotifier.cpp
|
||||
src/components/call/CallModel.cpp
|
||||
src/components/calls/CallsListModel.cpp
|
||||
src/components/calls/CallsListProxyModel.cpp
|
||||
src/components/camera/Camera.cpp
|
||||
src/components/camera/CameraPreview.cpp
|
||||
src/components/camera/MSFunctions.cpp
|
||||
src/components/chat/ChatModel.cpp
|
||||
src/components/chat/ChatProxyModel.cpp
|
||||
src/components/codecs/AbstractCodecsModel.cpp
|
||||
src/components/codecs/AudioCodecsModel.cpp
|
||||
src/components/codecs/VideoCodecsModel.cpp
|
||||
src/components/conference/ConferenceAddModel.cpp
|
||||
src/components/conference/ConferenceHelperModel.cpp
|
||||
src/components/conference/ConferenceModel.cpp
|
||||
src/components/contact/ContactModel.cpp
|
||||
src/components/contact/VcardModel.cpp
|
||||
src/components/contacts/ContactsListModel.cpp
|
||||
src/components/contacts/ContactsListProxyModel.cpp
|
||||
src/components/core/CoreHandlers.cpp
|
||||
src/components/core/CoreManager.cpp
|
||||
src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp
|
||||
src/components/file/FileDownloader.cpp
|
||||
src/components/file/FileExtractor.cpp
|
||||
src/components/notifier/Notifier.cpp
|
||||
src/components/other/clipboard/Clipboard.cpp
|
||||
src/components/other/colors/Colors.cpp
|
||||
src/components/other/text-to-speech/TextToSpeech.cpp
|
||||
src/components/other/units/Units.cpp
|
||||
src/components/presence/OwnPresenceModel.cpp
|
||||
src/components/presence/Presence.cpp
|
||||
src/components/settings/AccountSettingsModel.cpp
|
||||
src/components/settings/SettingsModel.cpp
|
||||
src/components/sip-addresses/SipAddressesModel.cpp
|
||||
src/components/sip-addresses/SipAddressesProxyModel.cpp
|
||||
src/components/sip-addresses/SipAddressObserver.cpp
|
||||
src/components/sound-player/SoundPlayer.cpp
|
||||
src/components/telephone-numbers/TelephoneNumbersModel.cpp
|
||||
src/components/timeline/TimelineModel.cpp
|
||||
src/components/url-handlers/UrlHandlers.cpp
|
||||
src/utils/LinphoneUtils.cpp
|
||||
src/utils/MediastreamerUtils.cpp
|
||||
src/utils/QExifImageHeader.cpp
|
||||
src/utils/Utils.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
src/app/App.hpp
|
||||
src/app/AppController.hpp
|
||||
src/app/cli/Cli.hpp
|
||||
src/app/logger/Logger.hpp
|
||||
src/app/paths/Paths.hpp
|
||||
src/app/providers/AvatarProvider.hpp
|
||||
src/app/providers/ImageProvider.hpp
|
||||
src/app/providers/ThumbnailProvider.hpp
|
||||
src/app/single-application/SingleApplication.hpp
|
||||
src/app/translator/DefaultTranslator.hpp
|
||||
src/components/assistant/AssistantModel.hpp
|
||||
src/components/authentication/AuthenticationNotifier.hpp
|
||||
src/components/call/CallModel.hpp
|
||||
src/components/calls/CallsListModel.hpp
|
||||
src/components/calls/CallsListProxyModel.hpp
|
||||
src/components/camera/Camera.hpp
|
||||
src/components/camera/CameraPreview.hpp
|
||||
src/components/camera/MSFunctions.hpp
|
||||
src/components/chat/ChatModel.hpp
|
||||
src/components/chat/ChatProxyModel.hpp
|
||||
src/components/codecs/AbstractCodecsModel.hpp
|
||||
src/components/codecs/AudioCodecsModel.hpp
|
||||
src/components/codecs/VideoCodecsModel.hpp
|
||||
src/components/Components.hpp
|
||||
src/components/conference/ConferenceAddModel.hpp
|
||||
src/components/conference/ConferenceHelperModel.hpp
|
||||
src/components/conference/ConferenceModel.hpp
|
||||
src/components/contact/ContactModel.hpp
|
||||
src/components/contact/VcardModel.hpp
|
||||
src/components/contacts/ContactsListModel.hpp
|
||||
src/components/contacts/ContactsListProxyModel.hpp
|
||||
src/components/core/CoreHandlers.hpp
|
||||
src/components/core/CoreManager.hpp
|
||||
src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp
|
||||
src/components/file/FileDownloader.hpp
|
||||
src/components/file/FileExtractor.hpp
|
||||
src/components/notifier/Notifier.hpp
|
||||
src/components/other/clipboard/Clipboard.hpp
|
||||
src/components/other/colors/Colors.hpp
|
||||
src/components/other/desktop-tools/DesktopTools.hpp
|
||||
src/components/other/text-to-speech/TextToSpeech.hpp
|
||||
src/components/other/units/Units.hpp
|
||||
src/components/presence/OwnPresenceModel.hpp
|
||||
src/components/presence/Presence.hpp
|
||||
src/components/settings/AccountSettingsModel.hpp
|
||||
src/components/settings/SettingsModel.hpp
|
||||
src/components/sip-addresses/SipAddressesModel.hpp
|
||||
src/components/sip-addresses/SipAddressesProxyModel.hpp
|
||||
src/components/sip-addresses/SipAddressObserver.hpp
|
||||
src/components/sound-player/SoundPlayer.hpp
|
||||
src/components/telephone-numbers/TelephoneNumbersModel.hpp
|
||||
src/components/timeline/TimelineModel.hpp
|
||||
src/components/url-handlers/UrlHandlers.hpp
|
||||
src/utils/LinphoneUtils.hpp
|
||||
src/utils/MediastreamerUtils.hpp
|
||||
src/utils/QExifImageHeader.hpp
|
||||
src/utils/Utils.hpp
|
||||
)
|
||||
src/app/App.hpp
|
||||
src/app/AppController.hpp
|
||||
src/app/cli/Cli.hpp
|
||||
src/app/logger/Logger.hpp
|
||||
src/app/paths/Paths.hpp
|
||||
src/app/providers/AvatarProvider.hpp
|
||||
src/app/providers/ImageProvider.hpp
|
||||
src/app/providers/ThumbnailProvider.hpp
|
||||
src/app/single-application/SingleApplication.hpp
|
||||
src/app/translator/DefaultTranslator.hpp
|
||||
src/components/assistant/AssistantModel.hpp
|
||||
src/components/authentication/AuthenticationNotifier.hpp
|
||||
src/components/call/CallModel.hpp
|
||||
src/components/calls/CallsListModel.hpp
|
||||
src/components/calls/CallsListProxyModel.hpp
|
||||
src/components/camera/Camera.hpp
|
||||
src/components/camera/CameraPreview.hpp
|
||||
src/components/camera/MSFunctions.hpp
|
||||
src/components/chat/ChatModel.hpp
|
||||
src/components/chat/ChatProxyModel.hpp
|
||||
src/components/codecs/AbstractCodecsModel.hpp
|
||||
src/components/codecs/AudioCodecsModel.hpp
|
||||
src/components/codecs/VideoCodecsModel.hpp
|
||||
src/components/Components.hpp
|
||||
src/components/conference/ConferenceAddModel.hpp
|
||||
src/components/conference/ConferenceHelperModel.hpp
|
||||
src/components/conference/ConferenceModel.hpp
|
||||
src/components/contact/ContactModel.hpp
|
||||
src/components/contact/VcardModel.hpp
|
||||
src/components/contacts/ContactsListModel.hpp
|
||||
src/components/contacts/ContactsListProxyModel.hpp
|
||||
src/components/core/CoreHandlers.hpp
|
||||
src/components/core/CoreManager.hpp
|
||||
src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp
|
||||
src/components/file/FileDownloader.hpp
|
||||
src/components/file/FileExtractor.hpp
|
||||
src/components/notifier/Notifier.hpp
|
||||
src/components/other/clipboard/Clipboard.hpp
|
||||
src/components/other/colors/Colors.hpp
|
||||
src/components/other/desktop-tools/DesktopTools.hpp
|
||||
src/components/other/text-to-speech/TextToSpeech.hpp
|
||||
src/components/other/units/Units.hpp
|
||||
src/components/presence/OwnPresenceModel.hpp
|
||||
src/components/presence/Presence.hpp
|
||||
src/components/settings/AccountSettingsModel.hpp
|
||||
src/components/settings/SettingsModel.hpp
|
||||
src/components/sip-addresses/SipAddressesModel.hpp
|
||||
src/components/sip-addresses/SipAddressesProxyModel.hpp
|
||||
src/components/sip-addresses/SipAddressObserver.hpp
|
||||
src/components/sound-player/SoundPlayer.hpp
|
||||
src/components/telephone-numbers/TelephoneNumbersModel.hpp
|
||||
src/components/timeline/TimelineModel.hpp
|
||||
src/components/url-handlers/UrlHandlers.hpp
|
||||
src/utils/LinphoneUtils.hpp
|
||||
src/utils/MediastreamerUtils.hpp
|
||||
src/utils/QExifImageHeader.hpp
|
||||
src/utils/Utils.hpp
|
||||
)
|
||||
|
||||
set(MAIN_FILE src/app/main.cpp)
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND SOURCES
|
||||
list(APPEND SOURCES
|
||||
src/app/single-application/SingleApplication.cpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierMacOs.m
|
||||
src/components/other/desktop-tools/DesktopToolsMacOs.cpp
|
||||
src/components/other/desktop-tools/screen-saver/ScreenSaverMacOs.m
|
||||
src/components/other/desktop-tools/state-process/StateProcessMacOs.mm
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
src/app/single-application/SingleApplicationPrivate.hpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp
|
||||
src/components/other/desktop-tools/DesktopToolsMacOs.hpp
|
||||
)
|
||||
)
|
||||
elseif (WIN32)
|
||||
list(APPEND SOURCES
|
||||
list(APPEND SOURCES
|
||||
src/app/single-application/SingleApplication.cpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp
|
||||
src/components/other/desktop-tools/DesktopToolsWindows.cpp
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
src/app/single-application/SingleApplicationPrivate.hpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp
|
||||
src/components/other/desktop-tools/DesktopToolsWindows.hpp
|
||||
)
|
||||
)
|
||||
else ()
|
||||
list(APPEND SOURCES
|
||||
list(APPEND SOURCES
|
||||
src/app/single-application/SingleApplicationDBus.cpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp
|
||||
src/components/other/desktop-tools/DesktopToolsLinux.cpp
|
||||
src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp
|
||||
src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
)
|
||||
list(APPEND HEADERS
|
||||
src/app/single-application/SingleApplicationDBusPrivate.hpp
|
||||
src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp
|
||||
src/components/other/desktop-tools/DesktopToolsLinux.hpp
|
||||
src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp
|
||||
src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp
|
||||
)
|
||||
)
|
||||
endif ()
|
||||
|
||||
set(QRC_RESOURCES resources.qrc)
|
||||
set(QRC_RESOURCES resources.qrc)
|
||||
|
||||
set(LANGUAGES_DIRECTORY "${ASSETS_DIR}/languages")
|
||||
set(I18N_FILENAME i18n.qrc)
|
||||
|
|
@ -286,13 +296,13 @@ else()
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
function (PREPEND list prefix)
|
||||
set(new_list "")
|
||||
set(new_list "")
|
||||
|
||||
foreach (elem ${${list}})
|
||||
foreach (elem ${${list}})
|
||||
list(APPEND new_list "${prefix}${elem}")
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
|
||||
set(${list} ${new_list} PARENT_SCOPE)
|
||||
set(${list} ${new_list} PARENT_SCOPE)
|
||||
endfunction ()
|
||||
|
||||
# Force absolute paths.
|
||||
|
|
@ -308,14 +318,14 @@ else()
|
|||
foreach (line ${QRC_RESOURCES_CONTENT})
|
||||
set(result)
|
||||
string(REGEX REPLACE
|
||||
"^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$"
|
||||
"\\1"
|
||||
result
|
||||
"${line}"
|
||||
"^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$"
|
||||
"\\1"
|
||||
result
|
||||
"${line}"
|
||||
)
|
||||
string(REGEX MATCH "\\.[a-z]+$" is_ui ${result})
|
||||
if (NOT ${is_ui} STREQUAL "")
|
||||
list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}")
|
||||
list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
|
|
@ -324,16 +334,16 @@ else()
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
if (NOT WIN32)
|
||||
add_custom_target(
|
||||
add_custom_target(
|
||||
check_qml DEPENDS ${QML_SOURCES}
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/check_qml_syntax"
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tools/private/pre-commit"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit"
|
||||
)
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tools/private/pre-commit"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit"
|
||||
)
|
||||
set(_QML_IMPORT_PATHS "")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/modules")
|
||||
list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/dev-modules")
|
||||
|
|
@ -344,16 +354,16 @@ else()
|
|||
set(QML_IMPORT_PATH ${_QML_IMPORT_PATHS} CACHE STRING "Path used to locate CMake modules by Qt Creator" FORCE)
|
||||
|
||||
|
||||
if(APPLE)
|
||||
if(MS2_PLUGINS_LOCATION)
|
||||
set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION})
|
||||
else()
|
||||
set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries")
|
||||
endif()
|
||||
else()
|
||||
set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins")
|
||||
endif()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
if(APPLE)
|
||||
if(MS2_PLUGINS_LOCATION)
|
||||
set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION})
|
||||
else()
|
||||
set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries")
|
||||
endif()
|
||||
else()
|
||||
set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins")
|
||||
endif()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
# ------------------------------------------------------------------------------
|
||||
# Build.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
@ -364,11 +374,11 @@ endif()
|
|||
find_package(Qt5 COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET)
|
||||
|
||||
if (CMAKE_INSTALL_RPATH)
|
||||
#Retrieve lib path from a know QT executable
|
||||
get_target_property(LUPDATE_PATH Qt5::lupdate LOCATION)
|
||||
get_filename_component(LUPDATE_PATH "${LUPDATE_PATH}" DIRECTORY)
|
||||
get_filename_component(QT_PATH "${LUPDATE_PATH}/../lib" ABSOLUTE)
|
||||
list(APPEND CMAKE_INSTALL_RPATH "${QT_PATH}")
|
||||
#Retrieve lib path from a know QT executable
|
||||
get_target_property(LUPDATE_PATH Qt5::lupdate LOCATION)
|
||||
get_filename_component(LUPDATE_PATH "${LUPDATE_PATH}" DIRECTORY)
|
||||
get_filename_component(QT_PATH "${LUPDATE_PATH}/../lib" ABSOLUTE)
|
||||
list(APPEND CMAKE_INSTALL_RPATH "${QT_PATH}")
|
||||
endif ()
|
||||
# Add languages support.
|
||||
add_subdirectory(${LANGUAGES_DIRECTORY})
|
||||
|
|
@ -386,109 +396,113 @@ endif()
|
|||
|
||||
bc_git_version(${TARGET_NAME} ${PROJECT_VERSION})
|
||||
add_dependencies(${APP_LIBRARY} ${TARGET_NAME}-git-version)
|
||||
add_dependencies(${APP_LIBRARY} update_translations)
|
||||
add_dependencies(${APP_LIBRARY} update_translations)
|
||||
if (WIN32)
|
||||
add_executable(${TARGET_NAME} WIN32 $<TARGET_OBJECTS:${APP_LIBRARY}> ${ASSETS_DIR}/app-icon.rc ${MAIN_FILE})
|
||||
add_executable(${TARGET_NAME} WIN32 $<TARGET_OBJECTS:${APP_LIBRARY}> ${ASSETS_DIR}/app-icon.rc ${MAIN_FILE})
|
||||
else ()
|
||||
add_executable(${TARGET_NAME} $<TARGET_OBJECTS:${APP_LIBRARY}> ${MAIN_FILE})
|
||||
add_executable(${TARGET_NAME} $<TARGET_OBJECTS:${APP_LIBRARY}> ${MAIN_FILE})
|
||||
endif ()
|
||||
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}")
|
||||
set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${LINPHONE_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}" "${MINIZIP_INCLUDE_DIRS}")
|
||||
set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONE_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${OPUS_LIBRARIES})
|
||||
if(WIN32)
|
||||
list(APPEND LIBRARIES ${MINIZIP_LIBRARIES})
|
||||
list(APPEND LIBRARIES ${MINIZIP_LIBRARIES})
|
||||
endif()
|
||||
foreach (package ${QT5_PACKAGES})
|
||||
list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
# `qt5_create_translation` is provided from `LinguistTools` package.
|
||||
# But the `Qt5::LinguistTools` lib does not exist. Remove it.
|
||||
if (NOT (${package} STREQUAL LinguistTools))
|
||||
list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
# `qt5_create_translation` is provided from `LinguistTools` package.
|
||||
# But the `Qt5::LinguistTools` lib does not exist. Remove it.
|
||||
if (NOT (${package} STREQUAL LinguistTools))
|
||||
list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
foreach (package ${QT5_PACKAGES_OPTIONAL})
|
||||
if ("${Qt5${package}_FOUND}")
|
||||
if ("${Qt5${package}_FOUND}")
|
||||
message("Optional package ${package} found.")
|
||||
list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
|
||||
|
||||
string(TOUPPER "${package}" INCLUDE_NAME)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${INCLUDE_NAME}_ENABLED")
|
||||
else ()
|
||||
else ()
|
||||
message("Optional package ${package} not found.")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND LIBRARIES "-framework Cocoa -framework IOKit")
|
||||
# -framework linphone") #This doesn't work yet
|
||||
list(APPEND LIBRARIES "-framework Cocoa -framework IOKit")
|
||||
# -framework linphone") #This doesn't work yet
|
||||
endif ()
|
||||
target_include_directories(${APP_LIBRARY} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${LIBRARIES})
|
||||
if(WIN32)
|
||||
target_link_libraries(${TARGET_NAME} wsock32 ws2_32)
|
||||
endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(${TARGET_NAME} wsock32 ws2_32)
|
||||
endif()
|
||||
|
||||
foreach (target ${TARGET_NAME})
|
||||
install(TARGETS ${target}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
message("Available target : ${target}")
|
||||
# install(TARGETS ${target}
|
||||
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
# PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
# )
|
||||
endforeach ()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
# Install desktop/icon files.
|
||||
configure_file("${ASSETS_DIR}/linphone.desktop.cmake" "${EXECUTABLE_NAME}.desktop" @ONLY)
|
||||
# Install desktop/icon files.
|
||||
configure_file("${ASSETS_DIR}/linphone.desktop.cmake" "${EXECUTABLE_NAME}.desktop" @ONLY)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}.desktop"
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
|
||||
)
|
||||
install(FILES "${ASSETS_DIR}/images/linphone_logo.svg"
|
||||
)
|
||||
install(FILES "${ASSETS_DIR}/images/linphone_logo.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/"
|
||||
RENAME "${EXECUTABLE_NAME}.svg"
|
||||
)
|
||||
|
||||
set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128 256x256)
|
||||
foreach (DIR ${ICON_DIRS})
|
||||
install(FILES "${ASSETS_DIR}/icons/hicolor/${DIR}/apps/icon.png"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${DIR}/apps/"
|
||||
RENAME "${EXECUTABLE_NAME}.png"
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128 256x256)
|
||||
foreach (DIR ${ICON_DIRS})
|
||||
install(FILES "${ASSETS_DIR}/icons/hicolor/${DIR}/apps/icon.png"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${DIR}/apps/"
|
||||
RENAME "${EXECUTABLE_NAME}.png"
|
||||
)
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Install rc files.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if(APPLE)
|
||||
set(PACKAGING_DIR "${APPLICATION_NAME}.app/Contents/Resources")
|
||||
else()
|
||||
set(PACKAGING_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
install(FILES "${ASSETS_DIR}/linphonerc-factory"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}"
|
||||
)
|
||||
DESTINATION "${PACKAGING_DIR}/${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}"
|
||||
)
|
||||
|
||||
set(ASSETS_ASSISTANT_DIR "${ASSETS_DIR}/assistant")
|
||||
set(ASSISTANT_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}/assistant")
|
||||
set(ASSISTANT_INSTALL_DATADIR "${PACKAGING_DIR}/${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}/assistant")
|
||||
|
||||
install(FILES "${ASSETS_ASSISTANT_DIR}/use-other-sip-account.rc"
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
install(FILES "${ASSETS_ASSISTANT_DIR}/create-app-sip-account.rc"
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
install(FILES "${ASSETS_ASSISTANT_DIR}/use-app-sip-account.rc"
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
DESTINATION "${ASSISTANT_INSTALL_DATADIR}"
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# CPack settings & RPM.
|
||||
# ------------------------------------------------------------------------------
|
||||
set(LINPHONE_DESKTOP_DIR "${CMAKE_SOURCE_DIR}")
|
||||
set(LINPHONE_OUTPUT_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
set(LINPHONE_SDK_DIR "${CMAKE_BINARY_DIR}/linphone-sdk")
|
||||
set(TOOLS_DIR "${CMAKE_BINARY_DIR}/programs")
|
||||
set(LINPHONE_SOURCE_DIR ${EP_linphone_SOURCE_DIR})
|
||||
|
|
@ -503,31 +517,24 @@ endif()
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
source_group(
|
||||
"Qml" REGULAR_EXPRESSION ".+\.qml$"
|
||||
)
|
||||
"Qml" REGULAR_EXPRESSION ".+\.qml$"
|
||||
)
|
||||
source_group(
|
||||
"Js" REGULAR_EXPRESSION ".+\.js$"
|
||||
)
|
||||
"Js" REGULAR_EXPRESSION ".+\.js$"
|
||||
)
|
||||
source_group(
|
||||
"Svg" REGULAR_EXPRESSION ".+\.svg$"
|
||||
)
|
||||
"Svg" REGULAR_EXPRESSION ".+\.svg$"
|
||||
)
|
||||
|
||||
# ------------------------------
|
||||
# Installation
|
||||
# ------------------------------
|
||||
install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake_builder/install.cmake")
|
||||
#endif ()
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib")
|
||||
target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
||||
execute_process(COMMAND install_name_tool -id "@executable_path/../Frameworks/libminizip.dylib" "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
||||
elseif(NOT WIN32)
|
||||
if( EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/libminizip.so")
|
||||
target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib64/libminizip.so")
|
||||
elseif(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libminizip.so")
|
||||
target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib/libminizip.so")
|
||||
else()
|
||||
message("Error cannot find ${CMAKE_INSTALL_PREFIX}/lib*/libminizip.so while linking")
|
||||
endif()
|
||||
target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.so")
|
||||
endif()
|
||||
endif()#If (LinphoneCxx_FOUND AND Minizip_FOUND)
|
||||
endif()#If (LinphoneCxx_FOUND)
|
||||
endif()#If (LinphoneCxx_FOUND)
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -68,11 +68,13 @@ Go to this new folder and begin the build process : `cd build-desktop`
|
|||
|
||||
2. Prepare your options : `cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo` By default, it will try compile all dependencies. You can remove some by adding `-ENABLE_<COMPONENT>=NO` to the command. You can use `cmake-gui ..` if you want to have a better access to them.
|
||||
|
||||
3. Build the SDK : `cmake --build . --target sdk`. You can add `--parallel 10` if you have CMake>3.12 to speedup the process.
|
||||
3. Build the SDK : `cmake --build . --target sdk --config RelWithDebInfo`. You can add `--parallel 10` if you have CMake>3.12 to speedup the process.
|
||||
|
||||
4. Build The submodule. `cmake ..` and `cmake --build . --target install`
|
||||
4. Build The submodule. `cmake ..` and `cmake --build . --target install --config RelWithDebInfo`
|
||||
|
||||
5. Finish the process with a new `cmake ..` and `cmake --build . --target install`.
|
||||
5. Finish the process with a new `cmake ..` and `cmake --build . --target install --config RelWithDebInfo`.
|
||||
|
||||
It is important to set the config in the process or you can have a bad configuration for your binary that could lead to some corruption : on Windows, this issue is spotted when trying to start the application and an empty file with a random name is created. So, you are working on an IDE (like Qt Creator), you may override the build command.
|
||||
|
||||
When all are over, the files will be in the OUTPUT folder in the build directory.
|
||||
|
||||
|
|
@ -90,8 +92,6 @@ Usually, if it is about VPX or Decaf, this could come from your Perl installatio
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
#### Mac OS X Troubleshooting
|
||||
To install the required dependencies on Mac OS X, you can use [Homebrew](https://brew.sh/).
|
||||
Before you install packages with Brew, you may have to change directories permissions (if you can't change permissions with sudo on a MacOS >= High Sierra, get a look at [this StackOverflow answer](https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions#46844441)).
|
||||
|
|
@ -128,7 +128,7 @@ Before you install packages with Brew, you may have to change directories permis
|
|||
### Installing Linux dependencies
|
||||
|
||||
|
||||
From 4.1 version of Desktop:
|
||||
Dependencies from 4.1 version of Desktop:
|
||||
|
||||
apt-get install libqt53dcore5:amd64 libqt53dextras5:amd64 libqt53dinput5:amd64 libqt53dlogic5:amd64 libqt53dquick5:amd64 libqt53dquickextras5:amd64 libqt53dquickinput5:amd64 libqt53dquickrender5:amd64 libqt53drender5:amd64 libqt5concurrent5:amd64 libqt5core5a:amd64 libqt5dbus5:amd64 libqt5designer5:amd64 libqt5designercomponents5:amd64 libqt5gui5:amd64 libqt5help5:amd64 libqt5multimedia5:amd64 libqt5multimedia5-plugins:amd64 libqt5multimediawidgets5:amd64 libqt5network5:amd64 libqt5opengl5:amd64 libqt5opengl5-dev:amd64 libqt5positioning5:amd64 libqt5printsupport5:amd64 libqt5qml5:amd64 libqt5quick5:amd64 libqt5quickcontrols2-5:amd64 libqt5quickparticles5:amd64 libqt5quicktemplates2-5:amd64 libqt5quicktest5:amd64 libqt5quickwidgets5:amd64 libqt5script5:amd64 libqt5scripttools5:amd64 libqt5sensors5:amd64 libqt5serialport5:amd64 libqt5sql5:amd64 libqt5sql5-sqlite:amd64 libqt5svg5:amd64 libqt5svg5-dev:amd64 libqt5test5:amd64 libqt5webchannel5:amd64 libqt5webengine-data libqt5webenginecore5:amd64 libqt5webenginewidgets5:amd64 libqt5webkit5:amd64 libqt5widgets5:amd64 libqt5x11extras5:amd64 libqt5xml5:amd64 libqt5xmlpatterns5:amd64 qt5-default:amd64 qt5-doc qt5-gtk-platformtheme:amd64 qt5-qmake:amd64 qt5-qmltooling-plugins:amd64
|
||||
|
||||
|
|
|
|||
27
assets/icons/genicons_1.0.sh
Executable file
27
assets/icons/genicons_1.0.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
##
|
||||
## Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||
##
|
||||
## This file is part of linphone-desktop
|
||||
## (see https://www.linphone.org).
|
||||
##
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
for i in 16 22 24 32 64 128 256
|
||||
do
|
||||
mkdir -p hicolor/${i}x${i}/apps
|
||||
inkscape -z --export-type=png --export-file=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../images/linphone_logo.svg
|
||||
done
|
||||
convert hicolor/16x16/apps/icon.png hicolor/22x22/apps/icon.png hicolor/24x24/apps/icon.png hicolor/32x32/apps/icon.png hicolor/64x64/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png -colors 256 ../icon.ico
|
||||
|
|
@ -9,16 +9,14 @@ cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win
|
|||
:: Mini config
|
||||
::cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=NO -DENABLE_OPUS=NO -A Win32 -DENABLE_VIDEO=YES -DENABLE_GL=YES
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
cmake --build . --target sdk --config RelWithDebInfo --parallel 10
|
||||
cmake --build . --target sdk --config RelWithDebInfo --parallel 10 -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false;DoNotCopyLocalIfInGac=true;CL_MPCount=16
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Minizip Submodule Building
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win32
|
||||
cmake --build . --target all_build --parallel 10 --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false
|
||||
cmake --build . --target install --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false
|
||||
cmake --build . --target install --config RelWithDebInfo --parallel 10 -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false;DoNotCopyLocalIfInGac=true;CL_MPCount=16
|
||||
|
||||
:: Desktop Building
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win32
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
cmake --build . --target all_build --config RelWithDebInfo --parallel 10 -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false
|
||||
cmake --build . --target install --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false
|
||||
cmake --build . --target install --config RelWithDebInfo --parallel 10 -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false;DoNotCopyLocalIfInGac=true;CL_MPCount=16
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include(../application_info.cmake)
|
||||
if (APPLE)
|
||||
#execute_process(COMMAND install_name_tool -id "@executable_path/../lib/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib")
|
||||
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks/" "${CMAKE_INSTALL_PREFIX}/bin/linphone")
|
||||
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../lib/" "${CMAKE_INSTALL_PREFIX}/bin/linphone")
|
||||
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks/" "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}")
|
||||
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../lib/" "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}")
|
||||
else ()
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -62,105 +62,38 @@ set(PACKAGE_VERSION "${LINPHONE_VERSION}")
|
|||
# Preparing the Linphone SDK bundle.
|
||||
# ==============================================================================
|
||||
|
||||
# Create sdk-temp folder where we can find all needed files (libs, includes etc.)
|
||||
|
||||
file(REMOVE_RECURSE "${LINPHONE_SDK_TMP}")
|
||||
message(" Linphone_SDK_DIR : ${LINPHONE_SDK_DIR}")
|
||||
file(COPY "${LINPHONE_SDK_DIR}/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
if(APPLE)
|
||||
execute_process(COMMAND install_name_tool -id "@executable_path/../Frameworks/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib")
|
||||
elseif(WIN32)
|
||||
|
||||
endif()
|
||||
file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/desktop" "${LINPHONE_SDK_TMP}")
|
||||
|
||||
# Generates a zip archive containing the development files.
|
||||
macro (add_sdk_list_file NAME)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sdk_content/${NAME}.list.in" "${LINPHONE_SDK_TMP}/${NAME}.list" @ONLY)
|
||||
list(APPEND LIST_FILES "${LINPHONE_SDK_TMP}/${NAME}.list")
|
||||
endmacro ()
|
||||
|
||||
if (WIN32)
|
||||
set(LIBDIR "bin")
|
||||
set(LIBDIR ${CMAKE_INSTALL_BINDIR})
|
||||
set(LIBPREFIX "")
|
||||
set(LIBEXT "dll")
|
||||
set(PLUGINEXT "dll")
|
||||
elseif (APPLE)
|
||||
set(LIBDIR "lib")
|
||||
set(LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(LIBPREFIX "lib")
|
||||
set(LIBEXT "dylib")
|
||||
set(PLUGINEXT "so")
|
||||
endif ()
|
||||
|
||||
set(LIST_FILES )
|
||||
add_sdk_list_file(bctoolbox)
|
||||
add_sdk_list_file(bellesip)
|
||||
add_sdk_list_file(ortp)
|
||||
add_sdk_list_file(ms2)
|
||||
add_sdk_list_file(ms2plugins)
|
||||
add_sdk_list_file(linphone)
|
||||
add_sdk_list_file(linphonecxx)
|
||||
if (WIN32)
|
||||
add_sdk_list_file(sqlite3)
|
||||
add_sdk_list_file(xml2)
|
||||
add_sdk_list_file(zlib)
|
||||
endif ()
|
||||
if (ENABLE_UNIT_TESTS)
|
||||
add_sdk_list_file(bcunit)
|
||||
endif ()
|
||||
if (ENABLE_VCARD)
|
||||
add_sdk_list_file(vcard)
|
||||
endif ()
|
||||
if (ENABLE_BV16)
|
||||
add_sdk_list_file(bv16)
|
||||
endif ()
|
||||
if (ENABLE_GSM)
|
||||
add_sdk_list_file(gsm)
|
||||
endif ()
|
||||
if (ENABLE_OPUS)
|
||||
add_sdk_list_file(opus)
|
||||
endif ()
|
||||
if (ENABLE_SPEEX)
|
||||
add_sdk_list_file(speex)
|
||||
endif ()
|
||||
if (ENABLE_MBEDTLS)
|
||||
add_sdk_list_file(mbedtls)
|
||||
endif ()
|
||||
if (ENABLE_POLARSSL)
|
||||
add_sdk_list_file(polarssl)
|
||||
endif ()
|
||||
if (ENABLE_SRTP)
|
||||
add_sdk_list_file(srtp)
|
||||
endif ()
|
||||
if (ENABLE_ZRTP)
|
||||
add_sdk_list_file(bzrtp)
|
||||
endif ()
|
||||
if (ENABLE_FFMPEG)
|
||||
add_sdk_list_file(ffmpeg)
|
||||
endif ()
|
||||
file(WRITE "${LINPHONE_SDK_TMP}/${EXECUTABLE_NAME}-sdk.list" "")
|
||||
foreach (FILE ${LIST_FILES})
|
||||
file(READ "${FILE}" CONTENT)
|
||||
file(APPEND "${LINPHONE_SDK_TMP}/${EXECUTABLE_NAME}-sdk.list" "${CONTENT}\n")
|
||||
endforeach ()
|
||||
|
||||
if (WIN32)
|
||||
find_program(7Z_PROGRAM 7z PATHS "$ENV{ProgramFiles}/7-Zip")
|
||||
if (7Z_PROGRAM)
|
||||
execute_process(
|
||||
COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-win32.zip "@${EXECUTABLE_NAME}-sdk.list"
|
||||
WORKING_DIRECTORY ${LINPHONE_SDK_TMP}
|
||||
)
|
||||
else ()
|
||||
message(WARNING "7z has not been found, cannot generate the SDK!")
|
||||
endif ()
|
||||
elseif (APPLE)
|
||||
execute_process(
|
||||
COMMAND rm -rf "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-mac.zip"
|
||||
COMMAND zip -ry "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-mac.zip" . -i "@${EXECUTABLE_NAME}-sdk.list"
|
||||
WORKING_DIRECTORY ${LINPHONE_SDK_TMP}
|
||||
)
|
||||
endif ()
|
||||
# Removed unless it is usefull to get a zip from SDK : The SDK is packaged with binaries.
|
||||
#if (WIN32)
|
||||
# find_program(7Z_PROGRAM 7z PATHS "$ENV{ProgramFiles}/7-Zip")
|
||||
# if (7Z_PROGRAM)
|
||||
# execute_process(
|
||||
# COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-win32.zip "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
|
||||
# )
|
||||
# else ()
|
||||
# message(WARNING "7z has not been found, cannot generate the SDK!")
|
||||
# endif ()
|
||||
#elseif (APPLE)
|
||||
# execute_process(
|
||||
# COMMAND rm -rf "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-mac.zip"
|
||||
# COMMAND zip -ry "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONE_GIT_REVISION}-mac.zip" . -i "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
|
||||
# )
|
||||
#endif ()
|
||||
|
||||
# ==============================================================================
|
||||
# Specific deployment.
|
||||
|
|
@ -170,33 +103,33 @@ if (WIN32)
|
|||
#execute_process(
|
||||
# COMMAND windeployqt "${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}.exe" "--qmldir" "${LINPHONE_QML_DIR}"
|
||||
#)
|
||||
install( CODE "execute_process(COMMAND windeployqt ${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}.exe --qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" )
|
||||
install( CODE "execute_process(COMMAND windeployqt ${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_BINDIR}/${EXECUTABLE_NAME}.exe --qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" COMPONENT application)
|
||||
|
||||
file(GLOB LIB_FILES "${LINPHONE_SDK_TMP}/lib/*.dll")
|
||||
install(FILES ${LIB_FILES} DESTINATION "bin/")
|
||||
file(GLOB LIB_FILES "${LINPHONE_SDK_TMP}/bin/*.dll")
|
||||
install(FILES ${LIB_FILES} DESTINATION "bin/")
|
||||
file(GLOB EXE_FILES "${LINPHONE_SDK_TMP}/bin/*.exe")
|
||||
install(FILES ${EXE_FILES} DESTINATION "bin/")
|
||||
if (EXISTS "${LINPHONE_SDK_TMP}/lib/mediastreamer")
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/lib/mediastreamer" DESTINATION "lib" USE_SOURCE_PERMISSIONS)
|
||||
file(GLOB LIB_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/*.dll")
|
||||
install(FILES ${LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/")
|
||||
file(GLOB LIB_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_BINDIR}/*.dll")
|
||||
install(FILES ${LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/")
|
||||
file(GLOB EXE_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_BINDIR}/*.exe")
|
||||
install(FILES ${EXE_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/")
|
||||
if (EXISTS "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer" DESTINATION "${CMAKE_INSTALL_LIBDIR}" USE_SOURCE_PERMISSIONS)
|
||||
endif ()
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "share" USE_SOURCE_PERMISSIONS)
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "share" USE_SOURCE_PERMISSIONS)
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/Linphone/rootca.pem" DESTINATION "share/Linphone/")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/images" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS)
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/sounds" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS)
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/Linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}/")
|
||||
|
||||
# list(REMOVE_ITEM SHARE_CONTENT "share/belr" "share/Belr" "share/images" "share/${APPLICATION_NAME}" "share/${APPLICATION_NAME}" "share/sounds")
|
||||
# list(REMOVE_ITEM SHARE_CONTENT "${CMAKE_INSTALL_DATAROOTDIR}/belr" "${CMAKE_INSTALL_DATAROOTDIR}/Belr" "${CMAKE_INSTALL_DATAROOTDIR}/images" "${CMAKE_INSTALL_DATAROOTDIR}/${APPLICATION_NAME}" "${CMAKE_INSTALL_DATAROOTDIR}/${APPLICATION_NAME}" "${CMAKE_INSTALL_DATAROOTDIR}/sounds")
|
||||
# foreach (ITEM IN LISTS SHARE_CONTENT)
|
||||
# list(APPEND SHARE_CONTENT_EXCLUDE PATTERN "${ITEM}" EXCLUDE)
|
||||
# endforeach ()
|
||||
elseif (APPLE)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in" "${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Info.plist" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone.icns" "${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Resources/${EXECUTABLE_NAME}.icns" COPYONLY)
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/Frameworks/" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks" USE_SOURCE_PERMISSIONS)
|
||||
install(PROGRAMS "${CMAKE_INSTALL_PREFIX}/bin/${EXECUTABLE_NAME}" DESTINATION "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||
file(GLOB SHARED_LIBRARIES "${LINPHONE_SDK_TMP}/lib/lib*.dylib")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/Frameworks/" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks" USE_SOURCE_PERMISSIONS COMPONENT application)
|
||||
install(PROGRAMS "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}" DESTINATION "${APPLICATION_NAME}.app/Contents/MacOS" COMPONENT application)
|
||||
file(GLOB SHARED_LIBRARIES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/lib*.dylib")
|
||||
foreach (LIBRARY ${SHARED_LIBRARIES})
|
||||
install(FILES "${LIBRARY}" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks")
|
||||
install(FILES "${LIBRARY}" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks" COMPONENT application)
|
||||
endforeach ()
|
||||
|
||||
find_program(DEPLOYQT_PROGRAM macdeployqt)
|
||||
|
|
@ -205,32 +138,27 @@ elseif (APPLE)
|
|||
endif ()
|
||||
|
||||
|
||||
if (EXISTS "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer")
|
||||
file(COPY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/lib" USE_SOURCE_PERMISSIONS)
|
||||
if (EXISTS "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer")
|
||||
file(COPY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_LIBDIR}" USE_SOURCE_PERMISSIONS)
|
||||
endif ()
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/lib/libminizip.dylib" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks/")
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/Belr/grammars/cpim_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/")
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/Belr/grammars/vcard_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/")
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS)
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS)
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/${APPLICATION_NAME}/rootca.pem" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/linphonerc-factory" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}")
|
||||
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-other-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/create-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant")
|
||||
install(FILES "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks/" COMPONENT application)
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/Belr/grammars/cpim_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/" COMPONENT application)
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/Belr/grammars/vcard_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/" COMPONENT application)
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/images" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS COMPONENT application)
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/sounds" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS COMPONENT application)
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/Linphone/rootca.pem" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/${CMAKE_INSTALL_DATAROOTDIR}/${APPLICATION_NAME}" COMPONENT application)
|
||||
|
||||
file(GLOB SHARED_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app/Contents/Frameworks/lib*.dylib")
|
||||
|
||||
foreach (LIBRARY ${SHARED_LIBRARIES})
|
||||
get_filename_component(LIBRARY_FILENAME ${LIBRARY} NAME)
|
||||
if(NOT ("${LIBRARY_FILENAME}" STREQUAL "libminizip.dylib"))
|
||||
message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/lib' to '@executable_path/../Frameworks'")
|
||||
execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/lib" "@executable_path/../Frameworks" "${LIBRARY}")
|
||||
message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}' to '@executable_path/../Frameworks'")
|
||||
execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}" "@executable_path/../Frameworks" "${LIBRARY}")
|
||||
endif()
|
||||
endforeach ()
|
||||
|
||||
install( CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} ${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" )
|
||||
install( CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} ${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" COMPONENT application)
|
||||
|
||||
if (LINPHONE_BUILDER_SIGNING_IDENTITY)
|
||||
file(GLOB FRAMEWORKS_NAMES "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app/Contents/Frameworks/*")
|
||||
|
|
@ -246,45 +174,34 @@ elseif (APPLE)
|
|||
endforeach ()
|
||||
execute_process(COMMAND "codesign" "--verbose" "-s" "${LINPHONE_BUILDER_SIGNING_IDENTITY}" "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app")
|
||||
endif ()
|
||||
# install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" DESTINATION "." USE_SOURCE_PERMISSIONS)
|
||||
# install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" DESTINATION "." USE_SOURCE_PERMISSIONS COMPONENT application)
|
||||
|
||||
# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/packaging.cmake.in" "packaging.cmake" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/packaging.cmake.in" "packaging.cmake" @ONLY)
|
||||
# install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake")
|
||||
else()# Not Windows and Apple
|
||||
foreach (LIBRARY ${SHARED_LIBRARIES})
|
||||
get_filename_component(LIBRARY_FILENAME ${LIBRARY} NAME)
|
||||
#if(NOT ("${LIBRARY_FILENAME}" STREQUAL "libminizip.dylib"))
|
||||
message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/lib' to '$ORIGIN/../lib'")
|
||||
execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/lib" "$ORIGIN/../lib" "${LIBRARY}")
|
||||
execute_process(COMMAND install_name_tool -add_rpath "$ORIGIN/../lib64" "${LIBRARY}")
|
||||
#endif()
|
||||
endforeach ()
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/bin/" DESTINATION "bin" USE_SOURCE_PERMISSIONS)
|
||||
message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}' to '$ORIGIN/../${CMAKE_INSTALL_LIBDIR}'")
|
||||
execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}" "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" "${LIBRARY}")
|
||||
endforeach ()
|
||||
message(${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_BINDIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" USE_SOURCE_PERMISSIONS)
|
||||
#Just in case. This is useless because we have to use CMAKE_INSTALL_LIBDIR
|
||||
if( EXISTS "${LINPHONE_SDK_TMP}/lib/")
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/lib/" DESTINATION "lib" USE_SOURCE_PERMISSIONS)
|
||||
if( EXISTS "${LINPHONE_OUTPUT_DIR}/lib/")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" USE_SOURCE_PERMISSIONS)
|
||||
endif()
|
||||
if( EXISTS "${LINPHONE_SDK_TMP}/lib64/")
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/lib64/" DESTINATION "lib64" USE_SOURCE_PERMISSIONS)
|
||||
if( EXISTS "${LINPHONE_OUTPUT_DIR}/lib64/")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib64/" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib64" USE_SOURCE_PERMISSIONS)
|
||||
endif()
|
||||
install(DIRECTORY "${LINPHONE_SDK_TMP}/share/" DESTINATION "share" USE_SOURCE_PERMISSIONS)
|
||||
#install(PROGRAMS "${CMAKE_INSTALL_PREFIX}/bin/${EXECUTABLE_NAME}" DESTINATION "/bin")
|
||||
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS)
|
||||
|
||||
|
||||
if (EXISTS "${LINPHONE_SDK_TMP}/lib/mediastreamer")
|
||||
file(COPY "${LINPHONE_SDK_TMP}/lib/mediastreamer" DESTINATION "lib" USE_SOURCE_PERMISSIONS)
|
||||
if (EXISTS "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer")
|
||||
file(COPY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" USE_SOURCE_PERMISSIONS)
|
||||
endif ()
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/belr/grammars/cpim_grammar" DESTINATION "share/belr/grammars/")
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/belr/grammars/vcard_grammar" DESTINATION "share/belr/grammars/")
|
||||
# install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "share" USE_SOURCE_PERMISSIONS)
|
||||
# install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "share" USE_SOURCE_PERMISSIONS)
|
||||
#install(FILES "${LINPHONE_SDK_TMP}/share/${APPLICATION_NAME}/rootca.pem" DESTINATION "share/${APPLICATION_NAME}")
|
||||
install(FILES "${LINPHONE_SDK_TMP}/share/${EXECUTABLE_NAME}/rootca.pem" DESTINATION "share/${APPLICATION_NAME}") #We use executable_name because of name folder that is not harmonized from the SDK
|
||||
# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/linphonerc-factory" DESTINATION "share/${APPLICATION_NAME}")
|
||||
|
||||
# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-other-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant")
|
||||
# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/create-app-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant")
|
||||
# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-app-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/cpim_grammar" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/vcard_grammar" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/")
|
||||
install(FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${APPLICATION_NAME}") #We use executable_name because of name folder that is not harmonized from the SDK
|
||||
install(PROGRAMS "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" COMPONENT application)
|
||||
endif ()
|
||||
|
||||
# Temporary deactivate
|
||||
|
|
@ -297,7 +214,7 @@ endif ()
|
|||
# if (NOT VCRUNTIME_LIB)
|
||||
# find_file(VCRUNTIME_LIB "msvcr${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32")
|
||||
# endif ()
|
||||
# install(FILES ${MSVCP_LIB} ${UCRTBASE_LIB} ${VCRUNTIME_LIB} DESTINATION "bin")
|
||||
# install(FILES ${MSVCP_LIB} ${UCRTBASE_LIB} ${VCRUNTIME_LIB} DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
# if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# find_file(MSVCPD_LIB "msvcp${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32")
|
||||
# find_file(UCRTBASED_LIB "ucrtbased.dll" PATHS "C:/Windows/System32")
|
||||
|
|
@ -305,7 +222,7 @@ endif ()
|
|||
# if (NOT VCRUNTIMED_LIB)
|
||||
# find_file(VCRUNTIMED_LIB "msvcr${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32")
|
||||
# endif ()
|
||||
# install(FILES ${MSVCPD_LIB} ${UCRTBASED_LIB} ${VCRUNTIMED_LIB} DESTINATION "bin")
|
||||
# install(FILES ${MSVCPD_LIB} ${UCRTBASED_LIB} ${VCRUNTIMED_LIB} DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
# endif ()
|
||||
#endif ()
|
||||
|
||||
|
|
@ -321,7 +238,6 @@ if (LINPHONE_MICRO_VERSION)
|
|||
set(CPACK_PACKAGE_VERSION_PATCH ${LINPHONE_MICRO_VERSION})
|
||||
endif ()
|
||||
set(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};${APPLICATION_NAME}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${APPLICATION_NAME}")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${LINPHONE_DESKTOP_DIR}/LICENSE.txt")
|
||||
|
||||
if (APPLE)
|
||||
|
|
@ -330,6 +246,9 @@ if (APPLE)
|
|||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone_dmg.scpt.in" "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt" @ONLY)
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt")
|
||||
set(CPACK_BINARY_DRAGNDROP ON)
|
||||
else()
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${APPLICATION_NAME}")
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
|
|
@ -377,7 +296,7 @@ if (WIN32)
|
|||
set(PASSPHRASE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt")
|
||||
get_filename_component(WINSDK_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" REALPATH CACHE)
|
||||
find_package(PythonInterp)
|
||||
find_program(SIGNTOOL signtool PATHS ${WINSDK_DIR}/bin)
|
||||
find_program(SIGNTOOL signtool PATHS ${WINSDK_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||
set(SIGNTOOL_COMMAND "${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/windows/signtool.py")
|
||||
set(PERFORM_SIGNING 0)
|
||||
if (EXISTS ${PFX_FILE})
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<key>CFBundleGetInfoString</key>
|
||||
<string>@PACKAGE_VERSION@, (C) 2011-2018 @APPLICATION_NAME@ @APPLICATION_URL@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>linphone.icns</string>
|
||||
<string>@EXECUTABLE_NAME@.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.linphone.linphone</string>
|
||||
<string>@APPLICATION_ID@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 9bbf905c45d298d98dca5ef2eac6288e5cb70af7
|
||||
Subproject commit bff2ab0768b4f6b0f8fc73d02acd61ca3360ff82
|
||||
|
|
@ -40,7 +40,6 @@ namespace {
|
|||
AppController::AppController (int &argc, char *argv[]) {
|
||||
QT_REQUIRE_VERSION(argc, argv, ApplicationMinimalQtVersion)
|
||||
Q_ASSERT(!mApp);
|
||||
|
||||
// Disable QML cache. Avoid malformed cache.
|
||||
qputenv("QML_DISABLE_DISK_CACHE", "true");
|
||||
|
||||
|
|
@ -59,6 +58,8 @@ AppController::AppController (int &argc, char *argv[]) {
|
|||
// The EXECUTABLE_NAME will be used in qt standard paths. It's our goal.
|
||||
QCoreApplication::setApplicationName(EXECUTABLE_NAME);
|
||||
QCoreApplication::setApplicationVersion(LINPHONE_QT_GIT_VERSION);
|
||||
QApplication::setOrganizationName(QString(APPLICATION_VENDOR).replace(' ', '-'));
|
||||
QApplication::setOrganizationDomain(APPLICATION_ID);
|
||||
|
||||
mApp = new App(argc, argv);
|
||||
QQuickStyle::setStyle("Default");
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
// =============================================================================
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
QApplication::setOrganizationName("Belledonne-Communications");
|
||||
QApplication::setOrganizationDomain("linphone.org");
|
||||
AppController controller(argc, argv);
|
||||
//QLoggingCategory::setFilterRules("*.debug=true;qml=false");
|
||||
App *app = controller.getApp();
|
||||
|
|
|
|||
|
|
@ -136,11 +136,13 @@ static inline QDir getAppPackageDir () {
|
|||
|
||||
static inline QString getAppPackageDataDirPath() {
|
||||
QDir dir = getAppPackageDir();
|
||||
#ifdef APPLE
|
||||
if (!dir.cd("Resources"))
|
||||
{
|
||||
dir.mkdir("Resources");
|
||||
dir.cd("Resources");
|
||||
}
|
||||
#endif
|
||||
if (!dir.cd("share"))
|
||||
{
|
||||
dir.mkdir("share");
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#cmakedefine APPLICATION_DESCRIPTION "${APPLICATION_DESCRIPTION}"
|
||||
#cmakedefine APPLICATION_ID "${APPLICATION_ID}"
|
||||
#cmakedefine APPLICATION_NAME "${APPLICATION_NAME}"
|
||||
#cmakedefine APPLICATION_VENDOR "${APPLICATION_VENDOR}"
|
||||
#cmakedefine ENABLE_UPDATE_CHECK 1
|
||||
#cmakedefine EXECUTABLE_NAME "${EXECUTABLE_NAME}"
|
||||
#cmakedefine MSPLUGINS_DIR "${MSPLUGINS_DIR}"
|
||||
|
|
|
|||
|
|
@ -381,9 +381,9 @@ Rectangle {
|
|||
height: CallStyle.actionArea.userVideo.height
|
||||
width: CallStyle.actionArea.userVideo.width
|
||||
// Function to use if we want to manually Flip horizontally the preview without MSOGL
|
||||
// transform: Matrix4x4 {
|
||||
// matrix: Qt.matrix4x4(-1, 0, 0, CallStyle.actionArea.userVideo.width, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
|
||||
// }
|
||||
transform: Matrix4x4 {
|
||||
matrix: Qt.matrix4x4(-1, 0, 0, CallStyle.actionArea.userVideo.width, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
|
||||
}
|
||||
|
||||
active: incall.width >= CallStyle.actionArea.lowWidth && incall.call.videoEnabled && !_fullscreen
|
||||
sourceComponent: cameraPreview
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ DialogPlus {
|
|||
elide: Text.ElideRight
|
||||
font.pointSize: AboutStyle.copyrightBlock.license.pointSize
|
||||
|
||||
text: 'GNU General Public License V2\n\u00A9 2010-' +
|
||||
text: 'GNU General Public License V3\n\u00A9 2010-' +
|
||||
(new Date().toLocaleDateString(Qt.locale(), 'yyyy')) +
|
||||
' Belledonne Communications'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue