Skip to content

BUILD(shared): build CLI11 into shared target #6243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@
[submodule "3rdparty/spdlog"]
path = 3rdparty/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "3rdparty/CLI11"]
path = 3rdparty/CLI11
url = https://github.com/CLIUtils/CLI11.git
1 change: 1 addition & 0 deletions 3rdparty/CLI11
Submodule CLI11 added at 291c58
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ if(plugins AND client)
endif()

if(client OR server)
add_subdirectory(${3RDPARTY_DIR}/CLI11)
add_subdirectory(src)
endif()

Expand Down
1 change: 1 addition & 0 deletions scripts/generate_license_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
["licenseAppImageRuntime", "3rdPartyLicenses/appimage_runtime_license.txt", "AppImage Runtime", "http://www.appimage.org", "USE_BUILDENV"], # Linux only
Expand Down
7 changes: 4 additions & 3 deletions src/murmur/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else()
add_executable(mumble-server "main.cpp")
endif()

target_link_libraries(mumble-server mumble_server_object_lib)
target_link_libraries(mumble-server mumble_server_object_lib)

set_property(TARGET mumble-server PROPERTY INTERPROCEDURAL_OPTIMIZATION ${lto})
set_property(TARGET mumble_server_object_lib PROPERTY INTERPROCEDURAL_OPTIMIZATION ${lto})
Expand Down Expand Up @@ -91,6 +91,7 @@ target_include_directories(mumble_server_object_lib
)

target_link_libraries(mumble_server_object_lib PUBLIC shared Qt6::Sql)
target_link_libraries(mumble_server_object_lib PUBLIC shared CLI11::CLI11)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you only need to link mumble-server with CLI11 as we only need the lib for main.cpp


if(static)
# MariaDB and MySQL
Expand Down Expand Up @@ -139,8 +140,8 @@ if(WIN32)

find_pkg(Qt6 COMPONENTS Widgets REQUIRED)

target_link_libraries(mumble_server_object_lib
PUBLIC
target_link_libraries(mumble_server_object_lib
PUBLIC
Qt6::Widgets
dbghelp.lib
shlwapi.lib
Expand Down
Loading