2018-08-21 00:25:44 +02:00
|
|
|
## CMakeLists.txt
|
2023-09-25 10:52:55 +02:00
|
|
|
#
|
2023-08-31 17:35:12 +02:00
|
|
|
# Author: Steffen Vogel <post@steffenvogel.de>
|
2023-08-31 11:17:07 +02:00
|
|
|
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-08-21 00:25:44 +02:00
|
|
|
|
2018-08-23 16:02:02 +02:00
|
|
|
include(FindPkgConfig)
|
|
|
|
include(FeatureSummary)
|
2019-01-07 14:46:40 +01:00
|
|
|
include(GNUInstallDirs)
|
2018-08-23 16:02:02 +02:00
|
|
|
|
2018-08-22 11:29:39 +02:00
|
|
|
# Check packages
|
|
|
|
find_package(OpenSSL 1.0.0 REQUIRED)
|
|
|
|
find_package(CURL 7.29 REQUIRED)
|
2022-01-07 16:02:21 +01:00
|
|
|
find_package(spdlog 1.6.0 REQUIRED)
|
2023-09-25 10:52:55 +02:00
|
|
|
find_package(fmt 6.0.0 REQUIRED)
|
2018-08-22 11:29:39 +02:00
|
|
|
find_package(Criterion)
|
2018-10-21 22:18:49 +01:00
|
|
|
|
2018-08-23 16:02:02 +02:00
|
|
|
pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7)
|
2018-08-23 16:03:34 +02:00
|
|
|
pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9)
|
2020-08-25 20:08:29 +02:00
|
|
|
pkg_check_modules(UUID IMPORTED_TARGET REQUIRED uuid>=2.23)
|
2018-08-21 00:25:44 +02:00
|
|
|
|
2023-09-25 10:52:55 +02:00
|
|
|
if(fmt_VERSION VERSION_LESS "9.0.0")
|
|
|
|
message("Using legacy ostream formatting")
|
|
|
|
set(FMT_LEGACY_OSTREAM_FORMATTER 1)
|
|
|
|
endif()
|
|
|
|
|
2018-08-21 00:25:44 +02:00
|
|
|
add_subdirectory(lib)
|
2024-02-29 18:35:52 +01:00
|
|
|
if(WITH_TESTS)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
2018-08-22 11:30:52 +02:00
|
|
|
|
2023-04-03 09:42:32 +00:00
|
|
|
# Disable any colored log output
|
|
|
|
option(LOG_COLOR_DISABLE "Disable any colored log output" OFF)
|
|
|
|
|
2018-08-22 11:30:52 +02:00
|
|
|
configure_file(
|
2021-08-11 12:40:19 -04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/config.hpp.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/include/villas/config.hpp
|
2018-08-22 11:30:52 +02:00
|
|
|
)
|