feat: drop cli11
This commit is contained in:
committed by
Chris Rizzitello
parent
4a5f173422
commit
06263ceaad
16
.github/actions/install-dependencies/action.yml
vendored
16
.github/actions/install-dependencies/action.yml
vendored
@ -38,25 +38,21 @@ runs:
|
||||
xorg-dev libx11-dev libxtst-dev libssl-dev \
|
||||
libglib2.0-dev libxkbfile-dev qt6-base-dev qt6-tools-dev \
|
||||
libgtk-3-dev libgtest-dev libgmock-dev \
|
||||
libei-dev libportal-dev libcli11-dev \
|
||||
help2man -y >/dev/null
|
||||
libei-dev libportal-dev help2man -y >/dev/null
|
||||
elif [ ${{inputs.like}} == "fedora" ]; then
|
||||
dnf install -y cmake make ninja-build gcc-c++ \
|
||||
rpm-build openssl-devel glib2-devel \
|
||||
libXtst-devel libxkbfile-devel qt6-qtbase-devel qt6-qttools-devel \
|
||||
gtk3-devel gtest-devel gmock-devel \
|
||||
libei-devel libportal-devel cli11-devel help2man
|
||||
dnf install -y cmake make ninja-build gcc-c++ rpm-build openssl-devel \
|
||||
glib2-devel libXtst-devel libxkbfile-devel qt6-qtbase-devel qt6-qttools-devel \
|
||||
gtk3-devel gtest-devel gmock-devel libei-devel libportal-devel help2man
|
||||
elif [ ${{inputs.like}} == "suse" ]; then
|
||||
zypper refresh
|
||||
zypper install -y --force-resolution \
|
||||
cmake make ninja gcc-c++ rpm-build libopenssl-devel \
|
||||
glib2-devel libXtst-devel libxkbfile-devel qt6-base-devel qt6-tools-devel gtk3-devel \
|
||||
googletest-devel googlemock-devel libei-devel \
|
||||
libportal-devel cli11-devel help2man
|
||||
googletest-devel googlemock-devel libei-devel libportal-devel help2man
|
||||
elif [ ${{ inputs.like }} == "arch" ]; then
|
||||
pacman -Syu --noconfirm base-devel cmake ninja \
|
||||
gcc openssl glib2 libxtst libxkbfile gtest libei libportal \
|
||||
qt6-base qt6-tools qt6-svg gtk3 cli11 help2man doxygen graphviz rsync
|
||||
qt6-base qt6-tools qt6-svg gtk3 help2man doxygen graphviz rsync
|
||||
else
|
||||
echo "Unknown like"
|
||||
fi
|
||||
|
||||
@ -62,15 +62,6 @@ modules:
|
||||
commit: 8f5dc8d192f6e31dafe69e35219e3b707bde71ce
|
||||
- type: patch
|
||||
path: libportal-qt69.patch
|
||||
- name: cli11
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCLI11_BUILD_TESTS=OFF
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/CLIUtils/CLI11
|
||||
tag: v2.5.0
|
||||
commit: 4160d259d961cd393fd8d67590a8c7d210207348
|
||||
- name: gtest
|
||||
buildsystem: cmake-ninja
|
||||
sources:
|
||||
|
||||
@ -7,7 +7,6 @@ To build Deskflow you will a minimum of:
|
||||
- [libportal] 0.8+ (linux, bsd)
|
||||
- [libei] 1.3+ (linux, bsd)
|
||||
- [google_test] ^
|
||||
- [cli11] ^
|
||||
|
||||
> ^ Will be fetched if not found on the host system.
|
||||
|
||||
@ -75,6 +74,5 @@ After configuring you should be able to run make to build all targets.
|
||||
[cmake]:https://cmake.org/
|
||||
[openssl]:https://www.openssl.org/
|
||||
[google_test]:https://github.com/google/googletest
|
||||
[cli11]:https://github.com/CLIUtils/CLI11
|
||||
[libei]:https://gitlab.freedesktop.org/libinput/libei
|
||||
[libportal]:https://github.com/flatpak/libportal
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
#include "platform/XDGPortalRegistry.h"
|
||||
#endif
|
||||
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
using namespace deskflow;
|
||||
|
||||
App *App::s_instance = nullptr;
|
||||
@ -142,18 +140,6 @@ void App::loggingFilterWarning() const
|
||||
|
||||
void App::initApp(int argc, const char **argv)
|
||||
{
|
||||
CLI::App cliApp{kAppDescription};
|
||||
|
||||
// Allow legacy args.
|
||||
cliApp.allow_extras();
|
||||
|
||||
// Having the help argument crashes without try / catch around it
|
||||
try {
|
||||
cliApp.parse(argc, argv);
|
||||
} catch (const CLI::Error &e) {
|
||||
cliApp.exit(e);
|
||||
}
|
||||
|
||||
parseArgs();
|
||||
|
||||
// set log filter
|
||||
|
||||
@ -1,27 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2012 - 2025 Symless Ltd
|
||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
find_package(CLI11 QUIET)
|
||||
if(CLI11_FOUND)
|
||||
message(STATUS "CLI11 [System] Version: ${CLI11_VERSION}")
|
||||
set(cli11_lib CLI11::CLI11)
|
||||
else()
|
||||
#Be sure to update the version and MD5 together
|
||||
set(CLI11_VERSION 2.5.0)
|
||||
set(CLI11_MD5 0d3d6898febe3b82fc47b3d608b1ae95)
|
||||
file(
|
||||
DOWNLOAD "https://github.com/CLIUtils/CLI11/releases/download/v${CLI11_VERSION}/CLI11.hpp"
|
||||
"${CMAKE_BINARY_DIR}/include/CLI/CLI.hpp"
|
||||
EXPECTED_MD5 ${CLI11_MD5}
|
||||
)
|
||||
set(cli11_inc_dir "${CMAKE_BINARY_DIR}/include")
|
||||
message(STATUS "CLI11 [Downloaded] Version: ${CLI11_VERSION}")
|
||||
message(STATUS "CLI11 INC_DIR: ${cli11_inc_dir}")
|
||||
endif()
|
||||
|
||||
####################Start Making Library#########################
|
||||
set(lib_name app)
|
||||
|
||||
# arch
|
||||
@ -109,16 +90,6 @@ add_library(${lib_name} STATIC ${PLATFORM_CODE}
|
||||
|
||||
target_link_libraries(${lib_name} PUBLIC common Qt6::Core Qt6::Network)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${lib_name} PRIVATE ${cli11_lib})
|
||||
endif()
|
||||
|
||||
target_include_directories(
|
||||
${lib_name}
|
||||
PRIVATE
|
||||
${cli11_inc_dir}
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(
|
||||
${lib_name}
|
||||
@ -130,7 +101,6 @@ if(UNIX)
|
||||
platform
|
||||
mt
|
||||
server
|
||||
${cli11_lib}
|
||||
)
|
||||
|
||||
if(NOT APPLE)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(WIN32)
|
||||
set(extra_libs version ${cli11_lib} ${tomlPP_lib} app mt net)
|
||||
set(extra_libs version app mt net)
|
||||
endif()
|
||||
|
||||
create_test(
|
||||
|
||||
Reference in New Issue
Block a user