Skip to content

Commit

Permalink
cmake: apply cmake-format to all CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Dec 9, 2019
1 parent 60b8d10 commit 472d2d6
Show file tree
Hide file tree
Showing 17 changed files with 356 additions and 276 deletions.
4 changes: 1 addition & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ set(BUILDNAME
CACHE STRING "site name variable for CDash"
)
set(SITE
"${CMAKE_SYSTEM_NAME}-${DISTVER}-${CMAKE_HOST_SYSTEM_PROCESSOR}"
"${CMAKE_SYSTEM_NAME}-${DISTVER}-${CMAKE_HOST_SYSTEM_PROCESSOR}"
CACHE STRING "build name variable for CDash"
)
# enable "make test"
Expand Down Expand Up @@ -337,7 +337,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
endif()
include(BareosFindStaticCodeAnalysisTools)


include(BareosGenerateDebianInfo)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(
Expand Down Expand Up @@ -585,7 +584,6 @@ message(STATUS "CMAKE_RANLIB: " ${CMAKE_RANLIB})

message(STATUS "CMAKE_INSTALL_PREFIX: " ${CMAKE_INSTALL_PREFIX})


if(HAVE_DYNAMIC_SD_BACKENDS)
set(UNCOMMENT_SD_BACKEND_DIRECTORY "")
else()
Expand Down
21 changes: 12 additions & 9 deletions core/platforms/debian/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ file(GLOB SQLFILES
)
foreach(SQLFILE ${SQLFILES})
get_filename_component(BASENAME ${SQLFILE} NAME)
string(
REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}
) # match the regex, we only are interested in submatch in parentheses
string(REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}) # match the regex, we
# only are interested
# in submatch in
# parentheses
set(VERSION ${CMAKE_MATCH_1})
install(
FILES ${SQLFILE}
Expand Down Expand Up @@ -128,9 +129,10 @@ file(GLOB SQLFILES
)
foreach(SQLFILE ${SQLFILES})
get_filename_component(BASENAME ${SQLFILE} NAME)
string(
REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}
) # match the regex, we only are interested in submatch in parentheses
string(REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}) # match the regex, we
# only are interested
# in submatch in
# parentheses
set(VERSION ${CMAKE_MATCH_1})

file(STRINGS ${SQLFILE} SQLFILE_LINE)
Expand Down Expand Up @@ -177,9 +179,10 @@ file(GLOB SQLFILES
)
foreach(SQLFILE ${SQLFILES})
get_filename_component(BASENAME ${SQLFILE} NAME)
string(
REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}
) # match the regex, we only are interested in submatch in parentheses
string(REGEX MATCH "[0-9]*_([0-9]*)" DUMMMY ${SQLFILE}) # match the regex, we
# only are interested
# in submatch in
# parentheses
set(VERSION ${CMAKE_MATCH_1})
install(
FILES ${SQLFILE}
Expand Down
5 changes: 3 additions & 2 deletions core/platforms/univention/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ install(
install(
# This file contains the Bareos repository signature public.
# During the automatic build process, It will be added.
# For manual builds, download the file from
# http://download.bareos.org/bareos/release/<RELEASE>/<DISTRIBUTION>/Release.key
# For manual builds, download the file from
# http://download.bareos.org/bareos/release/<RELEASE>/<DISTRIBUTION>/Release.k
# ey
FILES "bareos-release.key"
DESTINATION "${confdir}"
)
Expand Down
2 changes: 1 addition & 1 deletion core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if(GTEST_FOUND)
add_subdirectory(tests)
endif()

add_subdirectory(console)
add_subdirectory(console)
if(${HAVE_LMDB})
add_subdirectory(lmdb)
endif()
Expand Down
10 changes: 6 additions & 4 deletions core/src/cats/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ set(POSTGRESQL_SRCS postgresql.cc ${LIBBAREOSCATS_SRCS})
add_library(bareossql SHARED ${LIBBAREOSSQL_SRCS})

set_target_properties(
bareossql PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareossql
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
)
target_link_libraries(bareossql bareoscats bareos)

Expand All @@ -60,8 +61,9 @@ list(LENGTH db_backends nr_db_backends)
add_library(bareoscats SHARED ${LIBBAREOSCATS_SRCS})
target_link_libraries(bareoscats bareos)
set_target_properties(
bareoscats PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION} SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareoscats
PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION} SOVERSION
"${BAREOS_VERSION_MAJOR}"
)
install(TARGETS bareoscats DESTINATION ${libdir})

Expand Down
12 changes: 10 additions & 2 deletions core/src/console/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ endif()

target_link_libraries(bconsole ${CONSOLE_LINK_LIBRARIES})

