Skip to content

Commit

Permalink
cmake: move config.h to binary dir
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge authored and BareosBot committed Mar 12, 2024
1 parent 8a059a6 commit 207bfcf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -54,7 +54,6 @@ core/src/defaultconfigs/tray-monitor.d/client/FileDaemon-local.conf
core/src/defaultconfigs/tray-monitor.d/director/Director-local.conf
core/src/defaultconfigs/tray-monitor.d/monitor/bareos-mon.conf
core/src/defaultconfigs/tray-monitor.d/storage/StorageDaemon-local.conf
core/src/include/config.h
core/src/qt-tray-monitor/bareos-tray-monitor.desktop
core/src/tests/configs/bareos-configparser-tests/bareos-sd-CFG_TYPE_STR_VECTOR_OF_DIRS.conf
core/src/tests/configs/bareos-configparser-tests/bareos-sd.d/storage/bareos-sd.conf
Expand Down
6 changes: 5 additions & 1 deletion core/src/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2021 Bareos GmbH & Co. KG
# Copyright (C) 2017-2024 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 All @@ -18,6 +18,10 @@
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

include(BareosConfigureFile)
bareos_configure_file(FILES include/config.h.in)
include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_subdirectory(filed)

if(NOT client-only)
Expand Down
4 changes: 2 additions & 2 deletions core/src/include/bareos.h
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 Planets Communications B.V.
Copyright (C) 2013-2023 Bareos GmbH & Co. KG
Copyright (C) 2013-2024 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 @@ -71,7 +71,7 @@
#ifndef BAREOS_INCLUDE_BAREOS_H_
#define BAREOS_INCLUDE_BAREOS_H_

#include "config.h"
#include "include/config.h"

#if HAVE_AIX_OS
# define _LINUX_SOURCE_COMPAT 1
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2023 Bareos GmbH & Co. KG
# Copyright (C) 2017-2024 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 All @@ -21,6 +21,7 @@ message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")
# create include dirs needed when compiling python modules

set(pymod_include_dirs ${PROJECT_SOURCE_DIR}/src)
list(APPEND pymod_include_dirs ${PROJECT_BINARY_DIR}/src)

# FreeBSD
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
Expand Down

0 comments on commit 207bfcf

Please sign in to comment.