diff --git a/.gitignore b/.gitignore index 469ed74b704..d9617dfa3b7 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ debian/bareos-filedaemon-python-plugin.install debian/bareos-filedaemon-python-plugins-common.install debian/bareos-filedaemon-python2-plugin.install debian/bareos-filedaemon-python3-plugin.install +debian/bareos-filedaemon-postgresql-python-plugin.install debian/bareos-filedaemon.bareos-fd.init debian/bareos-filedaemon.install debian/bareos-filedaemon.postinst diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff86da6ef6..ab287b4ae64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https: - storage daemon: class Device: rename dev_name to archive_device_string (as the value stored here is the value of the "Archive Device" directive) [PR #744] - Enable c++17 support [PR #741] - webui: Localization updated [PR #776] +- running cmake for the core-directory only is now forbidden [PR #767] ### Deprecated diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 97523c51dea..64fe4436385 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -21,6 +21,13 @@ message("Entering ${CMAKE_CURRENT_SOURCE_DIR}") cmake_minimum_required(VERSION 3.12) project(bareos C CXX) +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + message( + FATAL_ERROR + "Building from bareos/core/ is not supported anymore. Use bareos/ instead" + ) +endif() + if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif(POLICY CMP0054) diff --git a/core/cmake/BareosConfigureFile.cmake b/core/cmake/BareosConfigureFile.cmake index 39766f1b4fb..258f8cb0dcd 100644 --- a/core/cmake/BareosConfigureFile.cmake +++ b/core/cmake/BareosConfigureFile.cmake @@ -1,6 +1,6 @@ # BAREOSĀ® - Backup Archiving REcovery Open Sourced # -# Copyright (C) 2017-2020 Bareos GmbH & Co. KG +# Copyright (C) 2017-2021 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 @@ -21,16 +21,13 @@ # configure file all *.in files # -# if we're not the toplevel project, then we want to glob in core and debian -# subdirectories only -get_directory_property(have_parent PARENT_DIRECTORY) -if(have_parent) - file(GLOB_RECURSE IN_FILES "${CMAKE_SOURCE_DIR}/core/*.in" - "${CMAKE_SOURCE_DIR}/debian/*.in" - ) -else() - file(GLOB_RECURSE IN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.in") -endif() +file( + GLOB_RECURSE IN_FILES + "${CMAKE_SOURCE_DIR}/debian/*.in" + "${CMAKE_SOURCE_DIR}/core/src/*.in" + "${CMAKE_SOURCE_DIR}/core/scripts/*.in" + "${CMAKE_SOURCE_DIR}/core/platforms/*.in" +) foreach(in_file ${IN_FILES}) string(REGEX REPLACE ".in\$" "" file ${in_file})