install(TARGETS bconsole DESTINATION "${bindir}" COMPONENT bconsole)
install(TARGETS bconsole DESTINATION "${sbindir}" COMPONENT bconsole)
install(
TARGETS bconsole
DESTINATION "${bindir}"
COMPONENT bconsole
)
install(
TARGETS bconsole
DESTINATION "${sbindir}"
COMPONENT bconsole
)
install(
FILES bconsole.conf
DESTINATION "${configtemplatedir}"
Expand Down
5 changes: 3 additions & 2 deletions core/src/fastlz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ target_include_directories(
target_compile_definitions(bareosfastlz PRIVATE "-DDLL_EXPORT")
install(TARGETS bareosfastlz DESTINATION ${libdir})
set_target_properties(
bareosfastlz PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareosfastlz
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
)
6 changes: 5 additions & 1 deletion core/src/filed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
)
endif()

install(TARGETS bareos-fd DESTINATION "${sbindir}" COMPONENT filedaemon)
install(
TARGETS bareos-fd
DESTINATION "${sbindir}"
COMPONENT filedaemon
)

install(CODE "set(PLUGINS \"${PLUGINS}\")" COMPONENT filedaemon)
install(CODE "set(BACKENDS \"${BACKENDS}\")" COMPONENT filedaemon)
Expand Down
12 changes: 9 additions & 3 deletions core/src/findlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ add_library(bareosfind SHARED ${BAREOSFIND_SRCS})

target_link_libraries(bareosfind bareos ${ACL_LIBS})

install(TARGETS bareosfind DESTINATION ${libdir} COMPONENT filedaemon)
install(
TARGETS bareosfind
DESTINATION ${libdir}
COMPONENT filedaemon
)

set_target_properties(
bareosfind PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}" DEFINE_SYMBOL "BUILDING_DLL"
bareosfind
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}"
SOVERSION "${BAREOS_VERSION_MAJOR}"
DEFINE_SYMBOL "BUILDING_DLL"
)
if(HAVE_WIN32)
set_target_properties(bareosfind PROPERTIES DEFINE_SYMBOL "BUILDING_DLL")
Expand Down
5 changes: 3 additions & 2 deletions core/src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ target_link_libraries(
install(TARGETS bareos DESTINATION ${libdir})

set_target_properties(
bareos PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareos
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
)

if(HAVE_WIN32)
Expand Down
5 changes: 3 additions & 2 deletions core/src/lmdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ add_library(bareoslmdb SHARED mdb.c midl.c)
set_property(TARGET bareoslmdb PROPERTY INCLUDE_DIRECTORIES "")

set_target_properties(
bareoslmdb PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareoslmdb
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
)
if(HAVE_WIN32)
set_target_properties(bareoslmdb PROPERTIES DEFINE_SYMBOL "BUILDING_DLL")
Expand Down
5 changes: 3 additions & 2 deletions core/src/ndmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ target_link_libraries(bareosndmp ${WRAP_LIBS} ${TIRPC_LIBRARIES})
install(TARGETS bareosndmp DESTINATION ${libdir})

set_target_properties(
bareosndmp PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareosndmp
PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
)
if(build_ndmjob)
add_executable(ndmjob ${NDMJOB_SRCS})
Expand Down
42 changes: 35 additions & 7 deletions core/src/plugins/filed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ include_directories(${OPENSSL_INCLUDE_DIR})

add_library(bpipe-fd MODULE bpipe-fd.cc)
set_target_properties(bpipe-fd PROPERTIES PREFIX "")
install(TARGETS bpipe-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS bpipe-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
if(HAVE_WIN32 OR HAVE_DARWIN_OS)
target_link_libraries(bpipe-fd bareos)
endif()
Expand All @@ -58,20 +62,32 @@ if(HAVE_WIN32)
mssqlvdi-fd PROPERTIES PREFIX "" DEFINE_SYMBOL "BUILDING_DLL"
)

install(TARGETS mssqlvdi-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS mssqlvdi-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
target_link_libraries(mssqlvdi-fd bareos)
endif()

if(${HAVE_CEPHFS})
add_library(cephfs-fd MODULE cephfs-fd.cc)
set_target_properties(cephfs-fd PROPERTIES PREFIX "")
install(TARGETS cephfs-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS cephfs-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
endif()

if(${HAVE_CEPH_RADOS})
add_library(rados-fd MODULE rados-fd.cc)
set_target_properties(rados-fd PROPERTIES PREFIX "")
install(TARGETS rados-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS rados-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
endif()

if(NOT HAVE_WIN32)
Expand All @@ -82,22 +98,34 @@ endif()
if(HAVE_PYTHON)
add_library(python-fd MODULE python-fd.cc)
set_target_properties(python-fd PROPERTIES PREFIX "")
install(TARGETS python-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS python-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
target_link_libraries(python-fd ${PYTHON_LIBRARIES} bareos)
endif()

if(${HAVE_GLUSTERFS})
add_library(gfapi-fd MODULE gfapi-fd.cc)
set_target_properties(gfapi-fd PROPERTIES PREFIX "")
install(TARGETS gfapi-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS gfapi-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
target_link_libraries(gfapi-fd gfapi)
endif()

if(${HAVE_TEST_PLUGIN})
add_library(test-plugin-fd MODULE test-plugin-fd.cc)
# do not prefix with "lib"
set_target_properties(test-plugin-fd PROPERTIES PREFIX "")
install(TARGETS test-plugin-fd DESTINATION ${plugindir} COMPONENT filedaemon)
install(
TARGETS test-plugin-fd
DESTINATION ${plugindir}
COMPONENT filedaemon
)
endif()

set(PYFILES
Expand Down
4 changes: 2 additions & 2 deletions core/src/stored/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ target_link_libraries(bcopy bareossd bareos)

install(TARGETS bareossd DESTINATION ${libdir})

install(TARGETS bareos-sd bls bextract bscan btape bcopy DESTINATION
"${sbindir}"
install(TARGETS bareos-sd bls bextract bscan btape bcopy
DESTINATION "${sbindir}"
)

install(CODE "set(PLUGINS \"${PLUGINS}\")")
Expand Down

0 comments on commit 472d2d6

Please sign in to comment.