Skip to content

Commit

Permalink
CLI11: adding CLI11 to cmake
Browse files Browse the repository at this point in the history
added readme
ignore third-party in bareos-check-sources
  • Loading branch information
alaaeddineelamri committed Jul 11, 2022
1 parent 1652890 commit 837eca8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
1 change: 1 addition & 0 deletions .bareos-check-sources-ignore
Expand Up @@ -16,3 +16,4 @@ webui/public/css/*.min.*
webui/public/css/bootstrap*.css.map
systemtests/tests/bareos/expected/status-subscriptions.txt
systemtests/tests/bareos/expected/status-subscriptions-detail.txt
third-party/
3 changes: 2 additions & 1 deletion CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2019-2021 Bareos GmbH & Co. KG
# Copyright (C) 2019-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -116,6 +116,7 @@ if(NOT hostname)
endif()

if(BUILD_BAREOS_BINARIES)
add_subdirectory(third-party EXCLUDE_FROM_ALL)
add_subdirectory(core)
add_subdirectory(webui)
if(NOT client-only AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
Expand Down
22 changes: 22 additions & 0 deletions third-party/CMakeLists.txt
@@ -0,0 +1,22 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2022-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
# License as published by the Free Software Foundation and included
# in the file LICENSE.
#
# 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
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero 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.

message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

add_subdirectory(CLI11)
18 changes: 18 additions & 0 deletions third-party/README.md
@@ -0,0 +1,18 @@
# Bareos third party libraries

This is the "home" of external libraries that are used in Bareos

### Adding third party libraries

Each Library will be put into its own subdirectory with `git subtree` and will have its own CMake include-file (if it is not already made available by the provider of the library), that is then loaded in CMakeLists.txt

A typical git subtree command would look like this : `git subtree add --prefix destination/path https://www.yourgithost.com/your/repo yourbranch(usuallymaster) --squash`

Make sure the library license is covert by `core/LICENSE`. At best, the library is also licensed as AGPL-3. If it is not already covered, a section needs to be added for it in `core/LICENSE` and `debian/copyright.footer`. Also execute `cd debian; make copyright` to update `debian/copyright`.

### What to add?

External things that we rely on (but don't want to change) should live here. Things like `FMT` and `GSL` could be added here.
`lmdb` (and maybe the `md5` code) should be migrated here.

Things like `droplet`, `fastlz` and `ndmp` will stay as is, because there is no upstream and we made significant changes (i.e. we imported that code into our code-base instead of just using it).

0 comments on commit 837eca8

Please sign in to comment.