From f6e484020a5e3a8bdeb52e1d64dd90c51fd9e5fc Mon Sep 17 00:00:00 2001 From: Thomas Windt Date: Fri, 20 Oct 2023 17:17:19 +0200 Subject: [PATCH] BUILD(shared): build CLI11 into shared target --- .gitmodules | 3 +++ 3rdparty/CLI11 | 1 + CMakeLists.txt | 1 + scripts/generate_license_header.py | 1 + src/CMakeLists.txt | 2 ++ 5 files changed, 8 insertions(+) create mode 160000 3rdparty/CLI11 diff --git a/.gitmodules b/.gitmodules index c19da4099cd..2645b57093b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "3rdparty/SPSCQueue"] path = 3rdparty/SPSCQueue url = https://github.com/rigtorp/SPSCQueue.git +[submodule "3rdparty/CLI11"] + path = 3rdparty/CLI11 + url = https://github.com/CLIUtils/CLI11.git diff --git a/3rdparty/CLI11 b/3rdparty/CLI11 new file mode 160000 index 00000000000..998ef314535 --- /dev/null +++ b/3rdparty/CLI11 @@ -0,0 +1 @@ +Subproject commit 998ef314535df72b8511eb12a3f954d55d40bca7 diff --git a/CMakeLists.txt b/CMakeLists.txt index 877cfe023ae..00bf8c301b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,7 @@ set(CMAKE_UNITY_BUILD_BATCH_SIZE 40) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${lto}) if(client OR server) + add_subdirectory(${3RDPARTY_DIR}/CLI11) add_subdirectory(src) endif() diff --git a/scripts/generate_license_header.py b/scripts/generate_license_header.py index 0968a9ba86d..0ea9a61ea87 100755 --- a/scripts/generate_license_header.py +++ b/scripts/generate_license_header.py @@ -55,6 +55,7 @@ ["licensePCRE", "3rdPartyLicenses/pcre_license.txt", "PCRE", "http://www.pcre.org/", "USE_BUILDENV"], ["licenseQt", "3rdPartyLicenses/qt_license.txt", "Qt", "https://www.qt.io/", "USE_BUILDENV"], ["licenseSQLite3", "3rdPartyLicenses/sqlite3_license.txt", "SQLite3", "http://sqlite.org", "USE_BUILDENV"], + ["licenseCLI11", "3rdparty/CLI11/LICENSE", "CLI11", "https://github.com/CLIUtils/CLI11", "USE_BUILDENV"], ["licenseXar", "3rdPartyLicenses/xar_license.txt", "XAR", "https://opensource.apple.com/source/xar/", "USE_BUILDENV"], # macOS only ["licenseAvahi", "3rdPartyLicenses/avahi_license.txt", "Avahi", "https://www.avahi.org/", "USE_BUILDENV"], # Linux only ["licenseDBus", "3rdPartyLicenses/dbus_license.txt", "D-Bus", "https://www.freedesktop.org/wiki/Software/dbus", "USE_BUILDENV"], # Linux only diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bd281cc5a6..4e459d4c96c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -234,6 +234,8 @@ else() endif() endif() +target_link_libraries(shared PUBLIC CLI11::CLI11) + if(client) add_subdirectory(mumble)