Skip to content

Commit

Permalink
Merge branch '1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
lnjX committed Feb 3, 2024
2 parents 9455f8c + d62fec5 commit b6b095e
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Install extra packages
run: tests/travis/install-build-depends
run: tests/travis/install-build-depends-debian
- name: Update XEP metadata
run: doc/doap-rendering/update-xeplist.sh
- name: Build documentation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
version: ${{ matrix.qt_version }}
setup-python: true
- name: Install extra packages
run: tests/travis/install-build-depends
run: tests/travis/install-build-depends-debian
- name: Run tests
run: tests/travis/build-and-test
- uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
version: ${{ matrix.qt_version }}
setup-python: false
- name: Install extra packages
run: tests/travis/install-build-depends
run: tests/travis/install-build-depends-macos
- name: Disable OS X firewall
run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
Expand Down
40 changes: 20 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,6 @@ install(
COMPONENT Devel
)

# QXmpp package with Qt version autodetect
configure_package_config_file(
cmake/QXmppQtAutoConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
)

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
COMPONENT Devel
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/QXmppQtAutoConfigVersion.cmake
RENAME QXmppConfigVersion.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
COMPONENT Devel
)

# Generate QXmppQt5/6.pc
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qxmpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${QXMPP_TARGET}.pc @ONLY)
install(
Expand All @@ -140,8 +121,27 @@ install(
COMPONENT Devel
)

# "qxmpp.pc" for backwards-compatibility
if(QT_VERSION_MAJOR EQUAL 5)
# "QXmpp" cmake package for backwards-compatibility
configure_package_config_file(
cmake/QXmppLegacyConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
)

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/QXmppConfig.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
COMPONENT Devel
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/QXmppLegacyConfigVersion.cmake
RENAME QXmppConfigVersion.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/QXmpp"
COMPONENT Devel
)

# "qxmpp.pc" for backwards-compatibility
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qxmpp_legacy.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@

@PACKAGE_INIT@

# Detect Qt version
if(NOT DEFINED QT_VERSION_MAJOR)
if(TARGET Qt6::Core)
set(QT_VERSION_MAJOR 6)
elseif(TARGET Qt5::Core)
set(QT_VERSION_MAJOR 5)
else()
# default to Qt 6
set(QT_VERSION_MAJOR 6)
endif()
endif()

set(_QXmpp_FIND_PARTS_REQUIRED)
if(QXmpp_FIND_REQUIRED)
set(_QXmpp_FIND_PARTS_REQUIRED REQUIRED)
Expand All @@ -25,13 +13,13 @@ if(QXmpp_FIND_QUIETLY)
set(_QXmpp_FIND_PARTS_QUIET QUIET)
endif()

# Pass through arguments to QXmppQt5/6
# Pass through arguments to QXmppQt5
include(CMakeFindDependencyMacro)
find_package(QXmppQt${QT_VERSION_MAJOR}
find_package(QXmppQt5
${QXmpp_FIND_VERSION}
${_QXmpp_FIND_PARTS_REQUIRED}
${_QXmpp_FIND_PARTS_QUIET}
COMPONENTS ${QXmpp_FIND_COMPONENTS}
)

set(QXmpp_FOUND ${QXmppQt${QT_VERSION_MAJOR}_FOUND})
set(QXmpp_FOUND ${QXmppQt5_FOUND})
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# SPDX-License-Identifier: CC0-1.0

set(PACKAGE_VERSION "")
# Allow all requested versions here, the actual check is going to be done in QXmppQt5/6.
# Allow all requested versions here, the actual check is going to be done in QXmppQt5.
set(PACKAGE_VERSION_COMPATIBLE TRUE)

6 changes: 4 additions & 2 deletions tests/travis/build-and-test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ full*)
CMAKE_ARGS="-DBUILD_DOCUMENTATION:BOOL=True -DBUILD_EXAMPLES:BOOL=True -DWITH_GSTREAMER:BOOL=True"
case "$QT_VERSION" in
5.15* | 6*)
# Enable OMEMO
CMAKE_ARGS="$CMAKE_ARGS -DBUILD_OMEMO=ON"
if [ $HOST_SYSTEM = "Linux" ]; then
# Enable OMEMO
CMAKE_ARGS="$CMAKE_ARGS -DBUILD_OMEMO=ON"
fi
;;
esac
;;
Expand Down
68 changes: 0 additions & 68 deletions tests/travis/install-build-depends

This file was deleted.

46 changes: 46 additions & 0 deletions tests/travis/install-build-depends-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh

# SPDX-FileCopyrightText: 2014 Boris Pek <[email protected]>
# SPDX-FileCopyrightText: 2018 Jeremy Lainé <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

set -e

install_cmake() {
NAME=$1
URL=$2
OPTS=$3
CURRENT_DIR=$(pwd)

cd
git clone $URL $NAME
mkdir -p $NAME-build
cmake $NAME -B./$NAME-build/ -DCMAKE_BUILD_TYPE=Release $OPTS
cmake --build $NAME-build --parallel
sudo cmake --build $NAME-build --target install

cd $CURRENT_DIR
}

sudo apt-get update -qq
sudo apt-get install -qq clang cmake git

case "$CONFIG" in
full*)
sudo apt-get install -qq \
doxygen graphviz \
libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
libprotobuf-c-dev \
libssl-dev

# Enable OMEMO for Qt > 5.15 (including Qt 6)
# Build and install qca and libomemo-c
case "$QT_VERSION" in
5.15* | 6)
install_cmake libomemo-c https://github.com/dino/libomemo-c "-DBUILD_SHARED_LIBS=ON"
install_cmake qca https://invent.kde.org/libraries/qca "-DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF -DBUILD_WITH_QT6=OFF"
;;
esac
;;
esac
20 changes: 20 additions & 0 deletions tests/travis/install-build-depends-macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# SPDX-FileCopyrightText: 2014 Boris Pek <[email protected]>
# SPDX-FileCopyrightText: 2018 Jeremy Lainé <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

set -e

brew update
brew unlink python@3
brew install python@3 || true
brew link --overwrite python@3

case "$CONFIG" in
full*)
brew install doxygen \
gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly
;;
esac

0 comments on commit b6b095e

Please sign in to comment.