misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
# Copyright (C) 2015-2022 Savoir-faire Linux Inc.
|
|
|
|
#
|
|
|
|
# Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
|
|
|
|
# Author: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
|
|
|
|
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
|
|
|
#
|
|
|
|
# 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, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
|
|
|
# Once done, this find module will set:
|
|
|
|
#
|
2022-11-05 23:18:13 -04:00
|
|
|
# LIBJAMI_INCLUDE_DIR - libjami include directories
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
# LIBJAMI_FOUND - whether it was able to find the include directories
|
|
|
|
# LIBJAMI_LIB - path to libjami or libring library
|
|
|
|
|
|
|
|
set(LIBJAMI_FOUND true)
|
|
|
|
|
2022-10-14 10:55:36 -04:00
|
|
|
if(WITH_DAEMON_SUBMODULE)
|
2022-11-05 23:18:13 -04:00
|
|
|
set(LIBJAMI_INCLUDE_DIR ${DAEMON_DIR}/src/jami)
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
else()
|
2022-11-05 23:18:13 -04:00
|
|
|
find_path(LIBJAMI_INCLUDE_DIR jami.h PATH_SUFFIXES jami)
|
|
|
|
if(NOT LIBJAMI_INCLUDE_DIR)
|
2022-10-14 10:55:36 -04:00
|
|
|
message(STATUS "Jami daemon headers not found!
|
2022-11-05 23:18:13 -04:00
|
|
|
Set -DCMAKE_INSTALL_PREFIX or use -DWITH_DAEMON_SUBMODULE")
|
2022-10-14 10:55:36 -04:00
|
|
|
set(LIBJAMI_FOUND false)
|
|
|
|
endif()
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Save the current value of CMAKE_FIND_LIBRARY_SUFFIXES.
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES_orig ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
|
|
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so;.dll")
|
|
|
|
|
2022-10-14 10:55:36 -04:00
|
|
|
if(WITH_DAEMON_SUBMODULE)
|
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring
|
|
|
|
PATHS ${DAEMON_DIR}/src/.libs
|
2022-12-01 16:37:19 -05:00
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/bin
|
2022-10-14 10:55:36 -04:00
|
|
|
NO_DEFAULT_PATH)
|
|
|
|
else()
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
# Search only in these given PATHS.
|
2022-10-13 15:05:36 -04:00
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
PATHS ${LIBJAMI_BUILD_DIR}/.libs
|
|
|
|
PATHS ${RING_BUILD_DIR}/.libs
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
2022-10-14 10:55:36 -04:00
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/bin
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
NO_DEFAULT_PATH)
|
|
|
|
|
|
|
|
# Search elsewhere as well (e.g. system-wide).
|
|
|
|
if(NOT LIBJAMI_LIB)
|
2022-10-13 15:05:36 -04:00
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring)
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
endif()
|
2022-10-14 10:55:36 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Try for a static version also.
|
|
|
|
if(NOT LIBJAMI_LIB)
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.lib")
|
|
|
|
|
|
|
|
if(WITH_DAEMON_SUBMODULE)
|
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring
|
|
|
|
PATHS ${DAEMON_DIR}/src/.libs
|
2022-12-01 16:37:19 -05:00
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
2022-10-14 10:55:36 -04:00
|
|
|
NO_DEFAULT_PATH)
|
|
|
|
else()
|
|
|
|
# Search only in these given PATHS.
|
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring
|
|
|
|
PATHS ${LIBJAMI_BUILD_DIR}/.libs
|
|
|
|
PATHS ${RING_BUILD_DIR}/.libs
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
|
|
|
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
|
|
|
NO_DEFAULT_PATH)
|
|
|
|
|
|
|
|
# Search elsewhere as well (e.g. system-wide).
|
|
|
|
if(NOT LIBJAMI_LIB)
|
|
|
|
find_library(LIBJAMI_LIB NAMES jami ring)
|
|
|
|
endif()
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
|
2022-10-14 10:55:36 -04:00
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|
|
|
add_definitions(-fPIC)
|
|
|
|
endif()
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Restore the original value of CMAKE_FIND_LIBRARY_SUFFIXES.
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_orig})
|
|
|
|
|
2022-11-05 23:18:13 -04:00
|
|
|
message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIR})
|
misc: vendor libjamiclient into 'src/libclient/'
This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:
* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.
* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclient/smartinfohub.cpp:
* src/libclient/vcard.h:
* src/libclient/authority/storagehelper.cpp: Replace Qt's 'foreach'
with 'Q_FOREACH' and its 'emit' with 'Q_EMIT' because in the client-qt
code base we have '-DQT_NO_KEYWORDS' to avoid conflicts with other
libraries we use.
* cmake/FindLibJami.cmake: Import cmake/FindRing.cmake from the
jami-libclient.git repository. Then, rename RING_BUILD_DIR to
LIBJAMI_BUILD_DIR (though the old name is still supported for now).
Also update other references of Ring to Jami. Further, add additional
calls to 'find_library' to make sure specified local paths for libjami
are checked before system-wide ones (in case of older/obsolete libjami
being available system-wide, which might happen on GNU/Linux systems).
* translations/lrc_*.ts: Import translation files from the libclient
repository. The message location paths were corrected by running
"sed -i 's|../src|&/libclient|g' lrc_*.ts" in 'translations/'.
.tx/config: Add section for the newly-imported libclient translations.
* CMakeLists.txt: Reformat, plus various fixes and cleanups, such as
changing indentation to 2 spaces and wrapping lines at 70 characters,
renaming the parent directory of translations from 'ring' to 'jami',
and using all lowercase function calls. Also add copyright headers.
* src/app/appsettingsmanager.cpp:
(AppSettingsManager::loadTranslations):
* src/app/utilsadapter.cpp (UtilsAdapter::supportedLang): Update to
adapt to the renaming of the parent directory of translations from
'ring' to 'jami'.
GitLab: #748
Change-Id: I86e3b0fb30e554755023e7b858b6a0d132cd59ab
2022-05-06 16:00:16 -04:00
|
|
|
message(STATUS "Jami daemon library is at " ${LIBJAMI_LIB})
|